CMS 3D CMS Logo

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