CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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  friend class TtHadEvtSolutionMaker;
23  friend class TtFullHadKinFitter;
25  friend class TtHadLRJetCombCalc;
26  /*
27  friend class TtHadLRSignalSelObservables;
28  friend class TtHadLRSignalSelCalc;
29  */
30 
31 public:
33  virtual ~TtHadEvtSolution();
34 
35  //-------------------------------------------
36  // get calibrated base objects
37  //-------------------------------------------
38  pat::Jet getHadb() const;
39  pat::Jet getHadp() const;
40  pat::Jet getHadq() const;
41  pat::Jet getHadbbar() const;
42  pat::Jet getHadj() const;
43  pat::Jet getHadk() const;
44 
45  //-------------------------------------------
46  // get the matched gen particles
47  //-------------------------------------------
48  const edm::RefProd<TtGenEvent>& getGenEvent() const { return theGenEvt_; };
49  const reco::GenParticle* getGenHadb() const {
50  if (!theGenEvt_)
51  return nullptr;
52  else
53  return theGenEvt_->b();
54  };
56  if (!theGenEvt_)
57  return nullptr;
58  else
59  return theGenEvt_->bBar();
60  };
61  const reco::GenParticle* getGenHadp() const {
62  if (!theGenEvt_)
63  return nullptr;
64  else
65  return theGenEvt_->daughterQuarkOfWPlus();
66  };
67  const reco::GenParticle* getGenHadq() const {
68  if (!theGenEvt_)
69  return nullptr;
70  else
71  return theGenEvt_->daughterQuarkBarOfWPlus();
72  };
73  const reco::GenParticle* getGenHadj() const {
74  if (!theGenEvt_)
75  return nullptr;
76  else
77  return theGenEvt_->daughterQuarkOfWMinus();
78  };
79  const reco::GenParticle* getGenHadk() const {
80  if (!theGenEvt_)
81  return nullptr;
82  else
83  return theGenEvt_->daughterQuarkBarOfWMinus();
84  };
85 
86  //-------------------------------------------
87  // get (un-)/calibrated reco objects
88  //-------------------------------------------
89  reco::Particle getRecHadt() const;
93 
94  pat::Jet getRecHadb() const { return this->getHadb().correctedJet("RAW"); };
95  pat::Jet getRecHadbbar() const { return this->getHadbbar().correctedJet("RAW"); };
96  pat::Jet getRecHadp() const { return this->getHadp().correctedJet("RAW"); };
97  pat::Jet getRecHadq() const { return this->getHadq().correctedJet("RAW"); };
98  pat::Jet getRecHadj() const { return this->getHadj().correctedJet("RAW"); };
99  pat::Jet getRecHadk() const { return this->getHadk().correctedJet("RAW"); };
100 
101  reco::Particle getCalHadt() const;
105  pat::Jet getCalHadb() const { return this->getHadb(); };
106  pat::Jet getCalHadbbar() const { return this->getHadbbar(); };
107  pat::Jet getCalHadp() const { return this->getHadp(); };
108  pat::Jet getCalHadq() const { return this->getHadq(); };
109  pat::Jet getCalHadj() const { return this->getHadj(); };
110  pat::Jet getCalHadk() const { return this->getHadk(); };
111 
112  //-------------------------------------------
113  // get objects from kinematic fit
114  //-------------------------------------------
115  reco::Particle getFitHadt() const;
119  pat::Particle getFitHadb() const { return (!fitHadb_.empty() ? fitHadb_.front() : pat::Particle()); };
120  pat::Particle getFitHadbbar() const { return (!fitHadbbar_.empty() ? fitHadbbar_.front() : pat::Particle()); };
121  pat::Particle getFitHadp() const { return (!fitHadp_.empty() ? fitHadp_.front() : pat::Particle()); };
122  pat::Particle getFitHadq() const { return (!fitHadq_.empty() ? fitHadq_.front() : pat::Particle()); };
123  pat::Particle getFitHadj() const { return (!fitHadj_.empty() ? fitHadj_.front() : pat::Particle()); };
124  pat::Particle getFitHadk() const { return (!fitHadk_.empty() ? fitHadk_.front() : pat::Particle()); };
125 
126  //-------------------------------------------
127  // get the selected hadronic decay chain
128  //-------------------------------------------
129  std::string getDecay() const { return decay_; }
130 
131  //-------------------------------------------
132  // get info on the matching
133  //-------------------------------------------
134  double getMCBestSumAngles() const { return sumAnglejp_; };
135  double getMCBestAngleHadp() const { return angleHadp_; };
136  double getMCBestAngleHadq() const { return angleHadq_; };
137  double getMCBestAngleHadj() const { return angleHadj_; };
138  double getMCBestAngleHadk() const { return angleHadk_; };
139  double getMCBestAngleHadb() const { return angleHadb_; };
140  double getMCBestAngleHadbbar() const { return angleHadbbar_; };
141  int getMCChangeW1Q() const { return changeW1Q_; };
142  int getMCChangeW2Q() const { return changeW2Q_; };
143 
144  //-------------------------------------------
145  // get selected kinfit parametrisations of
146  //each type of object
147  //-------------------------------------------
148  int getJetParametrisation() const { return jetParam_; }
149 
150  //-------------------------------------------
151  // get the prob of the chi2 value resulting
152  // from the kinematic fit added chi2 for all
153  // fits
154  //-------------------------------------------
155  double getProbChi2() const { return probChi2_; }
156 
157  //-------------------------------------------
158  // get info on the outcome of the signal
159  // selection LR
160  //-------------------------------------------
161  double getLRSignalEvtObsVal(unsigned int) const;
162  double getLRSignalEvtLRval() const { return lrSignalEvtLRval_; }
163  double getLRSignalEvtProb() const { return lrSignalEvtProb_; }
164 
165  //-------------------------------------------
166  // get info on the outcome of the different
167  //jet combination methods
168  //-------------------------------------------
169  int getMCBestJetComb() const { return mcBestJetComb_; }
170  int getSimpleBestJetComb() const { return simpleBestJetComb_; }
171  int getLRBestJetComb() const { return lrBestJetComb_; }
172  double getLRJetCombObsVal(unsigned int) const;
173  double getLRJetCombLRval() const { return lrJetCombLRval_; }
174  double getLRJetCombProb() const { return lrJetCombProb_; }
175 
176  //protected: seems to cause compile error, check!!!
177 
178  //-------------------------------------------
179  // set the generated event
180  //-------------------------------------------
181  void setGenEvt(const edm::Handle<TtGenEvent>& aGenEvt);
182 
183  //-------------------------------------------
184  // set the basic objects
185  //-------------------------------------------
186  void setJetCorrectionScheme(int scheme) { jetCorrScheme_ = scheme; };
187  void setHadp(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
189  }
190  void setHadq(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
192  };
193  void setHadj(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
195  };
196  void setHadk(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
198  };
199  void setHadb(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
201  };
202  void setHadbbar(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
204  };
205 
206  //-------------------------------------------
207  // set the fitted objects
208  //-------------------------------------------
209  void setFitHadp(const pat::Particle& aFitHadp) {
210  fitHadp_.clear();
211  fitHadp_.push_back(aFitHadp);
212  };
213  void setFitHadq(const pat::Particle& aFitHadq) {
214  fitHadq_.clear();
215  fitHadq_.push_back(aFitHadq);
216  };
217  void setFitHadj(const pat::Particle& aFitHadj) {
218  fitHadj_.clear();
219  fitHadj_.push_back(aFitHadj);
220  };
221  void setFitHadk(const pat::Particle& aFitHadk) {
222  fitHadk_.clear();
223  fitHadk_.push_back(aFitHadk);
224  };
225  void setFitHadb(const pat::Particle& aFitHadb) {
226  fitHadb_.clear();
227  fitHadb_.push_back(aFitHadb);
228  };
229  void setFitHadbbar(const pat::Particle& aFitHadbbar) {
230  fitHadbbar_.clear();
231  fitHadbbar_.push_back(aFitHadbbar);
232  };
233 
234  //-------------------------------------------
235  // set matching info
236  //-------------------------------------------
237  void setMCBestSumAngles(double sdr) { sumAnglejp_ = sdr; };
238  void setMCBestAngleHadp(double adr) { angleHadp_ = adr; };
239  void setMCBestAngleHadq(double adr) { angleHadq_ = adr; };
240  void setMCBestAngleHadj(double adr) { angleHadj_ = adr; };
241  void setMCBestAngleHadk(double adr) { angleHadk_ = adr; };
242  void setMCBestAngleHadb(double adr) { angleHadb_ = adr; };
243  void setMCBestAngleHadbbar(double adr) { angleHadbbar_ = adr; };
244  void setMCChangeW1Q(int w1q) { changeW1Q_ = w1q; };
245  void setMCChangeW2Q(int w2q) { changeW2Q_ = w2q; };
246 
247  //-------------------------------------------
248  // methods to set the kinfit parametrisations
249  //of each type of object
250  //-------------------------------------------
251  void setJetParametrisation(int jp) { jetParam_ = jp; };
252 
253  //-------------------------------------------
254  // method to set the prob. of the chi2 value
255  //resulting from the kinematic fit
256  //-------------------------------------------
257  void setProbChi2(double c) { probChi2_ = c; };
258 
259  //-------------------------------------------
260  // methods to set the outcome of the different
261  // jet combination methods
262  //-------------------------------------------
263  void setMCBestJetComb(int mcbs) { mcBestJetComb_ = mcbs; };
264  void setSimpleBestJetComb(int sbs) { simpleBestJetComb_ = sbs; };
265  void setLRBestJetComb(int lrbs) { lrBestJetComb_ = lrbs; };
266  void setLRJetCombObservables(const std::vector<std::pair<unsigned int, double> >& varval);
267  void setLRJetCombLRval(double clr) { lrJetCombLRval_ = clr; };
268  void setLRJetCombProb(double plr) { lrJetCombProb_ = plr; };
269 
270  //-------------------------------------------
271  // methods to set the outcome of the signal
272  // selection LR
273  //-------------------------------------------
274  void setLRSignalEvtObservables(const std::vector<std::pair<unsigned int, double> >& varval);
275  void setLRSignalEvtLRval(double clr) { lrSignalEvtLRval_ = clr; };
276  void setLRSignalEvtProb(double plr) { lrSignalEvtProb_ = plr; };
277 
278 private:
279  //-------------------------------------------
280  // particle content
281  //-------------------------------------------
284  std::vector<pat::Particle> fitHadb_, fitHadp_, fitHadq_, fitHadbbar_, fitHadj_, fitHadk_;
285 
291  double probChi2_;
295  std::vector<std::pair<unsigned int, double> > lrJetCombVarVal_;
296  std::vector<std::pair<unsigned int, double> > lrSignalEvtVarVal_;
297 };
298 
299 #endif
void setSimpleBestJetComb(int sbs)
edm::Ref< std::vector< pat::Jet > > hadk_
int getMCChangeW1Q() const
edm::RefProd< TtGenEvent > theGenEvt_
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::EventSetup & c
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
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:30
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:77
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)
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
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_