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  unsigned short process = 0;
387 
388  // Check existence of SimVerteces assigned
389  if(parentVertex->nG4Vertices() > 0) {
390  process = (*(parentVertex->g4Vertices_begin())).processType();
391  }
392 
393  // Flagging all the different processes
394  update(
396  process != G4::Undefined &&
397  process != G4::Unknown &&
398  process != G4::Primary
399  );
400 
402  update(flags_[UnknownProcess], process == G4::Unknown);
403  update(flags_[PrimaryProcess], process == G4::Primary);
405  update(flags_[DecayProcess], process == G4::Decay);
406  update(flags_[ComptonProcess], process == G4::Compton);
408  update(flags_[EIoniProcess], process == G4::EIoni);
409  update(flags_[HIoniProcess], process == G4::HIoni);
410  update(flags_[MuIoniProcess], process == G4::MuIoni);
411  update(flags_[PhotonProcess], process == G4::Photon);
414  update(flags_[EBremProcess], process == G4::EBrem);
416  update(flags_[MuBremProcess], process == G4::MuBrem);
417  update(flags_[MuNuclProcess], process == G4::MuNucl);
418 
419  // Get particle type
420  HepPDT::ParticleID particleID(pdgid);
421 
422  // Check if the particle type is valid one
423  if (particleID.isValid())
424  {
425  // Get particle data
426  ParticleData const * particleData = particleDataTable_->particle(particleID);
427  // Special treatment for decays
428  if (process == G4::Decay)
429  {
430  // Check if the particle exist in the table
431  if (particleData)
432  {
433  // Check if their life time is bigger than 1e-14
434  if ( particleDataTable_->particle(particleID)->lifetime() > longLivedDecayLength_ )
435  update(flags_[LongLivedDecay], true);
436 
437  // Check for B and C weak decays
438  update(flags_[BWeakDecay], particleID.hasBottom());
439  update(flags_[CWeakDecay], particleID.hasCharm());
440 
441  // Check for B or C pure leptonic decays
442  int daughtId = abs((*iparticle)->pdgId());
443  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughtId == 13);
444  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughtId == 13);
445  }
446  // Check decays
447  update(flags_[ChargePionDecay], pdgid == 211);
448  update(flags_[ChargeKaonDecay], pdgid == 321);
449  update(flags_[TauDecay], pdgid == 15);
450  update(flags_[KsDecay], pdgid == 310);
451  update(flags_[LambdaDecay], pdgid == 3122);
452  update(flags_[JpsiDecay], pdgid == 443);
453  update(flags_[XiDecay], pdgid == 3312);
454  update(flags_[OmegaDecay], pdgid == 3334);
455  update(flags_[SigmaPlusDecay], pdgid == 3222);
456  update(flags_[SigmaMinusDecay], pdgid == 3112);
457  }
458  }
459  }
460  // Decays in flight
463  update(flags_[DecayOnFlightMuon], flags_[FromChargePionMuon] || flags_[FromChargeKaonMuon]);
464 }
465 
466 
468 {
469  // Get the main primary vertex from the list
470  GeneratedPrimaryVertex const & genpv = genpvs_.back();
471 
472  // Get the generated history of the tracks
474 
475  // Vertex counter
476  int counter = 0;
477 
478  // Unit transformation from mm to cm
479  double const mm = 0.1;
480 
481  double oldX = genpv.x;
482  double oldY = genpv.y;
483  double oldZ = genpv.z;
484 
485  // Loop over the generated particles
486  for (
487  TrackHistory::GenParticleTrail::reverse_iterator iparticle = genParticleTrail.rbegin();
488  iparticle != genParticleTrail.rend();
489  ++iparticle
490  )
491  {
492  // Look for those with production vertex
493  HepMC::GenVertex * parent = (*iparticle)->production_vertex();
494  if (parent)
495  {
496  HepMC::ThreeVector p = parent->point3d();
497 
498  double distance2 = pow(p.x() * mm - genpv.x, 2) + pow(p.y() * mm - genpv.y, 2) + pow(p.z() * mm - genpv.z, 2);
499  double difference2 = pow(p.x() * mm - oldX, 2) + pow(p.y() * mm - oldY, 2) + pow(p.z() * mm - oldZ, 2);
500 
501  // std::cout << "Distance2 : " << distance2 << " (" << p.x() * mm << "," << p.y() * mm << "," << p.z() * mm << ")" << std::endl;
502  // std::cout << "Difference2 : " << difference2 << std::endl;
503 
504  if ( difference2 > vertexClusteringSqDistance_ )
505  {
506  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
507  oldX = p.x() * mm;
508  oldY = p.y() * mm;
509  oldZ = p.z() * mm;
510  }
511  }
512  }
513 
515 
516  // Loop over the generated particles
517  for (
518  TrackHistory::SimParticleTrail::reverse_iterator iparticle = simParticleTrail.rbegin();
519  iparticle != simParticleTrail.rend();
520  ++iparticle
521  )
522  {
523  // Look for those with production vertex
524  TrackingParticle::Point p = (*iparticle)->vertex();
525 
526  double distance2 = pow(p.x() - genpv.x, 2) + pow(p.y() - genpv.y, 2) + pow(p.z() - genpv.z, 2);
527  double difference2 = pow(p.x() - oldX, 2) + pow(p.y() - oldY, 2) + pow(p.z() - oldZ, 2);
528 
529  // std::cout << "Distance2 : " << distance2 << " (" << p.x() << "," << p.y() << "," << p.z() << ")" << std::endl;
530  // std::cout << "Difference2 : " << difference2 << std::endl;
531 
532  if ( difference2 > vertexClusteringSqDistance_ )
533  {
534  if ( distance2 > vertexClusteringSqDistance_ ) counter++;
535  oldX = p.x();
536  oldY = p.y();
537  oldZ = p.z();
538  }
539  }
540 
541  if ( !counter )
542  flags_[PrimaryVertex] = true;
543  else if ( counter == 1 )
544  flags_[SecondaryVertex] = true;
545  else
546  flags_[TertiaryVertex] = true;
547 }
548 
549 
551 {
552  return !p->end_vertex() && p->status() == 1;
553 }
554 
555 
557 {
558  const ParticleData * part = particleDataTable_->particle( p->pdg_id() );
559  if (part)
560  return part->charge()!=0;
561  else
562  {
563  // the new/improved particle table doesn't know anti-particles
564  return particleDataTable_->particle( -p->pdg_id() ) != 0;
565  }
566 }
567 
568 
570 {
571  genpvs_.clear();
572 
573  const HepMC::GenEvent * event = mcInformation_->GetEvent();
574 
575  if (event)
576  {
577  int idx = 0;
578 
579  // Loop over the different GenVertex
580  for ( HepMC::GenEvent::vertex_const_iterator ivertex = event->vertices_begin(); ivertex != event->vertices_end(); ++ivertex )
581  {
582  bool hasParentVertex = false;
583 
584  // Loop over the parents looking to see if they are coming from a production vertex
585  for (
586  HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(HepMC::parents);
587  iparent != (*ivertex)->particles_end(HepMC::parents);
588  ++iparent
589  )
590  if ( (*iparent)->production_vertex() )
591  {
592  hasParentVertex = true;
593  break;
594  }
595 
596  // Reject those vertices with parent vertices
597  if (hasParentVertex) continue;
598 
599  // Get the position of the vertex
600  HepMC::FourVector pos = (*ivertex)->position();
601 
602  double const mm = 0.1;
603 
604  GeneratedPrimaryVertex pv(pos.x()*mm, pos.y()*mm, pos.z()*mm);
605 
606  std::vector<GeneratedPrimaryVertex>::iterator ientry = genpvs_.begin();
607 
608  // Search for a VERY close vertex in the list
609  for (; ientry != genpvs_.end(); ++ientry)
610  {
611  double distance2 = pow(pv.x - ientry->x, 2) + pow(pv.y - ientry->y, 2) + pow(pv.z - ientry->z, 2);
612  if ( distance2 < vertexClusteringSqDistance_ )
613  break;
614  }
615 
616  // Check if there is not a VERY close vertex and added to the list
617  if (ientry == genpvs_.end())
618  ientry = genpvs_.insert(ientry,pv);
619 
620  // Add the vertex barcodes to the new or existent vertices
621  ientry->genVertex.push_back((*ivertex)->barcode());
622 
623  // Collect final state descendants
624  for (
625  HepMC::GenVertex::particle_iterator idecendants = (*ivertex)->particles_begin(HepMC::descendants);
626  idecendants != (*ivertex)->particles_end(HepMC::descendants);
627  ++idecendants
628  )
629  {
630  if (isFinalstateParticle(*idecendants))
631  if ( find(ientry->finalstateParticles.begin(), ientry->finalstateParticles.end(), (*idecendants)->barcode()) == ientry->finalstateParticles.end() )
632  {
633  ientry->finalstateParticles.push_back((*idecendants)->barcode());
634  HepMC::FourVector m = (*idecendants)->momentum();
635 
636  ientry->ptot.setPx(ientry->ptot.px() + m.px());
637  ientry->ptot.setPy(ientry->ptot.py() + m.py());
638  ientry->ptot.setPz(ientry->ptot.pz() + m.pz());
639  ientry->ptot.setE(ientry->ptot.e() + m.e());
640  ientry->ptsq += m.perp() * m.perp();
641 
642  if ( m.perp() > 0.8 && std::abs(m.pseudoRapidity()) < 2.5 && isCharged(*idecendants) ) ientry->nGenTrk++;
643  }
644  }
645  idx++;
646  }
647  }
648 
649  std::sort(genpvs_.begin(), genpvs_.end());
650 }
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
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:207
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_
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
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:74
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:125
double dzError() const
error on dz
Definition: TrackBase.h:213
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
tuple pid
Definition: sysUtil.py:22
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
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:111
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:119
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