60 unsigned int gensize = genParticles->size();
62 std::auto_ptr<double>
weight (
new double);
71 for (
unsigned int i = 0;
i<gensize; ++
i) {
74 if (status!=3)
continue;
77 if (status==3 && (partId==23||
abs(partId)==24)) {
78 boson = &(*genParticles)[
i];
88 for (
unsigned int i = 0;
i<gensize; ++
i) {
92 if (status!=1)
continue;
94 if (partId!=22)
continue;
98 if (mother->
status()!=3)
continue;
99 int mId = mother->
pdgId();
100 if (
abs(mId)>6 && mId!=2212)
continue;
103 if (keyD==parton1Key || keyD==parton2Key) {
112 if (boson && photon) {
114 double s = smom.M2();
115 double sqrts = smom.M();
118 ROOT::Math::Boost cmboost(smom.BoostToCM());
120 double pcostheta = ( smom.x()*photonCM.x()
121 + smom.y()*photonCM.y()
122 + smom.z()*photonCM.z() ) / smom.P();
125 double t = - sqrts * (photonCM.t()-pcostheta);
126 double MV = boson->
mass();
127 double u = MV*MV - s -
t;
128 (*weight) = 1. - 2*t*u/(s*s+MV*MV*MV*MV);
virtual int pdgId() const
PDG identifier.
daughters::value_type daughterRef(size_type i) const
reference to daughter at given position
virtual int status() const
status word
XYZTLorentzVectorD XYZTLorentzVector
Lorentz vector with cylindrical internal representation using pseudorapidity.
virtual double mass() const
mass
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
virtual size_t numberOfMothers() const
number of mothers
virtual size_t numberOfDaughters() const
number of daughters
daughters::value_type motherRef(size_type i=0) const
reference to mother at given position
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
virtual const LorentzVector & p4() const
four-momentum Lorentz vector