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