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
edm::RefProd< StGenEvent >
StEvtSolutionMaker
Definition: StEvtSolutionMaker.h:16
StEvtSolution::pTrueBhadrSel_
double pTrueBhadrSel_
Definition: StEvtSolution.h:177
StEvtSolution::getGenLepton
const reco::GenParticle * getGenLepton() const
Definition: StEvtSolution.cc:93
RefProd.h
StEvtSolution::getPtrueJetComb
double getPtrueJetComb() const
Definition: StEvtSolution.h:85
StEvtSolution::setDeltaRL
void setDeltaRL(double adr)
Definition: StEvtSolution.h:155
StEvtSolution::getNeutrino
pat::MET getNeutrino() const
Definition: StEvtSolution.h:36
StEvtSolution::signalPur_
double signalPur_
Definition: StEvtSolution.h:178
Handle.h
mps_fire.i
i
Definition: mps_fire.py:428
StEvtSolution::fitBottom_
std::vector< pat::Particle > fitBottom_
Definition: StEvtSolution.h:168
StEvtSolution::setFitNeutrino
void setFitNeutrino(const pat::Particle &part)
Definition: StEvtSolution.h:137
muon
Definition: MuonCocktails.h:17
reco::Particle
Definition: Particle.h:16
StEvtSolution::muon_
edm::Ref< std::vector< pat::Muon > > muon_
Definition: StEvtSolution.h:165
reco::GenParticle
Definition: GenParticle.h:21
DiDispStaMuonMonitor_cfi.pt
pt
Definition: DiDispStaMuonMonitor_cfi.py:39
StEvtSolution::fitNeutrino_
std::vector< pat::Particle > fitNeutrino_
Definition: StEvtSolution.h:168
Muon.h
StEvtSolution::signalLRTot_
double signalLRTot_
Definition: StEvtSolution.h:178
StEvtSolution::StEvtSolution
StEvtSolution()
Definition: StEvtSolution.cc:7
StEvtSolution::getFitLight
pat::Particle getFitLight() const
Definition: StEvtSolution.h:66
StEvtSolution::setJetCorrectionScheme
void setJetCorrectionScheme(int scheme)
Definition: StEvtSolution.h:103
StEvtSolution::getRecBottom
pat::Jet getRecBottom() const
Definition: StEvtSolution.h:54
StEvtSolution::pTrueCombExist_
double pTrueCombExist_
Definition: StEvtSolution.h:177
StEvtSolution::getGenLept
const reco::GenParticle * getGenLept() const
Definition: StEvtSolution.cc:114
StEvtSolution::setGenEvt
void setGenEvt(const edm::Handle< StGenEvent > &)
Definition: StEvtSolution.cc:152
StEvtSolution::setPtrueBhadrSel
void setPtrueBhadrSel(double pbh)
Definition: StEvtSolution.h:149
StEvtSolution::getFitNeutrino
pat::Particle getFitNeutrino() const
Definition: StEvtSolution.h:68
pat::Muon
Analysis-level muon class.
Definition: Muon.h:51
edm::Handle
Definition: AssociativeIterator.h:50
StEvtSolution::decay_
std::string decay_
Definition: StEvtSolution.h:173
StEvtSolution::setScanValues
void setScanValues(const std::vector< double > &)
Definition: StEvtSolution.cc:159
StEvtSolution::getRecLight
pat::Jet getRecLight() const
Definition: StEvtSolution.h:55
StEvtSolution::setPtrueJetComb
void setPtrueJetComb(double pt)
Definition: StEvtSolution.h:150
edm::Ref
Definition: AssociativeIterator.h:58
BTaggingMonitor_cfi.met
met
Definition: BTaggingMonitor_cfi.py:84
StEvtSolution::chi2Prob_
double chi2Prob_
Definition: StEvtSolution.h:175
StEvtSolution::getFitLepW
reco::Particle getFitLepW() const
Definition: StEvtSolution.cc:139
StEvtSolution::setLight
void setLight(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: StEvtSolution.h:107
StEvtSolution::getRecNeutrino
pat::MET getRecNeutrino() const
Definition: StEvtSolution.h:58
StEvtSolution::getRecElectron
pat::Electron getRecElectron() const
Definition: StEvtSolution.h:57
StEvtSolution::getGenLepW
const reco::GenParticle * getGenLepW() const
Definition: StEvtSolution.cc:107
cms::cuda::bs
bs
Definition: HistoContainer.h:76
pat::Jet
Analysis-level calorimeter jet class.
Definition: Jet.h:77
StEvtSolution::setSignalLRTot
void setSignalLRTot(double lrt)
Definition: StEvtSolution.h:152
part
part
Definition: HCALResponse.h:20
StGenEvent.h
StEvtSolution::setSignalPurity
void setSignalPurity(double pur)
Definition: StEvtSolution.h:151
StEvtSolution::pTrueBJetSel_
double pTrueBJetSel_
Definition: StEvtSolution.h:177
StEvtSolution::setSumDeltaRjp
void setSumDeltaRjp(double sdr)
Definition: StEvtSolution.h:153
StEvtSolution::getMuon
pat::Muon getMuon() const
Definition: StEvtSolution.h:34
StEvtSolution::getDecay
std::string getDecay() const
Definition: StEvtSolution.h:75
StEvtSolution::bestSol_
bool bestSol_
Definition: StEvtSolution.h:181
HLT_FULL_cff.muon
muon
Definition: HLT_FULL_cff.py:11725
StEvtSolution::fitLepton_
std::vector< pat::Particle > fitLepton_
Definition: StEvtSolution.h:168
StEvtSolution::light_
edm::Ref< std::vector< pat::Jet > > light_
Definition: StEvtSolution.h:164
StEvtSolution::~StEvtSolution
virtual ~StEvtSolution()
Definition: StEvtSolution.cc:23
StEvtSolution::setFitLepton
void setFitLepton(const pat::Particle &part)
Definition: StEvtSolution.h:133
StEvtSolution::getChangeBL
int getChangeBL() const
Definition: StEvtSolution.h:91
StEvtSolution::getLept
reco::Particle getLept() const
Definition: StEvtSolution.cc:64
StEvtSolution::getPtrueBJetSel
double getPtrueBJetSel() const
Definition: StEvtSolution.h:83
StEvtSolution::deltaRL_
double deltaRL_
Definition: StEvtSolution.h:179
StEvtSolution::getSignalLRTot
double getSignalLRTot() const
Definition: StEvtSolution.h:87
StEvtSolution::getFitLepton
pat::Particle getFitLepton() const
Definition: StEvtSolution.h:67
StEvtSolution::getPtrueCombExist
double getPtrueCombExist() const
Definition: StEvtSolution.h:82
StEvtSolution::getScanValues
std::vector< double > getScanValues() const
Definition: StEvtSolution.h:80
StEvtSolution::setPtrueBJetSel
void setPtrueBJetSel(double pbs)
Definition: StEvtSolution.h:148
StEvtSolution::getElectron
pat::Electron getElectron() const
Definition: StEvtSolution.h:35
StEvtSolution::pTrueJetComb_
double pTrueJetComb_
Definition: StEvtSolution.h:177
StEvtSolution::neutrino_
edm::Ref< std::vector< pat::MET > > neutrino_
Definition: StEvtSolution.h:167
StEvtSolution::getRecLepW
reco::Particle getRecLepW() const
Definition: StEvtSolution.h:59
StEvtSolution::getLepW
reco::Particle getLepW() const
Definition: StEvtSolution.cc:54
StEvtSolution::getFitLept
reco::Particle getFitLept() const
Definition: StEvtSolution.cc:144
StEvtSolution::setMuon
void setMuon(const edm::Handle< std::vector< pat::Muon > > &muon, int i)
Definition: StEvtSolution.h:110
StEvtSolution::setElectron
void setElectron(const edm::Handle< std::vector< pat::Electron > > &elec, int i)
Definition: StEvtSolution.h:114
StEvtSolution::getBestSol
bool getBestSol() const
Definition: StEvtSolution.h:92
StEvtSolution::scanValues_
std::vector< double > scanValues_
Definition: StEvtSolution.h:176
StEvtSolution::setPtrueCombExist
void setPtrueCombExist(double pce)
Definition: StEvtSolution.h:147
pat::MET
Analysis-level MET class.
Definition: MET.h:40
StEvtSolution::setChi2Prob
void setChi2Prob(double prob)
Definition: StEvtSolution.h:145
StEvtSolution::setNeutrino
void setNeutrino(const edm::Handle< std::vector< pat::MET > > &met, int i)
Definition: StEvtSolution.h:118
StEvtSolution::getDeltaRL
double getDeltaRL() const
Definition: StEvtSolution.h:90
StEvtSolution::getRecMuon
pat::Muon getRecMuon() const
Definition: StEvtSolution.h:56
MET.h
StEvtSolution::deltaRB_
double deltaRB_
Definition: StEvtSolution.h:179
Jet.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
generator_cfi.scheme
scheme
Definition: generator_cfi.py:22
StEvtSolution::getGenEvent
const edm::RefProd< StGenEvent > & getGenEvent() const
Definition: StEvtSolution.h:43
StEvtSolution::getDeltaRB
double getDeltaRB() const
Definition: StEvtSolution.h:89
StEvtSolution::setBottom
void setBottom(const edm::Handle< std::vector< pat::Jet > > &jet, int i)
Definition: StEvtSolution.h:104
StEvtSolution::setFitBottom
void setFitBottom(const pat::Particle &part)
Definition: StEvtSolution.h:125
StEvtSolution::getGenBottom
const reco::GenParticle * getGenBottom() const
Definition: StEvtSolution.cc:79
Ref.h
StEvtSolution::getFitBottom
pat::Particle getFitBottom() const
Definition: StEvtSolution.h:65
StEvtSolution::sumDeltaRjp_
double sumDeltaRjp_
Definition: StEvtSolution.h:179
StEvtSolution::theGenEvt_
edm::RefProd< StGenEvent > theGenEvt_
Definition: StEvtSolution.h:157
metsig::jet
Definition: SignAlgoResolutions.h:47
StEvtSolution::getLight
pat::Jet getLight() const
Definition: StEvtSolution.cc:41
StEvtSolution::getSignalPur
double getSignalPur() const
Definition: StEvtSolution.h:86
pat::Jet::correctedJet
Jet correctedJet(const std::string &level, const std::string &flavor="none", const std::string &set="") const
StEvtSolution::fitLight_
std::vector< pat::Particle > fitLight_
Definition: StEvtSolution.h:168
Electron.h
StEvtSolution::electron_
edm::Ref< std::vector< pat::Electron > > electron_
Definition: StEvtSolution.h:166
pat::Electron
Analysis-level electron class.
Definition: Electron.h:51
StEvtSolution::getGenNeutrino
const reco::GenParticle * getGenNeutrino() const
Definition: StEvtSolution.cc:100
StEvtSolution::bottom_
edm::Ref< std::vector< pat::Jet > > bottom_
Definition: StEvtSolution.h:164
StEvtSolution::jetCorrScheme_
int jetCorrScheme_
Definition: StEvtSolution.h:174
StEvtSolution::getChi2Prob
double getChi2Prob() const
Definition: StEvtSolution.h:81
Particle.h
StEvtSolution::getBottom
pat::Jet getBottom() const
Definition: StEvtSolution.cc:28
StEvtSolution::setChangeBL
void setChangeBL(int bl)
Definition: StEvtSolution.h:156
StEvtSolution::setBestSol
void setBestSol(bool bs)
Definition: StEvtSolution.h:157
StEvtSolution::getPtrueBhadrSel
double getPtrueBhadrSel() const
Definition: StEvtSolution.h:84
TtFullHadEvtBuilder_cfi.prob
prob
Definition: TtFullHadEvtBuilder_cfi.py:33
StKinFitter
Definition: StKinFitter.h:19
pat::Particle
Analysis-level particle class.
Definition: Particle.h:30
StEvtSolution::setDeltaRB
void setDeltaRB(double adr)
Definition: StEvtSolution.h:154
StEvtSolution::getSumDeltaRjp
double getSumDeltaRjp() const
Definition: StEvtSolution.h:88
StEvtSolution::getRecLept
reco::Particle getRecLept() const
Definition: StEvtSolution.cc:124
StEvtSolution::setFitLight
void setFitLight(const pat::Particle &part)
Definition: StEvtSolution.h:129
StEvtSolution
Definition: StEvtSolution.h:21
StEvtSolution::changeBL_
int changeBL_
Definition: StEvtSolution.h:180