CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
V0Validator.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: V0Validator
4 // Class: V0Validator
5 //
13 //
14 // Original Author: Brian Drell
15 // Created: Wed Feb 18 17:21:04 MST 2009
16 //
17 //
18 
19 
20 // system include files
21 #include <memory>
22 
23 // user include files
26 
29 
33 
37 
54 
60 
63 
70 
73 
76 
77 
78 #include "HepMC/GenVertex.h"
79 #include "HepMC/GenParticle.h"
80 
81 #include "TROOT.h"
82 #include "TMath.h"
83 #include "TH1F.h"
84 #include "TH1I.h"
85 #include "TH2F.h"
86 
87 class V0Validator : public edm::EDAnalyzer {
88 
89 public:
90  explicit V0Validator(const edm::ParameterSet&);
91  ~V0Validator();
92 
93 
94 private:
95  //virtual void beginJob(const edm::EventSetup&) ;
96  virtual void analyze(const edm::Event&, const edm::EventSetup&);
97  //virtual void endJob() ;
98  virtual void beginRun(const edm::Run&, const edm::EventSetup&);
99  virtual void endRun(const edm::Run&, const edm::EventSetup&);
100 
101  //Quantities that are to be histogrammed
106  unsigned int K0sPiCandStatus[2], LamPiCandStatus[2], K0sPiEff[2], LamPiEff[2];
107 
108  //Bookkeeping quantities
111 
112  //Temporary histograms so that we can divide them for efficiencies.
113  // They are turned into MonitorElements in endJob()
114  /* TH1F* ksEffVsRHist;
115  TH1F* ksEffVsEtaHist;
116  TH1F* ksEffVsPtHist;
117  TH1F* ksTkEffVsRHist;
118  TH1F* ksTkEffVsEtaHist;
119  TH1F* ksTkEffVsPtHist;
120  TH1F* ksFakeVsRHist;
121  TH1F* ksFakeVsEtaHist;
122  TH1F* ksFakeVsPtHist;
123  TH1F* ksTkFakeVsRHist;
124  TH1F* ksTkFakeVsEtaHist;
125  TH1F* ksTkFakeVsPtHist;
126 
127  TH1F* ksEffVsRHist_denom;
128  TH1F* ksEffVsEtaHist_denom;
129  TH1F* ksEffVsPtHist_denom;
130  TH1F* ksFakeVsRHist_denom;
131  TH1F* ksFakeVsEtaHist_denom;
132  TH1F* ksFakeVsPtHist_denom;
133 
134  TH1F* ksXResolutionHist;
135  TH1F* ksYResolutionHist;
136  TH1F* ksZResolutionHist;
137  TH1F* ksAbsoluteDistResolutionHist;
138  TH1F* lamXResolutionHist;
139  TH1F* lamYResolutionHist;
140  TH1F* lamZResolutionHist;
141  TH1F* lamAbsoluteDistResolutionHist;
142 
143  TH1F* lamEffVsRHist;
144  TH1F* lamEffVsEtaHist;
145  TH1F* lamEffVsPtHist;
146  TH1F* lamTkEffVsRHist;
147  TH1F* lamTkEffVsEtaHist;
148  TH1F* lamTkEffVsPtHist;
149  TH1F* lamFakeVsRHist;
150  TH1F* lamFakeVsEtaHist;
151  TH1F* lamFakeVsPtHist;
152  TH1F* lamTkFakeVsRHist;
153  TH1F* lamTkFakeVsEtaHist;
154  TH1F* lamTkFakeVsPtHist;
155 
156  TH1F* lamEffVsRHist_denom;
157  TH1F* lamEffVsEtaHist_denom;
158  TH1F* lamEffVsPtHist_denom;
159  TH1F* lamFakeVsRHist_denom;
160  TH1F* lamFakeVsEtaHist_denom;
161  TH1F* lamFakeVsPtHist_denom;
162 
163  TH1F* nKsHist;
164  TH1F* nLamHist;
165 
166  TH1F* lamCandStatusHist;
167  TH1F* ksCandStatusHist;
168 
169  TH1F* fakeKsMassHisto;
170  TH1F* goodKsMassHisto;
171  TH1F* fakeLamMassHisto;
172  TH1F* goodLamMassHisto;
173 
174  TH1F* ksFakeDauRadDistHisto;
175  TH1F* lamFakeDauRadDistHisto;*/
176 
177  // DQMStore and MonitorElements for final histograms
179 
192 
205 
212 
219 
232 
245 
254 
257 
260 
265 
268 
269 
272 
273 
284 };
285 
MonitorElement * ksTkFakeVsPt
Definition: V0Validator.h:191
edm::EDGetTokenT< edm::SimVertexContainer > edmSimVertexContainerToken_
Definition: V0Validator.h:281
MonitorElement * nLam
Definition: V0Validator.h:256
MonitorElement * lamTkFakeVsR_num
Definition: V0Validator.h:242
MonitorElement * ksEffVsR
Definition: V0Validator.h:180
unsigned int K0sCandStatus
Definition: V0Validator.h:105
edm::EDGetTokenT< reco::SimToRecoCollection > recoSimToRecoCollectionToken_
Definition: V0Validator.h:277
V0Validator(const edm::ParameterSet &)
Definition: V0Validator.cc:31
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > recoVertexCompositeCandidateCollection_k0s_Token_
Definition: V0Validator.h:283
float LamGenR
Definition: V0Validator.h:102
MonitorElement * ksFakeVsPt_denom
Definition: V0Validator.h:208
float LamCandR
Definition: V0Validator.h:104
MonitorElement * lamTkEffVsR
Definition: V0Validator.h:223
MonitorElement * lamFakeVsPt
Definition: V0Validator.h:228
MonitorElement * ksTkFakeVsEta
Definition: V0Validator.h:190
MonitorElement * ksFakeVsR_denom
Definition: V0Validator.h:206
MonitorElement * ksFakeVsEta_num
Definition: V0Validator.h:200
unsigned int LamPiCandStatus[2]
Definition: V0Validator.h:106
MonitorElement * lamEffVsEta_num
Definition: V0Validator.h:234
MonitorElement * lamFakeVsPt_denom
Definition: V0Validator.h:215
float KsGenX
Definition: V0Validator.h:103
MonitorElement * ksEffVsR_num
Definition: V0Validator.h:193
MonitorElement * ksFakeVsPt_num
Definition: V0Validator.h:201
MonitorElement * lamFakeVsR_denom
Definition: V0Validator.h:213
MonitorElement * lamEffVsPt_denom
Definition: V0Validator.h:218
unsigned int K0sPiCandStatus[2]
Definition: V0Validator.h:106
MonitorElement * lamEffVsPt_num
Definition: V0Validator.h:235
float KsGenY
Definition: V0Validator.h:103
MonitorElement * lamTkFakeVsR
Definition: V0Validator.h:229
MonitorElement * lamFakeVsR
Definition: V0Validator.h:226
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: V0Validator.cc:462
MonitorElement * ksFakeVsEta
Definition: V0Validator.h:187
MonitorElement * lamZResolution
Definition: V0Validator.h:252
unsigned int LamPiEff[2]
Definition: V0Validator.h:106
MonitorElement * lamFakeDauRadDist
Definition: V0Validator.h:271
MonitorElement * lamTkEffVsEta
Definition: V0Validator.h:224
MonitorElement * lamEffVsR
Definition: V0Validator.h:220
MonitorElement * ksFakeVsEta_denom
Definition: V0Validator.h:207
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
Definition: V0Validator.h:278
MonitorElement * fakeLamMass
Definition: V0Validator.h:263
MonitorElement * ksFakeDauRadDist
Definition: V0Validator.h:270
MonitorElement * lamTkFakeVsEta_num
Definition: V0Validator.h:243
MonitorElement * lamTkFakeVsPt
Definition: V0Validator.h:231
MonitorElement * ksEffVsPt_denom
Definition: V0Validator.h:211
int lamCandFound
Definition: V0Validator.h:110
MonitorElement * ksTkFakeVsEta_num
Definition: V0Validator.h:203
int k0sCandFound
Definition: V0Validator.h:110
int noTPforLamCand
Definition: V0Validator.h:110
MonitorElement * ksTkEffVsR_num
Definition: V0Validator.h:196
MonitorElement * lamFakeVsEta_denom
Definition: V0Validator.h:214
DQMStore * theDQMstore
Definition: V0Validator.h:178
MonitorElement * lamXResolution
Definition: V0Validator.h:250
MonitorElement * ksEffVsEta_denom
Definition: V0Validator.h:210
MonitorElement * lamTkEffVsPt
Definition: V0Validator.h:225
float K0sCandEta
Definition: V0Validator.h:104
MonitorElement * goodKsMass
Definition: V0Validator.h:262
float LamGenpT
Definition: V0Validator.h:102
float LamGenY
Definition: V0Validator.h:103
int realLamFound
Definition: V0Validator.h:109
MonitorElement * fakeKsMass
Definition: V0Validator.h:261
edm::EDGetTokenT< std::vector< reco::Vertex > > vec_recoVertex_Token_
Definition: V0Validator.h:282
MonitorElement * ksTkEffVsPt
Definition: V0Validator.h:185
MonitorElement * goodLamMass
Definition: V0Validator.h:264
MonitorElement * ksFakeVsPt
Definition: V0Validator.h:188
unsigned int LamGenStatus
Definition: V0Validator.h:105
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
Definition: V0Validator.h:280
MonitorElement * lamTkFakeVsEta
Definition: V0Validator.h:230
unsigned int K0sGenStatus
Definition: V0Validator.h:105
MonitorElement * ksMassAll
Definition: V0Validator.h:266
MonitorElement * lamTkEffVsR_num
Definition: V0Validator.h:236
MonitorElement * ksTkEffVsR
Definition: V0Validator.h:183
MonitorElement * nKs
Definition: V0Validator.h:255
MonitorElement * lamTkEffVsEta_num
Definition: V0Validator.h:237
int noTPforK0sCand
Definition: V0Validator.h:110
float K0sGenEta
Definition: V0Validator.h:102
MonitorElement * ksXResolution
Definition: V0Validator.h:246
float K0sCandpT
Definition: V0Validator.h:104
float K0sGenpT
Definition: V0Validator.h:102
MonitorElement * lamEffVsEta_denom
Definition: V0Validator.h:217
MonitorElement * lamFakeVsEta
Definition: V0Validator.h:227
MonitorElement * ksAbsoluteDistResolution
Definition: V0Validator.h:249
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollection_Eff_Token_
Definition: V0Validator.h:278
MonitorElement * ksCandStatus
Definition: V0Validator.h:258
MonitorElement * lamCandStatus
Definition: V0Validator.h:259
MonitorElement * lamEffVsEta
Definition: V0Validator.h:221
float LamGenX
Definition: V0Validator.h:103
MonitorElement * lamTkFakeVsPt_num
Definition: V0Validator.h:244
MonitorElement * lamFakeVsEta_num
Definition: V0Validator.h:240
std::string theDQMRootFileName
Definition: V0Validator.h:274
MonitorElement * ksTkEffVsPt_num
Definition: V0Validator.h:198
MonitorElement * lamFakeVsPt_num
Definition: V0Validator.h:241
MonitorElement * lamMassAll
Definition: V0Validator.h:267
float K0sCandR
Definition: V0Validator.h:104
MonitorElement * lamFakeVsR_num
Definition: V0Validator.h:239
edm::EDGetTokenT< edm::View< reco::Track > > edmView_recoTrack_Token_
Definition: V0Validator.h:279
float LamGenEta
Definition: V0Validator.h:102
float LamCandEta
Definition: V0Validator.h:104
MonitorElement * lamEffVsR_num
Definition: V0Validator.h:233
MonitorElement * ksFakeVsR
Definition: V0Validator.h:186
MonitorElement * ksEffVsEta
Definition: V0Validator.h:181
MonitorElement * lamTkEffVsPt_num
Definition: V0Validator.h:238
edm::EDGetTokenT< reco::RecoToSimCollection > recoRecoToSimCollectionToken_
Definition: V0Validator.h:276
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > recoVertexCompositeCandidateCollection_lambda_Token_
Definition: V0Validator.h:283
MonitorElement * lamAbsoluteDistResolution
Definition: V0Validator.h:253
float LamGenZ
Definition: V0Validator.h:103
int lamTracksFound
Definition: V0Validator.h:110
MonitorElement * ksZResolution
Definition: V0Validator.h:248
float KsGenZ
Definition: V0Validator.h:103
unsigned int LamCandStatus
Definition: V0Validator.h:105
MonitorElement * ksEffVsPt_num
Definition: V0Validator.h:195
MonitorElement * ksTkEffVsEta_num
Definition: V0Validator.h:197
MonitorElement * lamEffVsPt
Definition: V0Validator.h:222
MonitorElement * ksEffVsR_denom
Definition: V0Validator.h:209
MonitorElement * ksTkFakeVsPt_num
Definition: V0Validator.h:204
int realK0sFoundEff
Definition: V0Validator.h:109
MonitorElement * ksTkEffVsEta
Definition: V0Validator.h:184
MonitorElement * ksFakeVsR_num
Definition: V0Validator.h:199
MonitorElement * ksEffVsEta_num
Definition: V0Validator.h:194
virtual void endRun(const edm::Run &, const edm::EventSetup &)
MonitorElement * lamYResolution
Definition: V0Validator.h:251
std::string dirName
Definition: V0Validator.h:275
MonitorElement * ksEffVsPt
Definition: V0Validator.h:182
unsigned int K0sPiEff[2]
Definition: V0Validator.h:106
int k0sTracksFound
Definition: V0Validator.h:110
int realLamFoundEff
Definition: V0Validator.h:109
float K0sGenR
Definition: V0Validator.h:102
MonitorElement * ksTkFakeVsR
Definition: V0Validator.h:189
MonitorElement * ksYResolution
Definition: V0Validator.h:247
MonitorElement * lamEffVsR_denom
Definition: V0Validator.h:216
Definition: Run.h:41
int realK0sFound
Definition: V0Validator.h:109
virtual void beginRun(const edm::Run &, const edm::EventSetup &)
Definition: V0Validator.cc:67
float LamCandpT
Definition: V0Validator.h:104
MonitorElement * ksTkFakeVsR_num
Definition: V0Validator.h:202