CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StEvtSolution.h
Go to the documentation of this file.
1 //
2 // $Id: StEvtSolution.h,v 1.13 2008/12/18 21:20:10 rwolf Exp $
3 //
4 
5 #ifndef TopObjects_StEvtSolution_h
6 #define TopObjects_StEvtSolution_h
7 
8 #include <vector>
9 
13 
19 
21 
23 
24  friend class StEvtSolutionMaker;
25  friend class StKinFitter;
26 
27  public:
28 
29  StEvtSolution();
30  virtual ~StEvtSolution();
31 
32  //-------------------------------------------
33  // get calibrated base objects
34  //-------------------------------------------
35  pat::Jet getBottom() const;
36  pat::Jet getLight() const;
37  pat::Muon getMuon() const { return *muon_; };
38  pat::Electron getElectron() const { return *electron_; };
39  pat::MET getNeutrino() const { return *neutrino_; };
40  reco::Particle getLepW() const;
41  reco::Particle getLept() const;
42 
43  //-------------------------------------------
44  // get the matched gen particles
45  //-------------------------------------------
46  const edm::RefProd<StGenEvent>& getGenEvent() const { return theGenEvt_; };
47  const reco::GenParticle * getGenBottom() const;
48  //const reco::GenParticle * getGenLight() const; // not implemented yet
49  const reco::GenParticle * getGenLepton() const;
50  const reco::GenParticle * getGenNeutrino() const;
51  const reco::GenParticle * getGenLepW() const;
52  const reco::GenParticle * getGenLept() const;
53 
54  //-------------------------------------------
55  // get uncalibrated reco objects
56  //-------------------------------------------
57  pat::Jet getRecBottom() const { return this->getBottom().correctedJet("RAW"); };
58  pat::Jet getRecLight() const { return this->getLight ().correctedJet("RAW"); };
59  pat::Muon getRecMuon() const { return this->getMuon(); }; // redundant
60  pat::Electron getRecElectron() const { return this->getElectron(); }; // redundant
61  pat::MET getRecNeutrino() const { return this->getNeutrino(); }; // redundant
62  reco::Particle getRecLepW() const { return this->getLepW(); }; // redundant
63  reco::Particle getRecLept() const;
64 
65  //-------------------------------------------
66  // get objects from kinematic fit
67  //-------------------------------------------
68  pat::Particle getFitBottom() const { return (fitBottom_.size()>0 ? fitBottom_.front() : pat::Particle()); };
69  pat::Particle getFitLight() const { return (fitLight_.size()>0 ? fitLight_.front() : pat::Particle()); };
70  pat::Particle getFitLepton() const { return (fitLepton_.size()>0 ? fitLepton_.front() : pat::Particle()); };
71  pat::Particle getFitNeutrino() const { return (fitNeutrino_.size()>0 ? fitNeutrino_.front() : pat::Particle()); };
72  reco::Particle getFitLepW() const;
73  reco::Particle getFitLept() const;
74 
75  //-------------------------------------------
76  // get info on the selected decay
77  //-------------------------------------------
78  std::string getDecay() const { return decay_; }
79 
80  //-------------------------------------------
81  // get other event info
82  //-------------------------------------------
83  std::vector<double> getScanValues() const { return scanValues_; }
84  double getChi2Prob() const { return chi2Prob_; }
85  double getPtrueCombExist() const { return pTrueCombExist_; }
86  double getPtrueBJetSel() const { return pTrueBJetSel_; }
87  double getPtrueBhadrSel() const { return pTrueBhadrSel_; }
88  double getPtrueJetComb() const { return pTrueJetComb_; }
89  double getSignalPur() const { return signalPur_; }
90  double getSignalLRTot() const { return signalLRTot_; }
91  double getSumDeltaRjp() const { return sumDeltaRjp_; }
92  double getDeltaRB() const { return deltaRB_; }
93  double getDeltaRL() const { return deltaRL_; }
94  int getChangeBL() const { return changeBL_; }
95  bool getBestSol() const { return bestSol_; }
96 
97  protected:
98 
99  //-------------------------------------------
100  // set the generated event
101  //-------------------------------------------
102  void setGenEvt(const edm::Handle<StGenEvent> &);
103 
104  //-------------------------------------------
105  // set the basic objects
106  //-------------------------------------------
107  void setJetCorrectionScheme(int scheme) { jetCorrScheme_ = scheme;};
108  void setBottom(const edm::Handle<std::vector<pat::Jet > >& jet, int i)
110  void setLight (const edm::Handle<std::vector<pat::Jet > >& jet, int i)
112  void setMuon (const edm::Handle<std::vector<pat::Muon> >& muon, int i)
113  { muon_ = edm::Ref<std::vector<pat::Muon> >(muon, i); decay_ = "muon"; };
114  void setElectron(const edm::Handle<std::vector<pat::Electron> >& elec, int i)
115  { electron_ = edm::Ref<std::vector<pat::Electron> >(elec, i); decay_ = "electron"; };
116  void setNeutrino(const edm::Handle<std::vector<pat::MET> >& met, int i)
118 
119  //-------------------------------------------
120  // set the fitted objects
121  //-------------------------------------------
122  void setFitBottom(const pat::Particle& part) { fitBottom_.clear(); fitBottom_.push_back(part); };
123  void setFitLight (const pat::Particle& part) { fitLight_.clear(); fitLight_.push_back(part); };
124  void setFitLepton(const pat::Particle& part) { fitLepton_.clear(); fitLepton_.push_back(part); };
125  void setFitNeutrino(const pat::Particle& part) { fitNeutrino_.clear(); fitNeutrino_.push_back(part); };
126 
127  //-------------------------------------------
128  // set other info on the event
129  //-------------------------------------------
130  void setChi2Prob(double prob){ chi2Prob_ = prob; };
131  void setScanValues(const std::vector<double>&);
132  void setPtrueCombExist(double pce){ pTrueCombExist_ = pce; };
133  void setPtrueBJetSel (double pbs) { pTrueBJetSel_ = pbs; };
134  void setPtrueBhadrSel(double pbh) { pTrueBhadrSel_ = pbh; };
135  void setPtrueJetComb (double pt) { pTrueJetComb_ = pt; };
136  void setSignalPurity (double pur) { signalPur_ = pur; };
137  void setSignalLRTot(double lrt){ signalLRTot_ = lrt; };
138  void setSumDeltaRjp(double sdr){ sumDeltaRjp_ = sdr; };
139  void setDeltaRB(double adr) { deltaRB_ = adr; };
140  void setDeltaRL(double adr) { deltaRL_ = adr; };
141  void setChangeBL(int bl) { changeBL_ = bl; };
142  void setBestSol(bool bs) { bestSol_ = bs; };
143 
144  private:
145 
146  //-------------------------------------------
147  // particle content
148  //-------------------------------------------
154  std::vector<pat::Particle> fitBottom_, fitLight_, fitLepton_, fitNeutrino_;
155 
156  //-------------------------------------------
157  // miscellaneous
158  //-------------------------------------------
161  double chi2Prob_;
162  std::vector<double> scanValues_;
167  bool bestSol_;
168  //double jetMatchPur_;
169 };
170 
171 #endif
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:70
Analysis-level MET class.
Definition: MET.h:42
reco::Particle getRecLept() const
int i
Definition: DBlmapReader.cc:9
std::vector< pat::Particle > fitNeutrino_
double getPtrueBJetSel() const
Definition: StEvtSolution.h:86
pat::Muon getMuon() const
Definition: StEvtSolution.h:37
void setPtrueBhadrSel(double pbh)
double getSumDeltaRjp() const
Definition: StEvtSolution.h:91
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
double getDeltaRB() const
Definition: StEvtSolution.h:92
void setLight(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
edm::Ref< std::vector< pat::Jet > > light_
edm::Ref< std::vector< pat::Electron > > electron_
pat::Particle getFitLight() const
Definition: StEvtSolution.h:69
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Definition: Jet.cc:271
double pTrueJetComb_
void setDeltaRL(double adr)
void setBestSol(bool bs)
std::vector< double > getScanValues() const
Definition: StEvtSolution.h:83
std::vector< pat::Particle > fitLepton_
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
reco::Particle getRecLepW() const
Definition: StEvtSolution.h:62
double signalLRTot_
double pTrueBhadrSel_
void setSumDeltaRjp(double sdr)
const reco::GenParticle * getGenBottom() const
void setFitBottom(const pat::Particle &part)
reco::Particle getFitLepW() const
void setChi2Prob(double prob)
void setFitNeutrino(const pat::Particle &part)
edm::Ref< std::vector< pat::Muon > > muon_
void setSignalPurity(double pur)
pat::Jet getRecBottom() const
Definition: StEvtSolution.h:57
pat::MET getRecNeutrino() const
Definition: StEvtSolution.h:61
std::vector< double > scanValues_
pat::Jet getBottom() const
edm::Ref< std::vector< pat::Jet > > bottom_
void setPtrueCombExist(double pce)
pat::Jet getLight() const
reco::Particle getLepW() const
double getPtrueBhadrSel() const
Definition: StEvtSolution.h:87
void setSignalLRTot(double lrt)
double sumDeltaRjp_
pat::Particle getFitNeutrino() const
Definition: StEvtSolution.h:71
pat::Jet getRecLight() const
Definition: StEvtSolution.h:58
double pTrueCombExist_
void setFitLepton(const pat::Particle &part)
double getPtrueJetComb() const
Definition: StEvtSolution.h:88
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:68
const edm::RefProd< StGenEvent > & getGenEvent() const
Definition: StEvtSolution.h:46
const reco::GenParticle * getGenLept() const
void setFitLight(const pat::Particle &part)
double pTrueBJetSel_
std::vector< pat::Particle > fitLight_
double getSignalLRTot() const
Definition: StEvtSolution.h:90
std::string getDecay() const
Definition: StEvtSolution.h:78
void setScanValues(const std::vector< double > &)
pat::Muon getRecMuon() const
Definition: StEvtSolution.h:59
pat::MET getNeutrino() const
Definition: StEvtSolution.h:39
void setPtrueBJetSel(double pbs)
std::string decay_
void setDeltaRB(double adr)
part
Definition: HCALResponse.h:20
Analysis-level particle class.
Definition: Particle.h:34
void setJetCorrectionScheme(int scheme)
reco::Particle getFitLept() const
Analysis-level electron class.
Definition: Electron.h:52
Analysis-level calorimeter jet class.
Definition: Jet.h:71
reco::Particle getLept() const
bool getBestSol() const
Definition: StEvtSolution.h:95
void setBottom(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
virtual ~StEvtSolution()
int getChangeBL() const
Definition: StEvtSolution.h:94
void setChangeBL(int bl)
pat::Electron getRecElectron() const
Definition: StEvtSolution.h:60
const reco::GenParticle * getGenLepton() const
double getPtrueCombExist() const
Definition: StEvtSolution.h:85
double getChi2Prob() const
Definition: StEvtSolution.h:84
void setGenEvt(const edm::Handle< StGenEvent > &)
edm::Ref< std::vector< pat::MET > > neutrino_
double getSignalPur() const
Definition: StEvtSolution.h:89
void setPtrueJetComb(double pt)
Analysis-level muon class.
Definition: Muon.h:51
double getDeltaRL() const
Definition: StEvtSolution.h:93
std::vector< pat::Particle > fitBottom_
edm::RefProd< StGenEvent > theGenEvt_
pat::Electron getElectron() const
Definition: StEvtSolution.h:38
const reco::GenParticle * getGenLepW() const
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
const reco::GenParticle * getGenNeutrino() const