CMS 3D CMS Logo

TtDilepEvtSolution.h
Go to the documentation of this file.
1 //
2 //
3 
4 #ifndef TopObjects_TtDilepEvtSolution_h
5 #define TopObjects_TtDilepEvtSolution_h
6 
7 #include <vector>
8 #include <string>
9 
13 
17 
24 
26  friend class TtFullLepKinSolver;
29  friend class TtLRSignalSelCalc;
30 
31 public:
33  virtual ~TtDilepEvtSolution();
34 
35  //-------------------------------------------
36  // get calibrated base objects
37  //-------------------------------------------
38  pat::Jet getJetB() const;
39  pat::Jet getJetBbar() const;
40  pat::Electron getElectronp() const { return *elecp_; };
41  pat::Electron getElectronm() const { return *elecm_; };
42  pat::Muon getMuonp() const { return *muonp_; };
43  pat::Muon getMuonm() const { return *muonm_; };
44  pat::Tau getTaup() const { return *taup_; };
45  pat::Tau getTaum() const { return *taum_; };
46  pat::MET getMET() const { return *met_; };
47 
48  //-------------------------------------------
49  // get the matched gen particles
50  //-------------------------------------------
51  const edm::RefProd<TtGenEvent>& getGenEvent() const { return theGenEvt_; };
52  const reco::GenParticle* getGenT() const {
53  if (!theGenEvt_)
54  return nullptr;
55  else
56  return theGenEvt_->top();
57  };
58  const reco::GenParticle* getGenWp() const {
59  if (!theGenEvt_)
60  return nullptr;
61  else
62  return theGenEvt_->wPlus();
63  };
64  const reco::GenParticle* getGenB() const {
65  if (!theGenEvt_)
66  return nullptr;
67  else
68  return theGenEvt_->b();
69  };
70  const reco::GenParticle* getGenLepp() const {
71  if (!theGenEvt_)
72  return nullptr;
73  else
74  return theGenEvt_->leptonBar();
75  };
76  const reco::GenParticle* getGenN() const {
77  if (!theGenEvt_)
78  return nullptr;
79  else
80  return theGenEvt_->neutrino();
81  };
82  const reco::GenParticle* getGenTbar() const {
83  if (!theGenEvt_)
84  return nullptr;
85  else
86  return theGenEvt_->topBar();
87  };
88  const reco::GenParticle* getGenWm() const {
89  if (!theGenEvt_)
90  return nullptr;
91  else
92  return theGenEvt_->wMinus();
93  };
94  const reco::GenParticle* getGenBbar() const {
95  if (!theGenEvt_)
96  return nullptr;
97  else
98  return theGenEvt_->bBar();
99  };
100  const reco::GenParticle* getGenLepm() const {
101  if (!theGenEvt_)
102  return nullptr;
103  else
104  return theGenEvt_->lepton();
105  };
106  const reco::GenParticle* getGenNbar() const {
107  if (!theGenEvt_)
108  return nullptr;
109  else
110  return theGenEvt_->neutrinoBar();
111  };
112 
113  //-------------------------------------------
114  // get (un-)/calibrated reco objects
115  //-------------------------------------------
116  pat::Jet getRecJetB() const { return this->getJetB().correctedJet("RAW"); };
117  pat::Jet getCalJetB() const { return this->getJetB(); };
118  pat::Jet getRecJetBbar() const { return this->getJetBbar().correctedJet("RAW"); };
119  pat::Jet getCalJetBbar() const { return this->getJetBbar(); };
120 
121  //-------------------------------------------
122  // get info on the W decays
123  //-------------------------------------------
124  std::string getWpDecay() const { return wpDecay_; }
125  std::string getWmDecay() const { return wmDecay_; }
126 
127  //-------------------------------------------
128  // miscellaneous
129  //-------------------------------------------
130  double getJetResidual() const;
131  double getLeptonResidual() const;
132  double getFullResidual() const { return getJetResidual() + getLeptonResidual(); }
133  bool getBestSol() const { return bestSol_; }
134  double getRecTopMass() const { return topmass_; }
135  double getRecWeightMax() const { return weightmax_; }
136 
137  //-------------------------------------------
138  // returns the 4-vector of the positive
139  // lepton, with the charge and the pdgId
140  //-------------------------------------------
141  reco::Particle getLeptPos() const;
142 
143  //-------------------------------------------
144  // returns the 4-vector of the negative
145  // lepton, with the charge and the pdgId
146  //-------------------------------------------
147  reco::Particle getLeptNeg() const;
148 
149  //-------------------------------------------
150  // get info on the outcome of the signal
151  // selection LR
152  //-------------------------------------------
153  double getLRSignalEvtObsVal(unsigned int) const;
154  double getLRSignalEvtLRval() const { return lrSignalEvtLRval_; }
155  double getLRSignalEvtProb() const { return lrSignalEvtProb_; }
156 
157 protected:
158  //-------------------------------------------
159  // set the generated event
160  //-------------------------------------------
161  void setGenEvt(const edm::Handle<TtGenEvent>&);
162 
163  //-------------------------------------------
164  // set the basic objects
165  //-------------------------------------------
166  void setJetCorrectionScheme(int jetCorrScheme) { jetCorrScheme_ = jetCorrScheme; };
167  void setB(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
169  };
170  void setBbar(const edm::Handle<std::vector<pat::Jet> >& jet, int i) {
172  };
173  void setMuonp(const edm::Handle<std::vector<pat::Muon> >& muon, int i) {
175  wpDecay_ = "muon";
176  };
177  void setMuonm(const edm::Handle<std::vector<pat::Muon> >& muon, int i) {
179  wmDecay_ = "muon";
180  }
181  void setTaup(const edm::Handle<std::vector<pat::Tau> >& tau, int i) {
183  wpDecay_ = "tau";
184  }
185  void setTaum(const edm::Handle<std::vector<pat::Tau> >& tau, int i) {
187  wmDecay_ = "tau";
188  }
189  void setElectronp(const edm::Handle<std::vector<pat::Electron> >& elec, int i) {
191  wpDecay_ = "electron";
192  };
193  void setElectronm(const edm::Handle<std::vector<pat::Electron> >& elec, int i) {
195  wmDecay_ = "electron";
196  };
197  void setMET(const edm::Handle<std::vector<pat::MET> >& met, int i) {
199  };
200 
201  //-------------------------------------------
202  // miscellaneous
203  //-------------------------------------------
204  void setBestSol(bool bs) { bestSol_ = bs; };
205  void setRecTopMass(double mass) { topmass_ = mass; };
206  void setRecWeightMax(double wgt) { weightmax_ = wgt; };
207 
208  //-------------------------------------------
209  // set the outcome of the signal selection LR
210  //-------------------------------------------
211  void setLRSignalEvtObservables(const std::vector<std::pair<unsigned int, double> >&);
212  void setLRSignalEvtLRval(double clr) { lrSignalEvtLRval_ = clr; };
213  void setLRSignalEvtProb(double plr) { lrSignalEvtProb_ = plr; };
214 
215 private:
216  //-------------------------------------------
217  // particle content
218  //-------------------------------------------
225 
226  //-------------------------------------------
227  // miscellaneous
228  //-------------------------------------------
232  bool bestSol_;
233  double topmass_;
234  double weightmax_;
235 
237  std::vector<std::pair<unsigned int, double> > lrSignalEvtVarVal_;
238 };
239 
240 #endif
edm::RefProd< TtGenEvent >
RefProd.h
TtGenEvent::neutrino
const reco::GenParticle * neutrino(bool excludeTauLeptons=false) const
get neutrino for semi-leptonic or full leptonic decays
Definition: TtGenEvent.cc:111
TtDilepEvtSolution::getLeptonResidual
double getLeptonResidual() const
Definition: TtDilepEvtSolution.cc:81
Handle.h
TtDilepEvtSolution::taum_
edm::Ref< std::vector< pat::Tau > > taum_
Definition: TtDilepEvtSolution.h:222
mps_fire.i
i
Definition: mps_fire.py:355
TtDilepEvtSolution::jetBbar_
edm::Ref< std::vector< pat::Jet > > jetBbar_
Definition: TtDilepEvtSolution.h:223
TtDilepEvtSolution::lrSignalEvtLRval_
double lrSignalEvtLRval_
Definition: TtDilepEvtSolution.h:236
TtDilepEvtSolutionMaker
Definition: TtDilepEvtSolutionMaker.h:14
TtDilepEvtSolution::setGenEvt
void setGenEvt(const edm::Handle< TtGenEvent > &)
Definition: TtDilepEvtSolution.cc:137
metsig::tau
Definition: SignAlgoResolutions.h:49
muon
Definition: MuonCocktails.h:17
reco::Particle
Definition: Particle.h:16
reco::GenParticle
Definition: GenParticle.h:21
TtDilepEvtSolution::getRecJetB
pat::Jet getRecJetB() const
Definition: TtDilepEvtSolution.h:116
TtDilepEvtSolution::getLRSignalEvtProb
double getLRSignalEvtProb() const
Definition: TtDilepEvtSolution.h:155
TtDilepEvtSolution::setRecTopMass
void setRecTopMass(double mass)
Definition: TtDilepEvtSolution.h:205
Muon.h
TtDilepEvtSolution::setBbar
void setBbar(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtDilepEvtSolution.h:170
pat::Tau
Analysis-level tau class.
Definition: Tau.h:53
TtDilepEvtSolution::getGenTbar
const reco::GenParticle * getGenTbar() const
Definition: TtDilepEvtSolution.h:82
TtDilepEvtSolution::getLRSignalEvtLRval
double getLRSignalEvtLRval() const
Definition: TtDilepEvtSolution.h:154
TtDilepEvtSolution::getElectronm
pat::Electron getElectronm() const
Definition: TtDilepEvtSolution.h:41
TopGenEvent::b
const reco::GenParticle * b() const
return b quark if available; 0 else
Definition: TopGenEvent.h:97
TtDilepEvtSolution::getCalJetB
pat::Jet getCalJetB() const
Definition: TtDilepEvtSolution.h:117
TtGenEvent::lepton
const reco::GenParticle * lepton(bool excludeTauLeptons=false) const
get lepton for semi-leptonic or full leptonic decays
Definition: TtGenEvent.cc:69
TtDilepEvtSolution::getCalJetBbar
pat::Jet getCalJetBbar() const
Definition: TtDilepEvtSolution.h:119
TtDilepEvtSolution::met_
edm::Ref< std::vector< pat::MET > > met_
Definition: TtDilepEvtSolution.h:224
TtDilepEvtSolution::getJetB
pat::Jet getJetB() const
Definition: TtDilepEvtSolution.cc:22
TtDilepEvtSolution::jetB_
edm::Ref< std::vector< pat::Jet > > jetB_
Definition: TtDilepEvtSolution.h:223
TopGenEvent::wMinus
const reco::GenParticle * wMinus() const
return W minus if available; 0 else
Definition: TopGenEvent.h:93
TtDilepEvtSolution::getGenB
const reco::GenParticle * getGenB() const
Definition: TtDilepEvtSolution.h:64
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
TtDilepEvtSolution::elecp_
edm::Ref< std::vector< pat::Electron > > elecp_
Definition: TtDilepEvtSolution.h:220
HLT_2018_cff.muon
muon
Definition: HLT_2018_cff.py:10349
edm::Handle
Definition: AssociativeIterator.h:50
TtDilepEvtSolution::getTaum
pat::Tau getTaum() const
Definition: TtDilepEvtSolution.h:45
Tau.h
TtDilepEvtSolution::topmass_
double topmass_
Definition: TtDilepEvtSolution.h:233
edm::Ref
Definition: AssociativeIterator.h:58
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
TopGenEvent::topBar
const reco::GenParticle * topBar() const
return anti-top if available; 0 else
Definition: TopGenEvent.h:103
GenParticle.h
TtDilepEvtSolution::getWpDecay
std::string getWpDecay() const
Definition: TtDilepEvtSolution.h:124
TtDilepEvtSolution::getLeptPos
reco::Particle getLeptPos() const
Definition: TtDilepEvtSolution.cc:52
TtDilepEvtSolution::getJetResidual
double getJetResidual() const
Definition: TtDilepEvtSolution.cc:72
TtDilepEvtSolution::TtLRSignalSelCalc
friend class TtLRSignalSelCalc
Definition: TtDilepEvtSolution.h:29
TtDilepEvtSolution::wpDecay_
std::string wpDecay_
Definition: TtDilepEvtSolution.h:230
TopGenEvent::bBar
const reco::GenParticle * bBar() const
return anti-b quark if available; 0 else
Definition: TopGenEvent.h:99
TtDilepEvtSolution::getBestSol
bool getBestSol() const
Definition: TtDilepEvtSolution.h:133
cms::cuda::bs
bs
Definition: HistoContainer.h:127
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
TtDilepEvtSolution::theGenEvt_
edm::RefProd< TtGenEvent > theGenEvt_
Definition: TtDilepEvtSolution.h:213
TtDilepEvtSolution::getGenEvent
const edm::RefProd< TtGenEvent > & getGenEvent() const
Definition: TtDilepEvtSolution.h:51
TtDilepEvtSolution::getMuonp
pat::Muon getMuonp() const
Definition: TtDilepEvtSolution.h:42
TtDilepEvtSolution::getGenNbar
const reco::GenParticle * getGenNbar() const
Definition: TtDilepEvtSolution.h:106
TtDilepEvtSolution::jetCorrScheme_
int jetCorrScheme_
Definition: TtDilepEvtSolution.h:229
TtDilepEvtSolution::elecm_
edm::Ref< std::vector< pat::Electron > > elecm_
Definition: TtDilepEvtSolution.h:220
TtDilepEvtSolution::lrSignalEvtVarVal_
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
Definition: TtDilepEvtSolution.h:237
TtDilepEvtSolution::setJetCorrectionScheme
void setJetCorrectionScheme(int jetCorrScheme)
Definition: TtDilepEvtSolution.h:166
TtDilepEvtSolution::getGenBbar
const reco::GenParticle * getGenBbar() const
Definition: TtDilepEvtSolution.h:94
Particle.h
TtDilepEvtSolution::lrSignalEvtProb_
double lrSignalEvtProb_
Definition: TtDilepEvtSolution.h:236
TtDilepEvtSolution::getGenWm
const reco::GenParticle * getGenWm() const
Definition: TtDilepEvtSolution.h:88
TtDilepEvtSolution::getGenWp
const reco::GenParticle * getGenWp() const
Definition: TtDilepEvtSolution.h:58
TtDilepEvtSolution::setLRSignalEvtObservables
void setLRSignalEvtObservables(const std::vector< std::pair< unsigned int, double > > &)
Definition: TtDilepEvtSolution.cc:148
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
TtDilepEvtSolution::getElectronp
pat::Electron getElectronp() const
Definition: TtDilepEvtSolution.h:40
TopGenEvent::top
const reco::GenParticle * top() const
return top if available; 0 else
Definition: TopGenEvent.h:101
TtDilepEvtSolution::muonm_
edm::Ref< std::vector< pat::Muon > > muonm_
Definition: TtDilepEvtSolution.h:221
TtDilepEvtSolution::bestSol_
bool bestSol_
Definition: TtDilepEvtSolution.h:232
TtDilepEvtSolution::setRecWeightMax
void setRecWeightMax(double wgt)
Definition: TtDilepEvtSolution.h:206
TtDilepEvtSolution::getGenT
const reco::GenParticle * getGenT() const
Definition: TtDilepEvtSolution.h:52
TtGenEvent.h
TtDilepEvtSolution::getTaup
pat::Tau getTaup() const
Definition: TtDilepEvtSolution.h:44
TtDilepEvtSolution::TtDilepEvtSolution
TtDilepEvtSolution()
Definition: TtDilepEvtSolution.cc:8
TtDilepEvtSolution::getWmDecay
std::string getWmDecay() const
Definition: TtDilepEvtSolution.h:125
TopGenEvent::wPlus
const reco::GenParticle * wPlus() const
return W plus if available; 0 else
Definition: TopGenEvent.h:95
pat::MET
Analysis-level MET class.
Definition: MET.h:40
TtDilepEvtSolution::setTaup
void setTaup(const edm::Handle< std::vector< pat::Tau > > &tau, int i)
Definition: TtDilepEvtSolution.h:181
TtDilepEvtSolution::setElectronp
void setElectronp(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
Definition: TtDilepEvtSolution.h:189
TtDilepEvtSolution::taup_
edm::Ref< std::vector< pat::Tau > > taup_
Definition: TtDilepEvtSolution.h:222
MET.h
Jet.h
TtDilepEvtSolution::setMET
void setMET(const edm::Handle< std::vector< pat::MET > > &met, int i)
Definition: TtDilepEvtSolution.h:197
TtDilepEvtSolution::muonp_
edm::Ref< std::vector< pat::Muon > > muonp_
Definition: TtDilepEvtSolution.h:221
TtDilepEvtSolution::setBestSol
void setBestSol(bool bs)
Definition: TtDilepEvtSolution.h:204
TtDilepEvtSolution::getGenLepp
const reco::GenParticle * getGenLepp() const
Definition: TtDilepEvtSolution.h:70
TtGenEvent::leptonBar
const reco::GenParticle * leptonBar(bool excludeTauLeptons=false) const
get anti-lepton for semi-leptonic or full leptonic decays
Definition: TtGenEvent.cc:83
TtDilepEvtSolution::getMET
pat::MET getMET() const
Definition: TtDilepEvtSolution.h:46
TtDilepEvtSolution::weightmax_
double weightmax_
Definition: TtDilepEvtSolution.h:234
Ref.h
TtDilepEvtSolution::setTaum
void setTaum(const edm::Handle< std::vector< pat::Tau > > &tau, int i)
Definition: TtDilepEvtSolution.h:185
metsig::jet
Definition: SignAlgoResolutions.h:47
TtDilepEvtSolution::getGenLepm
const reco::GenParticle * getGenLepm() const
Definition: TtDilepEvtSolution.h:100
TtDilepEvtSolution::getLRSignalEvtObsVal
double getLRSignalEvtObsVal(unsigned int) const
Definition: TtDilepEvtSolution.cc:125
TtDilepEvtSolution::getMuonm
pat::Muon getMuonm() const
Definition: TtDilepEvtSolution.h:43
TtDilepEvtSolution::wmDecay_
std::string wmDecay_
Definition: TtDilepEvtSolution.h:231
EgHLTOffHistBins_cfi.mass
mass
Definition: EgHLTOffHistBins_cfi.py:34
TtDilepEvtSolution::setMuonp
void setMuonp(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
Definition: TtDilepEvtSolution.h:173
TtDilepEvtSolution::getRecWeightMax
double getRecWeightMax() const
Definition: TtDilepEvtSolution.h:135
TtDilepEvtSolution::getJetBbar
pat::Jet getJetBbar() const
Definition: TtDilepEvtSolution.cc:35
pat::Jet::correctedJet
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
TtDilepEvtSolution::getLeptNeg
reco::Particle getLeptNeg() const
Definition: TtDilepEvtSolution.cc:104
TtDilepEvtSolution::setMuonm
void setMuonm(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
Definition: TtDilepEvtSolution.h:177
Electron.h
TtDilepEvtSolution::setB
void setB(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: TtDilepEvtSolution.h:167
TtDilepEvtSolution::setElectronm
void setElectronm(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
Definition: TtDilepEvtSolution.h:193
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
TtDilepLRSignalSelObservables
Definition: TtDilepLRSignalSelObservables.h:16
TtDilepEvtSolution::getRecTopMass
double getRecTopMass() const
Definition: TtDilepEvtSolution.h:134
Particle.h
TtDilepEvtSolution::setLRSignalEvtLRval
void setLRSignalEvtLRval(double clr)
Definition: TtDilepEvtSolution.h:212
TtDilepEvtSolution::getRecJetBbar
pat::Jet getRecJetBbar() const
Definition: TtDilepEvtSolution.h:118
TtGenEvent::neutrinoBar
const reco::GenParticle * neutrinoBar(bool excludeTauLeptons=false) const
get anti-neutrino for semi-leptonic or full leptonic decays
Definition: TtGenEvent.cc:125
TtDilepEvtSolution::setLRSignalEvtProb
void setLRSignalEvtProb(double plr)
Definition: TtDilepEvtSolution.h:213
TtDilepEvtSolution::getFullResidual
double getFullResidual() const
Definition: TtDilepEvtSolution.h:132
TtDilepEvtSolution::~TtDilepEvtSolution
virtual ~TtDilepEvtSolution()
Definition: TtDilepEvtSolution.cc:17
TtDilepEvtSolution::getGenN
const reco::GenParticle * getGenN() const
Definition: TtDilepEvtSolution.h:76
TtFullLepKinSolver
Definition: TtFullLepKinSolver.h:25
TtDilepEvtSolution
Definition: TtDilepEvtSolution.h:25