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 }
edm::RefProd< StGenEvent >
StEvtSolution::pTrueBhadrSel_
double pTrueBhadrSel_
Definition: StEvtSolution.h:177
StEvtSolution::getGenLepton
const reco::GenParticle * getGenLepton() const
Definition: StEvtSolution.cc:93
StEvtSolution::getNeutrino
pat::MET getNeutrino() const
Definition: StEvtSolution.h:36
StEvtSolution::signalPur_
double signalPur_
Definition: StEvtSolution.h:178
mps_fire.i
i
Definition: mps_fire.py:428
MessageLogger.h
reco::Particle
Definition: Particle.h:16
reco::GenParticle
Definition: GenParticle.h:21
StEvtSolution::signalLRTot_
double signalLRTot_
Definition: StEvtSolution.h:178
AlCaHLTBitMon_ParallelJobs.p
p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
StEvtSolution::StEvtSolution
StEvtSolution()
Definition: StEvtSolution.cc:7
StEvtSolution::getRecBottom
pat::Jet getRecBottom() const
Definition: StEvtSolution.h:54
StEvtSolution::pTrueCombExist_
double pTrueCombExist_
Definition: StEvtSolution.h:177
StEvtSolution::getGenLept
const reco::GenParticle * getGenLept() const
Definition: StEvtSolution.cc:114
StEvtSolution::setGenEvt
void setGenEvt(const edm::Handle< StGenEvent > &)
Definition: StEvtSolution.cc:152
StEvtSolution::getFitNeutrino
pat::Particle getFitNeutrino() const
Definition: StEvtSolution.h:68
edm::Handle
Definition: AssociativeIterator.h:50
StEvtSolution::setScanValues
void setScanValues(const std::vector< double > &)
Definition: StEvtSolution.cc:159
StEvtSolution::chi2Prob_
double chi2Prob_
Definition: StEvtSolution.h:175
StEvtSolution::getFitLepW
reco::Particle getFitLepW() const
Definition: StEvtSolution.cc:139
StEvtSolution::getGenLepW
const reco::GenParticle * getGenLepW() const
Definition: StEvtSolution.cc:107
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
StEvtSolution::pTrueBJetSel_
double pTrueBJetSel_
Definition: StEvtSolution.h:177
StEvtSolution::getMuon
pat::Muon getMuon() const
Definition: StEvtSolution.h:34
StEvtSolution::getDecay
std::string getDecay() const
Definition: StEvtSolution.h:75
StEvtSolution::bestSol_
bool bestSol_
Definition: StEvtSolution.h:181
StGenEvent::singleTop
const reco::GenParticle * singleTop() const
return single Top
Definition: StGenEvent.cc:90
StEvtSolution::light_
edm::Ref< std::vector< pat::Jet > > light_
Definition: StEvtSolution.h:164
StEvtSolution::~StEvtSolution
virtual ~StEvtSolution()
Definition: StEvtSolution.cc:23
StEvtSolution::getLept
reco::Particle getLept() const
Definition: StEvtSolution.cc:64
StEvtSolution::deltaRL_
double deltaRL_
Definition: StEvtSolution.h:179
StEvtSolution::getFitLepton
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:67
StEvtSolution::getElectron
pat::Electron getElectron() const
Definition: StEvtSolution.h:35
StGenEvent::singleLepton
const reco::GenParticle * singleLepton() const
return single lepton if available; 0 else
Definition: StGenEvent.cc:50
StEvtSolution::pTrueJetComb_
double pTrueJetComb_
Definition: StEvtSolution.h:177
math::XYZPoint
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:12
StEvtSolution::getLepW
reco::Particle getLepW() const
Definition: StEvtSolution.cc:54
StEvtSolution::getFitLept
reco::Particle getFitLept() const
Definition: StEvtSolution.cc:144
p4
double p4[4]
Definition: TauolaWrapper.h:92
StEvtSolution::scanValues_
std::vector< double > scanValues_
Definition: StEvtSolution.h:176
StGenEvent::singleW
const reco::GenParticle * singleW() const
return single W
Definition: StGenEvent.cc:74
StEvtSolution::deltaRB_
double deltaRB_
Definition: StEvtSolution.h:179
heppy_batch.val
val
Definition: heppy_batch.py:351
StEvtSolution::getGenBottom
const reco::GenParticle * getGenBottom() const
Definition: StEvtSolution.cc:79
StEvtSolution::getFitBottom
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:65
StGenEvent::singleNeutrino
const reco::GenParticle * singleNeutrino() const
return single neutrino if available; 0 else
Definition: StGenEvent.cc:62
StEvtSolution::sumDeltaRjp_
double sumDeltaRjp_
Definition: StEvtSolution.h:179
StEvtSolution::theGenEvt_
edm::RefProd< StGenEvent > theGenEvt_
Definition: StEvtSolution.h:157
StEvtSolution::getLight
pat::Jet getLight() const
Definition: StEvtSolution.cc:41
StEvtSolution::getGenNeutrino
const reco::GenParticle * getGenNeutrino() const
Definition: StEvtSolution.cc:100
StEvtSolution::bottom_
edm::Ref< std::vector< pat::Jet > > bottom_
Definition: StEvtSolution.h:164
StEvtSolution::jetCorrScheme_
int jetCorrScheme_
Definition: StEvtSolution.h:174
StEvtSolution::getBottom
pat::Jet getBottom() const
Definition: StEvtSolution.cc:28
StGenEvent::decayB
const reco::GenParticle * decayB() const
return decay b
Definition: StGenEvent.cc:18
StEvtSolution.h
StEvtSolution::getRecLept
reco::Particle getRecLept() const
Definition: StEvtSolution.cc:124
StEvtSolution::changeBL_
int changeBL_
Definition: StEvtSolution.h:180