Fork me on GitHub

Changeset 298734e in git


Ignore:
Timestamp:
Aug 26, 2016, 11:51:11 AM (8 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
5076b1b, bba5aca
Parents:
4827699
Message:

add better definition for Etrk estimate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/Calorimeter.cc

    r4827699 r298734e  
    212212  Double_t ecalFraction, hcalFraction;
    213213  Double_t ecalEnergy, hcalEnergy;
     214  Double_t ecalSigma, hcalSigma;
     215  Double_t energyGuess;
    214216  Int_t pdgCode;
    215217
     
    398400      {
    399401        fECalTrackEnergy += ecalEnergy;
    400         fECalTrackSigma += (track->TrackResolution)*momentum.E()*(track->TrackResolution)*momentum.E();
     402        ecalSigma = fECalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E());       
     403        if(ecalSigma/momentum.E() < track->TrackResolution) energyGuess = ecalEnergy;       
     404        else energyGuess = momentum.E();
     405
     406        fECalTrackSigma += (track->TrackResolution)*energyGuess*(track->TrackResolution)*energyGuess;
    401407        fECalTowerTrackArray->Add(track);
    402408      }
     
    405411      {
    406412        fHCalTrackEnergy += hcalEnergy;
    407         fHCalTrackSigma += (track->TrackResolution)*momentum.E()*(track->TrackResolution)*momentum.E();
     413        hcalSigma = fHCalResolutionFormula->Eval(0.0, fTowerEta, 0.0, momentum.E());
     414        if(hcalSigma/momentum.E() < track->TrackResolution) energyGuess = hcalEnergy;
     415        else energyGuess = momentum.E();
     416
     417        fHCalTrackSigma += (track->TrackResolution)*energyGuess*(track->TrackResolution)*energyGuess;
    408418        fHCalTowerTrackArray->Add(track);
    409419      }
Note: See TracChangeset for help on using the changeset viewer.