Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r01f457a r82575a3  
    1 /*
    2  *  Delphes: a framework for fast simulation of a generic collider experiment
    3  *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
    5  *  This program is free software: you can redistribute it and/or modify
    6  *  it under the terms of the GNU General Public License as published by
    7  *  the Free Software Foundation, either version 3 of the License, or
    8  *  (at your option) any later version.
    9  * 
    10  *  This program is distributed in the hope that it will be useful,
    11  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    12  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    13  *  GNU General Public License for more details.
    14  * 
    15  *  You should have received a copy of the GNU General Public License
    16  *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
    17  */
    18 
    191
    202/** \class Calorimeter
     
    153135  }
    154136*/
    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  
    164137  // read resolution formulas
    165138  fECalResolutionFormula->Compile(GetString("ECalResolutionFormula", "0"));
     
    441414
    442415  if(!fTower) return;
    443 //  cout<<"----------------------"<<endl;
    444 //  cout<<"Finalize Tower"<<endl;
    445 //  cout<<""<<endl;
    446 
    447416
    448417  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     
    461430  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    462431  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;
    470432
    471433  energy = ecalEnergy + hcalEnergy;
     
    491453  fTower->Edges[3] = fTowerEdges[3];
    492454
    493   if( energy > 0.0 )
     455
     456  // fill calorimeter towers
     457  if(energy > 0.0)
    494458  {
    495459    if(fTowerPhotonHits > 0 && fTowerTrackHits == 0)
     
    511475
    512476  ecalEnergy -= fTrackECalEnergy;
    513   if(ecalEnergy < fEcalEnergyMin || ecalEnergy < fEcalSigmaMin*fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, ecalEnergy)) ecalEnergy = 0.0;
     477  if(ecalEnergy < 0.0) ecalEnergy = 0.0;
    514478
    515479  hcalEnergy -= fTrackHCalEnergy;
    516   if(hcalEnergy < fHcalEnergyMin || hcalEnergy < fHcalSigmaMin*fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, hcalEnergy)) hcalEnergy = 0.0;
     480  if(hcalEnergy < 0.0) hcalEnergy = 0.0;
    517481
    518482  energy = ecalEnergy + hcalEnergy;
    519483
     484 
     485  // save ECAL and/or HCAL energy excess as an energy flow tower
    520486  if(ecalEnergy > 0.0)
    521487  {
     
    531497    fEFlowPhotonOutputArray->Add(tower);
    532498  }
     499
    533500  if(hcalEnergy > 0.0)
    534501  {
Note: See TracChangeset for help on using the changeset viewer.