CMS 3D CMS Logo

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
66  };
67  const reco::GenParticle* getGenHadq() const {
68  if (!theGenEvt_)
69  return nullptr;
70  else
72  };
73  const reco::GenParticle* getGenHadj() const {
74  if (!theGenEvt_)
75  return nullptr;
76  else
78  };
79  const reco::GenParticle* getGenHadk() const {
80  if (!theGenEvt_)
81  return nullptr;
82  else
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  //-------------------------------------------
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_
reco::Particle getCalHadtbar() const
int getLRBestJetComb() const
const reco::GenParticle * b() const
return b quark if available; 0 else
Definition: TopGenEvent.h:97
edm::RefProd< TtGenEvent > theGenEvt_
void setHadj(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
pat::Jet getRecHadb() const
void setFitHadj(const pat::Particle &aFitHadj)
edm::Ref< std::vector< pat::Jet > > hadj_
pat::Jet getCalHadq() const
double getLRSignalEvtProb() const
pat::Particle getFitHadk() const
double getProbChi2() const
double getMCBestAngleHadk() const
int getMCChangeW2Q() const
reco::Particle getFitHadW_plus() const
void setMCBestAngleHadp(double adr)
Steering class for the overall hadronic top likelihood.
double getMCBestAngleHadbbar() const
void setFitHadb(const pat::Particle &aFitHadb)
const reco::GenParticle * getGenHadb() const
std::vector< pat::Particle > fitHadj_
pat::Jet getHadk() const
void setLRSignalEvtObservables(const std::vector< std::pair< unsigned int, double > > &varval)
pat::Jet getRecHadbbar() const
double getMCBestAngleHadj() const
void setFitHadp(const pat::Particle &aFitHadp)
void setMCBestAngleHadq(double adr)
const reco::GenParticle * getGenHadq() const
std::string getDecay() const
const reco::GenParticle * getGenHadj() const
reco::Particle getCalHadt() const
const reco::GenParticle * bBar() const
return anti-b quark if available; 0 else
Definition: TopGenEvent.h:99
int getMCBestJetComb() const
std::vector< pat::Particle > fitHadp_
void setJetCorrectionScheme(int scheme)
void setProbChi2(double c)
reco::Particle getRecHadW_minus() const
const reco::GenParticle * daughterQuarkOfWPlus(bool invertQuarkCharge=false, bool invertBosonCharge=false) const
return quark daughter quark of W boson
Definition: TopGenEvent.cc:150
void setGenEvt(const edm::Handle< TtGenEvent > &aGenEvt)
pat::Jet getCalHadj() const
void setHadq(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
pat::Jet getRecHadq() const
pat::Jet getCalHadp() const
pat::Jet getHadq() const
void setLRJetCombObservables(const std::vector< std::pair< unsigned int, double > > &varval)
const reco::GenParticle * getGenHadbbar() const
std::vector< pat::Particle > fitHadb_
void setMCChangeW2Q(int w2q)
void setLRSignalEvtProb(double plr)
void setLRJetCombProb(double plr)
const reco::GenParticle * getGenHadp() const
double getLRJetCombLRval() const
void setMCBestAngleHadj(double adr)
const edm::RefProd< TtGenEvent > & getGenEvent() const
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
reco::Particle getFitHadW_minus() const
double getMCBestSumAngles() const
void setMCBestSumAngles(double sdr)
virtual ~TtHadEvtSolution()
edm::Ref< std::vector< pat::Jet > > hadb_
double getLRSignalEvtObsVal(unsigned int) const
void setHadk(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
const reco::GenParticle * daughterQuarkBarOfWMinus() const
return anti-quark daughter of anti-W boson
Definition: TopGenEvent.h:76
pat::Jet getHadb() const
pat::Particle getFitHadb() const
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
void setLRSignalEvtLRval(double clr)
reco::Particle getRecHadt() const
pat::Particle getFitHadj() const
reco::Particle getFitHadtbar() const
void setLRBestJetComb(int lrbs)
void setHadp(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
pat::Jet getHadbbar() const
reco::Particle getRecHadW_plus() const
pat::Particle getFitHadq() const
Analysis-level particle class.
Definition: Particle.h:30
edm::Ref< std::vector< pat::Jet > > hadbbar_
std::vector< pat::Particle > fitHadk_
double getLRJetCombObsVal(unsigned int) const
void setFitHadbbar(const pat::Particle &aFitHadbbar)
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)
int getMCChangeW1Q() const
void setMCBestJetComb(int mcbs)
void setMCChangeW1Q(int w1q)
int getJetParametrisation() const
reco::Particle getFitHadt() const
double getMCBestAngleHadp() const
double getLRSignalEvtLRval() const
void setMCBestAngleHadb(double adr)
pat::Jet getCalHadb() const
void setJetParametrisation(int jp)
double getMCBestAngleHadq() const
void setFitHadq(const pat::Particle &aFitHadq)
pat::Jet getHadj() const
pat::Jet getRecHadk() const
edm::Ref< std::vector< pat::Jet > > hadp_
pat::Particle getFitHadbbar() const
const reco::GenParticle * getGenHadk() const
void setLRJetCombLRval(double clr)
void setMCBestAngleHadk(double adr)
pat::Jet getRecHadp() const
pat::Jet getRecHadj() const
reco::Particle getRecHadtbar() const
void setHadb(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
const reco::GenParticle * daughterQuarkOfWMinus() const
return quark daughter of anti-W boson
Definition: TopGenEvent.h:72
const reco::GenParticle * daughterQuarkBarOfWPlus() const
return anti-quark daughter of W boson
Definition: TopGenEvent.h:74
reco::Particle getCalHadW_plus() const
pat::Jet getCalHadk() const
pat::Jet getCalHadbbar() const
reco::Particle getCalHadW_minus() const
edm::Ref< std::vector< pat::Jet > > hadq_
std::vector< pat::Particle > fitHadbbar_
void setMCBestAngleHadbbar(double adr)
std::vector< std::pair< unsigned int, double > > lrJetCombVarVal_
pat::Particle getFitHadp() const
double getMCBestAngleHadb() const
int getSimpleBestJetComb() const
pat::Jet getHadp() const
std::vector< pat::Particle > fitHadq_
double getLRJetCombProb() const