CMS 3D CMS Logo

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
124  const reco::TrackBaseRef & recotrack = tracer_.recoTrack();
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,
189  );
190 
191  GlobalVector v = tsAtClosestApproach.theState().position()
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 
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 from the recoGenParticleTrail
266  const reco::GenParticle * particle = tracer_.recoGenParticle();
267 
268  // Check for the initial hadron
269  if (particle)
270  {
271  HepPDT::ParticleID pid(particle->pdgId());
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 (reco::GenParticle in the recoGenParticleTrail)
285  TrackHistory::RecoGenParticleTrail const & recoGenParticleTrail = tracer_.recoGenParticleTrail();
286 
287  // Loop over the generated particles (reco::GenParticle in the recoGenParticleTrail)
288  for (TrackHistory::RecoGenParticleTrail::const_iterator iparticle = recoGenParticleTrail.begin(); iparticle != recoGenParticleTrail.end(); ++iparticle)
289  {
290  pdgid = std::abs((*iparticle)->pdgId());
291  // Get particle type
293 
294  // Check if the particle type is valid one
295  if (particleID.isValid())
296  {
297  // Get particle data
298  ParticleData const * particleData = particleDataTable_->particle(particleID);
299  // Check if the particle exist in the table
300  if (particleData)
301  {
302  // Check if their life time is bigger than longLivedDecayLength_
303  if ( particleData->lifetime() > longLivedDecayLength_ )
304  update(flags_[LongLivedDecay], true);
305  // Check for B and C weak decays
306  update(flags_[BWeakDecay], particleID.hasBottom());
307  update(flags_[CWeakDecay], particleID.hasCharm());
308  // Check for B and C pure leptonic decay
309  std::set<int> daughterIds;
310  size_t ndau = (*iparticle)->numberOfDaughters();
311  for( size_t i = 0; i < ndau; ++ i ){
312  daughterIds.insert((*iparticle)->daughter(i)->pdgId());
313  }
314  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && (daughterIds.find(13) != daughterIds.end()));
315  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && (daughterIds.find(13) != daughterIds.end()));
316  }
317  // Check Tau, Ks and Lambda decay
318  update(flags_[ChargePionDecay], pdgid == 211);
319  update(flags_[ChargeKaonDecay], pdgid == 321);
320  update(flags_[TauDecay], pdgid == 15);
321  update(flags_[KsDecay], pdgid == 310);
322  update(flags_[LambdaDecay], pdgid == 3122);
323  update(flags_[JpsiDecay], pdgid == 443);
324  update(flags_[XiDecay], pdgid == 3312);
325  update(flags_[SigmaPlusDecay], pdgid == 3222);
326  update(flags_[SigmaMinusDecay], pdgid == 3112);
327  }
328  }
329  // Decays in flight
332  update(flags_[DecayOnFlightMuon], (flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]));
333 }
334 
335 
337 {
338  TrackHistory::SimParticleTrail const & simParticleTrail = tracer_.simParticleTrail();
339 
340  // Loop over the simulated particles
341  for (
342  TrackHistory::SimParticleTrail::const_iterator iparticle = simParticleTrail.begin();
343  iparticle != simParticleTrail.end();
344  ++iparticle
345  )
346  {
347  // pdgid of the real source parent vertex
348  int pdgid = 0;
349 
350  // Get a reference to the TP's parent vertex
351  TrackingVertexRef const & parentVertex = (*iparticle)->parentVertex();
352 
353  // Look for the original source track
354  if ( parentVertex.isNonnull() )
355  {
356  // select the original source in case of combined vertices
357  bool flag = false;
359 
360  for (its = parentVertex->sourceTracks_begin(); its != parentVertex->sourceTracks_end(); ++its)
361  {
362  for (itd = parentVertex->daughterTracks_begin(); itd != parentVertex->daughterTracks_end(); ++itd)
363  if (itd != its)
364  {
365  flag = true;
366  break;
367  }
368  if (flag)
369  break;
370  }
371 
372  // Collect the pdgid of the original source track
373  if ( its != parentVertex->sourceTracks_end() )
374  pdgid = std::abs((*its)->pdgId());
375  else
376  pdgid = 0;
377  }
378 
379  unsigned int processG4 = 0;
380 
381  // Check existence of SimVerteces assigned
382  if(parentVertex->nG4Vertices() > 0) {
383  processG4 = (*(parentVertex->g4Vertices_begin())).processType();
384  }
385 
386  unsigned int process = g4toCMSProcMap_.processId(processG4);
387 
388  // Flagging all the different processes
389  update(
391  process != CMS::Undefined &&
392  process != CMS::Unknown &&
393  process != CMS::Primary
394  );
395 
400  update(flags_[DecayProcess], process == CMS::Decay);
403  update(flags_[EIoniProcess], process == CMS::EIoni);
404  update(flags_[HIoniProcess], process == CMS::HIoni);
405  update(flags_[MuIoniProcess], process == CMS::MuIoni);
406  update(flags_[PhotonProcess], process == CMS::Photon);
409  update(flags_[EBremProcess], process == CMS::EBrem);
411  update(flags_[MuBremProcess], process == CMS::MuBrem);
412  update(flags_[MuNuclProcess], process == CMS::MuNucl);
413 
414  // Get particle type
416 
417  // Check if the particle type is valid one
418  if (particleID.isValid())
419  {
420  // Get particle data
421  ParticleData const * particleData = particleDataTable_->particle(particleID);
422  // Special treatment for decays
423  if (process == CMS::Decay)
424  {
425  // Check if the particle exist in the table
426  if (particleData)
427  {
428  // Check if their life time is bigger than 1e-14
429  if ( particleDataTable_->particle(particleID)->lifetime() > longLivedDecayLength_ )
430  update(flags_[LongLivedDecay], true);
431 
432  // Check for B and C weak decays
433  update(flags_[BWeakDecay], particleID.hasBottom());
434  update(flags_[CWeakDecay], particleID.hasCharm());
435 
436  // Check for B or C pure leptonic decays
437  int daughtId = abs((*iparticle)->pdgId());
438  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughtId == 13);
439  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughtId == 13);
440  }
441  // Check decays
442  update(flags_[ChargePionDecay], pdgid == 211);
443  update(flags_[ChargeKaonDecay], pdgid == 321);
444  update(flags_[TauDecay], pdgid == 15);
445  update(flags_[KsDecay], pdgid == 310);
446  update(flags_[LambdaDecay], pdgid == 3122);
447  update(flags_[JpsiDecay], pdgid == 443);
448  update(flags_[XiDecay], pdgid == 3312);
449  update(flags_[OmegaDecay], pdgid == 3334);
450  update(flags_[SigmaPlusDecay], pdgid == 3222);
451  update(flags_[SigmaMinusDecay], pdgid == 3112);
452  }
453  }
454  }
455  // Decays in flight
458  update(flags_[DecayOnFlightMuon], flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]);
459 }
460 
461 
463 {
464  // Get the main primary vertex from the list
465  GeneratedPrimaryVertex const & genpv = genpvs_.back();
466 
467  // Get the generated history of the tracks
468  const TrackHistory::GenParticleTrail & genParticleTrail = tracer_.genParticleTrail();
469 
470  // Vertex counter
471  int counter = 0;
472 
473  // Unit transformation from mm to cm
474  double const mm = 0.1;
475 
476  double oldX = genpv.x;
477  double oldY = genpv.y;
478  double oldZ = genpv.z;
479 
480  // Loop over the generated particles
481  for (
482  TrackHistory::GenParticleTrail::const_reverse_iterator iparticle = genParticleTrail.rbegin();
483  iparticle != genParticleTrail.rend();
484  ++iparticle
485  )
486  {
487  // Look for those with production vertex
488  HepMC::GenVertex * parent = (*iparticle)->production_vertex();
489  if (parent)
490  {
491  HepMC::ThreeVector p = parent->point3d();
492 
493  double distance2 = pow(p.x() * mm - genpv.x, 2) + pow(p.y() * mm - genpv.y, 2) + pow(p.z() * mm - genpv.z, 2);
494  double difference2 = pow(p.x() * mm - oldX, 2) + pow(p.y() * mm - oldY, 2) + pow(p.z() * mm - oldZ, 2);
495 
496  // std::cout << "Distance2 : " << distance2 << " (" << p.x() * mm << "," << p.y() * mm << "," << p.z() * mm << ")" << std::endl;
497  // std::cout << "Difference2 : " << difference2 << std::endl;
498 
499  if ( difference2 > vertexClusteringSqDistance_ )
500  {
501  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
502  oldX = p.x() * mm;
503  oldY = p.y() * mm;
504  oldZ = p.z() * mm;
505  }
506  }
507  }
508 
509  const TrackHistory::SimParticleTrail & simParticleTrail = tracer_.simParticleTrail();
510 
511  // Loop over the generated particles
512  for (
513  TrackHistory::SimParticleTrail::const_reverse_iterator iparticle = simParticleTrail.rbegin();
514  iparticle != simParticleTrail.rend();
515  ++iparticle
516  )
517  {
518  // Look for those with production vertex
519  TrackingParticle::Point p = (*iparticle)->vertex();
520 
521  double distance2 = pow(p.x() - genpv.x, 2) + pow(p.y() - genpv.y, 2) + pow(p.z() - genpv.z, 2);
522  double difference2 = pow(p.x() - oldX, 2) + pow(p.y() - oldY, 2) + pow(p.z() - oldZ, 2);
523 
524  // std::cout << "Distance2 : " << distance2 << " (" << p.x() << "," << p.y() << "," << p.z() << ")" << std::endl;
525  // std::cout << "Difference2 : " << difference2 << std::endl;
526 
527  if ( difference2 > vertexClusteringSqDistance_ )
528  {
529  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
530  oldX = p.x();
531  oldY = p.y();
532  oldZ = p.z();
533  }
534  }
535 
536  if ( !counter )
537  flags_[PrimaryVertex] = true;
538  else if ( counter == 1 )
539  flags_[SecondaryVertex] = true;
540  else
541  flags_[TertiaryVertex] = true;
542 }
543 
544 
546 {
547  return !p->end_vertex() && p->status() == 1;
548 }
549 
550 
552 {
553  const ParticleData * part = particleDataTable_->particle( p->pdg_id() );
554  if (part)
555  return part->charge()!=0;
556  else
557  {
558  // the new/improved particle table doesn't know anti-particles
559  return particleDataTable_->particle( -p->pdg_id() ) != 0;
560  }
561 }
562 
563 
565 {
566  genpvs_.clear();
567 
568  const HepMC::GenEvent * event = mcInformation_->GetEvent();
569 
570  if (event)
571  {
572  int idx = 0;
573 
574  // Loop over the different GenVertex
575  for ( HepMC::GenEvent::vertex_const_iterator ivertex = event->vertices_begin(); ivertex != event->vertices_end(); ++ivertex )
576  {
577  bool hasParentVertex = false;
578 
579  // Loop over the parents looking to see if they are coming from a production vertex
580  for (
581  HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(HepMC::parents);
582  iparent != (*ivertex)->particles_end(HepMC::parents);
583  ++iparent
584  )
585  if ( (*iparent)->production_vertex() )
586  {
587  hasParentVertex = true;
588  break;
589  }
590 
591  // Reject those vertices with parent vertices
592  if (hasParentVertex) continue;
593 
594  // Get the position of the vertex
595  HepMC::FourVector pos = (*ivertex)->position();
596 
597  double const mm = 0.1;
598 
599  GeneratedPrimaryVertex pv(pos.x()*mm, pos.y()*mm, pos.z()*mm);
600 
601  std::vector<GeneratedPrimaryVertex>::iterator ientry = genpvs_.begin();
602 
603  // Search for a VERY close vertex in the list
604  for (; ientry != genpvs_.end(); ++ientry)
605  {
606  double distance2 = pow(pv.x - ientry->x, 2) + pow(pv.y - ientry->y, 2) + pow(pv.z - ientry->z, 2);
607  if ( distance2 < vertexClusteringSqDistance_ )
608  break;
609  }
610 
611  // Check if there is not a VERY close vertex and added to the list
612  if (ientry == genpvs_.end())
613  ientry = genpvs_.insert(ientry,pv);
614 
615  // Add the vertex barcodes to the new or existent vertices
616  ientry->genVertex.push_back((*ivertex)->barcode());
617 
618  // Collect final state descendants
619  for (
620  HepMC::GenVertex::particle_iterator idecendants = (*ivertex)->particles_begin(HepMC::descendants);
621  idecendants != (*ivertex)->particles_end(HepMC::descendants);
622  ++idecendants
623  )
624  {
625  if (isFinalstateParticle(*idecendants))
626  if ( find(ientry->finalstateParticles.begin(), ientry->finalstateParticles.end(), (*idecendants)->barcode()) == ientry->finalstateParticles.end() )
627  {
628  ientry->finalstateParticles.push_back((*idecendants)->barcode());
629  HepMC::FourVector m = (*idecendants)->momentum();
630 
631  ientry->ptot.setPx(ientry->ptot.px() + m.px());
632  ientry->ptot.setPy(ientry->ptot.py() + m.py());
633  ientry->ptot.setPz(ientry->ptot.pz() + m.pz());
634  ientry->ptot.setE(ientry->ptot.e() + m.e());
635  ientry->ptsq += m.perp() * m.perp();
636 
637  if ( m.perp() > 0.8 && std::abs(m.pseudoRapidity()) < 2.5 && isCharged(*idecendants) ) ientry->nGenTrk++;
638  }
639  }
640  idx++;
641  }
642  }
643 
644  std::sort(genpvs_.begin(), genpvs_.end());
645 }
unsigned int numberOfLayers() const
Return the number of layers with simulated and/or reconstructed hits.
Definition: TrackQuality.h:81
double z0() const
z coordinate
Definition: BeamSpot.h:68
T getUntrackedParameter(std::string const &, T const &) const
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:253
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:796
const reco::GenParticle * recoGenParticle() const
Returns a pointer to most primitive status 1 or 2 particle in the recoGenParticleTrail_.
Definition: HistoryBase.h:108
const G4toCMSLegacyProcTypeMap g4toCMSProcMap_
const TrackingParticleRef & simParticle() const
Return the initial tracking particle from the history.
Definition: HistoryBase.h:89
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
def setup(process, global_tag, zero_tesla=False)
Definition: GeneralSetup.py:1
unsigned int numberOfInnerLayers_
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:337
Definition: config.py:1
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:20
unsigned int minTrackerSimHits_
std::vector< GeneratedPrimaryVertex > genpvs_
void processesAtSimulation()
Get information about conversion and other interactions.
void getData(T &iHolder) const
Definition: EventSetup.h:78
std::vector< const HepMC::GenParticle * > GenParticleTrail
HepMC::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
std::vector< const reco::GenParticle * > RecoGenParticleTrail
reco::GenParticle trail type.
Definition: HistoryBase.h:21
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_
Definition: Muon.py:1
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
virtual int pdgId() const final
PDG identifier.
def pv(vc)
Definition: MetAnalyzer.py:6
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
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.
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:609
double dzError() const
error on dz
Definition: TrackBase.h:814
GlobalPoint position() const
Get track history and classify it in function of their .
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:38
part
Definition: HCALResponse.h:20
const T & get() const
Definition: EventSetup.h:55
bool isFinalstateParticle(const HepMC::GenParticle *)
SimParticleTrail const & simParticleTrail() const
Return all the simulated particle in the history.
Definition: HistoryBase.h:65
void vertexInformation()
Get geometrical information about the vertices.
void processesAtGenerator()
Get all the information related to decay process.
HLT enums.
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:53
edm::ESHandle< MagneticField > magneticField_
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:22
double y0() const
y coordinate
Definition: BeamSpot.h:66
std::vector< Hit > hits
Definition: TrackQuality.h:63
Flags flags_
Flag containers.
int charge() const
track electric charge
Definition: TrackBase.h:567
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_
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:591
RecoGenParticleTrail const & recoGenParticleTrail() const
Return all reco::GenParticle in the history.
Definition: HistoryBase.h:83
T x() const
Definition: PV3DBase.h:62
edm::ESHandle< ParticleDataTable > particleDataTable_
T const * product() const
Definition: ESHandle.h:86
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:40
def move(src, dest)
Definition: eostools.py:510
GenParticleTrail const & genParticleTrail() const
Return all generated particle (HepMC::GenParticle) in the history.
Definition: HistoryBase.h:77
TrackHistory tracer_
Definition: event.py:1
Global3DVector GlobalVector
Definition: GlobalVector.h:10
std::vector< TrackingParticleRef > SimParticleTrail
SimParticle trail type.
Definition: HistoryBase.h:33
double x0() const
x coordinate
Definition: BeamSpot.h:64