36 bool matchHadb =
false;
37 bool matchLepb =
false;
38 bool matchHadp =
false;
39 bool matchHadq =
false;
40 bool matchHadpq =
false;
41 bool matchHadqp =
false;
42 bool matchLepl =
false;
43 bool matchLepn =
false;
45 if(debug)
std::cout <<
"== start matching the objects " << std::endl;
47 double drLepl=0, drLepn=0, drHadb=0, drLepb=0, drHadp=0, drHadq=0, drHadpq=0, drHadqp=0;
53 if(debug)
std::cout <<
"== not found genEvent " << std::endl;
54 }
else if (genEvent.
isValid()) {
55 if(debug)
std::cout <<
"== found genEvent " << std::endl;
57 if (genEvent->isSemiLeptonic() && genEvent->numberOfBQuarks() == 2) {
60 if(debug)
std::cout <<
"== genEvent->isSemiLeptonic() && genEvent->numberOfBQuarks() == 2 " << std::endl;
61 if(debug)
std::cout <<
"== solution.getDecay() == " <<solution.
getDecay()<< std::endl;
69 if(debug)
std::cout <<
"== matching lepton " << std::endl;
71 matchLepl = (drLepl < 0.3);
73 if(debug)
std::cout <<
"== lepton is matched " << std::endl;
76 matchLepn = (drLepn < 0.3);
80 matchHadb = (drHadb < 0.3);
84 matchLepb = (drLepb < 0.3);
88 matchHadp = (drHadp < 0.3);
92 matchHadpq = (drHadpq < 0.3);
96 matchHadq = (drHadq < 0.3);
100 matchHadqp = (drHadqp < 0.3);
122 if(debug)
std::cout <<
"== nothing " << std::endl;
125 if(debug)
std::cout <<
"== objects matched" <<std::endl;
130 if(debug)
std::cout <<
"== start calculating observables" << std::endl;
139 if(debug)
std::cout <<
"== observable 1 " << Obs1 << std::endl;
146 if(debug)
std::cout <<
"== observable 2 " << Obs2 << std::endl;
155 if(debug)
std::cout <<
"== observable 3 " << Obs3 << std::endl;
162 if(debug)
std::cout <<
"== observable 4 " << Obs4 << std::endl;
165 double Obs5 = ROOT::Math::VectorUtil::DeltaR( solution.
getHadq().
p4(),solution.
getHadp().
p4() );
169 if(debug)
std::cout <<
"== observable 5 " << Obs5 << std::endl;
181 if(debug)
std::cout <<
"== observable 6 " << Obs6 << std::endl;
189 if(debug)
std::cout <<
"== observable 7 " << Obs7 << std::endl;
196 if(debug)
std::cout <<
"== observable 8 " << Obs8 << std::endl;
203 if(debug)
std::cout <<
"== observable 9 " << Obs9 << std::endl;
210 if(debug)
std::cout <<
"== observable 10 " << Obs10 << std::endl;
217 if(debug)
std::cout <<
"== observable 11 " << Obs11 << std::endl;
224 if(debug)
std::cout <<
"== observable 12 " << Obs12 << std::endl;
231 if(debug)
std::cout <<
"== observable 13 " << Obs13 << std::endl;
238 if(debug)
std::cout <<
"== observable 14 " << Obs14 << std::endl;
245 if(debug)
std::cout <<
"== observable 15 " << Obs15 << std::endl;
252 if(debug)
std::cout <<
"== observable 16 " << Obs16 << std::endl;
259 if(debug)
std::cout <<
"== observable 17 " << Obs17 << std::endl;
266 if(debug)
std::cout <<
"== observable 18 " << Obs18 << std::endl;
273 if(debug)
std::cout <<
"== observable 19 " << Obs19 << std::endl;
280 if(debug)
std::cout <<
"== observable 20 " << Obs20 << std::endl;
287 if(debug)
std::cout <<
"== observable 21 " << Obs21 << std::endl;
294 if(debug)
std::cout <<
"== observable 22 " << Obs22 << std::endl;
301 if(debug)
std::cout <<
"== observable 23 " << Obs23 << std::endl;
308 if(debug)
std::cout <<
"== observable 24 " << Obs24 << std::endl;
315 if(debug)
std::cout <<
"== observable 25 " << Obs25 << std::endl;
322 if(debug)
std::cout <<
"== observable 26 " << Obs26 << std::endl;
329 if(debug)
std::cout <<
"== observable 27 " << Obs27 << std::endl;
336 if(debug)
std::cout <<
"== observable 28 " << Obs28 << std::endl;
343 if(debug)
std::cout <<
"== observable 29 " << Obs29 << std::endl;
350 if(debug)
std::cout <<
"== observable 30 " << Obs30 << std::endl;
357 if(debug)
std::cout <<
"== observable 31 " << Obs31 << std::endl;
360 double Obs32 = -999.;
366 if(debug)
std::cout <<
"== observable 32 " << Obs32 << std::endl;
369 double Obs33 = -999.;
375 if(debug)
std::cout <<
"== observable 33 " << Obs33 << std::endl;
378 double Obs34 = -999.;
384 if(debug)
std::cout <<
"== observable 34 " << Obs34 << std::endl;
391 if(debug)
std::cout <<
"== observable 35 " << Obs35 << std::endl;
398 if(debug)
std::cout <<
"== observable 36 " << Obs36 << std::endl;
405 if(debug)
std::cout <<
"== observable 37 " << Obs37 << std::endl;
410 if (Obs38 > 3.1415927) Obs38 = 2*3.1415927 - Obs31;
411 if (Obs38 < -3.1415927) Obs38 = -2*3.1415927 - Obs31;
415 if(debug)
std::cout <<
"== observable 38 " << Obs38 << std::endl;
422 if(debug)
std::cout <<
"== observable 39 " << Obs39 << std::endl;
429 if(debug)
std::cout <<
"== observable 40 " << Obs40 << std::endl;
436 if(debug)
std::cout <<
"== observable 41 " << Obs41 << std::endl;
440 if (Obs42 > 3.1415927) Obs42 = 2*3.1415927 - Obs42;
441 if (Obs42 < -3.1415927) Obs42 = -2*3.1415927 - Obs42;
445 if(debug)
std::cout <<
"== observable 42 " << Obs42 << std::endl;
452 if(debug)
std::cout <<
"== observable 43 " << Obs43 << std::endl;
459 if(debug)
std::cout <<
"== observable 44 " << Obs44 << std::endl;
466 if(debug)
std::cout <<
"== observable 45 " << Obs45 << std::endl;
470 if (Obs46 > 3.1415927) Obs46 = 2*3.1415927 - Obs46;
471 if (Obs46 < -3.1415927) Obs46 = -2*3.1415927 - Obs46;
475 if(debug)
std::cout <<
"== observable 46 " << Obs46 << std::endl;
482 if(debug)
std::cout <<
"== observable 47 " << Obs47 << std::endl;
489 if(debug)
std::cout <<
"== observable 48 " << Obs48 << std::endl;
496 if(debug)
std::cout <<
"== observable 49 " << Obs49 << std::endl;
500 if (Obs50 > 3.1415927) Obs50 = 2*3.1415927 - Obs50;
501 if (Obs50 < -3.1415927) Obs50 = -2*3.1415927 - Obs50;
505 if(debug)
std::cout <<
"== observable 50 " << Obs50 << std::endl;
512 if(debug)
std::cout <<
"== observable 51 " << Obs51 << std::endl;
519 if(debug)
std::cout <<
"== observable 52 " << Obs52 << std::endl;
526 if(debug)
std::cout <<
"== observable 53 " << Obs53 << std::endl;
530 if (Obs54 > 3.1415927) Obs54 = 2*3.1415927 - Obs54;
531 if (Obs54 < -3.1415927) Obs54 = -2*3.1415927 - Obs54;
535 if(debug)
std::cout <<
"== observable 54 " << Obs54 << std::endl;
542 if(debug)
std::cout <<
"== observable 55 " << Obs55 << std::endl;
549 if(debug)
std::cout <<
"== observable 56 " << Obs56 << std::endl;
556 if(debug)
std::cout <<
"== observable 57 " << Obs57 << std::endl;
559 double Obs58 = -999.;
562 if (Obs58 > 3.1415927) Obs58 = 2*3.1415927 - Obs58;
563 if (Obs58 < -3.1415927) Obs58 = -2*3.1415927 - Obs58;
567 if(debug)
std::cout <<
"== observable 58 " << Obs58 << std::endl;
570 double Obs59 = -999.;
576 if(debug)
std::cout <<
"== observable 59 " << Obs59 << std::endl;
579 double Obs60 = -999.;
585 if(debug)
std::cout <<
"== observable 60 " << Obs60 << std::endl;
588 double Obs61 = -999.;
594 if(debug)
std::cout <<
"== observable 61 " << Obs61 << std::endl;
600 double Obs62 = ((jets->size() > 4 && (*jets)[3].p4().Et() > 0.00001) ? (*jets)[4].p4().Et() / (*jets)[3].p4().Et() : 1.0);
605 if(debug)
std::cout <<
"== observable 62 " << Obs62 << std::endl;
607 float calJetsSumEt = 0;
608 for (
unsigned int i = 4;
i < jets->size();
i++) {
609 calJetsSumEt += (*jets)[
i].p4().Et();
613 double Obs63_den = (jets->size() > 4) ? ((*jets)[0].p4().Et()+(*jets)[1].p4().Et()+(*jets)[2].p4().Et()+(*jets)[3].p4().Et()+(*jets)[4].p4().Et()) : 0.0;
614 double Obs63 = (Obs63_den > 0.00001) ? calJetsSumEt / Obs63_den : 1.0;
619 if(debug)
std::cout <<
"== observable 63 " << Obs63 << std::endl;
626 if(debug)
std::cout <<
"== observable 64 " << Obs64 << std::endl;
633 if(debug)
std::cout <<
"== observable 65 " << Obs65 << std::endl;
640 if(debug)
std::cout <<
"observables calculated" << std::endl;
reco::Particle getCalHadW() const
pat::Jet getRecLepb() const
const LorentzVector & p4(P4Kind kind) const
std::pair< unsigned int, double > IntDblPair
virtual const LorentzVector & p4() const GCC11_FINAL
four-momentum Lorentz vector
bool getByToken(EDGetToken token, Handle< PROD > &result) const
pat::Jet getCalHadq() const
std::pair< unsigned int, bool > IntBoolPair
const reco::GenParticle * getGenLept() const
pat::Particle getFitLepn() const
std::vector< IntDblPair > evtselectVarVal
const LorentzVector & p4() const
four-momentum Lorentz vector
reco::Particle getFitHadt() const
std::string getDecay() const
const reco::GenParticle * getGenHadq() const
const reco::GenParticle * getGenLepb() const
edm::EDGetTokenT< TtGenEvent > genEvtToken_
pat::Electron getRecLepe() const
const reco::GenParticle * getGenHadp() const
pat::Jet getRecHadp() const
const reco::GenParticle * getGenHadb() const
const reco::GenParticle * getGenLepl() const
reco::Particle getCalLept() const
float bDiscriminator(const std::string &theLabel) const
-— methods for accessing b-tagging info -—
edm::EDGetTokenT< std::vector< pat::Jet > > jetSourceToken_
pat::Jet getRecHadb() const
void setLRJetCombObservables(const std::vector< std::pair< unsigned int, double > > &varval)
pat::Jet getCalHadb() const
pat::Jet getRecHadq() const
const reco::GenParticle * getGenLepn() const
pat::Muon getRecLepm() const
pat::Jet getCalLepb() const
pat::MET getRecLepn() const
std::vector< IntBoolPair > evtselectVarMatch
reco::Particle getCalHadt() const
virtual float pt() const GCC11_FINAL
transverse momentum
reco::Particle getRecLepW() const
double getProbChi2() const
reco::Particle getFitLept() const
pat::Jet getCalHadp() const