Fork me on GitHub

Changeset 4b9a2dc in git for modules/Calorimeter.cc


Ignore:
Timestamp:
Sep 24, 2014, 10:08:15 AM (10 years ago)
Author:
Michele <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
1c8d9db
Parents:
fcc959c
Message:

added EnergyMin and SigmaMin parameters

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    rfcc959c r4b9a2dc  
    135135  }
    136136*/
     137
     138  // read min E value for towers to be saved
     139  fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0);
     140  fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0);
     141 
     142  fEcalSigmaMin  = GetDouble("EcalTowerMinSignificance", 0.0);
     143  fHcalSigmaMin  = GetDouble("HcalTowerMinSignificance", 0.0);
     144
     145 
    137146  // read resolution formulas
    138147  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    414423
    415424  if(!fTower) return;
     425//  cout<<"----------------------"<<endl;
     426//  cout<<"Finalize Tower"<<endl;
     427//  cout<<""<<endl;
     428
    416429
    417430  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    430443  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    431444  hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime;
     445
     446 
     447  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
     448  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     449
     450  ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
     451  hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
    432452
    433453  energy = ecalEnergy + hcalEnergy;
     
    453473  fTower->Edges[3] = fTowerEdges[3];
    454474
    455 
    456   // fill calorimeter towers
    457   if(energy > 0.0)
     475  if( energy > 0.0 )
    458476  {
    459477    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    475493
    476494  ecalEnergy -= fTrackECalEnergy;
    477   if(ecalEnergy < 0.0) ecalEnergy = 0.0;
     495  if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
    478496
    479497  hcalEnergy -= fTrackHCalEnergy;
    480   if(hcalEnergy < 0.0) hcalEnergy = 0.0;
     498  if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
    481499
    482500  energy = ecalEnergy + hcalEnergy;
    483501
    484  
    485   // save ECAL and/or HCAL energy excess as an energy flow tower
    486502  if(ecalEnergy > 0.0)
    487503  {
     
    497513    fEFlowPhotonOutputArray->Add(tower);
    498514  }
    499 
    500515  if(hcalEnergy > 0.0)
    501516  {
Note: See TracChangeset for help on using the changeset viewer.