CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
V0Validator.cc
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 
22 
23 typedef std::vector<TrackingVertex> TrackingVertexCollection;
27 
29  : theDQMRootFileName(iConfig.getParameter<std::string>("DQMRootFileName"))
30  , dirName(iConfig.getParameter<std::string>("dirName"))
31  , recoRecoToSimCollectionToken_( consumes<reco::RecoToSimCollection>( edm::InputTag( std::string( "trackingParticleRecoTrackAsssociation" ) ) ) )
32  , recoSimToRecoCollectionToken_( consumes<reco::SimToRecoCollection>( edm::InputTag( std::string( "trackingParticleRecoTrackAsssociation" ) ) ) )
33  , trackingParticleCollection_Eff_Token_( consumes<TrackingParticleCollection>( edm::InputTag( std::string( "mix" )
34  , std::string( "MergedTrackTruth" )
35  )
36  )
37  )
38  , trackingParticleCollectionToken_( consumes<TrackingParticleCollection>( edm::InputTag( std::string( "mix" )
39  , std::string( "MergedTrackTruth" )
40  )
41  )
42  )
43  , edmView_recoTrack_Token_( consumes< edm::View<reco::Track> >( edm::InputTag( std::string( "generalTracks" ) ) ) )
44  , edmSimTrackContainerToken_( consumes<edm::SimTrackContainer>( edm::InputTag( std::string( "g4SimHits" ) ) ) )
45  , edmSimVertexContainerToken_( consumes<edm::SimVertexContainer>( edm::InputTag( std::string( "g4SimHits" ) ) ) )
46  , vec_recoVertex_Token_( consumes< std::vector<reco::Vertex> >( edm::InputTag( std::string( "offlinePrimaryVertices" ) ) ) )
47  , recoVertexCompositeCandidateCollection_k0s_Token_( consumes<reco::VertexCompositeCandidateCollection>( iConfig.getParameter<edm::InputTag>( "kShortCollection" ) ) )
48  , recoVertexCompositeCandidateCollection_lambda_Token_( consumes<reco::VertexCompositeCandidateCollection>( iConfig.getParameter<edm::InputTag>( "lambdaCollection" ) ) ) {
49 
51 
52 }
53 
55 
56 }
57 
59  ibooker.cd();
60  std::string subDirName = V0Validator::dirName + "/EffFakes";
61  ibooker.setCurrentFolder(subDirName.c_str());
62 
63  ksEffVsR = ibooker.book1D("K0sEffVsR",
64  "K^{0}_{S} Efficiency vs #rho", 40, 0., 40.);
65  ksEffVsEta = ibooker.book1D("K0sEffVsEta",
66  "K^{0}_{S} Efficiency vs #eta", 40, -2.5, 2.5);
67  ksEffVsPt = ibooker.book1D("K0sEffVsPt",
68  "K^{0}_{S} Efficiency vs p_{T}", 70, 0., 20.);;
69 
70  ksTkEffVsR = ibooker.book1D("K0sTkEffVsR",
71  "K^{0}_{S} Tracking Efficiency vs #rho", 40, 0., 40.);
72  ksTkEffVsEta = ibooker.book1D("K0sTkEffVsEta",
73  "K^{0}_{S} Tracking Efficiency vs #eta", 40, -2.5, 2.5);
74  ksTkEffVsPt = ibooker.book1D("K0sTkEffVsPt",
75  "K^{0}_{S} Tracking Efficiency vs p_{T}", 70, 0., 20.);
76 
77  ksEffVsR_num = ibooker.book1D("K0sEffVsR_num",
78  "K^{0}_{S} Efficiency vs #rho", 40, 0., 40.);
79  ksEffVsEta_num = ibooker.book1D("K0sEffVsEta_num",
80  "K^{0}_{S} Efficiency vs #eta", 40, -2.5, 2.5);
81  ksEffVsPt_num = ibooker.book1D("K0sEffVsPt_num",
82  "K^{0}_{S} Efficiency vs p_{T}", 70, 0., 20.);;
83 
84  ksTkEffVsR_num = ibooker.book1D("K0sTkEffVsR_num",
85  "K^{0}_{S} Tracking Efficiency vs #rho", 40, 0., 40.);
86  ksTkEffVsEta_num = ibooker.book1D("K0sTkEffVsEta_num",
87  "K^{0}_{S} Tracking Efficiency vs #eta", 40, -2.5, 2.5);
88  ksTkEffVsPt_num = ibooker.book1D("K0sTkEffVsPt_num",
89  "K^{0}_{S} Tracking Efficiency vs p_{T}", 70, 0., 20.);;
90 
91  ksEffVsR_denom = ibooker.book1D("K0sEffVsR_denom",
92  "K^{0}_{S} Efficiency vs #rho", 40, 0., 40.);
93  ksEffVsEta_denom = ibooker.book1D("K0sEffVsEta_denom",
94  "K^{0}_{S} Efficiency vs #eta", 40, -2.5, 2.5);
95  ksEffVsPt_denom = ibooker.book1D("K0sEffVsPt_denom",
96  "K^{0}_{S} Efficiency vs p_{T}", 70, 0., 20.);;
97 
98  lamEffVsR = ibooker.book1D("LamEffVsR",
99  "#Lambda^{0} Efficiency vs #rho", 40, 0., 40.);
100  lamEffVsEta = ibooker.book1D("LamEffVsEta",
101  "#Lambda^{0} Efficiency vs #eta", 40, -2.5, 2.5);
102  lamEffVsPt = ibooker.book1D("LamEffVsPt",
103  "#Lambda^{0} Efficiency vs p_{T}", 70, 0., 20.);
104 
105  lamTkEffVsR = ibooker.book1D("LamTkEffVsR",
106  "#Lambda^{0} TrackingEfficiency vs #rho", 40, 0., 40.);
107  lamTkEffVsEta = ibooker.book1D("LamTkEffVsEta",
108  "#Lambda^{0} Tracking Efficiency vs #eta", 40, -2.5, 2.5);
109  lamTkEffVsPt = ibooker.book1D("LamTkEffVsPt",
110  "#Lambda^{0} Tracking Efficiency vs p_{T}", 70, 0., 20.);
111 
112  lamEffVsR_num = ibooker.book1D("LamEffVsR_num",
113  "#Lambda^{0} Efficiency vs #rho", 40, 0., 40.);
114  lamEffVsEta_num = ibooker.book1D("LamEffVsEta_num",
115  "#Lambda^{0} Efficiency vs #eta", 40, -2.5, 2.5);
116  lamEffVsPt_num = ibooker.book1D("LamEffVsPt_num",
117  "#Lambda^{0} Efficiency vs p_{T}", 70, 0., 20.);
118 
119  lamTkEffVsR_num = ibooker.book1D("LamTkEffVsR_num",
120  "#Lambda^{0} TrackingEfficiency vs #rho", 40, 0., 40.);
121  lamTkEffVsEta_num = ibooker.book1D("LamTkEffVsEta_num",
122  "#Lambda^{0} Tracking Efficiency vs #eta", 40, -2.5, 2.5);
123  lamTkEffVsPt_num = ibooker.book1D("LamTkEffVsPt_num",
124  "#Lambda^{0} Tracking Efficiency vs p_{T}", 70, 0., 20.);
125 
126  lamEffVsR_denom = ibooker.book1D("LamEffVsR_denom",
127  "#Lambda^{0} Efficiency vs #rho", 40, 0., 40.);
128  lamEffVsEta_denom = ibooker.book1D("LamEffVsEta_denom",
129  "#Lambda^{0} Efficiency vs #eta", 40, -2.5, 2.5);
130  lamEffVsPt_denom = ibooker.book1D("LamEffVsPt_denom",
131  "#Lambda^{0} Efficiency vs p_{T}", 70, 0., 20.);
132 
133  ksFakeVsR = ibooker.book1D("K0sFakeVsR",
134  "K^{0}_{S} Fake Rate vs #rho", 40, 0., 40.);
135  ksFakeVsEta = ibooker.book1D("K0sFakeVsEta",
136  "K^{0}_{S} Fake Rate vs #eta", 40, -2.5, 2.5);
137  ksFakeVsPt = ibooker.book1D("K0sFakeVsPt",
138  "K^{0}_{S} Fake Rate vs p_{T}", 70, 0., 20.);
139  ksTkFakeVsR = ibooker.book1D("K0sTkFakeVsR",
140  "K^{0}_{S} Tracking Fake Rate vs #rho", 40, 0., 40.);
141  ksTkFakeVsEta = ibooker.book1D("K0sTkFakeVsEta",
142  "K^{0}_{S} Tracking Fake Rate vs #eta", 40, -2.5, 2.5);
143  ksTkFakeVsPt = ibooker.book1D("K0sTkFakeVsPt",
144  "K^{0}_{S} Tracking Fake Rate vs p_{T}", 70, 0., 20.);
145 
146  ksFakeVsR_num = ibooker.book1D("K0sFakeVsR_num",
147  "K^{0}_{S} Fake Rate vs #rho", 40, 0., 40.);
148  ksFakeVsEta_num = ibooker.book1D("K0sFakeVsEta_num",
149  "K^{0}_{S} Fake Rate vs #eta", 40, -2.5, 2.5);
150  ksFakeVsPt_num = ibooker.book1D("K0sFakeVsPt_num",
151  "K^{0}_{S} Fake Rate vs p_{T}", 70, 0., 20.);
152  ksTkFakeVsR_num = ibooker.book1D("K0sTkFakeVsR_num",
153  "K^{0}_{S} Tracking Fake Rate vs #rho", 40, 0., 40.);
154  ksTkFakeVsEta_num = ibooker.book1D("K0sTkFakeVsEta_num",
155  "K^{0}_{S} Tracking Fake Rate vs #eta", 40, -2.5, 2.5);
156  ksTkFakeVsPt_num = ibooker.book1D("K0sTkFakeVsPt_num",
157  "K^{0}_{S} Tracking Fake Rate vs p_{T}", 70, 0., 20.);
158 
159  ksFakeVsR_denom = ibooker.book1D("K0sFakeVsR_denom",
160  "K^{0}_{S} Fake Rate vs #rho", 40, 0., 40.);
161  ksFakeVsEta_denom = ibooker.book1D("K0sFakeVsEta_denom",
162  "K^{0}_{S} Fake Rate vs #eta", 40, -2.5, 2.5);
163  ksFakeVsPt_denom = ibooker.book1D("K0sFakeVsPt_denom",
164  "K^{0}_{S} Fake Rate vs p_{T}", 70, 0., 20.);
165 
166  lamFakeVsR = ibooker.book1D("LamFakeVsR",
167  "#Lambda^{0} Fake Rate vs #rho", 40, 0., 40.);
168  lamFakeVsEta = ibooker.book1D("LamFakeVsEta",
169  "#Lambda^{0} Fake Rate vs #eta", 40, -2.5, 2.5);
170  lamFakeVsPt = ibooker.book1D("LamFakeVsPt",
171  "#Lambda^{0} Fake Rate vs p_{T}", 70, 0., 20.);
172  lamTkFakeVsR = ibooker.book1D("LamTkFakeVsR",
173  "#Lambda^{0} Tracking Fake Rate vs #rho", 40, 0., 40.);
174  lamTkFakeVsEta = ibooker.book1D("LamTkFakeVsEta",
175  "#Lambda^{0} Tracking Fake Rate vs #eta", 40, -2.5, 2.5);
176  lamTkFakeVsPt = ibooker.book1D("LamTkFakeVsPt",
177  "#Lambda^{0} Tracking Fake Rate vs p_{T}", 70, 0., 20.);
178 
179  lamFakeVsR_num = ibooker.book1D("LamFakeVsR_num",
180  "#Lambda^{0} Fake Rate vs #rho", 40, 0., 40.);
181  lamFakeVsEta_num = ibooker.book1D("LamFakeVsEta_num",
182  "#Lambda^{0} Fake Rate vs #eta", 40, -2.5, 2.5);
183  lamFakeVsPt_num = ibooker.book1D("LamFakeVsPt_num",
184  "#Lambda^{0} Fake Rate vs p_{T}", 70, 0., 20.);
185  lamTkFakeVsR_num = ibooker.book1D("LamTkFakeVsR_num",
186  "#Lambda^{0} Tracking Fake Rate vs #rho", 40, 0., 40.);
187  lamTkFakeVsEta_num = ibooker.book1D("LamTkFakeVsEta_num",
188  "#Lambda^{0} Tracking Fake Rate vs #eta", 40, -2.5, 2.5);
189  lamTkFakeVsPt_num = ibooker.book1D("LamTkFakeVsPt_num",
190  "#Lambda^{0} Tracking Fake Rate vs p_{T}", 70, 0., 20.);
191 
192  lamFakeVsR_denom = ibooker.book1D("LamFakeVsR_denom",
193  "#Lambda^{0} Fake Rate vs #rho", 40, 0., 40.);
194  lamFakeVsEta_denom = ibooker.book1D("LamFakeVsEta_denom",
195  "#Lambda^{0} Fake Rate vs #eta", 40, -2.5, 2.5);
196  lamFakeVsPt_denom = ibooker.book1D("LamFakeVsPt_denom",
197  "#Lambda^{0} Fake Rate vs p_{T}", 70, 0., 20.);
198 
199  ibooker.cd();
200  subDirName = dirName + "/Other";
201  ibooker.setCurrentFolder(subDirName.c_str());
202 
203  nKs = ibooker.book1D("nK0s",
204  "Number of K^{0}_{S} found per event", 60, 0., 60.);
205  nLam = ibooker.book1D("nLam",
206  "Number of #Lambda^{0} found per event", 60, 0., 60.);
207 
208  ksXResolution = ibooker.book1D("ksXResolution",
209  "Resolution of V0 decay vertex X coordinate", 50, 0., 50.);
210  ksYResolution = ibooker.book1D("ksYResolution",
211  "Resolution of V0 decay vertex Y coordinate", 50, 0., 50.);
212  ksZResolution = ibooker.book1D("ksZResolution",
213  "Resolution of V0 decay vertex Z coordinate", 50, 0., 50.);
214  lamXResolution = ibooker.book1D("lamXResolution",
215  "Resolution of V0 decay vertex X coordinate", 50, 0., 50.);
216  lamYResolution = ibooker.book1D("lamYResolution",
217  "Resolution of V0 decay vertex Y coordinate", 50, 0., 50.);
218  lamZResolution = ibooker.book1D("lamZResolution",
219  "Resolution of V0 decay vertex Z coordinate", 50, 0., 50.);
220  ksAbsoluteDistResolution = ibooker.book1D("ksRResolution",
221  "Resolution of absolute distance from primary vertex to V0 vertex",
222  100, 0., 50.);
223  lamAbsoluteDistResolution = ibooker.book1D("lamRResolution",
224  "Resolution of absolute distance from primary vertex to V0 vertex",
225  100, 0., 50.);
226 
227  ksCandStatus = ibooker.book1D("ksCandStatus",
228  "Fake type by cand status",
229  10, 0., 10.);
230  lamCandStatus = ibooker.book1D("ksCandStatus",
231  "Fake type by cand status",
232  10, 0., 10.);
233 
234  double minKsMass = 0.49767 - 0.07;
235  double maxKsMass = 0.49767 + 0.07;
236  double minLamMass = 1.1156 - 0.05;
237  double maxLamMass = 1.1156 + 0.05;
238  int ksMassNbins = 100;
239  double ksMassXmin = minKsMass;
240  double ksMassXmax = maxKsMass;
241  int lamMassNbins = 100;
242  double lamMassXmin = minLamMass;
243  double lamMassXmax = maxLamMass;
244 
245  fakeKsMass = ibooker.book1D("ksMassFake",
246  "Mass of fake K0S",
247  ksMassNbins, minKsMass, maxKsMass);
248  goodKsMass = ibooker.book1D("ksMassGood",
249  "Mass of good reco K0S",
250  ksMassNbins, minKsMass, maxKsMass);
251  fakeLamMass = ibooker.book1D("lamMassFake",
252  "Mass of fake Lambda",
253  lamMassNbins, minLamMass, maxLamMass);
254  goodLamMass = ibooker.book1D("lamMassGood",
255  "Mass of good Lambda",
256  lamMassNbins, minLamMass, maxLamMass);
257 
258  ksMassAll = ibooker.book1D("ksMassAll",
259  "Invariant mass of all K0S",
260  ksMassNbins, ksMassXmin, ksMassXmax);
261  lamMassAll = ibooker.book1D("lamMassAll",
262  "Invariant mass of all #Lambda^{0}",
263  lamMassNbins, lamMassXmin, lamMassXmax);
264 
265  ksFakeDauRadDist = ibooker.book1D("radDistFakeKs",
266  "Production radius of daughter particle of Ks fake",
267  100, 0., 15.);
268  lamFakeDauRadDist = ibooker.book1D("radDistFakeLam",
269  "Production radius of daughter particle of Lam fake",
270  100, 0., 15.);
271 }
272 
274 
275  using std::cout;
276  using std::endl;
277  using namespace edm;
278  using namespace std;
279 
280  // Get event setup info, B-field and tracker geometry
281  ESHandle<MagneticField> bFieldHandle;
282  iSetup.get<IdealMagneticFieldRecord>().get(bFieldHandle);
283  ESHandle<GlobalTrackingGeometry> globTkGeomHandle;
284  iSetup.get<GlobalTrackingGeometryRecord>().get(globTkGeomHandle);
285 
286  // Make matching collections
287  Handle<reco::RecoToSimCollection > recotosimCollectionH;
288  iEvent.getByToken( recoRecoToSimCollectionToken_, recotosimCollectionH );
289 
290  Handle<reco::SimToRecoCollection> simtorecoCollectionH;
291  iEvent.getByToken( recoSimToRecoCollectionToken_, simtorecoCollectionH );
292 
294  iEvent.getByToken( trackingParticleCollection_Eff_Token_, TPCollectionEff );
295  const TrackingParticleCollection tPCeff = *( TPCollectionEff.product() );
296 
297  edm::ESHandle<TrackAssociatorBase> associatorByHits;
298  iSetup.get<TrackAssociatorRecord>().get("TrackAssociatorByHits", associatorByHits);
299 
300  // Get tracks
301  Handle< View<reco::Track> > trackCollectionH;
302  iEvent.getByToken( edmView_recoTrack_Token_, trackCollectionH );
303 
304  Handle<SimTrackContainer> simTrackCollection;
305  iEvent.getByToken( edmSimTrackContainerToken_, simTrackCollection );
306  const SimTrackContainer simTC = *(simTrackCollection.product());
307 
308  Handle<SimVertexContainer> simVertexCollection;
309  iEvent.getByToken( edmSimVertexContainerToken_, simVertexCollection );
310  const SimVertexContainer simVC = *(simVertexCollection.product());
311 
312  //Get tracking particles
313  // -->tracks
315  iEvent.getByToken( trackingParticleCollectionToken_, TPCollectionH );
316  const View<reco::Track> tC = *( trackCollectionH.product() );
317 
318  // Select the primary vertex, create a new reco::Vertex to hold it
319  edm::Handle< std::vector<reco::Vertex> > primaryVtxCollectionH;
320  iEvent.getByToken( vec_recoVertex_Token_, primaryVtxCollectionH );
321  const reco::VertexCollection primaryVertexCollection = *(primaryVtxCollectionH.product());
322 
323  reco::Vertex* thePrimary = 0;
324  std::vector<reco::Vertex>::const_iterator iVtxPH = primaryVtxCollectionH->begin();
325  for(std::vector<reco::Vertex>::const_iterator iVtx = primaryVtxCollectionH->begin();
326  iVtx < primaryVtxCollectionH->end();
327  iVtx++) {
328  if(primaryVtxCollectionH->size() > 1) {
329  if(iVtx->tracksSize() > iVtxPH->tracksSize()) {
330  iVtxPH = iVtx;
331  }
332  }
333  else iVtxPH = iVtx;
334  }
335  thePrimary = new reco::Vertex(*iVtxPH);
336 
337  //get the V0s;
342 
343  //make vector of pair of trackingParticles to hold good V0 candidates
344  std::vector< pair<TrackingParticleRef, TrackingParticleRef> > trueK0s;
345  std::vector< pair<TrackingParticleRef, TrackingParticleRef> > trueLams;
346  std::vector<double> trueKsMasses;
347  std::vector<double> trueLamMasses;
348 
350  // Do fake rate calculation //
352 
353  // Kshorts
354  double numK0sFound = 0.;
355  double mass = 0.;
356  std::vector<double> radDist;
357  if ( k0sCollection->size() > 0 ) {
358  vector<reco::TrackRef> theDaughterTracks;
359  for( reco::VertexCompositeCandidateCollection::const_iterator iK0s = k0sCollection->begin();
360  iK0s != k0sCollection->end();
361  iK0s++) {
362  // Fill mass of all K0S
363  ksMassAll->Fill( iK0s->mass() );
364  // Fill values to be histogrammed
365  K0sCandpT = (sqrt( iK0s->momentum().perp2() ));
366  K0sCandEta = iK0s->momentum().eta();
367  K0sCandR = (sqrt( iK0s->vertex().perp2() ));
368  K0sCandStatus = 0;
369  mass = iK0s->mass();
370 
371  theDaughterTracks.push_back( (*(dynamic_cast<const reco::RecoChargedCandidate *> (iK0s->daughter(0)) )).track() );
372  theDaughterTracks.push_back( (*(dynamic_cast<const reco::RecoChargedCandidate *> (iK0s->daughter(1)) )).track() );
373 
374  for (int itrack = 0; itrack < 2; itrack++) {
375  K0sPiCandStatus[itrack] = 0;
376  }
377 
378  std::vector< std::pair<TrackingParticleRef, double> > tp;
379  TrackingParticleRef tpref;
380  TrackingParticleRef firstDauTP;
381  TrackingVertexRef k0sVtx;
382 
383  // Loop through K0s candidate daugher tracks
384  for(View<reco::Track>::size_type i=0; i<theDaughterTracks.size(); ++i){
385  // Found track from theDaughterTracks
386  RefToBase<reco::Track> track( theDaughterTracks.at(i) );
387 
388  if(recotosimCollectionH->find(track) != recotosimCollectionH->end()) {
389  tp = (*recotosimCollectionH)[track];
390  if (tp.size() != 0) {
391  K0sPiCandStatus[i] = 1;
392  tpref = tp.begin()->first;
393 
394  if( simtorecoCollectionH->find(tpref) == simtorecoCollectionH->end() ) {
395  K0sPiCandStatus[i] = 3;
396  }
397  TrackingVertexRef parentVertex = tpref->parentVertex();
398  if(parentVertex.isNonnull()) radDist.push_back(parentVertex->position().R());
399 
400  if( parentVertex.isNonnull() ) {
401  if( k0sVtx.isNonnull() ) {
402  if( k0sVtx->position() == parentVertex->position() ) {
403  if( parentVertex->nDaughterTracks() == 2 ) {
404  if( parentVertex->nSourceTracks() == 0 ) {
405  // No source tracks found for K0s vertex; shouldn't happen, but does for evtGen events
406  K0sCandStatus = 6;
407  }
408 
409  for( TrackingVertex::tp_iterator iTP = parentVertex->sourceTracks_begin();
410  iTP != parentVertex->sourceTracks_end(); iTP++) {
411  if( (*iTP)->pdgId() == 310 ) {
412  K0sCandStatus = 1;
413  realK0sFound++;
414  numK0sFound += 1.;
415  std::pair<TrackingParticleRef, TrackingParticleRef> pair(firstDauTP, tpref);
416  // Pushing back a good V0
417  trueK0s.push_back(pair);
418  trueKsMasses.push_back(mass);
419  }
420  else {
421  K0sCandStatus = 2;
422  if( (*iTP)->pdgId() == 3122 ) {
423  K0sCandStatus = 7;
424  }
425  }
426  }
427  }
428  else {
429  // Found a bad match because the mother has too many daughters
430  K0sCandStatus = 3;
431  }
432  }
433  else {
434  // Found a bad match because the parent vertices from the two tracks are different
435  K0sCandStatus = 4;
436  }
437  }
438  else {
439  // if k0sVtx is null, fill it with parentVertex to compare to the parentVertex from the second track
440  k0sVtx = parentVertex;
441  firstDauTP = tpref;
442  }
443  }//parent vertex is null
444  }//tp size zero
445  }
446  else {
447  K0sPiCandStatus[i] = 2;
448  noTPforK0sCand++;
449  K0sCandStatus = 5;
450  theDaughterTracks.clear();
451  }
452  }
453  theDaughterTracks.clear();
454  // fill the fake rate histograms
455  if( K0sCandStatus > 1 ) {
459  ksCandStatus->Fill((float) K0sCandStatus);
460  fakeKsMass->Fill(mass);
461  for( unsigned int ndx = 0; ndx < radDist.size(); ndx++ ) {
462  ksFakeDauRadDist->Fill(radDist[ndx]);
463  }
464  }
465  if( K0sCandStatus == 5 ) {
469  }
473  }
474  }
475  nKs->Fill( (float) numK0sFound );
476  numK0sFound = 0.;
477 
478  double numLamFound = 0.;
479  mass = 0.;
480  radDist.clear();
481  // Lambdas
482  if ( lambdaCollection->size() > 0 ) {
483  vector<reco::TrackRef> theDaughterTracks;
484  for( reco::VertexCompositeCandidateCollection::const_iterator iLam = lambdaCollection->begin();
485  iLam != lambdaCollection->end();
486  iLam++) {
487  // Fill mass plot with ALL lambdas
488  lamMassAll->Fill( iLam->mass() );
489  // Fill values to be histogrammed
490  LamCandpT = (sqrt( iLam->momentum().perp2() ));
491  LamCandEta = iLam->momentum().eta();
492  LamCandR = (sqrt( iLam->vertex().perp2() ));
493  LamCandStatus = 0;
494  mass = iLam->mass();
495 
496  //cout << "Lam daughter tracks" << endl;
497  theDaughterTracks.push_back( (*(dynamic_cast<const reco::RecoChargedCandidate *> (iLam->daughter(0)) )).track() );
498  theDaughterTracks.push_back( (*(dynamic_cast<const reco::RecoChargedCandidate *> (iLam->daughter(1)) )).track() );
499 
500  for (int itrack = 0; itrack < 2; itrack++) {
501  LamPiCandStatus[itrack] = 0;
502  }
503 
504  std::vector< std::pair<TrackingParticleRef, double> > tp;
505  TrackingParticleRef tpref;
506  TrackingParticleRef firstDauTP;
507  TrackingVertexRef LamVtx;
508  // Loop through Lambda candidate daughter tracks
509  for(View<reco::Track>::size_type i=0; i<theDaughterTracks.size(); ++i){
510  // Found track from theDaughterTracks
511  RefToBase<reco::Track> track( theDaughterTracks.at(i) );
512 
513  if(recotosimCollectionH->find(track) != recotosimCollectionH->end()) {
514  tp = (*recotosimCollectionH)[track];
515  if (tp.size() != 0) {
516  LamPiCandStatus[i] = 1;
517  tpref = tp.begin()->first;
518  if( simtorecoCollectionH->find(tpref) == simtorecoCollectionH->end() ) {
519  LamPiCandStatus[i] = 3;
520  }
521  TrackingVertexRef parentVertex = tpref->parentVertex();
522  if( parentVertex.isNonnull() ) radDist.push_back(parentVertex->position().R());
523 
524  if( parentVertex.isNonnull() ) {
525  if( LamVtx.isNonnull() ) {
526  if( LamVtx->position() == parentVertex->position() ) {
527  if( parentVertex->nDaughterTracks() == 2 ) {
528  if( parentVertex->nSourceTracks() == 0 ) {
529  // No source tracks found for K0s vertex; shouldn't happen, but does for evtGen events
530  LamCandStatus = 6;
531  }
532 
533  for( TrackingVertex::tp_iterator iTP = parentVertex->sourceTracks_begin();
534  iTP != parentVertex->sourceTracks_end(); ++iTP) {
535  if( abs((*iTP)->pdgId()) == 3122 ) {
536  LamCandStatus = 1;
537  realLamFound++;
538  numLamFound += 1.;
539  std::pair<TrackingParticleRef, TrackingParticleRef> pair(firstDauTP, tpref);
540  // Pushing back a good V0
541  trueLams.push_back(pair);
542  trueLamMasses.push_back(mass);
543  }
544  else {
545  LamCandStatus = 2;
546  if( abs((*iTP)->pdgId() ) == 310 ) {
547  LamCandStatus = 7;
548  }
549  }
550  }
551  }
552  else {
553  // Found a bad match because the mother has too many daughters
554  LamCandStatus = 3;
555  }
556  }
557  else {
558  // Found a bad match because the parent vertices from the two tracks are different
559  LamCandStatus = 4;
560  }
561  }
562  else {
563  // if lamVtx is null, fill it with parentVertex to compare to the parentVertex from the second track
564  LamVtx = parentVertex;
565  firstDauTP = tpref;
566  }
567  }//parent vertex is null
568  }//tp size zero
569  }
570  else {
571  LamPiCandStatus[i] = 2;
572  noTPforLamCand++;
573  LamCandStatus = 5;
574  theDaughterTracks.clear();
575  }
576  }
577  theDaughterTracks.clear();
578  // fill the fake rate histograms
579  if( LamCandStatus > 1 ) {
583  lamCandStatus->Fill((float) LamCandStatus);
584  fakeLamMass->Fill(mass);
585  for( unsigned int ndx = 0; ndx < radDist.size(); ndx++ ) {
586  lamFakeDauRadDist->Fill(radDist[ndx]);
587  }
588  }
589  if( K0sCandStatus == 5 ) {
593  }
597  }
598  }
599  nLam->Fill( (double) numLamFound );
600  numLamFound = 0.;
601 
602 
604  // Do efficiency calculation //
606  // Lambdas
607  for(TrackingParticleCollection::size_type i = 0; i < tPCeff.size(); i++) {
608  TrackingParticleRef tpr1(TPCollectionEff, i);
609  const TrackingParticle* itp1 = tpr1.get();
610  if( (itp1->pdgId() == 211 || itp1->pdgId() == 2212)
611  && itp1->parentVertex().isNonnull()
612  && abs(itp1->momentum().eta()) < 2.4
613  && sqrt( itp1->momentum().perp2() ) > 0.9) {
614  bool isLambda = false;
615  if( itp1->pdgId() == 2212 ) isLambda = true;
616  if( itp1->parentVertex()->nDaughterTracks() == 2 ) {
617 
618  TrackingVertexRef piCand1Vertex = itp1->parentVertex();
619  for(TrackingVertex::tp_iterator iTP1 = piCand1Vertex->sourceTracks_begin();
620  iTP1 != piCand1Vertex->sourceTracks_end(); iTP1++) {
621  if( abs((*iTP1)->pdgId()) == 3122 ) {
622  // ----->>>>>>Keep going here
624  j < tPCeff.size();
625  j++) {
626  TrackingParticleRef tpr2(TPCollectionEff, j);
627  const TrackingParticle* itp2 = tpr2.get();
628  int particle2pdgId;
629  if (isLambda) particle2pdgId = -211;
630  else particle2pdgId = -2212;
631  if( itp2->pdgId() == particle2pdgId
632  && itp2->parentVertex().isNonnull()
633  && abs(itp2->momentum().eta()) < 2.4
634  && sqrt(itp2->momentum().perp2()) > 0.9) {
635  if(itp2->parentVertex() == itp1->parentVertex()) {
636  // Found a good pair of Lambda daughters
637  TrackingVertexRef piCand2Vertex = itp2->parentVertex();
638  for (TrackingVertex::tp_iterator iTP2 = piCand2Vertex->sourceTracks_begin();
639  iTP2 != piCand2Vertex->sourceTracks_end();
640  ++iTP2) {
641  LamGenEta = LamGenpT = LamGenR = 0.;
642  LamGenStatus = 0;
643  for(int ifill = 0;
644  ifill < 2;
645  ifill++) {
646  // do nothing?
647  }
648  if( abs((*iTP2)->pdgId()) == 3122 ) {
649  // found generated Lambda
650  LamGenpT = sqrt((*iTP2)->momentum().perp2());
651  LamGenEta = (*iTP2)->momentum().eta();
652  LamGenR = sqrt(itp2->vertex().perp2());
653  genLam++;
654  if(trueLams.size() > 0) {
655  int loop_1 = 0;
656  for(std::vector< pair<TrackingParticleRef, TrackingParticleRef> >::const_iterator iEffCheck = trueLams.begin();
657  iEffCheck != trueLams.end();
658  iEffCheck++) {
659  if( itp1->parentVertex() == iEffCheck->first->parentVertex()
660  && itp2->parentVertex() == iEffCheck->second->parentVertex() ) {
661  realLamFoundEff++;
662  //V0Producer found the generated Lambda
663  LamGenStatus = 1;
664  goodLamMass->Fill(trueLamMasses[loop_1]);
665  break;
666  }
667  else {
668  //V0Producer didn't find the generated Lambda
669  LamGenStatus = 2;
670  }
671  loop_1++;
672  }
673  }
674  else {
675  //No V0 cand found, so V0Producer didn't find the generated Lambda
676  LamGenStatus = 2;
677  }
678  std::vector< std::pair<RefToBase<reco::Track>, double> > rt1;
679  std::vector< std::pair<RefToBase<reco::Track>, double> > rt2;
680 
681  if( simtorecoCollectionH->find(tpr1) != simtorecoCollectionH->end() ) {
682  rt1 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) (*simtorecoCollectionH)[tpr1];
683  if(rt1.size() != 0) {
684  LamPiEff[0] = 1; //Found the first daughter track
685  edm::RefToBase<reco::Track> t1 = rt1.begin()->first;
686  }
687  }
688  else {
689  LamPiEff[0] = 2;//First daughter not found
690  }
691  if( (simtorecoCollectionH->find(tpr2) != simtorecoCollectionH->end()) ) {
692  rt2 = (std::vector<std::pair<RefToBase<reco::Track>, double> >) (*simtorecoCollectionH)[tpr2];
693  if(rt2.size() != 0) {
694  LamPiEff[1] = 1;//Found the second daughter track
695  edm::RefToBase<reco::Track> t2 = rt2.begin()->first;
696  }
697  }
698  else {
699  LamPiEff[1] = 2;//Second daughter not found
700  }
701 
702  if( LamGenStatus == 1
703  && (LamPiEff[0] == 2 || LamPiEff[1] == 2) ) {
704  // Good Lambda found, but recoTrack->trackingParticle->recoTrack didn't work
705  LamGenStatus = 4;
706  realLamFoundEff--;
707  }
708  if( LamGenStatus == 2
709  && (LamPiEff[0] == 2 || LamPiEff[1] == 2) ) {
710  // Lambda not found because we didn't find a daughter track
711  LamGenStatus = 3;
712  }
713  // Fill histograms
714  if(LamGenR > 0.) {
715  if(LamGenStatus == 1) {
717  }
718  if((double) LamGenStatus < 2.5) {
720  }
722  }
723  if(abs(LamGenEta) > 0.) {
724  if(LamGenStatus == 1) {
725  lamEffVsEta_num->Fill(LamGenEta);
726  }
727  if((double) LamGenStatus < 2.5) {
728  lamTkEffVsEta_num->Fill(LamGenEta);
729  }
730  lamEffVsEta_denom->Fill(LamGenEta);
731  }
732  if(LamGenpT > 0.) {
733  if(LamGenStatus == 1) {
735  }
736  if((double) LamGenStatus < 2.5) {
738  }
740  }
741  }
742  }
743  }
744  }
745  }
746  }
747  }
748  }
749  }
750  }
751 
752  //Kshorts
753 
754  for (TrackingParticleCollection::size_type i=0; i<tPCeff.size(); i++){
755  TrackingParticleRef tpr1(TPCollectionEff, i);
756  const TrackingParticle* itp1 = tpr1.get();
757  // only count the efficiency for pions with |eta|<2.4 and pT>0.9 GeV. First search for a suitable pi+
758  if ( itp1->pdgId() == 211
759  && itp1->parentVertex().isNonnull()
760  && abs(itp1->momentum().eta()) < 2.4
761  && sqrt(itp1->momentum().perp2()) > 0.9) {
762  if ( itp1->parentVertex()->nDaughterTracks() == 2 ) {
763  TrackingVertexRef piCand1Vertex = itp1->parentVertex();
764  //check trackingParticle pion for a Ks mother
765  for (TrackingVertex::tp_iterator iTP1 = piCand1Vertex->sourceTracks_begin();
766  iTP1 != piCand1Vertex->sourceTracks_end(); ++iTP1) {
767  //iTP1 is a TrackingParticle
768  if ( (*iTP1)->pdgId()==310 ) {
769  //with a Ks mother found for the pi+, loop through trackingParticles again to find a pi-
770  for (TrackingParticleCollection::size_type j=0; j<tPCeff.size(); j++){
771  TrackingParticleRef tpr2(TPCollectionEff, j);
772  const TrackingParticle* itp2 = tpr2.get();
773 
774  if ( itp2->pdgId() == -211 && itp2->parentVertex().isNonnull()
775  && abs(itp2->momentum().eta()) < 2.4
776  && sqrt(itp2->momentum().perp2()) > 0.9) {
777  //check the pi+ and pi- have the same vertex
778  if ( itp2->parentVertex() == itp1->parentVertex() ) {
779  TrackingVertexRef piCand2Vertex = itp2->parentVertex();
780  for (TrackingVertex::tp_iterator iTP2 = piCand2Vertex->sourceTracks_begin();
781  iTP2 != piCand2Vertex->sourceTracks_end(); ++iTP2) {
782  //iTP2 is a TrackingParticle
783  K0sGenEta = K0sGenpT = K0sGenR = 0.;
784  K0sGenStatus = 0;
785  if( (*iTP2)->pdgId() == 310 ) {
786  K0sGenpT = sqrt( (*iTP2)->momentum().perp2() );
787  K0sGenEta = (*iTP2)->momentum().eta();
788  K0sGenR = sqrt(itp2->vertex().perp2());
789  genK0s++;
790  int loop_2 = 0;
791  if( trueK0s.size() > 0 ) {
792  for( std::vector< pair<TrackingParticleRef, TrackingParticleRef> >::const_iterator iEffCheck = trueK0s.begin();
793  iEffCheck != trueK0s.end();
794  iEffCheck++) {
795  //if the parent vertices for the tracks are the same, then the generated Ks was found
796  if (itp1->parentVertex()==iEffCheck->first->parentVertex() &&
797  itp2->parentVertex()==iEffCheck->second->parentVertex()) {
798  realK0sFoundEff++;
799  K0sGenStatus = 1;
800  goodKsMass->Fill(trueKsMasses[loop_2]);
801  break;
802  }
803  else {
804  K0sGenStatus = 2;
805  }
806  }
807  }
808  else {
809  K0sGenStatus = 2;
810  }
811 
812  // Check if the generated Ks tracks were found or not
813  // by searching the recoTracks list for a match to the trackingParticles
814 
815  std::vector<std::pair<RefToBase<reco::Track>, double> > rt1;
816  std::vector<std::pair<RefToBase<reco::Track>, double> > rt2;
817 
818  if( simtorecoCollectionH->find(tpr1) != simtorecoCollectionH->end() ) {
819  rt1 = (std::vector< std::pair<RefToBase<reco::Track>, double> >) (*simtorecoCollectionH)[tpr1];
820  if(rt1.size() != 0) {
821  //First pion found
822  K0sPiEff[0] = 1;
823  edm::RefToBase<reco::Track> t1 = rt1.begin()->first;
824  }
825  }
826  else {
827  //First pion not found
828  K0sPiEff[0] = 2;
829  }
830 
831  if( simtorecoCollectionH->find(tpr2) != simtorecoCollectionH->end() ) {
832  rt2 = (std::vector< std::pair<RefToBase<reco::Track>, double> >) (*simtorecoCollectionH)[tpr2];
833  if(rt2.size() != 0) {
834  //Second pion found
835  K0sPiEff[1] = 1;
836  edm::RefToBase<reco::Track> t2 = rt2.begin()->first;
837  }
838  }
839  else {
840  K0sPiEff[1] = 2;
841  }
842  if(K0sGenStatus == 1
843  && (K0sPiEff[0] == 2 || K0sPiEff[1] == 2)) {
844  K0sGenStatus = 4;
845  realK0sFoundEff--;
846  }
847  if(K0sGenStatus == 2
848  && (K0sPiEff[0] == 2 || K0sPiEff[1] == 2)) {
849  K0sGenStatus = 3;
850  }
851  if(K0sPiEff[0] == 1 && K0sPiEff[1] == 1) {
852  k0sTracksFound++;
853  }
854  //Fill Histograms
855  if(K0sGenR > 0.) {
856  if(K0sGenStatus == 1) {
858  }
859  if((double) K0sGenStatus < 2.5) {
861  }
863  }
864  if(abs(K0sGenEta) > 0.) {
865  if(K0sGenStatus == 1) {
866  ksEffVsEta_num->Fill(K0sGenEta);
867  }
868  if((double) K0sGenStatus < 2.5) {
869  ksTkEffVsEta_num->Fill(K0sGenEta);
870  }
871  ksEffVsEta_denom->Fill(K0sGenEta);
872  }
873  if(K0sGenpT > 0.) {
874  if(K0sGenStatus == 1) {
876  }
877  if((double) K0sGenStatus < 2.5) {
879  }
881  }
882  }
883  }
884  }
885  }
886  }
887  }
888  }
889  }
890  }
891  }
892 
893  delete thePrimary;
894 }
895 
896 //define this as a plug-in
897 //DEFINE_FWK_MODULE(V0Validator);
MonitorElement * ksTkFakeVsPt
Definition: V0Validator.h:121
edm::EDGetTokenT< edm::SimVertexContainer > edmSimVertexContainerToken_
Definition: V0Validator.h:211
unsigned int size_type
Definition: View.h:85
int i
Definition: DBlmapReader.cc:9
MonitorElement * nLam
Definition: V0Validator.h:186
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override
Definition: V0Validator.cc:58
std::vector< VertexCompositeCandidate > VertexCompositeCandidateCollection
collection of Candidate objects
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
MonitorElement * lamTkFakeVsR_num
Definition: V0Validator.h:172
MonitorElement * ksEffVsR
Definition: V0Validator.h:110
unsigned int K0sCandStatus
Definition: V0Validator.h:102
edm::EDGetTokenT< reco::SimToRecoCollection > recoSimToRecoCollectionToken_
Definition: V0Validator.h:207
V0Validator(const edm::ParameterSet &)
Definition: V0Validator.cc:28
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > recoVertexCompositeCandidateCollection_k0s_Token_
Definition: V0Validator.h:213
float LamGenR
Definition: V0Validator.h:99
std::vector< TrackingParticle > TrackingParticleCollection
bool getByToken(EDGetToken token, Handle< PROD > &result) const
Definition: Event.h:446
void cd(void)
Definition: DQMStore.cc:266
MonitorElement * ksFakeVsPt_denom
Definition: V0Validator.h:138
float LamCandR
Definition: V0Validator.h:101
MonitorElement * lamTkEffVsR
Definition: V0Validator.h:153
int pdgId() const
PDG ID.
MonitorElement * lamFakeVsPt
Definition: V0Validator.h:158
MonitorElement * ksTkFakeVsEta
Definition: V0Validator.h:120
MonitorElement * ksFakeVsR_denom
Definition: V0Validator.h:136
MonitorElement * ksFakeVsEta_num
Definition: V0Validator.h:130
unsigned int LamPiCandStatus[2]
Definition: V0Validator.h:103
MonitorElement * lamEffVsEta_num
Definition: V0Validator.h:164
std::vector< Vertex > VertexCollection
collection of Vertex objects
Definition: VertexFwd.h:9
MonitorElement * lamFakeVsPt_denom
Definition: V0Validator.h:145
MonitorElement * ksEffVsR_num
Definition: V0Validator.h:123
MonitorElement * ksFakeVsPt_num
Definition: V0Validator.h:131
MonitorElement * lamFakeVsR_denom
Definition: V0Validator.h:143
MonitorElement * lamEffVsPt_denom
Definition: V0Validator.h:148
unsigned int K0sPiCandStatus[2]
Definition: V0Validator.h:103
uint16_t size_type
MonitorElement * lamEffVsPt_num
Definition: V0Validator.h:165
MonitorElement * lamTkFakeVsR
Definition: V0Validator.h:159
MonitorElement * lamFakeVsR
Definition: V0Validator.h:156
virtual void analyze(const edm::Event &, const edm::EventSetup &)
Definition: V0Validator.cc:273
void Fill(long long x)
MonitorElement * ksFakeVsEta
Definition: V0Validator.h:117
MonitorElement * lamZResolution
Definition: V0Validator.h:182
unsigned int LamPiEff[2]
Definition: V0Validator.h:103
MonitorElement * lamFakeDauRadDist
Definition: V0Validator.h:201
MonitorElement * lamTkEffVsEta
Definition: V0Validator.h:154
MonitorElement * lamEffVsR
Definition: V0Validator.h:150
MonitorElement * ksFakeVsEta_denom
Definition: V0Validator.h:137
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollectionToken_
Definition: V0Validator.h:208
int iEvent
Definition: GenABIO.cc:230
MonitorElement * fakeLamMass
Definition: V0Validator.h:193
MonitorElement * ksFakeDauRadDist
Definition: V0Validator.h:200
MonitorElement * lamTkFakeVsEta_num
Definition: V0Validator.h:173
edm::RefVector< edm::HepMCProduct, HepMC::GenVertex > GenVertexRefVector
MonitorElement * lamTkFakeVsPt
Definition: V0Validator.h:161
MonitorElement * ksEffVsPt_denom
Definition: V0Validator.h:141
int lamCandFound
Definition: V0Validator.h:107
MonitorElement * ksTkFakeVsEta_num
Definition: V0Validator.h:133
int k0sCandFound
Definition: V0Validator.h:107
int noTPforLamCand
Definition: V0Validator.h:107
T sqrt(T t)
Definition: SSEVec.h:48
MonitorElement * ksTkEffVsR_num
Definition: V0Validator.h:126
MonitorElement * lamFakeVsEta_denom
Definition: V0Validator.h:144
MonitorElement * lamXResolution
Definition: V0Validator.h:180
MonitorElement * ksEffVsEta_denom
Definition: V0Validator.h:140
MonitorElement * book1D(Args &&...args)
Definition: DQMStore.h:115
MonitorElement * lamTkEffVsPt
Definition: V0Validator.h:155
float K0sCandEta
Definition: V0Validator.h:101
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
MonitorElement * goodKsMass
Definition: V0Validator.h:192
T const * get() const
Returns C++ pointer to the item.
Definition: Ref.h:242
float LamGenpT
Definition: V0Validator.h:99
int realLamFound
Definition: V0Validator.h:106
MonitorElement * fakeKsMass
Definition: V0Validator.h:191
edm::EDGetTokenT< std::vector< reco::Vertex > > vec_recoVertex_Token_
Definition: V0Validator.h:212
MonitorElement * ksTkEffVsPt
Definition: V0Validator.h:115
MonitorElement * goodLamMass
Definition: V0Validator.h:194
MonitorElement * ksFakeVsPt
Definition: V0Validator.h:118
edm::Ref< TrackingVertexCollection > TrackingVertexRef
unsigned int LamGenStatus
Definition: V0Validator.h:102
edm::EDGetTokenT< edm::SimTrackContainer > edmSimTrackContainerToken_
Definition: V0Validator.h:210
MonitorElement * lamTkFakeVsEta
Definition: V0Validator.h:160
unsigned int K0sGenStatus
Definition: V0Validator.h:102
MonitorElement * ksMassAll
Definition: V0Validator.h:196
MonitorElement * lamTkEffVsR_num
Definition: V0Validator.h:166
MonitorElement * ksTkEffVsR
Definition: V0Validator.h:113
MonitorElement * nKs
Definition: V0Validator.h:185
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:274
MonitorElement * lamTkEffVsEta_num
Definition: V0Validator.h:167
int noTPforK0sCand
Definition: V0Validator.h:107
float K0sGenEta
Definition: V0Validator.h:99
MonitorElement * ksXResolution
Definition: V0Validator.h:176
float K0sCandpT
Definition: V0Validator.h:101
float K0sGenpT
Definition: V0Validator.h:99
MonitorElement * lamEffVsEta_denom
Definition: V0Validator.h:147
std::vector< TrackingVertex > TrackingVertexCollection
const T & get() const
Definition: EventSetup.h:55
std::vector< SimVertex > SimVertexContainer
MonitorElement * lamFakeVsEta
Definition: V0Validator.h:157
MonitorElement * ksAbsoluteDistResolution
Definition: V0Validator.h:179
edm::AssociationMap< edm::OneToManyWithQualityGeneric< edm::View< reco::Track >, TrackingParticleCollection, double > > RecoToSimCollection
edm::EDGetTokenT< TrackingParticleCollection > trackingParticleCollection_Eff_Token_
Definition: V0Validator.h:208
MonitorElement * ksCandStatus
Definition: V0Validator.h:188
MonitorElement * lamCandStatus
Definition: V0Validator.h:189
MonitorElement * lamEffVsEta
Definition: V0Validator.h:151
MonitorElement * lamTkFakeVsPt_num
Definition: V0Validator.h:174
MonitorElement * lamFakeVsEta_num
Definition: V0Validator.h:170
Point vertex() const
MonitorElement * ksTkEffVsPt_num
Definition: V0Validator.h:128
MonitorElement * lamFakeVsPt_num
Definition: V0Validator.h:171
MonitorElement * lamMassAll
Definition: V0Validator.h:197
float K0sCandR
Definition: V0Validator.h:101
MonitorElement * lamFakeVsR_num
Definition: V0Validator.h:169
edm::EDGetTokenT< edm::View< reco::Track > > edmView_recoTrack_Token_
Definition: V0Validator.h:209
const TrackingVertexRef & parentVertex() const
float LamGenEta
Definition: V0Validator.h:99
float LamCandEta
Definition: V0Validator.h:101
MonitorElement * lamEffVsR_num
Definition: V0Validator.h:163
MonitorElement * ksFakeVsR
Definition: V0Validator.h:116
MonitorElement * ksEffVsEta
Definition: V0Validator.h:111
MonitorElement * lamTkEffVsPt_num
Definition: V0Validator.h:168
Vector momentum() const
spatial momentum vector
edm::EDGetTokenT< reco::RecoToSimCollection > recoRecoToSimCollectionToken_
Definition: V0Validator.h:206
edm::EDGetTokenT< reco::VertexCompositeCandidateCollection > recoVertexCompositeCandidateCollection_lambda_Token_
Definition: V0Validator.h:213
edm::AssociationMap< edm::OneToManyWithQualityGeneric< TrackingParticleCollection, edm::View< reco::Track >, double > > SimToRecoCollection
MonitorElement * lamAbsoluteDistResolution
Definition: V0Validator.h:183
MonitorElement * ksZResolution
Definition: V0Validator.h:178
unsigned int LamCandStatus
Definition: V0Validator.h:102
Monte Carlo truth information used for tracking validation.
MonitorElement * ksEffVsPt_num
Definition: V0Validator.h:125
MonitorElement * ksTkEffVsEta_num
Definition: V0Validator.h:127
tuple cout
Definition: gather_cfg.py:121
MonitorElement * lamEffVsPt
Definition: V0Validator.h:152
MonitorElement * ksEffVsR_denom
Definition: V0Validator.h:139
MonitorElement * ksTkFakeVsPt_num
Definition: V0Validator.h:134
int realK0sFoundEff
Definition: V0Validator.h:106
MonitorElement * ksTkEffVsEta
Definition: V0Validator.h:114
MonitorElement * ksFakeVsR_num
Definition: V0Validator.h:129
MonitorElement * ksEffVsEta_num
Definition: V0Validator.h:124
MonitorElement * lamYResolution
Definition: V0Validator.h:181
std::string dirName
Definition: V0Validator.h:205
MonitorElement * ksEffVsPt
Definition: V0Validator.h:112
std::vector< SimTrack > SimTrackContainer
unsigned int K0sPiEff[2]
Definition: V0Validator.h:103
int k0sTracksFound
Definition: V0Validator.h:107
edm::RefVector< edm::HepMCProduct, HepMC::GenParticle > GenParticleRefVector
Definition: V0Validator.cc:26
int realLamFoundEff
Definition: V0Validator.h:106
float K0sGenR
Definition: V0Validator.h:99
MonitorElement * ksTkFakeVsR
Definition: V0Validator.h:119
MonitorElement * ksYResolution
Definition: V0Validator.h:177
MonitorElement * lamEffVsR_denom
Definition: V0Validator.h:146
Definition: Run.h:41
int realK0sFound
Definition: V0Validator.h:106
float LamCandpT
Definition: V0Validator.h:101
MonitorElement * ksTkFakeVsR_num
Definition: V0Validator.h:132