CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StEvtSolution.cc
Go to the documentation of this file.
1 //
2 // $Id: StEvtSolution.cc,v 1.11 2008/11/14 19:20:51 rwolf Exp $
3 //
4 
7 
9 {
10  jetCorrScheme_ = 0;
11  chi2Prob_ = -999.;
12  pTrueCombExist_ = -999.;
13  pTrueBJetSel_ = -999.;
14  pTrueBhadrSel_ = -999.;
15  pTrueJetComb_ = -999.;
16  signalPur_ = -999.;
17  signalLRTot_ = -999.;
18  sumDeltaRjp_ = -999.;
19  deltaRB_ = -999.;
20  deltaRL_ = -999.;
21  changeBL_ = -999 ;
22  bestSol_ = false;
23 }
24 
26 {
27 }
28 
29 //-------------------------------------------
30 // get calibrated base objects
31 //-------------------------------------------
33 {
34  // WARNING this is obsolete and only
35  // kept for backwards compatibility
36  if(jetCorrScheme_==1){
37  //jet calibrated according to MC truth
38  return bottom_->correctedJet("HAD", "B");
39  }
40  else if(jetCorrScheme_==2){
41  return bottom_->correctedJet("HAD", "B");
42  }
43  else{
44  return *bottom_;
45  }
46 }
47 
49 {
50  // WARNING this is obsolete and only
51  // kept for backwards compatibility
52  if(jetCorrScheme_==1){
53  //jet calibrated according to MC truth
54  return light_->correctedJet("HAD", "UDS");
55  }
56  else if(jetCorrScheme_==2){
57  return light_->correctedJet("HAD", "UDS");
58  }
59  else{
60  return *light_;
61  }
62 }
63 
65 {
66  // FIXME: the charge from the genevent
68  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4(), math::XYZPoint());
69  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4(), math::XYZPoint());
70  return p;
71 }
72 
74 {
75  // FIXME: the charge from the genevent
77  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4()+this->getBottom().p4(), math::XYZPoint());
78  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4()+this->getBottom().p4(), math::XYZPoint());
79  return p;
80 }
81 
82 //-------------------------------------------
83 // get the matched gen particles
84 //-------------------------------------------
85 // FIXME: provide defaults if the genevent is invalid
87 {
88  if(!theGenEvt_) return 0;
89  else return theGenEvt_->decayB();
90 }
91 
92 // FIXME: not implemented yet
93 // const reco::GenParticle * StEvtSolution::getGenLight() const
94 // {
95 // if(!theGenEvt_) return 0;
96 // else return theGenEvt_->recoilQuark();
97 // }
98 
100 {
101  if(!theGenEvt_) return 0;
102  else return theGenEvt_->singleLepton();
103 }
104 
106 {
107  if(!theGenEvt_) return 0;
108  else return theGenEvt_->singleNeutrino();
109 }
110 
112 {
113  if (!theGenEvt_) return 0;
114  else return theGenEvt_->singleW();
115 }
116 
118 {
119  if (!theGenEvt_) return 0;
120  else return theGenEvt_->singleTop();
121 }
122 
123 //-------------------------------------------
124 // get uncalibrated reco objects
125 //-------------------------------------------
127 {
128  // FIXME: the charge from the genevent
130  if(this->getDecay() == "muon") p=reco::Particle(0, this->getMuon().p4()+this->getNeutrino().p4()+this->getRecBottom().p4(), math::XYZPoint());
131  if(this->getDecay() == "electron") p=reco::Particle(0, this->getElectron().p4()+this->getNeutrino().p4()+this->getRecBottom().p4(), math::XYZPoint());
132  return p;
133 }
134 
135 //-------------------------------------------
136 // get objects from kinematic fit
137 //-------------------------------------------
139 {
140  // FIXME: provide the correct charge from generated event
141  return reco::Particle(0, this->getFitLepton().p4()+this->getFitNeutrino().p4());
142 }
143 
145 {
146  // FIXME: provide the correct charge from generated event
147  return reco::Particle(0, this->getFitLepton().p4()+this->getFitNeutrino().p4()+this->getFitBottom().p4());
148 }
149 
150 //-------------------------------------------
151 // set the generated event
152 //-------------------------------------------
155 }
156 
157 //-------------------------------------------
158 // set other info on the event
159 //-------------------------------------------
160 void StEvtSolution::setScanValues(const std::vector<double> & val) {
161  for(unsigned int i=0; i<val.size(); i++) scanValues_.push_back(val[i]);
162 }
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:70
reco::Particle getRecLept() const
int i
Definition: DBlmapReader.cc:9
pat::Muon getMuon() const
Definition: StEvtSolution.h:37
edm::Ref< std::vector< pat::Jet > > light_
double pTrueJetComb_
double signalLRTot_
double pTrueBhadrSel_
const reco::GenParticle * getGenBottom() const
reco::Particle getFitLepW() const
pat::Jet getRecBottom() const
Definition: StEvtSolution.h:57
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:71
double pTrueCombExist_
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:68
const reco::GenParticle * getGenLept() const
double pTrueBJetSel_
std::string getDecay() const
Definition: StEvtSolution.h:78
void setScanValues(const std::vector< double > &)
pat::MET getNeutrino() const
Definition: StEvtSolution.h:39
XYZPointD XYZPoint
point in space with cartesian internal representation
Definition: Point3D.h:13
reco::Particle getFitLept() const
Analysis-level calorimeter jet class.
Definition: Jet.h:72
reco::Particle getLept() const
virtual ~StEvtSolution()
const reco::GenParticle * getGenLepton() const
void setGenEvt(const edm::Handle< StGenEvent > &)
edm::RefProd< StGenEvent > theGenEvt_
pat::Electron getElectron() const
Definition: StEvtSolution.h:38
const reco::GenParticle * getGenLepW() const
const reco::GenParticle * getGenNeutrino() const