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