16 for (
unsigned int i = 0;
i<gensize; ++
i) {
18 if (lepton.
status()!=3)
continue;
20 if (
abs(leptonId)!=11 &&
abs(leptonId)!=13 &&
abs(leptonId)!=15)
continue;
24 if (bosonId!=23 && bosonId!=24)
continue;
25 double bosonMass = boson->
mass();
26 double leptonMass = lepton.
mass();
27 double leptonEnergy = lepton.
energy();
28 double cosLeptonTheta =
cos(lepton.
theta());
29 double sinLeptonTheta =
sin(lepton.
theta());
30 double leptonPhi = lepton.
phi();
40 trueKey = otherleptonKey;
46 for (
unsigned int j = 0; j<nDaughters; ++j) {
48 if (photon->
pdgId()!=22)
continue;
49 double photonEnergy = photon->
energy();
50 double cosPhotonTheta =
cos(photon->
theta());
51 double sinPhotonTheta =
sin(photon->
theta());
52 double photonPhi = photon->
phi();
53 double costheta = sinLeptonTheta*sinPhotonTheta*
cos(leptonPhi-photonPhi)
54 + cosLeptonTheta*cosPhotonTheta;
58 double betaLepton =
sqrt(1-
pow(leptonMass/leptonEnergy,2));
59 double delta = - 8*photonEnergy *(1-betaLepton*costheta)
61 / (1-
pow(leptonMass/bosonMass,2))
62 / (4-
pow(leptonMass/bosonMass,2))
63 * leptonEnergy * (
pow(leptonMass,2)/bosonMass+2*photonEnergy);
64 weight *= (1 +
delta);
int pdgId() const final
PDG identifier.
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode) ...
daughters::value_type daughterRef(size_type i) const
reference to daughter at given position
double theta() const final
momentum polar angle
Sin< T >::type sin(const T &t)
size_t numberOfMothers() const override
number of mothers
virtual double energy() const =0
energy
virtual int pdgId() const =0
PDG identifier.
Cos< T >::type cos(const T &t)
double energy() const final
energy
Abs< T >::type abs(const T &t)
std::vector< reco::GenParticle > genParticles_
virtual double theta() const =0
momentum polar angle
virtual double mass() const =0
mass
size_t numberOfDaughters() const override
number of daughters
double alphaRatio(double) const
int status() const final
status word
double phi() const final
momentum azimuthal angle
virtual double phi() const =0
momentum azimuthal angle
Power< A, B >::type pow(const A &a, const B &b)
const Candidate * mother(size_type=0) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode) ...
double mass() const final
mass