CMS 3D CMS Logo

TrackClassifier.cc
Go to the documentation of this file.
1 
2 #include <cmath>
3 #include <cstdlib>
4 #include <iostream>
5 
6 #include "HepPDT/ParticleID.hh"
7 
9 
10 #define update(a, b) \
11  do { \
12  (a) = (a) | (b); \
13  } while (0)
14 
16  : TrackCategories(),
17  hepMCLabel_(config.getUntrackedParameter<edm::InputTag>("hepMC")),
18  beamSpotLabel_(config.getUntrackedParameter<edm::InputTag>("beamSpot")),
19  tracer_(config, std::move(collector)),
20  quality_(config, collector),
21  magneticFieldToken_(collector.esConsumes<MagneticField, IdealMagneticFieldRecord>()),
22  transientTrackBuilderToken_(collector.esConsumes<TransientTrackBuilder, TransientTrackRecord>()),
23  tTopoHandToken_(collector.esConsumes<TrackerTopology, TrackerTopologyRcd>()) {
24  collector.consumes<edm::HepMCProduct>(hepMCLabel_);
25  collector.consumes<reco::BeamSpot>(beamSpotLabel_);
26 
27  // Set the history depth after hadronization
28  tracer_.depth(-2);
29 
30  // Set the maximum d0pull for the bad category
31  badPull_ = config.getUntrackedParameter<double>("badPull");
32 
33  // Set the minimum decay length for detecting long decays
34  longLivedDecayLength_ = config.getUntrackedParameter<double>("longLivedDecayLength");
35 
36  // Set the distance for clustering vertices
37  float vertexClusteringDistance = config.getUntrackedParameter<double>("vertexClusteringDistance");
39 
40  // Set the number of innermost layers to check for bad hits
41  numberOfInnerLayers_ = config.getUntrackedParameter<unsigned int>("numberOfInnerLayers");
42 
43  // Set the minimum number of simhits in the tracker
44  minTrackerSimHits_ = config.getUntrackedParameter<unsigned int>("minTrackerSimHits");
45 }
46 
48  // Get the new event information for the tracer
50 
51  // Get the new event information for the track quality analyser
53 
54  // Get hepmc of the event
55  event.getByLabel(hepMCLabel_, mcInformation_);
56 
57  // Magnetic field
59 
60  // Get the partivle data table
61  setup.getData(particleDataTable_);
62 
63  // get the beam spot
64  event.getByLabel(beamSpotLabel_, beamSpot_);
65 
66  // Transient track builder
68 
69  // Create the list of primary vertices associated to the event
71 
72  // Retrieve tracker topology from geometry
73  tTopo_ = &setup.getData(tTopoHandToken_);
74 }
75 
77  // Initializing the category vector
78  reset();
79 
80  // Associate and evaluate the track history (check for fakes)
81  if (tracer_.evaluate(track)) {
82  // Classify all the tracks by their association and reconstruction
83  // information
85 
86  // Get all the information related to the simulation details
88 
89  // Analyse the track reconstruction quality
91 
92  // Get hadron flavor of the initial hadron
93  hadronFlavor();
94 
95  // Get all the information related to decay process
97 
98  // Get information about conversion and other interactions
100 
101  // Get geometrical information about the vertices
103 
104  // Check for unkown classification
105  unknownTrack();
106  } else
107  flags_[Fake] = true;
108 
109  return *this;
110 }
111 
113  // Initializing the category vector
114  reset();
115 
116  // Trace the history for the given TP
118 
119  // Collect the associated reco track
120  const reco::TrackBaseRef &recotrack = tracer_.recoTrack();
121 
122  // If there is a reco truck then evaluate the simulated history
123  if (recotrack.isNonnull()) {
124  flags_[Reconstructed] = true;
125  // Classify all the tracks by their association and reconstruction
126  // information
127  reconstructionInformation(recotrack);
128  // Analyse the track reconstruction quality
129  qualityInformation(recotrack);
130  } else
131  flags_[Reconstructed] = false;
132 
133  // Get all the information related to the simulation details
135 
136  // Get hadron flavor of the initial hadron
137  hadronFlavor();
138 
139  // Get all the information related to decay process
141 
142  // Get information about conversion and other interactions
144 
145  // Get geometrical information about the vertices
147 
148  // Check for unkown classification
149  unknownTrack();
150 
151  return *this;
152 }
153 
156 
157  // Compute tracking particle parameters at point of closest approach to the
158  // beamline
159 
160  const SimTrack *assocTrack = &(*tpr->g4Track_begin());
161 
162  FreeTrajectoryState ftsAtProduction(
163  GlobalPoint(tpr->vertex().x(), tpr->vertex().y(), tpr->vertex().z()),
164  GlobalVector(assocTrack->momentum().x(), assocTrack->momentum().y(), assocTrack->momentum().z()),
165  TrackCharge(track->charge()),
167 
168  try {
169  TSCPBuilderNoMaterial tscpBuilder;
170  TrajectoryStateClosestToPoint tsAtClosestApproach =
171  tscpBuilder(ftsAtProduction, GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0()));
172 
173  GlobalVector v =
174  tsAtClosestApproach.theState().position() - GlobalPoint(beamSpot_->x0(), beamSpot_->y0(), beamSpot_->z0());
175  GlobalVector p = tsAtClosestApproach.theState().momentum();
176 
177  // Simulated dxy
178  double dxySim = -v.x() * sin(p.phi()) + v.y() * cos(p.phi());
179 
180  // Simulated dz
181  double dzSim = v.z() - (v.x() * p.x() + v.y() * p.y()) * p.z() / p.perp2();
182 
183  // Calculate the dxy pull
184  double dxyPull =
186  track->dxyError();
187 
188  // Calculate the dx pull
189  double dzPull =
191  track->dzError();
192 
193  // Return true if d0Pull > badD0Pull sigmas
194  flags_[Bad] = (dxyPull > badPull_ || dzPull > badPull_);
195 
196  } catch (cms::Exception const &) {
197  flags_[Bad] = true;
198  }
199 }
200 
202  // Get the event id for the initial TP.
203  EncodedEventId eventId = tracer_.simParticle()->eventId();
204  // Check for signal events
205  flags_[SignalEvent] = !eventId.bunchCrossing() && !eventId.event();
206  // Check for muons
207  flags_[Muon] = (abs(tracer_.simParticle()->pdgId()) == 13);
208  // Check for the number of psimhit in tracker
209  flags_[TrackerSimHits] = tracer_.simParticle()->numberOfTrackerLayers() >= (int)minTrackerSimHits_;
210 }
211 
213  // run the hit-by-hit reconstruction quality analysis
215 
217 
218  // check the innermost layers for bad hits
219  for (unsigned int i = 0; i < maxLayers; i++) {
221 
222  // check all hits in that layer
223  for (unsigned int j = 0; j < layer.hits.size(); j++) {
224  const TrackQuality::Layer::Hit &hit = layer.hits[j];
225 
226  // In those cases the bad hit was used by track reconstruction
228  flags_[BadInnerHits] = true;
229  else if (hit.state == TrackQuality::Layer::Shared)
230  flags_[SharedInnerHits] = true;
231  }
232  }
233 }
234 
236  // Get the initial hadron from the recoGenParticleTrail
237  const reco::GenParticle *particle = tracer_.recoGenParticle();
238 
239  // Check for the initial hadron
240  if (particle) {
241  HepPDT::ParticleID pid(particle->pdgId());
242  flags_[Bottom] = pid.hasBottom();
243  flags_[Charm] = pid.hasCharm();
244  flags_[Light] = !pid.hasCharm() && !pid.hasBottom();
245  }
246 }
247 
249  // pdgid of the "in" particle to the production vertex
250  int pdgid = 0;
251 
252  // Get the generated particles from track history (reco::GenParticle in the
253  // recoGenParticleTrail)
254  TrackHistory::RecoGenParticleTrail const &recoGenParticleTrail = tracer_.recoGenParticleTrail();
255 
256  // Loop over the generated particles (reco::GenParticle in the
257  // recoGenParticleTrail)
258  for (TrackHistory::RecoGenParticleTrail::const_iterator iparticle = recoGenParticleTrail.begin();
259  iparticle != recoGenParticleTrail.end();
260  ++iparticle) {
261  pdgid = std::abs((*iparticle)->pdgId());
262  // Get particle type
264 
265  // Check if the particle type is valid one
266  if (particleID.isValid()) {
267  // Get particle data
268  ParticleData const *particleData = particleDataTable_->particle(particleID);
269  // Check if the particle exist in the table
270  if (particleData) {
271  // Check if their life time is bigger than longLivedDecayLength_
272  if (particleData->lifetime() > longLivedDecayLength_)
273  update(flags_[LongLivedDecay], true);
274  // Check for B and C weak decays
275  update(flags_[BWeakDecay], particleID.hasBottom());
276  update(flags_[CWeakDecay], particleID.hasCharm());
277  // Check for B and C pure leptonic decay
278  std::set<int> daughterIds;
279  size_t ndau = (*iparticle)->numberOfDaughters();
280  for (size_t i = 0; i < ndau; ++i) {
281  daughterIds.insert((*iparticle)->daughter(i)->pdgId());
282  }
283  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && (daughterIds.find(13) != daughterIds.end()));
284  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && (daughterIds.find(13) != daughterIds.end()));
285  }
286  // Check Tau, Ks and Lambda decay
289  update(flags_[TauDecay], pdgid == 15);
290  update(flags_[KsDecay], pdgid == 310);
291  update(flags_[LambdaDecay], pdgid == 3122);
292  update(flags_[JpsiDecay], pdgid == 443);
293  update(flags_[XiDecay], pdgid == 3312);
294  update(flags_[SigmaPlusDecay], pdgid == 3222);
295  update(flags_[SigmaMinusDecay], pdgid == 3112);
296  }
297  }
298  // Decays in flight
302 }
303 
305  TrackHistory::SimParticleTrail const &simParticleTrail = tracer_.simParticleTrail();
306 
307  // Loop over the simulated particles
308  for (TrackHistory::SimParticleTrail::const_iterator iparticle = simParticleTrail.begin();
309  iparticle != simParticleTrail.end();
310  ++iparticle) {
311  // pdgid of the real source parent vertex
312  int pdgid = 0;
313 
314  // Get a reference to the TP's parent vertex
315  TrackingVertexRef const &parentVertex = (*iparticle)->parentVertex();
316 
317  // Look for the original source track
318  if (parentVertex.isNonnull()) {
319  // select the original source in case of combined vertices
320  bool flag = false;
322 
323  for (its = parentVertex->sourceTracks_begin(); its != parentVertex->sourceTracks_end(); ++its) {
324  for (itd = parentVertex->daughterTracks_begin(); itd != parentVertex->daughterTracks_end(); ++itd)
325  if (itd != its) {
326  flag = true;
327  break;
328  }
329  if (flag)
330  break;
331  }
332 
333  // Collect the pdgid of the original source track
334  if (its != parentVertex->sourceTracks_end())
335  pdgid = std::abs((*its)->pdgId());
336  else
337  pdgid = 0;
338  }
339 
340  unsigned int processG4 = 0;
341 
342  // Check existence of SimVerteces assigned
343  if (parentVertex->nG4Vertices() > 0) {
344  processG4 = (*(parentVertex->g4Vertices_begin())).processType();
345  }
346 
347  unsigned int process = g4toCMSProcMap_.processId(processG4);
348 
349  // Flagging all the different processes
351 
369 
370  // Get particle type
372 
373  // Check if the particle type is valid one
374  if (particleID.isValid()) {
375  // Get particle data
376  ParticleData const *particleData = particleDataTable_->particle(particleID);
377  // Special treatment for decays
378  if (process == CMS::Decay) {
379  // Check if the particle exist in the table
380  if (particleData) {
381  // Check if their life time is bigger than 1e-14
382  if (particleDataTable_->particle(particleID)->lifetime() > longLivedDecayLength_)
383  update(flags_[LongLivedDecay], true);
384 
385  // Check for B and C weak decays
386  update(flags_[BWeakDecay], particleID.hasBottom());
387  update(flags_[CWeakDecay], particleID.hasCharm());
388 
389  // Check for B or C pure leptonic decays
390  int daughtId = abs((*iparticle)->pdgId());
391  update(flags_[FromBWeakDecayMuon], particleID.hasBottom() && daughtId == 13);
392  update(flags_[FromCWeakDecayMuon], particleID.hasCharm() && daughtId == 13);
393  }
394  // Check decays
397  update(flags_[TauDecay], pdgid == 15);
398  update(flags_[KsDecay], pdgid == 310);
399  update(flags_[LambdaDecay], pdgid == 3122);
400  update(flags_[JpsiDecay], pdgid == 443);
401  update(flags_[XiDecay], pdgid == 3312);
402  update(flags_[OmegaDecay], pdgid == 3334);
403  update(flags_[SigmaPlusDecay], pdgid == 3222);
404  update(flags_[SigmaMinusDecay], pdgid == 3112);
405  }
406  }
407  }
408  // Decays in flight
412 }
413 
415  // Get the main primary vertex from the list
416  GeneratedPrimaryVertex const &genpv = genpvs_.back();
417 
418  // Get the generated history of the tracks
419  const TrackHistory::GenParticleTrail &genParticleTrail = tracer_.genParticleTrail();
420 
421  // Vertex counter
422  int counter = 0;
423 
424  // Unit transformation from mm to cm
425  double const mm = 0.1;
426 
427  double oldX = genpv.x;
428  double oldY = genpv.y;
429  double oldZ = genpv.z;
430 
431  // Loop over the generated particles
432  for (TrackHistory::GenParticleTrail::const_reverse_iterator iparticle = genParticleTrail.rbegin();
433  iparticle != genParticleTrail.rend();
434  ++iparticle) {
435  // Look for those with production vertex
436  HepMC::GenVertex *parent = (*iparticle)->production_vertex();
437  if (parent) {
438  HepMC::ThreeVector p = parent->point3d();
439 
440  double distance2 = pow(p.x() * mm - genpv.x, 2) + pow(p.y() * mm - genpv.y, 2) + pow(p.z() * mm - genpv.z, 2);
441  double difference2 = pow(p.x() * mm - oldX, 2) + pow(p.y() * mm - oldY, 2) + pow(p.z() * mm - oldZ, 2);
442 
443  // std::cout << "Distance2 : " << distance2 << " (" << p.x() * mm << ","
444  // << p.y() * mm << "," << p.z() * mm << ")" << std::endl; std::cout <<
445  // "Difference2 : " << difference2 << std::endl;
446 
447  if (difference2 > vertexClusteringSqDistance_) {
448  if (distance2 > vertexClusteringSqDistance_)
449  counter++;
450  oldX = p.x() * mm;
451  oldY = p.y() * mm;
452  oldZ = p.z() * mm;
453  }
454  }
455  }
456 
457  const TrackHistory::SimParticleTrail &simParticleTrail = tracer_.simParticleTrail();
458 
459  // Loop over the generated particles
460  for (TrackHistory::SimParticleTrail::const_reverse_iterator iparticle = simParticleTrail.rbegin();
461  iparticle != simParticleTrail.rend();
462  ++iparticle) {
463  // Look for those with production vertex
464  TrackingParticle::Point p = (*iparticle)->vertex();
465 
466  double distance2 = pow(p.x() - genpv.x, 2) + pow(p.y() - genpv.y, 2) + pow(p.z() - genpv.z, 2);
467  double difference2 = pow(p.x() - oldX, 2) + pow(p.y() - oldY, 2) + pow(p.z() - oldZ, 2);
468 
469  // std::cout << "Distance2 : " << distance2 << " (" << p.x() << "," << p.y()
470  // << "," << p.z() << ")" << std::endl; std::cout << "Difference2 : " <<
471  // difference2 << std::endl;
472 
473  if (difference2 > vertexClusteringSqDistance_) {
474  if (distance2 > vertexClusteringSqDistance_)
475  counter++;
476  oldX = p.x();
477  oldY = p.y();
478  oldZ = p.z();
479  }
480  }
481 
482  if (!counter)
483  flags_[PrimaryVertex] = true;
484  else if (counter == 1)
485  flags_[SecondaryVertex] = true;
486  else
487  flags_[TertiaryVertex] = true;
488 }
489 
490 bool TrackClassifier::isFinalstateParticle(const HepMC::GenParticle *p) { return !p->end_vertex() && p->status() == 1; }
491 
493  const ParticleData *part = particleDataTable_->particle(p->pdg_id());
494  if (part)
495  return part->charge() != 0;
496  else {
497  // the new/improved particle table doesn't know anti-particles
498  return particleDataTable_->particle(-p->pdg_id()) != nullptr;
499  }
500 }
501 
503  genpvs_.clear();
504 
505  const HepMC::GenEvent *event = mcInformation_->GetEvent();
506 
507  if (event) {
508  int idx = 0;
509 
510  // Loop over the different GenVertex
511  for (HepMC::GenEvent::vertex_const_iterator ivertex = event->vertices_begin(); ivertex != event->vertices_end();
512  ++ivertex) {
513  bool hasParentVertex = false;
514 
515  // Loop over the parents looking to see if they are coming from a
516  // production vertex
517  for (HepMC::GenVertex::particle_iterator iparent = (*ivertex)->particles_begin(HepMC::parents);
518  iparent != (*ivertex)->particles_end(HepMC::parents);
519  ++iparent)
520  if ((*iparent)->production_vertex()) {
521  hasParentVertex = true;
522  break;
523  }
524 
525  // Reject those vertices with parent vertices
526  if (hasParentVertex)
527  continue;
528 
529  // Get the position of the vertex
530  HepMC::FourVector pos = (*ivertex)->position();
531 
532  double const mm = 0.1;
533 
534  GeneratedPrimaryVertex pv(pos.x() * mm, pos.y() * mm, pos.z() * mm);
535 
536  std::vector<GeneratedPrimaryVertex>::iterator ientry = genpvs_.begin();
537 
538  // Search for a VERY close vertex in the list
539  for (; ientry != genpvs_.end(); ++ientry) {
540  double distance2 = pow(pv.x - ientry->x, 2) + pow(pv.y - ientry->y, 2) + pow(pv.z - ientry->z, 2);
541  if (distance2 < vertexClusteringSqDistance_)
542  break;
543  }
544 
545  // Check if there is not a VERY close vertex and added to the list
546  if (ientry == genpvs_.end())
547  ientry = genpvs_.insert(ientry, pv);
548 
549  // Add the vertex barcodes to the new or existent vertices
550  ientry->genVertex.push_back((*ivertex)->barcode());
551 
552  // Collect final state descendants
553  for (HepMC::GenVertex::particle_iterator idecendants = (*ivertex)->particles_begin(HepMC::descendants);
554  idecendants != (*ivertex)->particles_end(HepMC::descendants);
555  ++idecendants) {
556  if (isFinalstateParticle(*idecendants))
557  if (find(ientry->finalstateParticles.begin(), ientry->finalstateParticles.end(), (*idecendants)->barcode()) ==
558  ientry->finalstateParticles.end()) {
559  ientry->finalstateParticles.push_back((*idecendants)->barcode());
560  HepMC::FourVector m = (*idecendants)->momentum();
561 
562  ientry->ptot.setPx(ientry->ptot.px() + m.px());
563  ientry->ptot.setPy(ientry->ptot.py() + m.py());
564  ientry->ptot.setPz(ientry->ptot.pz() + m.pz());
565  ientry->ptot.setE(ientry->ptot.e() + m.e());
566  ientry->ptsq += m.perp() * m.perp();
567 
568  if (m.perp() > 0.8 && std::abs(m.pseudoRapidity()) < 2.5 && isCharged(*idecendants))
569  ientry->nGenTrk++;
570  }
571  }
572  idx++;
573  }
574  }
575 
576  std::sort(genpvs_.begin(), genpvs_.end());
577 }
TrackClassifier::tTopoHandToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoHandToken_
Definition: TrackClassifier.h:84
Vector3DBase
Definition: Vector3DBase.h:8
TrackClassifier::magneticField_
edm::ESHandle< MagneticField > magneticField_
Definition: TrackClassifier.h:71
CMS::EIoni
Definition: CMSProcessTypes.h:14
TrackQuality::numberOfLayers
unsigned int numberOfLayers() const
Return the number of layers with simulated and/or reconstructed hits.
Definition: TrackQuality.h:74
edm::ESHandle::product
T const * product() const
Definition: ESHandle.h:86
histoParameters_cff.maxLayers
maxLayers
Definition: histoParameters_cff.py:74
TrackCategories::MuPairProdProcess
Definition: TrackCategories.h:48
FreeTrajectoryState::momentum
GlobalVector momentum() const
Definition: FreeTrajectoryState.h:68
counter
Definition: counter.py:1
TrackCategories::KnownProcess
Definition: TrackCategories.h:36
TrackClassifier::TrackClassifier
TrackClassifier(edm::ParameterSet const &, edm::ConsumesCollector &&)
Constructor by ParameterSet.
Definition: TrackClassifier.cc:15
CoreSimTrack::momentum
const math::XYZTLorentzVectorD & momentum() const
Definition: CoreSimTrack.h:19
TrackQuality::Layer::Shared
Definition: TrackQuality.h:47
CMS::MuBrem
Definition: CMSProcessTypes.h:22
HistoryBase::SimParticleTrail
std::vector< TrackingParticleRef > SimParticleTrail
SimParticle trail type.
Definition: HistoryBase.h:30
TrackClassifier::quality_
TrackQuality quality_
Definition: TrackClassifier.h:67
TrackClassifier::GeneratedPrimaryVertex::y
double y
Definition: TrackClassifier.h:114
mps_fire.i
i
Definition: mps_fire.py:428
TrackCategories::FromBWeakDecayMuon
Definition: TrackCategories.h:54
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
TrackCharge
int TrackCharge
Definition: TrackCharge.h:4
TrackCategories::MuNuclProcess
Definition: TrackCategories.h:53
TrackClassifier::beamSpot_
edm::Handle< reco::BeamSpot > beamSpot_
Definition: TrackClassifier.h:81
TrackCategories::FromCWeakDecayMuon
Definition: TrackCategories.h:55
TrackCategories::LambdaDecay
Definition: TrackCategories.h:29
HistoryBase::recoGenParticle
const reco::GenParticle * recoGenParticle() const
Definition: HistoryBase.h:82
TrackCategories::JpsiDecay
Definition: TrackCategories.h:30
TrackCategories::OmegaDecay
Definition: TrackCategories.h:32
reco::GenParticle
Definition: GenParticle.h:21
min
T min(T a, T b)
Definition: MathUtil.h:58
reco::BeamSpot::z0
double z0() const
z coordinate
Definition: BeamSpot.h:65
edm
HLT enums.
Definition: AlignableModifier.h:19
TrackerTopology
Definition: TrackerTopology.h:16
TrackClassifier::tTopo_
const TrackerTopology * tTopo_
Definition: TrackClassifier.h:83
TrackCategories
Definition: TrackCategories.h:8
TrackHistory::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
Definition: TrackHistory.cc:33
pos
Definition: PixelAliasList.h:18
TrackCategories::SigmaMinusDecay
Definition: TrackCategories.h:34
TrackCategories::flags_
Flags flags_
Flag containers.
Definition: TrackCategories.h:89
TrackCategories::TrackerSimHits
Definition: TrackCategories.h:22
HLT_FULL_cff.InputTag
InputTag
Definition: HLT_FULL_cff.py:89301
TrackCategories::ComptonProcess
Definition: TrackCategories.h:42
TrackCategories::PhotonProcess
Definition: TrackCategories.h:47
TrackCategories::HIoniProcess
Definition: TrackCategories.h:45
HistoryBase::GenParticleTrail
std::vector< const HepMC::GenParticle * > GenParticleTrail
HepMC::GenParticle trail type.
Definition: HistoryBase.h:15
TrackClassifier::GeneratedPrimaryVertex::z
double z
Definition: TrackClassifier.h:114
CMS::SynchrotronRadiation
Definition: CMSProcessTypes.h:21
TrackCategories::PrimaryProcess
Definition: TrackCategories.h:39
HistoryBase::recoGenParticleTrail
const RecoGenParticleTrail & recoGenParticleTrail() const
Return all reco::GenParticle in the history.
Definition: HistoryBase.h:64
TrackCategories::SynchrotronRadiationProcess
Definition: TrackCategories.h:51
HistoryBase::RecoGenParticleTrail
std::vector< const reco::GenParticle * > RecoGenParticleTrail
reco::GenParticle trail type.
Definition: HistoryBase.h:18
TrackClassifier::minTrackerSimHits_
unsigned int minTrackerSimHits_
Definition: TrackClassifier.h:63
TrackQuality::Layer::Hit
Definition: TrackQuality.h:49
TrackHistory::recoTrack
const reco::TrackBaseRef & recoTrack() const
Return a reference to the reconstructed track.
Definition: TrackHistory.h:55
FreeTrajectoryState::position
GlobalPoint position() const
Definition: FreeTrajectoryState.h:67
GlobalVector
Global3DVector GlobalVector
Definition: GlobalVector.h:10
findQualityFiles.v
v
Definition: findQualityFiles.py:179
TauDecay
Definition: TauDecay.h:21
TrackCategories::ConversionsProcess
Definition: TrackCategories.h:49
spr::find
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
Definition: FindCaloHit.cc:19
TrackCategories::TertiaryVertex
Definition: TrackCategories.h:61
singleTopDQM_cfi.setup
setup
Definition: singleTopDQM_cfi.py:37
TrackCategories::Charm
Definition: TrackCategories.h:19
Muon
Definition: Muon.py:1
TrackCategories::Light
Definition: TrackCategories.h:20
HepMC::GenEvent
Definition: hepmc_rootio.cc:9
TrackClassifier::beamSpotLabel_
const edm::InputTag beamSpotLabel_
Definition: TrackClassifier.h:57
ParticleData
HepPDT::ParticleData ParticleData
Definition: ParticleDataTable.h:9
TrackQuality::layer
const Layer & layer(unsigned int index) const
Return information about the given layer by index.
Definition: TrackQuality.h:77
edm::Ref< TrackingParticleCollection >
TrackCategories::PrimaryVertex
Definition: TrackCategories.h:59
TrackCategories::MuIoniProcess
Definition: TrackCategories.h:46
CMS::Decay
Definition: CMSProcessTypes.h:11
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
funct::sin
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
EncodedEventId
Definition: EncodedEventId.h:11
IdealMagneticFieldRecord
Definition: IdealMagneticFieldRecord.h:11
config
Definition: config.py:1
TrackCategories::Fake
Definition: TrackCategories.h:12
TrackClassifier::hepMCLabel_
const edm::InputTag hepMCLabel_
Definition: TrackClassifier.h:56
TrackCategories::Reconstructed
Definition: TrackCategories.h:13
TrackClassifier::GeneratedPrimaryVertex
Auxiliary class holding simulated primary vertices.
Definition: TrackClassifier.h:109
part
part
Definition: HCALResponse.h:20
CMS::EBrem
Definition: CMSProcessTypes.h:20
EgammaObjectsElectrons_cfi.particleID
particleID
Definition: EgammaObjectsElectrons_cfi.py:4
TrackClassifier::magneticFieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: TrackClassifier.h:72
TrackCategories::unknownTrack
void unknownTrack()
Definition: TrackCategories.cc:57
funct::cos
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
TrackClassifier::isCharged
bool isCharged(const HepMC::GenParticle *)
Definition: TrackClassifier.cc:492
TrackClassifier::mcInformation_
edm::Handle< edm::HepMCProduct > mcInformation_
Definition: TrackClassifier.h:74
TrackCategories::Bottom
Definition: TrackCategories.h:18
TrackCategories::SharedInnerHits
Definition: TrackCategories.h:16
TrackClassifier::processesAtSimulation
void processesAtSimulation()
Get information about conversion and other interactions.
Definition: TrackClassifier.cc:304
CMS::Hadronic
Definition: CMSProcessTypes.h:10
TrackCategories::Bad
Definition: TrackCategories.h:14
visualization-live-secondInstance_cfg.m
m
Definition: visualization-live-secondInstance_cfg.py:79
TrackClassifier::tracer_
TrackHistory tracer_
Definition: TrackClassifier.h:65
TrackCategories::SecondaryVertex
Definition: TrackCategories.h:60
TrackClassifier::evaluate
const TrackClassifier & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
Definition: TrackClassifier.cc:76
reco::BeamSpot
Definition: BeamSpot.h:21
TransientTrackRecord
Definition: TransientTrackRecord.h:11
TrackCategories::EIoniProcess
Definition: TrackCategories.h:44
TrackClassifier::transientTrackBuilderToken_
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackBuilderToken_
Definition: TrackClassifier.h:79
HistoryBase::genParticleTrail
const GenParticleTrail & genParticleTrail() const
Return all generated particle (HepMC::GenParticle) in the history.
Definition: HistoryBase.h:61
TrackClassifier::numberOfInnerLayers_
unsigned int numberOfInnerLayers_
Definition: TrackClassifier.h:62
TrackClassifier::hadronFlavor
void hadronFlavor()
Get hadron flavor of the initial hadron.
Definition: TrackClassifier.cc:235
GlobalPoint
Global3DPoint GlobalPoint
Definition: GlobalPoint.h:10
TrackCategories::FromChargeKaonMuon
Definition: TrackCategories.h:58
TrackClassifier::badPull_
double badPull_
Definition: TrackClassifier.h:59
MuonClassifier_cff.vertexClusteringDistance
vertexClusteringDistance
Definition: MuonClassifier_cff.py:17
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
TrackCategories::BWeakDecay
Definition: TrackCategories.h:23
TrackCategories::ChargePionDecay
Definition: TrackCategories.h:25
TrackQuality::Layer::Noise
Definition: TrackQuality.h:47
CMS::Unknown
Definition: CMSProcessTypes.h:8
CMS::Undefined
Definition: CMSProcessTypes.h:7
TrackClassifier::genpvs_
std::vector< GeneratedPrimaryVertex > genpvs_
Definition: TrackClassifier.h:125
CMS::Annihilation
Definition: CMSProcessTypes.h:13
TrackClassifier::processesAtGenerator
void processesAtGenerator()
Get all the information related to decay process.
Definition: TrackClassifier.cc:248
TrackClassifier.h
CMS::HIoni
Definition: CMSProcessTypes.h:15
CMS::Photon
Definition: CMSProcessTypes.h:17
edm::ParameterSet
Definition: ParameterSet.h:47
TrackCategories::EBremProcess
Definition: TrackCategories.h:50
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
LaserDQM_cfg.process
process
Definition: LaserDQM_cfg.py:3
jetUpdater_cfi.sort
sort
Definition: jetUpdater_cfi.py:29
reco::LeafCandidate::pdgId
int pdgId() const final
PDG identifier.
Definition: LeafCandidate.h:176
edm::Ref::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: Ref.h:238
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition: TrackClassifier.cc:47
EncodedEventId::event
int event() const
get the contents of the subdetector field (should be protected?)
Definition: EncodedEventId.h:30
TrackCategories::SigmaPlusDecay
Definition: TrackCategories.h:33
createfilelist.int
int
Definition: createfilelist.py:10
MetAnalyzer.pv
def pv(vc)
Definition: MetAnalyzer.py:7
TrackClassifier::particleDataTable_
edm::ESHandle< ParticleDataTable > particleDataTable_
Definition: TrackClassifier.h:76
TrackCategories::KsDecay
Definition: TrackCategories.h:28
TrackCategories::reset
void reset()
Reset the categories flags.
Definition: TrackCategories.h:83
TrackCategories::UnknownProcess
Definition: TrackCategories.h:38
TransientTrackBuilder
Definition: TransientTrackBuilder.h:16
TrackClassifier::vertexInformation
void vertexInformation()
Get geometrical information about the vertices.
Definition: TrackClassifier.cc:414
edm::EventSetup
Definition: EventSetup.h:58
TrackClassifier::qualityInformation
void qualityInformation(reco::TrackBaseRef const &)
Classify all the tracks by their reconstruction quality.
Definition: TrackClassifier.cc:212
edm::HepMCProduct::GetEvent
const HepMC::GenEvent * GetEvent() const
Definition: HepMCProduct.h:37
TrajectoryStateClosestToPoint
Definition: TrajectoryStateClosestToPoint.h:18
TrackQuality::newEvent
void newEvent(const edm::Event &, const edm::EventSetup &)
Pre-process event information (for accessing reconstruction information)
Definition: TrackQuality.cc:138
TrackQuality::evaluate
void evaluate(SimParticleTrail const &, reco::TrackBaseRef const &, const TrackerTopology *tTopo)
Compute information about the track reconstruction quality.
Definition: TrackQuality.cc:142
TrackClassifier::vertexClusteringSqDistance_
double vertexClusteringSqDistance_
Definition: TrackClassifier.h:61
CMS::MuPairProd
Definition: CMSProcessTypes.h:18
TrackCategories::DecayOnFlightMuon
Definition: TrackCategories.h:56
reco::TrackBase::Point
math::XYZPoint Point
point in the space
Definition: TrackBase.h:80
TrackCategories::DecayProcess
Definition: TrackCategories.h:41
CMS::MuNucl
Definition: CMSProcessTypes.h:23
reco::BeamSpot::x0
double x0() const
x coordinate
Definition: BeamSpot.h:61
HistoryBase::simParticle
const TrackingParticleRef & simParticle() const
Return the initial tracking particle from the history.
Definition: HistoryBase.h:67
TrackCategories::BadInnerHits
Definition: TrackCategories.h:15
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
eostools.move
def move(src, dest)
Definition: eostools.py:511
std
Definition: JetResolutionObject.h:76
TSCPBuilderNoMaterial
Definition: TSCPBuilderNoMaterial.h:17
FreeTrajectoryState
Definition: FreeTrajectoryState.h:27
HistoryBase::simParticleTrail
const SimParticleTrail & simParticleTrail() const
Return all the simulated particle in the history.
Definition: HistoryBase.h:55
SimTrack
Definition: SimTrack.h:9
CMS::Compton
Definition: CMSProcessTypes.h:12
edm::RefToBase::isNonnull
bool isNonnull() const
Checks for non-null.
Definition: RefToBase.h:301
TrackClassifier::reconstructionInformation
void reconstructionInformation(reco::TrackBaseRef const &)
Definition: TrackClassifier.cc:154
edm::RefVectorIterator
Definition: EDProductfwd.h:33
TrackClassifier::transientTrackBuilder_
edm::ESHandle< TransientTrackBuilder > transientTrackBuilder_
Definition: TrackClassifier.h:78
TrackClassifier::longLivedDecayLength_
double longLivedDecayLength_
Definition: TrackClassifier.h:60
TrackClassifier::simulationInformation
void simulationInformation()
Get all the information related to the simulation details.
Definition: TrackClassifier.cc:201
TrackCategories::XiDecay
Definition: TrackCategories.h:31
CMS::Primary
Definition: CMSProcessTypes.h:9
TrackCategories::ChargeKaonDecay
Definition: TrackCategories.h:26
G4toCMSLegacyProcTypeMap::processId
const unsigned int processId(unsigned int g4ProcessId) const
Definition: Utils.cc:59
edm::RefToBase< reco::Track >
TrackCategories::LongLivedDecay
Definition: TrackCategories.h:35
TrackCategories::FromChargePionMuon
Definition: TrackCategories.h:57
TrackHistory::evaluate
bool evaluate(TrackingParticleRef tpr)
Evaluate track history using a TrackingParticleRef.
Definition: TrackHistory.h:37
funct::pow
Power< A, B >::type pow(const A &a, const B &b)
Definition: Power.h:29
TrackCategories::CWeakDecay
Definition: TrackCategories.h:24
cms::Exception
Definition: Exception.h:70
TrackClassifier::g4toCMSProcMap_
const G4toCMSLegacyProcTypeMap g4toCMSProcMap_
Definition: TrackClassifier.h:69
funct::abs
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
edm::HepMCProduct
Definition: HepMCProduct.h:21
TrackerTopologyRcd
Definition: TrackerTopologyRcd.h:10
CMS::MuIoni
Definition: CMSProcessTypes.h:16
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
TrajectoryStateClosestToPoint::theState
const FreeTrajectoryState & theState() const
Definition: TrajectoryStateClosestToPoint.h:96
parents
TPRegexp parents
Definition: eve_filter.cc:21
event
Definition: event.py:1
DeDxTools::esConsumes
ESGetTokenH3DDVariant esConsumes(std::string const &Reccord, edm::ConsumesCollector &)
Definition: DeDxTools.cc:283
reco::BeamSpot::y0
double y0() const
y coordinate
Definition: BeamSpot.h:63
TrackClassifier
Get track history and classify it in function of their .
Definition: TrackClassifier.h:29
edm::Event
Definition: Event.h:73
EgammaValidation_cff.pdgid
pdgid
Definition: EgammaValidation_cff.py:29
TrackQuality::Layer
Definition: TrackQuality.h:32
TrackClassifier::genPrimaryVertices
void genPrimaryVertices()
Definition: TrackClassifier.cc:502
TrackingParticle::Point
math::XYZPointD Point
point in the space
Definition: TrackingParticle.h:36
MagneticField
Definition: MagneticField.h:19
class-composition.parent
parent
Definition: class-composition.py:98
TrackCategories::Muon
Definition: TrackCategories.h:21
LHEGenericFilter_cfi.ParticleID
ParticleID
Definition: LHEGenericFilter_cfi.py:6
TrackQuality::Layer::Misassoc
Definition: TrackQuality.h:47
TrackClassifier::GeneratedPrimaryVertex::x
double x
Definition: TrackClassifier.h:114
TrackClassifier::isFinalstateParticle
bool isFinalstateParticle(const HepMC::GenParticle *)
Definition: TrackClassifier.cc:490
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
TrackCategories::AnnihilationProcess
Definition: TrackCategories.h:43
HistoryBase::depth
void depth(int d)
Set the depth of the history.
Definition: HistoryBase.h:49
EncodedEventId::bunchCrossing
int bunchCrossing() const
get the detector field from this detid
Definition: EncodedEventId.h:25
hit
Definition: SiStripHitEffFromCalibTree.cc:88
TrackCategories::MuBremProcess
Definition: TrackCategories.h:52
CMS::Conversions
Definition: CMSProcessTypes.h:19
update
#define update(a, b)
Definition: TrackClassifier.cc:10
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:117
TrackCategories::UndefinedProcess
Definition: TrackCategories.h:37
TrackCategories::HadronicProcess
Definition: TrackCategories.h:40
TrackCategories::SignalEvent
Definition: TrackCategories.h:17