test
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  edm::ConsumesCollector&& collector) : TrackCategories(),
14  hepMCLabel_( config.getUntrackedParameter<edm::InputTag>("hepMC") ),
15  beamSpotLabel_( config.getUntrackedParameter<edm::InputTag>("beamSpot") ),
16  tracer_(config,std::move(collector)),
17  quality_(config, collector)
18 {
19  collector.consumes<edm::HepMCProduct>(hepMCLabel_);
20  collector.consumes<reco::BeamSpot>(beamSpotLabel_);
21 
22  // Set the history depth after hadronization
23  tracer_.depth(-2);
24 
25  // Set the maximum d0pull for the bad category
26  badPull_ = config.getUntrackedParameter<double>("badPull");
27 
28  // Set the minimum decay length for detecting long decays
29  longLivedDecayLength_ = config.getUntrackedParameter<double>("longLivedDecayLength");
30 
31  // Set the distance for clustering vertices
32  float vertexClusteringDistance = config.getUntrackedParameter<double>("vertexClusteringDistance");
33  vertexClusteringSqDistance_ = vertexClusteringDistance * vertexClusteringDistance;
34 
35  // Set the number of innermost layers to check for bad hits
36  numberOfInnerLayers_ = config.getUntrackedParameter<unsigned int>("numberOfInnerLayers");
37 
38  // Set the minimum number of simhits in the tracker
39  minTrackerSimHits_ = config.getUntrackedParameter<unsigned int>("minTrackerSimHits");
40 }
41 
42 
44 {
45  // Get the new event information for the tracer
46  tracer_.newEvent(event, setup);
47 
48  // Get the new event information for the track quality analyser
49  quality_.newEvent(event, setup);
50 
51  // Get hepmc of the event
52  event.getByLabel(hepMCLabel_, mcInformation_);
53 
54  // Magnetic field
56 
57  // Get the partivle data table
59 
60  // get the beam spot
61  event.getByLabel(beamSpotLabel_, beamSpot_);
62 
63  // Transient track builder
64  setup.get<TransientTrackRecord>().get("TransientTrackBuilder", transientTrackBuilder_);
65 
66  // Create the list of primary vertices associated to the event
68 
69  //Retrieve tracker topology from geometry
71  setup.get<TrackerTopologyRcd>().get(tTopoHand);
72  tTopo_=tTopoHand.product();
73 }
74 
75 
77 {
78  // Initializing the category vector
79  reset();
80 
81  // Associate and evaluate the track history (check for fakes)
82  if ( tracer_.evaluate(track) )
83  {
84  // Classify all the tracks by their association and reconstruction information
86 
87  // Get all the information related to the simulation details
89 
90  // Analyse the track reconstruction quality
91  qualityInformation(track);
92 
93  // Get hadron flavor of the initial hadron
94  hadronFlavor();
95 
96  // Get all the information related to decay process
98 
99  // Get information about conversion and other interactions
101 
102  // Get geometrical information about the vertices
104 
105  // Check for unkown classification
106  unknownTrack();
107  }
108  else
109  flags_[Fake] = true;
110 
111  return *this;
112 }
113 
114 
116 {
117  // Initializing the category vector
118  reset();
119 
120  // Trace the history for the given TP
121  tracer_.evaluate(track);
122 
123  // Collect the associated reco track
125 
126  // If there is a reco truck then evaluate the simulated history
127  if ( recotrack.isNonnull() )
128  {
129  flags_[Reconstructed] = true;
130  // Classify all the tracks by their association and reconstruction information
131  reconstructionInformation(recotrack);
132  // Analyse the track reconstruction quality
133  qualityInformation(recotrack);
134  }
135  else
136  flags_[Reconstructed] = false;
137 
138  // Get all the information related to the simulation details
140 
141  // Get hadron flavor of the initial hadron
142  hadronFlavor();
143 
144  // Get all the information related to decay process
146 
147  // Get information about conversion and other interactions
149 
150  // Get geometrical information about the vertices
152 
153  // Check for unkown classification
154  unknownTrack();
155 
156  return *this;
157 }
158 
159 
161 {
163 
164  // Compute tracking particle parameters at point of closest approach to the beamline
165 
166  const SimTrack * assocTrack = &(*tpr->g4Track_begin());
167 
168  FreeTrajectoryState ftsAtProduction(
169  GlobalPoint(
170  tpr->vertex().x(),
171  tpr->vertex().y(),
172  tpr->vertex().z()
173  ),
174  GlobalVector(
175  assocTrack->momentum().x(),
176  assocTrack->momentum().y(),
177  assocTrack->momentum().z()
178  ),
179  TrackCharge(track->charge()),
181  );
182 
183  try
184  {
185  TSCPBuilderNoMaterial tscpBuilder;
186  TrajectoryStateClosestToPoint tsAtClosestApproach = tscpBuilder(
187  ftsAtProduction,
188  GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0())
189  );
190 
191  GlobalVector v = tsAtClosestApproach.theState().position()
192  - GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0());
193  GlobalVector p = tsAtClosestApproach.theState().momentum();
194 
195  // Simulated dxy
196  double dxySim = -v.x()*sin(p.phi()) + v.y()*cos(p.phi());
197 
198  // Simulated dz
199  double dzSim = v.z() - (v.x()*p.x() + v.y()*p.y())*p.z()/p.perp2();
200 
201  // Calculate the dxy pull
202  double dxyPull = std::abs(
203  track->dxy( reco::TrackBase::Point(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0()) ) - dxySim
204  ) / track->dxyError();
205 
206  // Calculate the dx pull
207  double dzPull = std::abs(
208  track->dz( reco::TrackBase::Point(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0()) ) - dzSim
209  ) / track->dzError();
210 
211  // Return true if d0Pull > badD0Pull sigmas
212  flags_[Bad] = (dxyPull > badPull_ || dzPull > badPull_);
213 
214  }
215  catch (cms::Exception exception)
216  {
217  flags_[Bad] = true;
218  }
219 }
220 
221 
223 {
224  // Get the event id for the initial TP.
225  EncodedEventId eventId = tracer_.simParticle()->eventId();
226  // Check for signal events
227  flags_[SignalEvent] = !eventId.bunchCrossing() && !eventId.event();
228  // Check for muons
229  flags_[Muon] = (abs(tracer_.simParticle()->pdgId()) == 13);
230  // Check for the number of psimhit in tracker
231  flags_[TrackerSimHits] = tracer_.simParticle()->numberOfTrackerLayers() >= (int)minTrackerSimHits_;
232 }
233 
234 
236 {
237  // run the hit-by-hit reconstruction quality analysis
239 
240  unsigned int maxLayers = std::min(numberOfInnerLayers_, quality_.numberOfLayers());
241 
242  // check the innermost layers for bad hits
243  for (unsigned int i = 0; i < maxLayers; i++)
244  {
245  const TrackQuality::Layer &layer = quality_.layer(i);
246 
247  // check all hits in that layer
248  for (unsigned int j = 0; j < layer.hits.size(); j++)
249  {
250  const TrackQuality::Layer::Hit &hit = layer.hits[j];
251 
252  // In those cases the bad hit was used by track reconstruction
253  if (hit.state == TrackQuality::Layer::Noise ||
255  flags_[BadInnerHits] = true;
256  else if (hit.state == TrackQuality::Layer::Shared)
257  flags_[SharedInnerHits] = true;
258  }
259  }
260 }
261 
262 
264 {
265  // Get the initial hadron
266  const HepMC::GenParticle * particle = tracer_.genParticle();
267 
268  // Check for the initial hadron
269  if (particle)
270  {
271  HepPDT::ParticleID pid(particle->pdg_id());
272  flags_[Bottom] = pid.hasBottom();
273  flags_[Charm] = pid.hasCharm();
274  flags_[Light] = !pid.hasCharm() && !pid.hasBottom();
275  }
276 }
277 
278 
280 {
281  // pdgid of the "in" particle to the production vertex
282  int pdgid = 0;
283 
284  // Get the generated particles from track history
285  TrackHistory::GenParticleTrail const & genParticleTrail = tracer_.genParticleTrail();
286 
287  // Loop over the generated particles
288  for (TrackHistory::GenParticleTrail::const_iterator iparticle = genParticleTrail.begin(); iparticle != genParticleTrail.end(); ++iparticle)
289  {
290  // Get the source vertex for the particle
291  HepMC::GenVertex * productionVertex = (*iparticle)->production_vertex();
292 
293  // Get the pointer to the vertex by removing the const-ness (no const methos in HepMC::GenVertex)
294  // HepMC::GenVertex * vertex = const_cast<HepMC::GenVertex *>(*ivertex);
295 
296  // Check for a non-null pointer to the production vertex
297  if (productionVertex)
298  {
299  // Only case track history will navegate (one in or source particle per vertex)
300  if ( productionVertex->particles_in_size() == 1 )
301  {
302  // Look at the pdgid of the first "in" particle to the vertex
303  pdgid = std::abs((*productionVertex->particles_in_const_begin())->pdg_id());
304  // Get particle type
305  HepPDT::ParticleID particleID(pdgid);
306 
307  // Check if the particle type is valid one
308  if (particleID.isValid())
309  {
310  // Get particle data
311  ParticleData const * particleData = particleDataTable_->particle(particleID);
312  // Check if the particle exist in the table
313  if (particleData)
314  {
315  // Check if their life time is bigger than longLivedDecayLength_
316  if ( particleData->lifetime() > longLivedDecayLength_ )
317  update(flags_[LongLivedDecay], true);
318  // Check for B and C weak decays
319  update(flags_[BWeakDecay], particleID.hasBottom());
320  update(flags_[CWeakDecay], particleID.hasCharm());
321  // Check for B and C pure leptonic decay
322  int daughterId = abs((*iparticle)->pdg_id());
323  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughterId == 13);
324  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughterId == 13);
325  }
326  // Check Tau, Ks and Lambda decay
327  update(flags_[ChargePionDecay], pdgid == 211);
328  update(flags_[ChargeKaonDecay], pdgid == 321);
329  update(flags_[TauDecay], pdgid == 15);
330  update(flags_[KsDecay], pdgid == 310);
331  update(flags_[LambdaDecay], pdgid == 3122);
332  update(flags_[JpsiDecay], pdgid == 443);
333  update(flags_[XiDecay], pdgid == 3312);
334  update(flags_[SigmaPlusDecay], pdgid == 3222);
335  update(flags_[SigmaMinusDecay], pdgid == 3112);
336  }
337  }
338  }
339  }
340  // Decays in flight
343  update(flags_[DecayOnFlightMuon], (flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]));
344 }
345 
346 
348 {
349  TrackHistory::SimParticleTrail const & simParticleTrail = tracer_.simParticleTrail();
350 
351  // Loop over the simulated particles
352  for (
353  TrackHistory::SimParticleTrail::const_iterator iparticle = simParticleTrail.begin();
354  iparticle != simParticleTrail.end();
355  ++iparticle
356  )
357  {
358  // pdgid of the real source parent vertex
359  int pdgid = 0;
360 
361  // Get a reference to the TP's parent vertex
362  TrackingVertexRef const & parentVertex = (*iparticle)->parentVertex();
363 
364  // Look for the original source track
365  if ( parentVertex.isNonnull() )
366  {
367  // select the original source in case of combined vertices
368  bool flag = false;
370 
371  for (its = parentVertex->sourceTracks_begin(); its != parentVertex->sourceTracks_end(); ++its)
372  {
373  for (itd = parentVertex->daughterTracks_begin(); itd != parentVertex->daughterTracks_end(); ++itd)
374  if (itd != its)
375  {
376  flag = true;
377  break;
378  }
379  if (flag)
380  break;
381  }
382 
383  // Collect the pdgid of the original source track
384  if ( its != parentVertex->sourceTracks_end() )
385  pdgid = std::abs((*its)->pdgId());
386  else
387  pdgid = 0;
388  }
389 
390  unsigned int processG4 = 0;
391 
392  // Check existence of SimVerteces assigned
393  if(parentVertex->nG4Vertices() > 0) {
394  processG4 = (*(parentVertex->g4Vertices_begin())).processType();
395  }
396 
397  unsigned int process = g4toCMSProcMap_.processId(processG4);
398 
399  // Flagging all the different processes
400  update(
402  process != CMS::Undefined &&
403  process != CMS::Unknown &&
404  process != CMS::Primary
405  );
406 
411  update(flags_[DecayProcess], process == CMS::Decay);
414  update(flags_[EIoniProcess], process == CMS::EIoni);
415  update(flags_[HIoniProcess], process == CMS::HIoni);
416  update(flags_[MuIoniProcess], process == CMS::MuIoni);
417  update(flags_[PhotonProcess], process == CMS::Photon);
420  update(flags_[EBremProcess], process == CMS::EBrem);
422  update(flags_[MuBremProcess], process == CMS::MuBrem);
423  update(flags_[MuNuclProcess], process == CMS::MuNucl);
424 
425  // Get particle type
426  HepPDT::ParticleID particleID(pdgid);
427 
428  // Check if the particle type is valid one
429  if (particleID.isValid())
430  {
431  // Get particle data
432  ParticleData const * particleData = particleDataTable_->particle(particleID);
433  // Special treatment for decays
434  if (process == CMS::Decay)
435  {
436  // Check if the particle exist in the table
437  if (particleData)
438  {
439  // Check if their life time is bigger than 1e-14
440  if ( particleDataTable_->particle(particleID)->lifetime() > longLivedDecayLength_ )
441  update(flags_[LongLivedDecay], true);
442 
443  // Check for B and C weak decays
444  update(flags_[BWeakDecay], particleID.hasBottom());
445  update(flags_[CWeakDecay], particleID.hasCharm());
446 
447  // Check for B or C pure leptonic decays
448  int daughtId = abs((*iparticle)->pdgId());
449  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughtId == 13);
450  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughtId == 13);
451  }
452  // Check decays
453  update(flags_[ChargePionDecay], pdgid == 211);
454  update(flags_[ChargeKaonDecay], pdgid == 321);
455  update(flags_[TauDecay], pdgid == 15);
456  update(flags_[KsDecay], pdgid == 310);
457  update(flags_[LambdaDecay], pdgid == 3122);
458  update(flags_[JpsiDecay], pdgid == 443);
459  update(flags_[XiDecay], pdgid == 3312);
460  update(flags_[OmegaDecay], pdgid == 3334);
461  update(flags_[SigmaPlusDecay], pdgid == 3222);
462  update(flags_[SigmaMinusDecay], pdgid == 3112);
463  }
464  }
465  }
466  // Decays in flight
469  update(flags_[DecayOnFlightMuon], flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]);
470 }
471 
472 
474 {
475  // Get the main primary vertex from the list
476  GeneratedPrimaryVertex const & genpv = genpvs_.back();
477 
478  // Get the generated history of the tracks
479  const TrackHistory::GenParticleTrail & genParticleTrail = tracer_.genParticleTrail();
480 
481  // Vertex counter
482  int counter = 0;
483 
484  // Unit transformation from mm to cm
485  double const mm = 0.1;
486 
487  double oldX = genpv.x;
488  double oldY = genpv.y;
489  double oldZ = genpv.z;
490 
491  // Loop over the generated particles
492  for (
493  TrackHistory::GenParticleTrail::const_reverse_iterator iparticle = genParticleTrail.rbegin();
494  iparticle != genParticleTrail.rend();
495  ++iparticle
496  )
497  {
498  // Look for those with production vertex
499  HepMC::GenVertex * parent = (*iparticle)->production_vertex();
500  if (parent)
501  {
502  HepMC::ThreeVector p = parent->point3d();
503 
504  double distance2 = pow(p.x() * mm - genpv.x, 2) + pow(p.y() * mm - genpv.y, 2) + pow(p.z() * mm - genpv.z, 2);
505  double difference2 = pow(p.x() * mm - oldX, 2) + pow(p.y() * mm - oldY, 2) + pow(p.z() * mm - oldZ, 2);
506 
507  // std::cout << "Distance2 : " << distance2 << " (" << p.x() * mm << "," << p.y() * mm << "," << p.z() * mm << ")" << std::endl;
508  // std::cout << "Difference2 : " << difference2 << std::endl;
509 
510  if ( difference2 > vertexClusteringSqDistance_ )
511  {
512  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
513  oldX = p.x() * mm;
514  oldY = p.y() * mm;
515  oldZ = p.z() * mm;
516  }
517  }
518  }
519 
520  const TrackHistory::SimParticleTrail & simParticleTrail = tracer_.simParticleTrail();
521 
522  // Loop over the generated particles
523  for (
524  TrackHistory::SimParticleTrail::const_reverse_iterator iparticle = simParticleTrail.rbegin();
525  iparticle != simParticleTrail.rend();
526  ++iparticle
527  )
528  {
529  // Look for those with production vertex
530  TrackingParticle::Point p = (*iparticle)->vertex();
531 
532  double distance2 = pow(p.x() - genpv.x, 2) + pow(p.y() - genpv.y, 2) + pow(p.z() - genpv.z, 2);
533  double difference2 = pow(p.x() - oldX, 2) + pow(p.y() - oldY, 2) + pow(p.z() - oldZ, 2);
534 
535  // std::cout << "Distance2 : " << distance2 << " (" << p.x() << "," << p.y() << "," << p.z() << ")" << std::endl;
536  // std::cout << "Difference2 : " << difference2 << std::endl;
537 
538  if ( difference2 > vertexClusteringSqDistance_ )
539  {
540  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
541  oldX = p.x();
542  oldY = p.y();
543  oldZ = p.z();
544  }
545  }
546 
547  if ( !counter )
548  flags_[PrimaryVertex] = true;
549  else if ( counter == 1 )
550  flags_[SecondaryVertex] = true;
551  else
552  flags_[TertiaryVertex] = true;
553 }
554 
555 
557 {
558  return !p->end_vertex() && p->status() == 1;
559 }
560 
561 
563 {
564  const ParticleData * part = particleDataTable_->particle( p->pdg_id() );
565  if (part)
566  return part->charge()!=0;
567  else
568  {
569  // the new/improved particle table doesn't know anti-particles
570  return particleDataTable_->particle( -p->pdg_id() ) != 0;
571  }
572 }
573 
574 
576 {
577  genpvs_.clear();
578 
579  const HepMC::GenEvent * event = mcInformation_->GetEvent();
580 
581  if (event)
582  {
583  int idx = 0;
584 
585  // Loop over the different GenVertex
586  for ( HepMC::GenEvent::vertex_const_iterator ivertex = event->vertices_begin(); ivertex != event->vertices_end(); ++ivertex )
587  {
588  bool hasParentVertex = false;
589 
590  // Loop over the parents looking to see if they are coming from a production vertex
591  for (
592  HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(HepMC::parents);
593  iparent != (*ivertex)->particles_end(HepMC::parents);
594  ++iparent
595  )
596  if ( (*iparent)->production_vertex() )
597  {
598  hasParentVertex = true;
599  break;
600  }
601 
602  // Reject those vertices with parent vertices
603  if (hasParentVertex) continue;
604 
605  // Get the position of the vertex
606  HepMC::FourVector pos = (*ivertex)->position();
607 
608  double const mm = 0.1;
609 
610  GeneratedPrimaryVertex pv(pos.x()*mm, pos.y()*mm, pos.z()*mm);
611 
612  std::vector<GeneratedPrimaryVertex>::iterator ientry = genpvs_.begin();
613 
614  // Search for a VERY close vertex in the list
615  for (; ientry != genpvs_.end(); ++ientry)
616  {
617  double distance2 = pow(pv.x - ientry->x, 2) + pow(pv.y - ientry->y, 2) + pow(pv.z - ientry->z, 2);
618  if ( distance2 < vertexClusteringSqDistance_ )
619  break;
620  }
621 
622  // Check if there is not a VERY close vertex and added to the list
623  if (ientry == genpvs_.end())
624  ientry = genpvs_.insert(ientry,pv);
625 
626  // Add the vertex barcodes to the new or existent vertices
627  ientry->genVertex.push_back((*ivertex)->barcode());
628 
629  // Collect final state descendants
630  for (
631  HepMC::GenVertex::particle_iterator idecendants = (*ivertex)->particles_begin(HepMC::descendants);
632  idecendants != (*ivertex)->particles_end(HepMC::descendants);
633  ++idecendants
634  )
635  {
636  if (isFinalstateParticle(*idecendants))
637  if ( find(ientry->finalstateParticles.begin(), ientry->finalstateParticles.end(), (*idecendants)->barcode()) == ientry->finalstateParticles.end() )
638  {
639  ientry->finalstateParticles.push_back((*idecendants)->barcode());
640  HepMC::FourVector m = (*idecendants)->momentum();
641 
642  ientry->ptot.setPx(ientry->ptot.px() + m.px());
643  ientry->ptot.setPy(ientry->ptot.py() + m.py());
644  ientry->ptot.setPz(ientry->ptot.pz() + m.pz());
645  ientry->ptot.setE(ientry->ptot.e() + m.e());
646  ientry->ptsq += m.perp() * m.perp();
647 
648  if ( m.perp() > 0.8 && std::abs(m.pseudoRapidity()) < 2.5 && isCharged(*idecendants) ) ientry->nGenTrk++;
649  }
650  }
651  idx++;
652  }
653  }
654 
655  std::sort(genpvs_.begin(), genpvs_.end());
656 }
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:39
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:252
int event() const
get the contents of the subdetector field (should be protected?)
TPRegexp parents
Definition: eve_filter.cc:21
const FreeTrajectoryState & theState() const
double dxyError() const
error on dxy
Definition: TrackBase.h:791
const G4toCMSLegacyProcTypeMap g4toCMSProcMap_
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
unsigned int numberOfInnerLayers_
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:337
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:79
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.
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.
TrackClassifier(edm::ParameterSet const &, edm::ConsumesCollector &&)
Constructor by ParameterSet.
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
def move
Definition: eostools.py:510
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
int j
Definition: DBlmapReader.cc:9
T min(T a, T b)
Definition: MathUtil.h:58
math::XYZPoint Point
point in the space
Definition: TrackBase.h:83
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 unsigned int processId(unsigned int g4ProcessId) const
Definition: Utils.cc:59
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:604
double dzError() const
error on dz
Definition: TrackBase.h:809
GlobalPoint position() const
Get track history and classify it in function of their .
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:56
tuple pid
Definition: sysUtil.py:22
T const * product() const
Definition: ESHandle.h:86
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:41
#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
Definition: CoreSimTrack.h:22
static std::atomic< unsigned int > counter
std::vector< Hit > hits
Definition: TrackQuality.h:63
Flags flags_
Flag containers.
int charge() const
track electric charge
Definition: TrackBase.h:562
const reco::TrackBaseRef & recoTrack() const
Return a reference to the reconstructed track.
Definition: TrackHistory.h:62
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:586
T x() const
Definition: PV3DBase.h:62
edm::ESHandle< ParticleDataTable > particleDataTable_
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