Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r7c0fcd5 r01f457a  
    153153  }
    154154*/
     155
     156  // read min E value for towers to be saved
     157  fEcalEnergyMin = GetDouble("EcalTowerMinEnergy", 0.0);
     158  fHcalEnergyMin = GetDouble("HcalTowerMinEnergy", 0.0);
     159 
     160  fEcalSigmaMin  = GetDouble("EcalTowerMinSignificance", 0.0);
     161  fHcalSigmaMin  = GetDouble("HcalTowerMinSignificance", 0.0);
     162
     163 
    155164  // read resolution formulas
    156165  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    432441
    433442  if(!fTower) return;
     443//  cout<<"----------------------"<<endl;
     444//  cout<<"Finalize Tower"<<endl;
     445//  cout<<""<<endl;
     446
    434447
    435448  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    448461  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    449462  hcalTime = (fTowerHCalWeightTime < 1.0E-09 ) ? 0 : fTowerHCalTime/fTowerHCalWeightTime;
     463
     464 
     465  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy);
     466  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy);
     467
     468  ecalEnergy = (ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*ecalSigma) ? 0 : ecalEnergy;
     469  hcalEnergy = (hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*hcalSigma) ? 0 : hcalEnergy;
    450470
    451471  energy = ecalEnergy + hcalEnergy;
     
    471491  fTower->Edges[3] = fTowerEdges[3];
    472492
    473 
    474   // fill calorimeter towers
    475   if(energy > 0.0)
     493  if( energy > 0.0 )
    476494  {
    477495    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    493511
    494512  ecalEnergy -= fTrackECalEnergy;
    495   if(ecalEnergy < 0.0) ecalEnergy = 0.0;
     513  if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
    496514
    497515  hcalEnergy -= fTrackHCalEnergy;
    498   if(hcalEnergy < 0.0) hcalEnergy = 0.0;
     516  if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
    499517
    500518  energy = ecalEnergy + hcalEnergy;
    501519
    502  
    503   // save ECAL and/or HCAL energy excess as an energy flow tower
    504520  if(ecalEnergy > 0.0)
    505521  {
     
    515531    fEFlowPhotonOutputArray->Add(tower);
    516532  }
    517 
    518533  if(hcalEnergy > 0.0)
    519534  {
Note: See TracChangeset for help on using the changeset viewer.