21 std::vector< TtSemiLRJetCombObservables::IntBoolPair >
34 bool matchHadb =
false;
35 bool matchLepb =
false;
36 bool matchHadp =
false;
37 bool matchHadq =
false;
38 bool matchHadpq =
false;
39 bool matchHadqp =
false;
40 bool matchLepl =
false;
41 bool matchLepn =
false;
43 if(debug)
std::cout <<
"== start matching the objects " << std::endl;
47 if(debug)
std::cout <<
"== start trying " << std::endl;
48 double drLepl=0, drLepn=0, drHadb=0, drLepb=0, drHadp=0, drHadq=0, drHadpq=0, drHadqp=0;
52 if(debug)
std::cout <<
"== found genEvent " << std::endl;
54 if (genEvent->isSemiLeptonic() && genEvent->numberOfBQuarks() == 2) {
57 if(debug)
std::cout <<
"== genEvent->isSemiLeptonic() && genEvent->numberOfBQuarks() == 2 " << std::endl;
58 if(debug)
std::cout <<
"== solution.getDecay() == " <<solution.
getDecay()<< std::endl;
66 if(debug)
std::cout <<
"== matching lepton " << std::endl;
68 matchLepl = (drLepl < 0.3);
70 if(debug)
std::cout <<
"== lepton is matched " << std::endl;
73 matchLepn = (drLepn < 0.3);
77 matchHadb = (drHadb < 0.3);
81 matchLepb = (drLepb < 0.3);
85 matchHadp = (drHadp < 0.3);
89 matchHadpq = (drHadpq < 0.3);
93 matchHadq = (drHadq < 0.3);
97 matchHadqp = (drHadqp < 0.3);
118 }
catch (...){
std::cout <<
"Exception\n";}
120 if(debug)
std::cout <<
"== objects matched" <<std::endl;
125 if(debug)
std::cout <<
"== start calculating observables" << std::endl;
134 if(debug)
std::cout <<
"== observable 1 " << Obs1 << std::endl;
141 if(debug)
std::cout <<
"== observable 2 " << Obs2 << std::endl;
150 if(debug)
std::cout <<
"== observable 3 " << Obs3 << std::endl;
157 if(debug)
std::cout <<
"== observable 4 " << Obs4 << std::endl;
160 double Obs5 = ROOT::Math::VectorUtil::DeltaR( solution.
getHadq().
p4(),solution.
getHadp().
p4() );
164 if(debug)
std::cout <<
"== observable 5 " << Obs5 << std::endl;
176 if(debug)
std::cout <<
"== observable 6 " << Obs6 << std::endl;
184 if(debug)
std::cout <<
"== observable 7 " << Obs7 << std::endl;
191 if(debug)
std::cout <<
"== observable 8 " << Obs8 << std::endl;
198 if(debug)
std::cout <<
"== observable 9 " << Obs9 << std::endl;
205 if(debug)
std::cout <<
"== observable 10 " << Obs10 << std::endl;
212 if(debug)
std::cout <<
"== observable 11 " << Obs11 << std::endl;
219 if(debug)
std::cout <<
"== observable 12 " << Obs12 << std::endl;
226 if(debug)
std::cout <<
"== observable 13 " << Obs13 << std::endl;
233 if(debug)
std::cout <<
"== observable 14 " << Obs14 << std::endl;
240 if(debug)
std::cout <<
"== observable 15 " << Obs15 << std::endl;
247 if(debug)
std::cout <<
"== observable 16 " << Obs16 << std::endl;
254 if(debug)
std::cout <<
"== observable 17 " << Obs17 << std::endl;
261 if(debug)
std::cout <<
"== observable 18 " << Obs18 << std::endl;
268 if(debug)
std::cout <<
"== observable 19 " << Obs19 << std::endl;
275 if(debug)
std::cout <<
"== observable 20 " << Obs20 << std::endl;
282 if(debug)
std::cout <<
"== observable 21 " << Obs21 << std::endl;
289 if(debug)
std::cout <<
"== observable 22 " << Obs22 << std::endl;
296 if(debug)
std::cout <<
"== observable 23 " << Obs23 << std::endl;
303 if(debug)
std::cout <<
"== observable 24 " << Obs24 << std::endl;
310 if(debug)
std::cout <<
"== observable 25 " << Obs25 << std::endl;
317 if(debug)
std::cout <<
"== observable 26 " << Obs26 << std::endl;
324 if(debug)
std::cout <<
"== observable 27 " << Obs27 << std::endl;
331 if(debug)
std::cout <<
"== observable 28 " << Obs28 << std::endl;
338 if(debug)
std::cout <<
"== observable 29 " << Obs29 << std::endl;
345 if(debug)
std::cout <<
"== observable 30 " << Obs30 << std::endl;
352 if(debug)
std::cout <<
"== observable 31 " << Obs31 << std::endl;
355 double Obs32 = -999.;
361 if(debug)
std::cout <<
"== observable 32 " << Obs32 << std::endl;
364 double Obs33 = -999.;
370 if(debug)
std::cout <<
"== observable 33 " << Obs33 << std::endl;
373 double Obs34 = -999.;
379 if(debug)
std::cout <<
"== observable 34 " << Obs34 << std::endl;
386 if(debug)
std::cout <<
"== observable 35 " << Obs35 << std::endl;
393 if(debug)
std::cout <<
"== observable 36 " << Obs36 << std::endl;
400 if(debug)
std::cout <<
"== observable 37 " << Obs37 << std::endl;
405 if (Obs38 > 3.1415927) Obs38 = 2*3.1415927 - Obs31;
406 if (Obs38 < -3.1415927) Obs38 = -2*3.1415927 - Obs31;
410 if(debug)
std::cout <<
"== observable 38 " << Obs38 << std::endl;
417 if(debug)
std::cout <<
"== observable 39 " << Obs39 << std::endl;
424 if(debug)
std::cout <<
"== observable 40 " << Obs40 << std::endl;
431 if(debug)
std::cout <<
"== observable 41 " << Obs41 << std::endl;
435 if (Obs42 > 3.1415927) Obs42 = 2*3.1415927 - Obs42;
436 if (Obs42 < -3.1415927) Obs42 = -2*3.1415927 - Obs42;
440 if(debug)
std::cout <<
"== observable 42 " << Obs42 << std::endl;
447 if(debug)
std::cout <<
"== observable 43 " << Obs43 << std::endl;
454 if(debug)
std::cout <<
"== observable 44 " << Obs44 << std::endl;
461 if(debug)
std::cout <<
"== observable 45 " << Obs45 << std::endl;
465 if (Obs46 > 3.1415927) Obs46 = 2*3.1415927 - Obs46;
466 if (Obs46 < -3.1415927) Obs46 = -2*3.1415927 - Obs46;
470 if(debug)
std::cout <<
"== observable 46 " << Obs46 << std::endl;
477 if(debug)
std::cout <<
"== observable 47 " << Obs47 << std::endl;
484 if(debug)
std::cout <<
"== observable 48 " << Obs48 << std::endl;
491 if(debug)
std::cout <<
"== observable 49 " << Obs49 << std::endl;
495 if (Obs50 > 3.1415927) Obs50 = 2*3.1415927 - Obs50;
496 if (Obs50 < -3.1415927) Obs50 = -2*3.1415927 - Obs50;
500 if(debug)
std::cout <<
"== observable 50 " << Obs50 << std::endl;
507 if(debug)
std::cout <<
"== observable 51 " << Obs51 << std::endl;
514 if(debug)
std::cout <<
"== observable 52 " << Obs52 << std::endl;
521 if(debug)
std::cout <<
"== observable 53 " << Obs53 << std::endl;
525 if (Obs54 > 3.1415927) Obs54 = 2*3.1415927 - Obs54;
526 if (Obs54 < -3.1415927) Obs54 = -2*3.1415927 - Obs54;
530 if(debug)
std::cout <<
"== observable 54 " << Obs54 << std::endl;
537 if(debug)
std::cout <<
"== observable 55 " << Obs55 << std::endl;
544 if(debug)
std::cout <<
"== observable 56 " << Obs56 << std::endl;
551 if(debug)
std::cout <<
"== observable 57 " << Obs57 << std::endl;
554 double Obs58 = -999.;
557 if (Obs58 > 3.1415927) Obs58 = 2*3.1415927 - Obs58;
558 if (Obs58 < -3.1415927) Obs58 = -2*3.1415927 - Obs58;
562 if(debug)
std::cout <<
"== observable 58 " << Obs58 << std::endl;
565 double Obs59 = -999.;
571 if(debug)
std::cout <<
"== observable 59 " << Obs59 << std::endl;
574 double Obs60 = -999.;
580 if(debug)
std::cout <<
"== observable 60 " << Obs60 << std::endl;
583 double Obs61 = -999.;
589 if(debug)
std::cout <<
"== observable 61 " << Obs61 << std::endl;
595 double Obs62 = ((jets->size() > 4 && (*jets)[3].p4().Et() > 0.00001) ? (*jets)[4].p4().Et() / (*jets)[3].p4().Et() : 1.0);
600 if(debug)
std::cout <<
"== observable 62 " << Obs62 << std::endl;
602 float calJetsSumEt = 0;
603 for (
unsigned int i = 4;
i < jets->size();
i++) {
604 calJetsSumEt += (*jets)[
i].p4().Et();
608 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;
609 double Obs63 = (Obs63_den > 0.00001) ? calJetsSumEt / Obs63_den : 1.0;
614 if(debug)
std::cout <<
"== observable 63 " << Obs63 << std::endl;
621 if(debug)
std::cout <<
"== observable 64 " << Obs64 << std::endl;
628 if(debug)
std::cout <<
"== observable 65 " << Obs65 << std::endl;
635 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
pat::Jet getCalHadq() const
std::pair< unsigned int, bool > IntBoolPair
const reco::GenParticle * getGenLept() const
pat::Particle getFitLepn() const
std::vector< IntDblPair > evtselectVarVal
reco::Particle getFitHadt() const
std::string getDecay() const
const reco::GenParticle * getGenHadq() const
const LorentzVector & p4() const
four-momentum Lorentz vector
const reco::GenParticle * getGenLepb() const
pat::Electron getRecLepe() const
std::vector< IntBoolPair > operator()(TtSemiEvtSolution &, const edm::Event &iEvent, bool matchOnly=false)
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 -—
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
void setLRJetCombObservables(std::vector< std::pair< unsigned int, double > > varval)
pat::Jet getRecHadb() const
pat::Jet getCalHadb() const
~TtSemiLRJetCombObservables()
virtual double pt() const
transverse momentum
pat::Jet getRecHadq() const
const reco::GenParticle * getGenLepn() const
pat::Muon getRecLepm() const
pat::Jet getCalLepb() const
TtSemiLRJetCombObservables()
pat::MET getRecLepn() const
std::vector< IntBoolPair > evtselectVarMatch
reco::Particle getCalHadt() const
reco::Particle getRecLepW() const
double getProbChi2() const
virtual const LorentzVector & p4() const
four-momentum Lorentz vector
reco::Particle getFitLept() const
pat::Jet getCalHadp() const