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