|
|
Go to the documentation of this file.
15 #include <Math/VectorUtil.h>
36 genToken_ = consumes<reco::GenParticleCollection>(
59 std::unique_ptr<double>
weight(
new double);
65 for (
unsigned int i = 0;
i < gensize; ++
i) {
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));
115 (1 -
pow(leptonMass / bosonMass, 2)) / (4 -
pow(leptonMass / bosonMass, 2)) * leptonEnergy *
117 (*weight) *= (1 +
delta);
132 const double alphapi = 1 / 137.036 /
M_PI;
133 const double mass_e = 0.0005;
134 const double mass_mu = 0.106;
135 const double mass_tau = 1.777;
136 const double mass_Z = 91.2;
138 pigaga += alphapi * (2 *
log(
pt / mass_e) / 3. - 5. / 9.);
140 pigaga += alphapi * (2 *
log(
pt / mass_mu) / 3. - 5. / 9.);
142 pigaga += alphapi * (2 *
log(
pt / mass_tau) / 3. - 5. / 9.);
154 }
else if (
pt < 2.0) {
158 }
else if (
pt < 4.0) {
162 }
else if (
pt < 10.0) {
166 }
else if (
pt < mass_Z) {
170 }
else if (
pt < 10000.) {
182 return 1. / (1. - pigaga);
size_t numberOfDaughters() const override
number of daughters
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
int status() const final
status word
virtual double mass() const =0
mass
daughters::value_type daughterRef(size_type i) const
reference to daughter at given position
const Candidate * mother(size_type=0) const override
return mother at a given position, i = 0, ... numberOfMothers() - 1 (read only mode)
size_t numberOfMothers() const override
number of mothers
double alphaRatio(double)
FSRWeightProducer(const edm::ParameterSet &)
Sin< T >::type sin(const T &t)
Cos< T >::type cos(const T &t)
#define DEFINE_FWK_MODULE(type)
~FSRWeightProducer() override
double theta() const final
momentum polar angle
double mass() const final
mass
int pdgId() const final
PDG identifier.
virtual int pdgId() const =0
PDG identifier.
static const std::string B
double phi() const final
momentum azimuthal angle
void produce(edm::Event &, const edm::EventSetup &) override
const Candidate * daughter(size_type) const override
return daughter at a given position, i = 0, ... numberOfDaughters() - 1 (read only mode)
double energy() const final
energy
Power< A, B >::type pow(const A &a, const B &b)
Abs< T >::type abs(const T &t)