test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
27  friend class TtFullLepKinSolver;
30  friend class TtLRSignalSelCalc;
31 
32  public:
33 
35  virtual ~TtDilepEvtSolution();
36 
37  //-------------------------------------------
38  // get calibrated base objects
39  //-------------------------------------------
40  pat::Jet getJetB() const;
41  pat::Jet getJetBbar() const;
42  pat::Electron getElectronp() const { return *elecp_; };
43  pat::Electron getElectronm() const { return *elecm_; };
44  pat::Muon getMuonp() const { return *muonp_; };
45  pat::Muon getMuonm() const { return *muonm_; };
46  pat::Tau getTaup() const { return *taup_; };
47  pat::Tau getTaum() const { return *taum_; };
48  pat::MET getMET() const { return *met_; };
49 
50  //-------------------------------------------
51  // get the matched gen particles
52  //-------------------------------------------
53  const edm::RefProd<TtGenEvent> & getGenEvent() const { return theGenEvt_; };
54  const reco::GenParticle * getGenT() const { if (!theGenEvt_) return 0; else return theGenEvt_->top(); };
55  const reco::GenParticle * getGenWp() const { if (!theGenEvt_) return 0; else return theGenEvt_->wPlus(); };
56  const reco::GenParticle * getGenB() const { if (!theGenEvt_) return 0; else return theGenEvt_->b(); };
57  const reco::GenParticle * getGenLepp() const { if (!theGenEvt_) return 0; else return theGenEvt_->leptonBar(); };
58  const reco::GenParticle * getGenN() const { if (!theGenEvt_) return 0; else return theGenEvt_->neutrino(); };
59  const reco::GenParticle * getGenTbar() const { if (!theGenEvt_) return 0; else return theGenEvt_->topBar(); };
60  const reco::GenParticle * getGenWm() const { if (!theGenEvt_) return 0; else return theGenEvt_->wMinus(); };
61  const reco::GenParticle * getGenBbar() const { if (!theGenEvt_) return 0; else return theGenEvt_->bBar(); };
62  const reco::GenParticle * getGenLepm() const { if (!theGenEvt_) return 0; else return theGenEvt_->lepton(); };
63  const reco::GenParticle * getGenNbar() const { if (!theGenEvt_) return 0; else return theGenEvt_->neutrinoBar(); };
64 
65  //-------------------------------------------
66  // get (un-)/calibrated reco objects
67  //-------------------------------------------
68  pat::Jet getRecJetB() const { return this->getJetB().correctedJet("RAW"); };
69  pat::Jet getCalJetB() const { return this->getJetB(); };
70  pat::Jet getRecJetBbar() const { return this->getJetBbar().correctedJet("RAW"); };
71  pat::Jet getCalJetBbar() const { return this->getJetBbar(); };
72 
73  //-------------------------------------------
74  // get info on the W decays
75  //-------------------------------------------
76  std::string getWpDecay() const { return wpDecay_; }
77  std::string getWmDecay() const { return wmDecay_; }
78 
79  //-------------------------------------------
80  // miscellaneous
81  //-------------------------------------------
82  double getJetResidual() const;
83  double getLeptonResidual() const;
84  double getFullResidual() const { return getJetResidual()+getFullResidual(); }
85  bool getBestSol() const { return bestSol_; }
86  double getRecTopMass() const {return topmass_; }
87  double getRecWeightMax() const {return weightmax_; }
88 
89  //-------------------------------------------
90  // returns the 4-vector of the positive
91  // lepton, with the charge and the pdgId
92  //-------------------------------------------
93  reco::Particle getLeptPos() const;
94 
95  //-------------------------------------------
96  // returns the 4-vector of the negative
97  // lepton, with the charge and the pdgId
98  //-------------------------------------------
99  reco::Particle getLeptNeg() const;
100 
101  //-------------------------------------------
102  // get info on the outcome of the signal
103  // selection LR
104  //-------------------------------------------
105  double getLRSignalEvtObsVal(unsigned int) const;
106  double getLRSignalEvtLRval() const { return lrSignalEvtLRval_; }
107  double getLRSignalEvtProb() const { return lrSignalEvtProb_; }
108 
109  protected:
110 
111  //-------------------------------------------
112  // set the generated event
113  //-------------------------------------------
114  void setGenEvt(const edm::Handle<TtGenEvent>&);
115 
116  //-------------------------------------------
117  // set the basic objects
118  //-------------------------------------------
119  void setJetCorrectionScheme(int jetCorrScheme)
120  { jetCorrScheme_ = jetCorrScheme; };
121  void setB(const edm::Handle<std::vector<pat::Jet> >& jet, int i)
123  void setBbar(const edm::Handle<std::vector<pat::Jet> >& jet, int i)
125  void setMuonp(const edm::Handle<std::vector<pat::Muon> >& muon, int i)
127  void setMuonm(const edm::Handle<std::vector<pat::Muon> >& muon, int i)
129  void setTaup(const edm::Handle<std::vector<pat::Tau> >& tau, int i)
131  void setTaum(const edm::Handle<std::vector<pat::Tau> >& tau, int i)
133  void setElectronp(const edm::Handle<std::vector<pat::Electron> >& elec, int i)
134  { elecp_ = edm::Ref<std::vector<pat::Electron> >(elec, i); wpDecay_ = "electron"; };
135  void setElectronm(const edm::Handle<std::vector<pat::Electron> >& elec, int i)
136  { elecm_ = edm::Ref<std::vector<pat::Electron> >(elec, i); wmDecay_ = "electron"; };
137  void setMET(const edm::Handle<std::vector<pat::MET> >& met, int i)
139 
140  //-------------------------------------------
141  // miscellaneous
142  //-------------------------------------------
143  void setBestSol(bool bs) { bestSol_ = bs; };
144  void setRecTopMass(double mass) { topmass_ = mass; };
145  void setRecWeightMax(double wgt) { weightmax_ = wgt; };
146 
147  //-------------------------------------------
148  // set the outcome of the signal selection LR
149  //-------------------------------------------
150  void setLRSignalEvtObservables(const std::vector<std::pair<unsigned int, double> >&);
151  void setLRSignalEvtLRval(double clr) {lrSignalEvtLRval_ = clr;};
152  void setLRSignalEvtProb(double plr) {lrSignalEvtProb_ = plr;};
153 
154  private:
155 
156  //-------------------------------------------
157  // particle content
158  //-------------------------------------------
165 
166  //-------------------------------------------
167  // miscellaneous
168  //-------------------------------------------
172  bool bestSol_;
173  double topmass_;
174  double weightmax_;
175 
177  std::vector<std::pair<unsigned int, double> > lrSignalEvtVarVal_;
178 };
179 
180 #endif
Analysis-level MET class.
Definition: MET.h:43
pat::Jet getCalJetBbar() const
const reco::GenParticle * getGenLepm() const
void setRecWeightMax(double wgt)
int i
Definition: DBlmapReader.cc:9
void setLRSignalEvtLRval(double clr)
const reco::GenParticle * getGenWp() const
edm::Ref< std::vector< pat::MET > > met_
edm::Ref< std::vector< pat::Jet > > jetB_
void setElectronm(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
edm::Ref< std::vector< pat::Tau > > taum_
void setElectronp(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
void setB(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
void setBestSol(bool bs)
const reco::GenParticle * getGenWm() const
const edm::RefProd< TtGenEvent > & getGenEvent() const
pat::MET getMET() const
const reco::GenParticle * getGenBbar() const
const reco::GenParticle * getGenN() const
pat::Electron getElectronm() const
double getLRSignalEvtProb() const
double getRecWeightMax() const
pat::Jet getRecJetBbar() const
std::string getWmDecay() const
std::string getWpDecay() const
const reco::GenParticle * getGenTbar() const
void setMuonm(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
double getLRSignalEvtObsVal(unsigned int) const
edm::Ref< std::vector< pat::Electron > > elecp_
void setLRSignalEvtObservables(const std::vector< std::pair< unsigned int, double > > &)
const reco::GenParticle * getGenNbar() const
edm::Ref< std::vector< pat::Muon > > muonm_
reco::Particle getLeptNeg() const
pat::Jet getJetBbar() const
void setMET(const edm::Handle< std::vector< pat::MET > > &met, int i)
pat::Electron getElectronp() const
edm::Ref< std::vector< pat::Jet > > jetBbar_
reco::Particle getLeptPos() const
double getRecTopMass() const
pat::Tau getTaup() const
friend class TtLRSignalSelCalc
void setTaup(const edm::Handle< std::vector< pat::Tau > > &tau, int i)
Analysis-level tau class.
Definition: Tau.h:56
void setJetCorrectionScheme(int jetCorrScheme)
edm::RefProd< TtGenEvent > theGenEvt_
pat::Muon getMuonm() const
double getFullResidual() const
pat::Jet getJetB() const
double getLeptonResidual() const
void setGenEvt(const edm::Handle< TtGenEvent > &)
bool getBestSol() const
pat::Tau getTaum() const
void setMuonp(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
pat::Jet getCalJetB() const
std::vector< std::pair< unsigned int, double > > lrSignalEvtVarVal_
Analysis-level electron class.
Definition: Electron.h:52
const reco::GenParticle * getGenLepp() const
Analysis-level calorimeter jet class.
Definition: Jet.h:77
double getJetResidual() const
edm::Ref< std::vector< pat::Tau > > taup_
pat::Jet getRecJetB() const
void setTaum(const edm::Handle< std::vector< pat::Tau > > &tau, int i)
double getLRSignalEvtLRval() const
void setLRSignalEvtProb(double plr)
pat::Muon getMuonp() const
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
void setRecTopMass(double mass)
Analysis-level muon class.
Definition: Muon.h:49
const reco::GenParticle * getGenT() const
const reco::GenParticle * getGenB() const
edm::Ref< std::vector< pat::Muon > > muonp_
edm::Ref< std::vector< pat::Electron > > elecm_
void setBbar(const edm::Handle< std::vector< pat::Jet > > &jet, int i)