Fork me on GitHub

Changeset b3bd4d2 in git


Ignore:
Timestamp:
Aug 25, 2016, 4:30:15 PM (8 years ago)
Author:
Alexandre Mertens <alexandre.mertens@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
eceb415
Parents:
629e819 (diff), bc58cf5 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'dev_01' of https://github.com/delphes/delphes into ValidationWorkWithPavel

Location:
modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • modules/MomentumSmearing.cc

    r629e819 rb3bd4d2  
    109109
    110110    // 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 );
    112113   
    113     if(pt <= 0.0) continue;
     114    //if(pt <= 0.0) continue;
    114115
    115116    mother = candidate;
     
    124125  }
    125126}
     127//----------------------------------------------------------------
     128
     129Double_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
    126146
    127147//------------------------------------------------------------------------------
  • modules/MomentumSmearing.h

    r629e819 rb3bd4d2  
    4747private:
    4848
     49  Double_t LogNormal(Double_t mean, Double_t sigma);
     50
    4951  DelphesFormula *fFormula; //!
    5052
Note: See TracChangeset for help on using the changeset viewer.