Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r01f457a r7c0fcd5  
    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  
    164155  // read resolution formulas
    165156  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    441432
    442433  if(!fTower) return;
    443 //  cout<<"----------------------"<<endl;
    444 //  cout<<"Finalize Tower"<<endl;
    445 //  cout<<""<<endl;
    446 
    447434
    448435  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    461448  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    462449  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;
    470450
    471451  energy = ecalEnergy + hcalEnergy;
     
    491471  fTower->Edges[3] = fTowerEdges[3];
    492472
    493   if( energy > 0.0 )
     473
     474  // fill calorimeter towers
     475  if(energy > 0.0)
    494476  {
    495477    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    511493
    512494  ecalEnergy -= fTrackECalEnergy;
    513   if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
     495  if(ecalEnergy < 0.0) ecalEnergy = 0.0;
    514496
    515497  hcalEnergy -= fTrackHCalEnergy;
    516   if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
     498  if(hcalEnergy < 0.0) hcalEnergy = 0.0;
    517499
    518500  energy = ecalEnergy + hcalEnergy;
    519501
     502 
     503  // save ECAL and/or HCAL energy excess as an energy flow tower
    520504  if(ecalEnergy > 0.0)
    521505  {
     
    531515    fEFlowPhotonOutputArray->Add(tower);
    532516  }
     517
    533518  if(hcalEnergy > 0.0)
    534519  {
Note: See TracChangeset for help on using the changeset viewer.