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