CMS 3D CMS Logo

StEvtSolution.cc
Go to the documentation of this file.
1 //
2 //
3 
6 
8 {
9  jetCorrScheme_ = 0;
10  chi2Prob_ = -999.;
11  pTrueCombExist_ = -999.;
12  pTrueBJetSel_ = -999.;
13  pTrueBhadrSel_ = -999.;
14  pTrueJetComb_ = -999.;
15  signalPur_ = -999.;
16  signalLRTot_ = -999.;
17  sumDeltaRjp_ = -999.;
18  deltaRB_ = -999.;
19  deltaRL_ = -999.;
20  changeBL_ = -999 ;
21  bestSol_ = false;
22 }
23 
25 {
26 }
27 
28 //-------------------------------------------
29 // get calibrated base objects
30 //-------------------------------------------
32 {
33  // WARNING this is obsolete and only
34  // kept for backwards compatibility
35  if(jetCorrScheme_==1){
36  //jet calibrated according to MC truth
37  return bottom_->correctedJet("HAD", "B");
38  }
39  else if(jetCorrScheme_==2){
40  return bottom_->correctedJet("HAD", "B");
41  }
42  else{
43  return *bottom_;
44  }
45 }
46 
48 {
49  // WARNING this is obsolete and only
50  // kept for backwards compatibility
51  if(jetCorrScheme_==1){
52  //jet calibrated according to MC truth
53  return light_->correctedJet("HAD", "UDS");
54  }
55  else if(jetCorrScheme_==2){
56  return light_->correctedJet("HAD", "UDS");
57  }
58  else{
59  return *light_;
60  }
61 }
62 
64 {
65  // FIXME: the charge from the genevent
67  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4(), math::XYZPoint());
68  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4(), math::XYZPoint());
69  return p;
70 }
71 
73 {
74  // FIXME: the charge from the genevent
76  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4()+this->getBottom().p4(), math::XYZPoint());
77  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4()+this->getBottom().p4(), math::XYZPoint());
78  return p;
79 }
80 
81 //-------------------------------------------
82 // get the matched gen particles
83 //-------------------------------------------
84 // FIXME: provide defaults if the genevent is invalid
86 {
87  if(!theGenEvt_) return nullptr;
88  else return theGenEvt_->decayB();
89 }
90 
91 // FIXME: not implemented yet
92 // const reco::GenParticle * StEvtSolution::getGenLight() const
93 // {
94 // if(!theGenEvt_) return 0;
95 // else return theGenEvt_->recoilQuark();
96 // }
97 
99 {
100  if(!theGenEvt_) return nullptr;
101  else return theGenEvt_->singleLepton();
102 }
103 
105 {
106  if(!theGenEvt_) return nullptr;
107  else return theGenEvt_->singleNeutrino();
108 }
109 
111 {
112  if (!theGenEvt_) return nullptr;
113  else return theGenEvt_->singleW();
114 }
115 
117 {
118  if (!theGenEvt_) return nullptr;
119  else return theGenEvt_->singleTop();
120 }
121 
122 //-------------------------------------------
123 // get uncalibrated reco objects
124 //-------------------------------------------
126 {
127  // FIXME: the charge from the genevent
129  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4()+this->getRecBottom().p4(), math::XYZPoint());
130  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4()+this->getRecBottom().p4(), math::XYZPoint());
131  return p;
132 }
133 
134 //-------------------------------------------
135 // get objects from kinematic fit
136 //-------------------------------------------
138 {
139  // FIXME: provide the correct charge from generated event
140  return reco::Particle(0, this->getFitLepton().p4()+this->getFitNeutrino().p4());
141 }
142 
144 {
145  // FIXME: provide the correct charge from generated event
146  return reco::Particle(0, this->getFitLepton().p4()+this->getFitNeutrino().p4()+this->getFitBottom().p4());
147 }
148 
149 //-------------------------------------------
150 // set the generated event
151 //-------------------------------------------
154 }
155 
156 //-------------------------------------------
157 // set other info on the event
158 //-------------------------------------------
159 void StEvtSolution::setScanValues(const std::vector<double> & val) {
160  for(unsigned int i=0; i<val.size(); i++) scanValues_.push_back(val[i]);
161 }
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:69
const reco::GenParticle * singleNeutrino() const
return single neutrino if available; 0 else
Definition: StGenEvent.cc:74
reco::Particle getRecLept() const
pat::Muon getMuon() const
Definition: StEvtSolution.h:36
edm::Ref< std::vector< pat::Jet > > light_
double pTrueJetComb_
const reco::GenParticle * singleLepton() const
return single lepton if available; 0 else
Definition: StGenEvent.cc:60
double signalLRTot_
double pTrueBhadrSel_
const reco::GenParticle * getGenBottom() const
reco::Particle getFitLepW() const
pat::Jet getRecBottom() const
Definition: StEvtSolution.h:56
std::vector< double > scanValues_
pat::Jet getBottom() const
edm::Ref< std::vector< pat::Jet > > bottom_
pat::Jet getLight() const
reco::Particle getLepW() const
double sumDeltaRjp_
double p4[4]
Definition: TauolaWrapper.h:92
pat::Particle getFitNeutrino() const
Definition: StEvtSolution.h:70
double pTrueCombExist_
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:67
const reco::GenParticle * getGenLept() const
double pTrueBJetSel_
std::string getDecay() const
Definition: StEvtSolution.h:77
void setScanValues(const std::vector< double > &)
const reco::GenParticle * singleTop() const
return single Top
Definition: StGenEvent.cc:106
pat::MET getNeutrino() const
Definition: StEvtSolution.h:38
const reco::GenParticle * decayB() const
return decay b
Definition: StGenEvent.cc:24
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
reco::Particle getFitLept() const
Analysis-level calorimeter jet class.
Definition: Jet.h:80
reco::Particle getLept() const
virtual ~StEvtSolution()
const reco::GenParticle * getGenLepton() const
void setGenEvt(const edm::Handle< StGenEvent > &)
const reco::GenParticle * singleW() const
return single W
Definition: StGenEvent.cc:88
edm::RefProd< StGenEvent > theGenEvt_
pat::Electron getElectron() const
Definition: StEvtSolution.h:37
const reco::GenParticle * getGenLepW() const
const reco::GenParticle * getGenNeutrino() const