CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TtHadEvtSolution.h
Go to the documentation of this file.
1 #ifndef TopObjects_TtHadEvtSolution_h
2 #define TopObjects_TtHadEvtSolution_h
3 //
4 // adapted TtSemiEvtSolution.h,v 1.14 2007/07/06 03:07:47 lowette Exp
5 // for fully hadronic channel
6 
7 #include <vector>
8 #include <string>
9 
13 
17 
20 
22 
23  friend class TtHadEvtSolutionMaker;
24  friend class TtFullHadKinFitter;
26  friend class TtHadLRJetCombCalc;
27  /*
28  friend class TtHadLRSignalSelObservables;
29  friend class TtHadLRSignalSelCalc;
30  */
31 
32  public:
33 
35  virtual ~TtHadEvtSolution();
36 
37  //-------------------------------------------
38  // get calibrated base objects
39  //-------------------------------------------
40  pat::Jet getHadb() const;
41  pat::Jet getHadp() const;
42  pat::Jet getHadq() const;
43  pat::Jet getHadbbar() const;
44  pat::Jet getHadj() const;
45  pat::Jet getHadk() const;
46 
47  //-------------------------------------------
48  // get the matched gen particles
49  //-------------------------------------------
50  const edm::RefProd<TtGenEvent> & getGenEvent() const { return theGenEvt_; };
51  const reco::GenParticle * getGenHadb() const { if (!theGenEvt_) return 0; else return theGenEvt_->b(); };
52  const reco::GenParticle * getGenHadbbar() const { if (!theGenEvt_) return 0; else return theGenEvt_->bBar(); };
53  const reco::GenParticle * getGenHadp() const { if (!theGenEvt_) return 0; else return theGenEvt_->daughterQuarkOfWPlus(); };
54  const reco::GenParticle * getGenHadq() const { if (!theGenEvt_) return 0; else return theGenEvt_->daughterQuarkBarOfWPlus(); };
55  const reco::GenParticle * getGenHadj() const { if (!theGenEvt_) return 0; else return theGenEvt_->daughterQuarkOfWMinus(); };
56  const reco::GenParticle * getGenHadk() const { if (!theGenEvt_) return 0; else return theGenEvt_->daughterQuarkBarOfWMinus(); };
57 
58  //-------------------------------------------
59  // get (un-)/calibrated reco objects
60  //-------------------------------------------
61  reco::Particle getRecHadt() const;
65 
66  pat::Jet getRecHadb() const { return this->getHadb().correctedJet("RAW"); };
67  pat::Jet getRecHadbbar() const { return this->getHadbbar().correctedJet("RAW"); };
68  pat::Jet getRecHadp() const { return this->getHadp().correctedJet("RAW"); };
69  pat::Jet getRecHadq() const { return this->getHadq().correctedJet("RAW"); };
70  pat::Jet getRecHadj() const { return this->getHadj().correctedJet("RAW"); };
71  pat::Jet getRecHadk() const { return this->getHadk().correctedJet("RAW"); };
72 
73  reco::Particle getCalHadt() const;
77  pat::Jet getCalHadb() const { return this->getHadb(); };
78  pat::Jet getCalHadbbar() const { return this->getHadbbar(); };
79  pat::Jet getCalHadp() const { return this->getHadp(); };
80  pat::Jet getCalHadq() const { return this->getHadq(); };
81  pat::Jet getCalHadj() const { return this->getHadj(); };
82  pat::Jet getCalHadk() const { return this->getHadk(); };
83 
84  //-------------------------------------------
85  // get objects from kinematic fit
86  //-------------------------------------------
87  reco::Particle getFitHadt() const;
91  pat::Particle getFitHadb() const { return (fitHadb_.size()>0 ? fitHadb_.front() : pat::Particle()); };
92  pat::Particle getFitHadbbar() const { return (fitHadbbar_.size()>0 ? fitHadbbar_.front() : pat::Particle()); };
93  pat::Particle getFitHadp() const { return (fitHadp_.size()>0 ? fitHadp_.front() : pat::Particle()); };
94  pat::Particle getFitHadq() const { return (fitHadq_.size()>0 ? fitHadq_.front() : pat::Particle()); };
95  pat::Particle getFitHadj() const { return (fitHadj_.size()>0 ? fitHadj_.front() : pat::Particle()); };
96  pat::Particle getFitHadk() const { return (fitHadk_.size()>0 ? fitHadk_.front() : pat::Particle()); };
97 
98  //-------------------------------------------
99  // get the selected hadronic decay chain
100  //-------------------------------------------
101  std::string getDecay() const { return decay_; }
102 
103  //-------------------------------------------
104  // get info on the matching
105  //-------------------------------------------
106  double getMCBestSumAngles() const { return sumAnglejp_; };
107  double getMCBestAngleHadp() const { return angleHadp_; };
108  double getMCBestAngleHadq() const { return angleHadq_; };
109  double getMCBestAngleHadj() const { return angleHadj_; };
110  double getMCBestAngleHadk() const { return angleHadk_; };
111  double getMCBestAngleHadb() const { return angleHadb_; };
112  double getMCBestAngleHadbbar() const { return angleHadbbar_; };
113  int getMCChangeW1Q() const { return changeW1Q_; };
114  int getMCChangeW2Q() const { return changeW2Q_;};
115 
116  //-------------------------------------------
117  // get selected kinfit parametrisations of
118  //each type of object
119  //-------------------------------------------
120  int getJetParametrisation() const { return jetParam_; }
121 
122  //-------------------------------------------
123  // get the prob of the chi2 value resulting
124  // from the kinematic fit added chi2 for all
125  // fits
126  //-------------------------------------------
127  double getProbChi2() const { return probChi2_; }
128 
129  //-------------------------------------------
130  // get info on the outcome of the signal
131  // selection LR
132  //-------------------------------------------
133  double getLRSignalEvtObsVal(unsigned int) const;
134  double getLRSignalEvtLRval() const { return lrSignalEvtLRval_; }
135  double getLRSignalEvtProb() const { return lrSignalEvtProb_; }
136 
137  //-------------------------------------------
138  // get info on the outcome of the different
139  //jet combination methods
140  //-------------------------------------------
141  int getMCBestJetComb() const { return mcBestJetComb_; }
142  int getSimpleBestJetComb() const { return simpleBestJetComb_; }
143  int getLRBestJetComb() const { return lrBestJetComb_; }
144  double getLRJetCombObsVal(unsigned int) const;
145  double getLRJetCombLRval() const { return lrJetCombLRval_; }
146  double getLRJetCombProb() const { return lrJetCombProb_; }
147 
148  //protected: seems to cause compile error, check!!!
149 
150  //-------------------------------------------
151  // set the generated event
152  //-------------------------------------------
153  void setGenEvt(const edm::Handle<TtGenEvent> & aGenEvt);
154 
155  //-------------------------------------------
156  // set the basic objects
157  //-------------------------------------------
158  void setJetCorrectionScheme(int scheme) { jetCorrScheme_ = scheme; };
159  void setHadp(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
161  void setHadq(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
163  void setHadj(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
165  void setHadk(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
167  void setHadb(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
169  void setHadbbar(const edm::Handle<std::vector<pat::Jet> > & jet, int i)
171 
172  //-------------------------------------------
173  // set the fitted objects
174  //-------------------------------------------
175  void setFitHadp(const pat::Particle & aFitHadp) { fitHadp_.clear(); fitHadp_.push_back(aFitHadp); };
176  void setFitHadq(const pat::Particle & aFitHadq) { fitHadq_.clear(); fitHadq_.push_back(aFitHadq); };
177  void setFitHadj(const pat::Particle & aFitHadj) { fitHadj_.clear(); fitHadj_.push_back(aFitHadj); };
178  void setFitHadk(const pat::Particle & aFitHadk) { fitHadk_.clear(); fitHadk_.push_back(aFitHadk); };
179  void setFitHadb(const pat::Particle & aFitHadb) { fitHadb_.clear(); fitHadb_.push_back(aFitHadb); };
180  void setFitHadbbar(const pat::Particle & aFitHadbbar) { fitHadbbar_.clear(); fitHadbbar_.push_back(aFitHadbbar); };
181 
182  //-------------------------------------------
183  // set matching info
184  //-------------------------------------------
185  void setMCBestSumAngles(double sdr) { sumAnglejp_ = sdr; };
186  void setMCBestAngleHadp(double adr) { angleHadp_ = adr; };
187  void setMCBestAngleHadq(double adr) { angleHadq_ = adr; };
188  void setMCBestAngleHadj(double adr) { angleHadj_ = adr; };
189  void setMCBestAngleHadk(double adr) { angleHadk_ = adr; };
190  void setMCBestAngleHadb(double adr) { angleHadb_ = adr; };
191  void setMCBestAngleHadbbar(double adr) { angleHadbbar_ = adr; };
192  void setMCChangeW1Q(int w1q) { changeW1Q_ = w1q; };
193  void setMCChangeW2Q(int w2q) { changeW2Q_ = w2q; };
194 
195  //-------------------------------------------
196  // methods to set the kinfit parametrisations
197  //of each type of object
198  //-------------------------------------------
199  void setJetParametrisation(int jp) { jetParam_ = jp; };
200 
201  //-------------------------------------------
202  // method to set the prob. of the chi2 value
203  //resulting from the kinematic fit
204  //-------------------------------------------
205  void setProbChi2(double c) { probChi2_ = c; };
206 
207  //-------------------------------------------
208  // methods to set the outcome of the different
209  // jet combination methods
210  //-------------------------------------------
211  void setMCBestJetComb(int mcbs) { mcBestJetComb_ = mcbs; };
212  void setSimpleBestJetComb(int sbs) { simpleBestJetComb_ = sbs; };
213  void setLRBestJetComb(int lrbs) { lrBestJetComb_ = lrbs; };
214  void setLRJetCombObservables(const std::vector<std::pair<unsigned int, double> >& varval);
215  void setLRJetCombLRval(double clr) {lrJetCombLRval_ = clr;};
216  void setLRJetCombProb(double plr) {lrJetCombProb_ = plr;};
217 
218  //-------------------------------------------
219  // methods to set the outcome of the signal
220  // selection LR
221  //-------------------------------------------
222  void setLRSignalEvtObservables(const std::vector<std::pair<unsigned int, double> >& varval);
223  void setLRSignalEvtLRval(double clr) {lrSignalEvtLRval_ = clr;};
224  void setLRSignalEvtProb(double plr) {lrSignalEvtProb_ = plr;};
225 
226  private:
227 
228  //-------------------------------------------
229  // particle content
230  //-------------------------------------------
233  std::vector<pat::Particle> fitHadb_, fitHadp_, fitHadq_, fitHadbbar_, fitHadj_, fitHadk_;
234 
240  double probChi2_;
244  std::vector<std::pair<unsigned int, double> > lrJetCombVarVal_;
245  std::vector<std::pair<unsigned int, double> > lrSignalEvtVarVal_;
246 };
247 
248 #endif
void setSimpleBestJetComb(int sbs)
edm::Ref< std::vector< pat::Jet > > hadk_
int getMCChangeW1Q() const
edm::RefProd< TtGenEvent > theGenEvt_
int i
Definition: DBlmapReader.cc:9
void setHadj(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
pat::Jet getCalHadj() const
void setFitHadj(const pat::Particle &aFitHadj)
double getMCBestAngleHadbbar() const
const edm::RefProd< TtGenEvent > & getGenEvent() const
edm::Ref< std::vector< pat::Jet > > hadj_
double getLRSignalEvtObsVal(unsigned int) const
double getMCBestSumAngles() const
void setMCBestAngleHadp(double adr)
Steering class for the overall hadronic top likelihood.
reco::Particle getFitHadW_plus() const
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:302
void setFitHadb(const pat::Particle &aFitHadb)
pat::Particle getFitHadp() const
pat::Jet getCalHadq() const
std::vector< pat::Particle > fitHadj_
pat::Jet getHadbbar() const
reco::Particle getFitHadW_minus() const
void setLRSignalEvtObservables(const std::vector< std::pair< unsigned int, double > > &varval)
pat::Jet getCalHadp() const
pat::Jet getHadb() const
double getMCBestAngleHadb() const
void setFitHadp(const pat::Particle &aFitHadp)
void setMCBestAngleHadq(double adr)
const reco::GenParticle * getGenHadbbar() const
pat::Jet getHadq() const
const reco::GenParticle * getGenHadq() const
pat::Jet getHadj() const
reco::Particle getCalHadW_minus() const
const reco::GenParticle * getGenHadb() const
reco::Particle getCalHadW_plus() const
reco::Particle getCalHadtbar() const
std::vector< pat::Particle > fitHadp_
void setJetCorrectionScheme(int scheme)
void setProbChi2(double c)
int getSimpleBestJetComb() const
void setGenEvt(const edm::Handle< TtGenEvent > &aGenEvt)
pat::Jet getRecHadq() const
void setHadq(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
reco::Particle getFitHadt() const
reco::Particle getRecHadW_plus() const
int getJetParametrisation() const
void setLRJetCombObservables(const std::vector< std::pair< unsigned int, double > > &varval)
pat::Particle getFitHadk() const
std::vector< pat::Particle > fitHadb_
double getLRJetCombObsVal(unsigned int) const
double getProbChi2() const
double getLRSignalEvtLRval() const
void setMCChangeW2Q(int w2q)
pat::Jet getRecHadbbar() const
const reco::GenParticle * getGenHadp() const
pat::Particle getFitHadj() const
void setLRSignalEvtProb(double plr)
reco::Particle getRecHadt() const
int getMCChangeW2Q() const
const reco::GenParticle * getGenHadk() const
double getMCBestAngleHadk() const
pat::Jet getHadp() const
void setLRJetCombProb(double plr)
pat::Jet getCalHadb() const
void setMCBestAngleHadj(double adr)
double getLRSignalEvtProb() const
pat::Jet getRecHadb() const
pat::Jet getCalHadk() const
double getLRJetCombLRval() const
const reco::GenParticle * getGenHadj() const
void setMCBestSumAngles(double sdr)
virtual ~TtHadEvtSolution()
edm::Ref< std::vector< pat::Jet > > hadb_
pat::Jet getHadk() const
pat::Particle getFitHadb() const
void setHadk(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
double getLRJetCombProb() const
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
reco::Particle getRecHadW_minus() const
void setLRSignalEvtLRval(double clr)
void setLRBestJetComb(int lrbs)
void setHadp(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
std::string getDecay() const
Analysis-level particle class.
Definition: Particle.h:32
edm::Ref< std::vector< pat::Jet > > hadbbar_
std::vector< pat::Particle > fitHadk_
pat::Particle getFitHadbbar() const
double getMCBestAngleHadp() const
reco::Particle getCalHadt() const
void setFitHadbbar(const pat::Particle &aFitHadbbar)
pat::Jet getRecHadk() const
void setHadbbar(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Analysis-level calorimeter jet class.
Definition: Jet.h:73
void setFitHadk(const pat::Particle &aFitHadk)
double getMCBestAngleHadq() const
pat::Particle getFitHadq() const
void setMCBestJetComb(int mcbs)
int getLRBestJetComb() const
void setMCChangeW1Q(int w1q)
void setMCBestAngleHadb(double adr)
void setJetParametrisation(int jp)
void setFitHadq(const pat::Particle &aFitHadq)
pat::Jet getRecHadp() const
pat::Jet getRecHadj() const
edm::Ref< std::vector< pat::Jet > > hadp_
reco::Particle getFitHadtbar() const
reco::Particle getRecHadtbar() const
void setLRJetCombLRval(double clr)
void setMCBestAngleHadk(double adr)
void setHadb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
pat::Jet getCalHadbbar() const
edm::Ref< std::vector< pat::Jet > > hadq_
std::vector< pat::Particle > fitHadbbar_
double getMCBestAngleHadj() const
void setMCBestAngleHadbbar(double adr)
int getMCBestJetComb() const
std::vector< std::pair< unsigned int, double > > lrJetCombVarVal_
std::vector< pat::Particle > fitHadq_