22 if (ptSim>0.) invPtSim = 1./ptSim;
25 simP4.SetPx(recP3.X());
26 simP4.SetPy(recP3.Y());
27 simP4.SetPz(recP3.Z());
29 simP4.SetE(muonEnergy);
32 double etaSim = simP4.eta();
34 invPtNew /= ( 1. +
shift(ptSim,etaSim)*invPtNew);
36 double invPtRec =
std::sqrt(recP3.perp2());
37 if (invPtRec>0) invPtRec = 1./invPtRec;
else invPtRec=invPtSim;
38 simP4.SetPx(recP3.x()*invPtRec/invPtNew);
39 simP4.SetPy(recP3.y()*invPtRec/invPtNew);
40 simP4.SetPz(recP3.z()*invPtRec/invPtNew);
42 simP4.SetE(muonEnergy);
45 simP4.SetPx(recP3.x());
46 simP4.SetPy(recP3.y());
47 simP4.SetPz(recP3.z());
49 simP4.SetE(muonEnergy);
55 return funSigma(fabs(theEta),thePt)/thePt;
63 if (x<1.305)
return 7.90897e-04;
64 else if (x<1.82 )
return 9.52662e-02-1.12262e-01*x+3.05410e-02*x*
x;
74 if (x<444.)
return 3.13349e-01+2.77853e-03*x+4.94289e-06*x*x-9.63359e-09*x*x*
x;
75 else return 9.26294e-01+1.64896e-03*
x;
79 if (x<0.94)
return 2.27603e-02+1.23995e-06*
exp(9.30755*x);
80 else return 2.99467e-02+1.86770e-05*
exp(3.52319*x);
double funShift(double x) const
FML3PtSmearer(const RandomEngine *engine)
Constructor.
double funSigmaEta(double x) const
const RandomEngine * random
double funSigmaPt(double x) const
Exp< T >::type exp(const T &t)
double gaussShoot(double mean=0.0, double sigma=1.0) const
double funSigma(double eta, double pt) const
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
math::XYZTLorentzVector smear(math::XYZTLorentzVector simP4, math::XYZVector recP3) const
smear the transverse momentum of a reco::Muon
double error(double thePt, double theEta) const
smear the transverse momentum of a SimplL3MuGMTCand
static double MuonMassSquared_
~FML3PtSmearer()
Destructor.
double shift(double thePt, double theEta) const
XYZVectorD XYZVector
spatial vector with cartesian internal representation