Fork me on GitHub

Changeset bdd52a7 in git for modules/Calorimeter.cc


Ignore:
Timestamp:
Sep 4, 2013, 8:26:45 AM (11 years ago)
Author:
pavel <pavel@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
852bc18
Parents:
2d28bda
Message:

compare energy excess to sigma

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r2d28bda rbdd52a7  
    382382  Double_t energy, pt, eta, phi;
    383383  Double_t ecalEnergy, hcalEnergy;
     384  Double_t ecalSigma, hcalSigma;
    384385
    385386  if(!fTower) return;
    386387
    387 //  ecalEnergy = gRandom->Gaus(fTowerECalEnergy, fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy));
     388  ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy);
     389
     390//  ecalEnergy = gRandom->Gaus(fTowerECalEnergy, ecalSigma);
    388391//  if(ecalEnergy < 0.0) ecalEnergy = 0.0;
    389392
    390   ecalEnergy = LogNormal(fTowerECalEnergy, fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerECalEnergy));
    391 
    392 //  hcalEnergy = gRandom->Gaus(fTowerHCalEnergy, fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy));
     393  ecalEnergy = LogNormal(fTowerECalEnergy, ecalSigma);
     394
     395  hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy);
     396
     397//  hcalEnergy = gRandom->Gaus(fTowerHCalEnergy, hcalSigma);
    393398//  if(hcalEnergy < 0.0) hcalEnergy = 0.0;
    394399
    395   hcalEnergy = LogNormal(fTowerHCalEnergy, fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, fTowerHCalEnergy));
     400  hcalEnergy = LogNormal(fTowerHCalEnergy, hcalSigma);
    396401
    397402  energy = ecalEnergy + hcalEnergy;
     
    436441
    437442  ecalEnergy -= fTrackECalEnergy;
    438   if(ecalEnergy < 0.0) ecalEnergy = 0.0;
     443  if(ecalEnergy < 0.0 || ecalEnergy < ecalSigma) ecalEnergy = 0.0;
    439444
    440445  hcalEnergy -= fTrackHCalEnergy;
    441   if(hcalEnergy < 0.0) hcalEnergy = 0.0;
     446  if(hcalEnergy < 0.0 || hcalEnergy < hcalSigma) hcalEnergy = 0.0;
    442447
    443448  energy = ecalEnergy + hcalEnergy;
Note: See TracChangeset for help on using the changeset viewer.