Fork me on GitHub

Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/SimpleCalorimeter.cc

    r7c0fcd5 r01f457a  
    147147  }
    148148*/
     149
     150  // read min E value for towers to be saved
     151  fEnergyMin = GetDouble("TowerMinEnergy", 0.0);
     152  fSigmaMin  = GetDouble("TowerMinSignificance", 0.0);
     153 
    149154  // read resolution formulas
    150155  fResolutionFormula->Compile(GetString("ResolutionFormula", "0"));
     
    402407  time = (fTowerWeightTime < 1.0E-09 ) ? 0 : fTowerTime/fTowerWeightTime;
    403408
     409  sigma = fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy);
     410 
     411  energy = (energy < fEnergyMin || energy < fSigmaMin*sigma) ? 0 : energy;
     412 
    404413  eta = gRandom->Uniform(fTowerEdges[0], fTowerEdges[1]);
    405414  phi = gRandom->Uniform(fTowerEdges[2], fTowerEdges[3]);
     
    423432  // fill energy flow candidates
    424433  energy -= fTrackEnergy;
    425   if(energy < 0.0) energy = 0.0;
     434  if(energy < fEnergyMin || energy < fSigmaMin*fResolutionFormula->Eval(0.0, fTowerEta, 0.0, energy)) energy = 0.0;
    426435   
    427436  // save energy excess as an energy flow tower
Note: See TracChangeset for help on using the changeset viewer.