59 std::unique_ptr<double>
weight(
new double);
64 unsigned int gensize = genParticles->size();
65 for (
unsigned int i = 0;
i < gensize; ++
i) {
70 if (
abs(leptonId) != 11 &&
abs(leptonId) != 13 &&
abs(leptonId) != 15)
76 if (bosonId != 23 && bosonId != 24)
78 double bosonMass = boson->
mass();
79 double leptonMass = lepton.
mass();
80 double leptonEnergy = lepton.
energy();
81 double cosLeptonTheta =
cos(lepton.
theta());
82 double sinLeptonTheta =
sin(lepton.
theta());
83 double leptonPhi = lepton.
phi();
95 trueKey = otherleptonKey;
101 for (
unsigned int j = 0;
j < nDaughters; ++
j) {
103 if (photon->
pdgId() != 22)
106 double cosPhotonTheta =
cos(photon->
theta());
107 double sinPhotonTheta =
sin(photon->
theta());
109 double costheta = sinLeptonTheta * sinPhotonTheta *
cos(leptonPhi - photonPhi) + cosLeptonTheta * cosPhotonTheta;
113 double betaLepton =
sqrt(1 -
pow(leptonMass / leptonEnergy, 2));
114 double delta = -8 * photonEnergy * (1 - betaLepton * costheta) /
pow(bosonMass, 3) /
115 (1 -
pow(leptonMass / bosonMass, 2)) / (4 -
pow(leptonMass / bosonMass, 2)) * leptonEnergy *
117 (*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) ...
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
daughters::value_type daughterRef(size_type i) const
reference to daughter at given position
double theta() const final
momentum polar angle
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Sin< T >::type sin(const T &t)
size_t numberOfMothers() const override
number of mothers
double alphaRatio(double)
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)
virtual double theta() const =0
momentum polar angle
virtual double mass() const =0
mass
size_t numberOfDaughters() const override
number of daughters
int status() const final
status word
double phi() const final
momentum azimuthal angle
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
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