CMS 3D CMS Logo

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