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
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:67
Analysis-level MET class.
Definition: MET.h:40
reco::Particle getRecLept() const
std::vector< pat::Particle > fitNeutrino_
double getPtrueBJetSel() const
Definition: StEvtSolution.h:83
pat::Muon getMuon() const
Definition: StEvtSolution.h:34
void setPtrueBhadrSel(double pbh)
double getSumDeltaRjp() const
Definition: StEvtSolution.h:88
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
double getDeltaRB() const
Definition: StEvtSolution.h:89
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:66
double pTrueJetComb_
void setDeltaRL(double adr)
void setBestSol(bool bs)
std::vector< double > getScanValues() const
Definition: StEvtSolution.h:80
std::vector< pat::Particle > fitLepton_
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
reco::Particle getRecLepW() const
Definition: StEvtSolution.h:59
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:54
pat::MET getRecNeutrino() const
Definition: StEvtSolution.h:58
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:84
void setSignalLRTot(double lrt)
double sumDeltaRjp_
pat::Particle getFitNeutrino() const
Definition: StEvtSolution.h:68
pat::Jet getRecLight() const
Definition: StEvtSolution.h:55
double pTrueCombExist_
void setFitLepton(const pat::Particle &part)
double getPtrueJetComb() const
Definition: StEvtSolution.h:85
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:65
const edm::RefProd< StGenEvent > & getGenEvent() const
Definition: StEvtSolution.h:43
const reco::GenParticle * getGenLept() const
void setFitLight(const pat::Particle &part)
double pTrueBJetSel_
std::vector< pat::Particle > fitLight_
double getSignalLRTot() const
Definition: StEvtSolution.h:87
std::string getDecay() const
Definition: StEvtSolution.h:75
void setScanValues(const std::vector< double > &)
pat::Muon getRecMuon() const
Definition: StEvtSolution.h:56
pat::MET getNeutrino() const
Definition: StEvtSolution.h:36
void setPtrueBJetSel(double pbs)
std::string decay_
void setDeltaRB(double adr)
part
Definition: HCALResponse.h:20
Analysis-level particle class.
Definition: Particle.h:30
void setJetCorrectionScheme(int scheme)
reco::Particle getFitLept() const
Analysis-level electron class.
Definition: Electron.h:51
Analysis-level calorimeter jet class.
Definition: Jet.h:77
reco::Particle getLept() const
bool getBestSol() const
Definition: StEvtSolution.h:92
void setBottom(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
virtual ~StEvtSolution()
int getChangeBL() const
Definition: StEvtSolution.h:91
void setChangeBL(int bl)
pat::Electron getRecElectron() const
Definition: StEvtSolution.h:57
const reco::GenParticle * getGenLepton() const
double getPtrueCombExist() const
Definition: StEvtSolution.h:82
double getChi2Prob() const
Definition: StEvtSolution.h:81
void setGenEvt(const edm::Handle< StGenEvent > &)
edm::Ref< std::vector< pat::MET > > neutrino_
double getSignalPur() const
Definition: StEvtSolution.h:86
void setPtrueJetComb(double pt)
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
Analysis-level muon class.
Definition: Muon.h:51
double getDeltaRL() const
Definition: StEvtSolution.h:90
std::vector< pat::Particle > fitBottom_
edm::RefProd< StGenEvent > theGenEvt_
pat::Electron getElectron() const
Definition: StEvtSolution.h:35
const reco::GenParticle * getGenLepW() const
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
const reco::GenParticle * getGenNeutrino() const