Changes in / [629e819:b3bd4d2] in git
- Location:
- modules
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/MomentumSmearing.cc
r629e819 rb3bd4d2 109 109 110 110 // apply smearing formula 111 pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 111 //pt = gRandom->Gaus(pt, fFormula->Eval(pt, eta, phi, e) * pt); 112 pt = LogNormal(pt, fFormula->Eval(pt, eta, phi, e) * pt ); 112 113 113 if(pt <= 0.0) continue;114 //if(pt <= 0.0) continue; 114 115 115 116 mother = candidate; … … 124 125 } 125 126 } 127 //---------------------------------------------------------------- 128 129 Double_t MomentumSmearing::LogNormal(Double_t mean, Double_t sigma) 130 { 131 Double_t a, b; 132 133 if(mean > 0.0) 134 { 135 b = TMath::Sqrt(TMath::Log((1.0 + (sigma*sigma)/(mean*mean)))); 136 a = TMath::Log(mean) - 0.5*b*b; 137 138 return TMath::Exp(a + b*gRandom->Gaus(0.0, 1.0)); 139 } 140 else 141 { 142 return 0.0; 143 } 144 } 145 126 146 127 147 //------------------------------------------------------------------------------ -
modules/MomentumSmearing.h
r629e819 rb3bd4d2 47 47 private: 48 48 49 Double_t LogNormal(Double_t mean, Double_t sigma); 50 49 51 DelphesFormula *fFormula; //! 50 52
Note:
See TracChangeset
for help on using the changeset viewer.