CMS 3D CMS Logo

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TrackClassifier.cc
Go to the documentation of this file.
1 
2 #include <math.h>
3 #include <cstdlib>
4 #include <iostream>
5 
6 #include "HepPDT/ParticleID.hh"
7 
9 
10 #define update(a, b) do { (a) = (a) | (b); } while(0)
11 
13  hepMCLabel_( config.getUntrackedParameter<edm::InputTag>("hepMC") ),
14  beamSpotLabel_( config.getUntrackedParameter<edm::InputTag>("beamSpot") ),
15  tracer_(config),
16  quality_(config)
17 {
18  // Set the history depth after hadronization
19  tracer_.depth(-2);
20 
21  // Set the maximum d0pull for the bad category
22  badPull_ = config.getUntrackedParameter<double>("badPull");
23 
24  // Set the minimum decay length for detecting long decays
25  longLivedDecayLength_ = config.getUntrackedParameter<double>("longLivedDecayLength");
26 
27  // Set the distance for clustering vertices
28  float vertexClusteringDistance = config.getUntrackedParameter<double>("vertexClusteringDistance");
29  vertexClusteringSqDistance_ = vertexClusteringDistance * vertexClusteringDistance;
30 
31  // Set the number of innermost layers to check for bad hits
32  numberOfInnerLayers_ = config.getUntrackedParameter<unsigned int>("numberOfInnerLayers");
33 
34  // Set the minimum number of simhits in the tracker
35  minTrackerSimHits_ = config.getUntrackedParameter<unsigned int>("minTrackerSimHits");
36 }
37 
38 
40 {
41  // Get the new event information for the tracer
42  tracer_.newEvent(event, setup);
43 
44  // Get the new event information for the track quality analyser
45  quality_.newEvent(event, setup);
46 
47  // Get hepmc of the event
48  event.getByLabel(hepMCLabel_, mcInformation_);
49 
50  // Magnetic field
52 
53  // Get the partivle data table
55 
56  // get the beam spot
57  event.getByLabel(beamSpotLabel_, beamSpot_);
58 
59  // Transient track builder
60  setup.get<TransientTrackRecord>().get("TransientTrackBuilder", transientTrackBuilder_);
61 
62  // Create the list of primary vertices associated to the event
64 
65  //Retrieve tracker topology from geometry
67  setup.get<IdealGeometryRecord>().get(tTopoHand);
68  tTopo_=tTopoHand.product();
69 }
70 
71 
73 {
74  // Initializing the category vector
75  reset();
76 
77  // Associate and evaluate the track history (check for fakes)
78  if ( tracer_.evaluate(track) )
79  {
80  // Classify all the tracks by their association and reconstruction information
82 
83  // Get all the information related to the simulation details
85 
86  // Analyse the track reconstruction quality
87  qualityInformation(track);
88 
89  // Get hadron flavor of the initial hadron
90  hadronFlavor();
91 
92  // Get all the information related to decay process
94 
95  // Get information about conversion and other interactions
97 
98  // Get geometrical information about the vertices
100 
101  // Check for unkown classification
102  unknownTrack();
103  }
104  else
105  flags_[Fake] = true;
106 
107  return *this;
108 }
109 
110 
112 {
113  // Initializing the category vector
114  reset();
115 
116  // Trace the history for the given TP
117  tracer_.evaluate(track);
118 
119  // Collect the associated reco track
121 
122  // If there is a reco truck then evaluate the simulated history
123  if ( recotrack.isNonnull() )
124  {
125  flags_[Reconstructed] = true;
126  // Classify all the tracks by their association and reconstruction information
127  reconstructionInformation(recotrack);
128  // Analyse the track reconstruction quality
129  qualityInformation(recotrack);
130  }
131  else
132  flags_[Reconstructed] = false;
133 
134  // Get all the information related to the simulation details
136 
137  // Get hadron flavor of the initial hadron
138  hadronFlavor();
139 
140  // Get all the information related to decay process
142 
143  // Get information about conversion and other interactions
145 
146  // Get geometrical information about the vertices
148 
149  // Check for unkown classification
150  unknownTrack();
151 
152  return *this;
153 }
154 
155 
157 {
159 
160  // Compute tracking particle parameters at point of closest approach to the beamline
161 
162  const SimTrack * assocTrack = &(*tpr->g4Track_begin());
163 
164  FreeTrajectoryState ftsAtProduction(
165  GlobalPoint(
166  tpr->vertex().x(),
167  tpr->vertex().y(),
168  tpr->vertex().z()
169  ),
170  GlobalVector(
171  assocTrack->momentum().x(),
172  assocTrack->momentum().y(),
173  assocTrack->momentum().z()
174  ),
175  TrackCharge(track->charge()),
177  );
178 
179  try
180  {
181  TSCPBuilderNoMaterial tscpBuilder;
182  TrajectoryStateClosestToPoint tsAtClosestApproach = tscpBuilder(
183  ftsAtProduction,
184  GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0())
185  );
186 
187  GlobalVector v = tsAtClosestApproach.theState().position()
188  - GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0());
189  GlobalVector p = tsAtClosestApproach.theState().momentum();
190 
191  // Simulated dxy
192  double dxySim = -v.x()*sin(p.phi()) + v.y()*cos(p.phi());
193 
194  // Simulated dz
195  double dzSim = v.z() - (v.x()*p.x() + v.y()*p.y())*p.z()/p.perp2();
196 
197  // Calculate the dxy pull
198  double dxyPull = std::abs(
199  track->dxy( reco::TrackBase::Point(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0()) ) - dxySim
200  ) / track->dxyError();
201 
202  // Calculate the dx pull
203  double dzPull = std::abs(
204  track->dz( reco::TrackBase::Point(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0()) ) - dzSim
205  ) / track->dzError();
206 
207  // Return true if d0Pull > badD0Pull sigmas
208  flags_[Bad] = (dxyPull > badPull_ || dzPull > badPull_);
209 
210  }
211  catch (cms::Exception exception)
212  {
213  flags_[Bad] = true;
214  }
215 }
216 
217 
219 {
220  // Get the event id for the initial TP.
221  EncodedEventId eventId = tracer_.simParticle()->eventId();
222  // Check for signal events
223  flags_[SignalEvent] = !eventId.bunchCrossing() && !eventId.event();
224  // Check for muons
225  flags_[Muon] = (abs(tracer_.simParticle()->pdgId()) == 13);
226  // Check for the number of psimhit in tracker
227  flags_[TrackerSimHits] = tracer_.simParticle()->numberOfTrackerLayers() >= (int)minTrackerSimHits_;
228 }
229 
230 
232 {
233  // run the hit-by-hit reconstruction quality analysis
235 
236  unsigned int maxLayers = std::min(numberOfInnerLayers_, quality_.numberOfLayers());
237 
238  // check the innermost layers for bad hits
239  for (unsigned int i = 0; i < maxLayers; i++)
240  {
241  const TrackQuality::Layer &layer = quality_.layer(i);
242 
243  // check all hits in that layer
244  for (unsigned int j = 0; j < layer.hits.size(); j++)
245  {
246  const TrackQuality::Layer::Hit &hit = layer.hits[j];
247 
248  // In those cases the bad hit was used by track reconstruction
249  if (hit.state == TrackQuality::Layer::Noise ||
251  flags_[BadInnerHits] = true;
252  else if (hit.state == TrackQuality::Layer::Shared)
253  flags_[SharedInnerHits] = true;
254  }
255  }
256 }
257 
258 
260 {
261  // Get the initial hadron
262  const HepMC::GenParticle * particle = tracer_.genParticle();
263 
264  // Check for the initial hadron
265  if (particle)
266  {
267  HepPDT::ParticleID pid(particle->pdg_id());
268  flags_[Bottom] = pid.hasBottom();
269  flags_[Charm] = pid.hasCharm();
270  flags_[Light] = !pid.hasCharm() && !pid.hasBottom();
271  }
272 }
273 
274 
276 {
277  // pdgid of the "in" particle to the production vertex
278  int pdgid = 0;
279 
280  // Get the generated particles from track history
281  TrackHistory::GenParticleTrail const & genParticleTrail = tracer_.genParticleTrail();
282 
283  // Loop over the generated particles
284  for (TrackHistory::GenParticleTrail::const_iterator iparticle = genParticleTrail.begin(); iparticle != genParticleTrail.end(); ++iparticle)
285  {
286  // Get the source vertex for the particle
287  HepMC::GenVertex * productionVertex = (*iparticle)->production_vertex();
288 
289  // Get the pointer to the vertex by removing the const-ness (no const methos in HepMC::GenVertex)
290  // HepMC::GenVertex * vertex = const_cast<HepMC::GenVertex *>(*ivertex);
291 
292  // Check for a non-null pointer to the production vertex
293  if (productionVertex)
294  {
295  // Only case track history will navegate (one in or source particle per vertex)
296  if ( productionVertex->particles_in_size() == 1 )
297  {
298  // Look at the pdgid of the first "in" particle to the vertex
299  pdgid = std::abs((*productionVertex->particles_in_const_begin())->pdg_id());
300  // Get particle type
301  HepPDT::ParticleID particleID(pdgid);
302 
303  // Check if the particle type is valid one
304  if (particleID.isValid())
305  {
306  // Get particle data
307  ParticleData const * particleData = particleDataTable_->particle(particleID);
308  // Check if the particle exist in the table
309  if (particleData)
310  {
311  // Check if their life time is bigger than longLivedDecayLength_
312  if ( particleData->lifetime() > longLivedDecayLength_ )
313  update(flags_[LongLivedDecay], true);
314  // Check for B and C weak decays
315  update(flags_[BWeakDecay], particleID.hasBottom());
316  update(flags_[CWeakDecay], particleID.hasCharm());
317  // Check for B and C pure leptonic decay
318  int daughterId = abs((*iparticle)->pdg_id());
319  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughterId == 13);
320  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughterId == 13);
321  }
322  // Check Tau, Ks and Lambda decay
323  update(flags_[ChargePionDecay], pdgid == 211);
324  update(flags_[ChargeKaonDecay], pdgid == 321);
325  update(flags_[TauDecay], pdgid == 15);
326  update(flags_[KsDecay], pdgid == 310);
327  update(flags_[LambdaDecay], pdgid == 3122);
328  update(flags_[JpsiDecay], pdgid == 443);
329  update(flags_[XiDecay], pdgid == 3312);
330  update(flags_[SigmaPlusDecay], pdgid == 3222);
331  update(flags_[SigmaMinusDecay], pdgid == 3112);
332  }
333  }
334  }
335  }
336  // Decays in flight
339  update(flags_[DecayOnFlightMuon], (flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]));
340 }
341 
342 
344 {
345  TrackHistory::SimParticleTrail const & simParticleTrail = tracer_.simParticleTrail();
346 
347  // Loop over the simulated particles
348  for (
349  TrackHistory::SimParticleTrail::const_iterator iparticle = simParticleTrail.begin();
350  iparticle != simParticleTrail.end();
351  ++iparticle
352  )
353  {
354  // pdgid of the real source parent vertex
355  int pdgid = 0;
356 
357  // Get a reference to the TP's parent vertex
358  TrackingVertexRef const & parentVertex = (*iparticle)->parentVertex();
359 
360  // Look for the original source track
361  if ( parentVertex.isNonnull() )
362  {
363  // select the original source in case of combined vertices
364  bool flag = false;
366 
367  for (its = parentVertex->sourceTracks_begin(); its != parentVertex->sourceTracks_end(); ++its)
368  {
369  for (itd = parentVertex->daughterTracks_begin(); itd != parentVertex->daughterTracks_end(); ++itd)
370  if (itd != its)
371  {
372  flag = true;
373  break;
374  }
375  if (flag)
376  break;
377  }
378 
379  // Collect the pdgid of the original source track
380  if ( its != parentVertex->sourceTracks_end() )
381  pdgid = std::abs((*its)->pdgId());
382  else
383  pdgid = 0;
384  }
385 
386  // Check for the number of psimhit if different from zero
387  if ((*iparticle)->numberOfHits()) continue;
388 
389  // Collect the G4 process of the first psimhit (it should be the same for all of them)
390 #warning "This file has been modified just to get it to compile without any regard as to whether it still functions as intended"
391 #ifdef REMOVED_JUST_TO_GET_IT_TO_COMPILE__THIS_CODE_NEEDS_TO_BE_CHECKED
392  unsigned short process = (*iparticle)->pSimHit_begin()->processType();
393 #else
394  unsigned short process = 0;
395 #endif
396  // Flagging all the different processes
397 
398  update(
400  process != G4::Undefined &&
401  process != G4::Unknown &&
402  process != G4::Primary
403  );
404 
406  update(flags_[UnknownProcess], process == G4::Unknown);
407  update(flags_[PrimaryProcess], process == G4::Primary);
409  update(flags_[DecayProcess], process == G4::Decay);
410  update(flags_[ComptonProcess], process == G4::Compton);
412  update(flags_[EIoniProcess], process == G4::EIoni);
413  update(flags_[HIoniProcess], process == G4::HIoni);
414  update(flags_[MuIoniProcess], process == G4::MuIoni);
415  update(flags_[PhotonProcess], process == G4::Photon);
418  update(flags_[EBremProcess], process == G4::EBrem);
420  update(flags_[MuBremProcess], process == G4::MuBrem);
421  update(flags_[MuNuclProcess], process == G4::MuNucl);
422 
423  // Get particle type
424  HepPDT::ParticleID particleID(pdgid);
425 
426  // Check if the particle type is valid one
427  if (particleID.isValid())
428  {
429  // Get particle data
430  ParticleData const * particleData = particleDataTable_->particle(particleID);
431  // Special treatment for decays
432  if (process == G4::Decay)
433  {
434  // Check if the particle exist in the table
435  if (particleData)
436  {
437  // Check if their life time is bigger than 1e-14
438  if ( particleDataTable_->particle(particleID)->lifetime() > longLivedDecayLength_ )
439  update(flags_[LongLivedDecay], true);
440 
441  // Check for B and C weak decays
442  update(flags_[BWeakDecay], particleID.hasBottom());
443  update(flags_[CWeakDecay], particleID.hasCharm());
444 
445  // Check for B or C pure leptonic decays
446  int daughtId = abs((*iparticle)->pdgId());
447  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughtId == 13);
448  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughtId == 13);
449  }
450  // Check decays
451  update(flags_[ChargePionDecay], pdgid == 211);
452  update(flags_[ChargeKaonDecay], pdgid == 321);
453  update(flags_[TauDecay], pdgid == 15);
454  update(flags_[KsDecay], pdgid == 310);
455  update(flags_[LambdaDecay], pdgid == 3122);
456  update(flags_[JpsiDecay], pdgid == 443);
457  update(flags_[XiDecay], pdgid == 3312);
458  update(flags_[OmegaDecay], pdgid == 3334);
459  update(flags_[SigmaPlusDecay], pdgid == 3222);
460  update(flags_[SigmaMinusDecay], pdgid == 3112);
461  }
462  }
463  }
464  // Decays in flight
467  update(flags_[DecayOnFlightMuon], flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]);
468 }
469 
470 
472 {
473  // Get the main primary vertex from the list
474  GeneratedPrimaryVertex const & genpv = genpvs_.back();
475 
476  // Get the generated history of the tracks
478 
479  // Vertex counter
480  int counter = 0;
481 
482  // Unit transformation from mm to cm
483  double const mm = 0.1;
484 
485  double oldX = genpv.x;
486  double oldY = genpv.y;
487  double oldZ = genpv.z;
488 
489  // Loop over the generated particles
490  for (
491  TrackHistory::GenParticleTrail::reverse_iterator iparticle = genParticleTrail.rbegin();
492  iparticle != genParticleTrail.rend();
493  ++iparticle
494  )
495  {
496  // Look for those with production vertex
497  HepMC::GenVertex * parent = (*iparticle)->production_vertex();
498  if (parent)
499  {
500  HepMC::ThreeVector p = parent->point3d();
501 
502  double distance2 = pow(p.x() * mm - genpv.x, 2) + pow(p.y() * mm - genpv.y, 2) + pow(p.z() * mm - genpv.z, 2);
503  double difference2 = pow(p.x() * mm - oldX, 2) + pow(p.y() * mm - oldY, 2) + pow(p.z() * mm - oldZ, 2);
504 
505  // std::cout << "Distance2 : " << distance2 << " (" << p.x() * mm << "," << p.y() * mm << "," << p.z() * mm << ")" << std::endl;
506  // std::cout << "Difference2 : " << difference2 << std::endl;
507 
508  if ( difference2 > vertexClusteringSqDistance_ )
509  {
510  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
511  oldX = p.x() * mm;
512  oldY = p.y() * mm;
513  oldZ = p.z() * mm;
514  }
515  }
516  }
517 
519 
520  // Loop over the generated particles
521  for (
522  TrackHistory::SimParticleTrail::reverse_iterator iparticle = simParticleTrail.rbegin();
523  iparticle != simParticleTrail.rend();
524  ++iparticle
525  )
526  {
527  // Look for those with production vertex
528  TrackingParticle::Point p = (*iparticle)->vertex();
529 
530  double distance2 = pow(p.x() - genpv.x, 2) + pow(p.y() - genpv.y, 2) + pow(p.z() - genpv.z, 2);
531  double difference2 = pow(p.x() - oldX, 2) + pow(p.y() - oldY, 2) + pow(p.z() - oldZ, 2);
532 
533  // std::cout << "Distance2 : " << distance2 << " (" << p.x() << "," << p.y() << "," << p.z() << ")" << std::endl;
534  // std::cout << "Difference2 : " << difference2 << std::endl;
535 
536  if ( difference2 > vertexClusteringSqDistance_ )
537  {
538  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
539  oldX = p.x();
540  oldY = p.y();
541  oldZ = p.z();
542  }
543  }
544 
545  if ( !counter )
546  flags_[PrimaryVertex] = true;
547  else if ( counter == 1 )
548  flags_[SecondaryVertex] = true;
549  else
550  flags_[TertiaryVertex] = true;
551 }
552 
553 
555 {
556  return !p->end_vertex() && p->status() == 1;
557 }
558 
559 
561 {
562  const ParticleData * part = particleDataTable_->particle( p->pdg_id() );
563  if (part)
564  return part->charge()!=0;
565  else
566  {
567  // the new/improved particle table doesn't know anti-particles
568  return particleDataTable_->particle( -p->pdg_id() ) != 0;
569  }
570 }
571 
572 
574 {
575  genpvs_.clear();
576 
577  const HepMC::GenEvent * event = mcInformation_->GetEvent();
578 
579  if (event)
580  {
581  int idx = 0;
582 
583  // Loop over the different GenVertex
584  for ( HepMC::GenEvent::vertex_const_iterator ivertex = event->vertices_begin(); ivertex != event->vertices_end(); ++ivertex )
585  {
586  bool hasParentVertex = false;
587 
588  // Loop over the parents looking to see if they are coming from a production vertex
589  for (
590  HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(HepMC::parents);
591  iparent != (*ivertex)->particles_end(HepMC::parents);
592  ++iparent
593  )
594  if ( (*iparent)->production_vertex() )
595  {
596  hasParentVertex = true;
597  break;
598  }
599 
600  // Reject those vertices with parent vertices
601  if (hasParentVertex) continue;
602 
603  // Get the position of the vertex
604  HepMC::FourVector pos = (*ivertex)->position();
605 
606  double const mm = 0.1;
607 
608  GeneratedPrimaryVertex pv(pos.x()*mm, pos.y()*mm, pos.z()*mm);
609 
610  std::vector<GeneratedPrimaryVertex>::iterator ientry = genpvs_.begin();
611 
612  // Search for a VERY close vertex in the list
613  for (; ientry != genpvs_.end(); ++ientry)
614  {
615  double distance2 = pow(pv.x - ientry->x, 2) + pow(pv.y - ientry->y, 2) + pow(pv.z - ientry->z, 2);
616  if ( distance2 < vertexClusteringSqDistance_ )
617  break;
618  }
619 
620  // Check if there is not a VERY close vertex and added to the list
621  if (ientry == genpvs_.end())
622  ientry = genpvs_.insert(ientry,pv);
623 
624  // Add the vertex barcodes to the new or existent vertices
625  ientry->genVertex.push_back((*ivertex)->barcode());
626 
627  // Collect final state descendants
628  for (
629  HepMC::GenVertex::particle_iterator idecendants = (*ivertex)->particles_begin(HepMC::descendants);
630  idecendants != (*ivertex)->particles_end(HepMC::descendants);
631  ++idecendants
632  )
633  {
634  if (isFinalstateParticle(*idecendants))
635  if ( find(ientry->finalstateParticles.begin(), ientry->finalstateParticles.end(), (*idecendants)->barcode()) == ientry->finalstateParticles.end() )
636  {
637  ientry->finalstateParticles.push_back((*idecendants)->barcode());
638  HepMC::FourVector m = (*idecendants)->momentum();
639 
640  ientry->ptot.setPx(ientry->ptot.px() + m.px());
641  ientry->ptot.setPy(ientry->ptot.py() + m.py());
642  ientry->ptot.setPz(ientry->ptot.pz() + m.pz());
643  ientry->ptot.setE(ientry->ptot.e() + m.e());
644  ientry->ptsq += m.perp() * m.perp();
645 
646  if ( m.perp() > 0.8 && std::abs(m.pseudoRapidity()) < 2.5 && isCharged(*idecendants) ) ientry->nGenTrk++;
647  }
648  }
649  idx++;
650  }
651  }
652 
653  std::sort(genpvs_.begin(), genpvs_.end());
654 }
unsigned int numberOfLayers() const
Return the number of layers with simulated and/or reconstructed hits.
Definition: TrackQuality.h:81
T getUntrackedParameter(std::string const &, T const &) const
int i
Definition: DBlmapReader.cc:9
const edm::InputTag beamSpotLabel_
const edm::InputTag hepMCLabel_
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
Definition: TrackHistory.cc:32
long int flag
Definition: mlp_lapack.h:47
int event() const
get the contents of the subdetector field (should be protected?)
TPRegexp parents
Definition: eve_filter.cc:24
list parent
Definition: dbtoconf.py:74
const FreeTrajectoryState & theState() const
double dxyError() const
error on dxy
Definition: TrackBase.h:209
const TrackingParticleRef & simParticle() const
Return the initial tracking particle from the history.
Definition: HistoryBase.h:77
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
edm::Handle< edm::HepMCProduct > mcInformation_
const TrackerTopology * tTopo_
T y() const
Definition: PV3DBase.h:63
#define abs(x)
Definition: mlp_lapack.h:159
unsigned int numberOfInnerLayers_
#define min(a, b)
Definition: mlp_lapack.h:161
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:7
unsigned int minTrackerSimHits_
std::vector< GeneratedPrimaryVertex > genpvs_
void processesAtSimulation()
Get information about conversion and other interactions.
void getData(T &iHolder) const
Definition: EventSetup.h:67
std::vector< const HepMC::GenParticle * > GenParticleTrail
GenParticle trail type.
Definition: HistoryBase.h:18
math::XYZPointD Point
point in the space
void simulationInformation()
Get all the information related to the simulation details.
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:250
int TrackCharge
Definition: TrackCharge.h:4
void qualityInformation(reco::TrackBaseRef const &)
Classify all the tracks by their reconstruction quality.
void reconstructionInformation(reco::TrackBaseRef const &)
Classify all the tracks by their association and reconstruction information.
TrackClassifier const & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
bool isCharged(const HepMC::GenParticle *)
edm::ESHandle< TransientTrackBuilder > transientTrackBuilder_
void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo)
Compute information about the track reconstruction quality.
Auxiliary class holding simulated primary vertices.
int bunchCrossing() const
get the detector field from this detid
T z() const
Definition: PV3DBase.h:64
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
int j
Definition: DBlmapReader.cc:9
math::XYZPoint Point
point in the space
Definition: TrackBase.h:76
void hadronFlavor()
Get hadron flavor of the initial hadron.
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
const Layer & layer(unsigned int index) const
Return information about the given layer by index.
Definition: TrackQuality.h:87
edm::Handle< reco::BeamSpot > beamSpot_
HepPDT::ParticleData ParticleData
GlobalVector momentum() const
TrackQuality quality_
double dz() const
dz parameter (= dsz/cos(lambda)). This is the track z0 w.r.t (0,0,0) only if the refPoint is close to...
Definition: TrackBase.h:127
double dzError() const
error on dz
Definition: TrackBase.h:215
GlobalPoint position() const
Get track history and classify it in function of their .
TrackClassifier(edm::ParameterSet const &)
Constructor by ParameterSet.
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
part
Definition: HCALResponse.h:20
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: ESHandle.h:62
bool isFinalstateParticle(const HepMC::GenParticle *)
SimParticleTrail const & simParticleTrail() const
Return all the simulated particle in the history.
Definition: HistoryBase.h:59
void vertexInformation()
Get geometrical information about the vertices.
void processesAtGenerator()
Get all the information related to decay process.
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: TrackHistory.h:39
#define update(a, b)
void depth(int d)
Set the depth of the history.
Definition: HistoryBase.h:47
edm::ESHandle< MagneticField > magneticField_
const math::XYZTLorentzVectorD & momentum() const
particle info...
Definition: CoreSimTrack.h:36
std::vector< Hit > hits
Definition: TrackQuality.h:63
Flags flags_
Flag containers.
int charge() const
track electric charge
Definition: TrackBase.h:113
const reco::TrackBaseRef & recoTrack() const
Return a reference to the reconstructed track.
Definition: TrackHistory.h:60
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
double longLivedDecayLength_
void reset()
Reset the categories flags.
double vertexClusteringSqDistance_
tuple process
Definition: LaserDQM_cfg.py:3
double dxy() const
dxy parameter. (This is the transverse impact parameter w.r.t. to (0,0,0) ONLY if refPoint is close t...
Definition: TrackBase.h:121
T x() const
Definition: PV3DBase.h:62
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:279
edm::ESHandle< ParticleDataTable > particleDataTable_
void setup(std::vector< TH2F > &depth, std::string name, std::string units="")
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
GenParticleTrail const & genParticleTrail() const
Return all generated particle in the history.
Definition: HistoryBase.h:71
TrackHistory tracer_
const HepMC::GenParticle * genParticle() const
Returns a pointer to most primitive status 1 or 2 particle.
Definition: HistoryBase.h:89
Global3DVector GlobalVector
Definition: GlobalVector.h:10
std::vector< TrackingParticleRef > SimParticleTrail
SimParticle trail type.
Definition: HistoryBase.h:27