|
|
Go to the documentation of this file.
15 #include <Math/VectorUtil.h>
37 genToken_ = consumes<reco::GenParticleCollection>(
61 std::unique_ptr<double>
weight(
new double);
70 for (
unsigned int i = 0;
i < gensize; ++
i) {
75 if (
part.numberOfMothers() != 2)
78 if (
status == 3 && (partId == 23 ||
abs(partId) == 24)) {
79 boson = &(*genParticles)[
i];
81 parton2Key =
part.motherRef(1).key();
89 for (
unsigned int i = 0;
i < gensize; ++
i) {
98 if (
part.numberOfMothers() != 1)
100 int keyM =
part.motherRef(0).key();
102 if (mother->
status() != 3)
104 int mId = mother->
pdgId();
105 if (
abs(mId) > 6 && mId != 2212)
109 if (keyD == parton1Key || keyD == parton2Key) {
121 double s = smom.M2();
122 double sqrts = smom.M();
125 ROOT::Math::Boost cmboost(smom.BoostToCM());
127 double pcostheta = (smom.x() * photonCM.x() + smom.y() * photonCM.y() + smom.z() * photonCM.z()) / smom.P();
130 double t = -sqrts * (photonCM.t() - pcostheta);
131 double MV = boson->
mass();
132 double u = MV * MV -
s -
t;
133 (*weight) = 1. - 2 *
t * u / (
s *
s + MV * MV * MV * MV);
size_t numberOfDaughters() const override
number of daughters
int status() const final
status word
ISRGammaWeightProducer(const edm::ParameterSet &)
void produce(edm::Event &, const edm::EventSetup &) override
daughters::value_type daughterRef(size_type i) const
reference to daughter at given position
std::vector< double > isrBinEdges_
#define DEFINE_FWK_MODULE(type)
std::vector< double > ptWeights_
edm::EDGetTokenT< reco::GenParticleCollection > genToken_
double mass() const final
mass
int pdgId() const final
PDG identifier.
const LorentzVector & p4() const final
four-momentum Lorentz vector
~ISRGammaWeightProducer() override
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
daughters::value_type motherRef(size_type i=0) const
reference to mother at given position
Abs< T >::type abs(const T &t)