CMS 3D CMS Logo

TrackClassifier.h
Go to the documentation of this file.
1 
2 #ifndef TrackClassifier_h
3 #define TrackClassifier_h
4 
8 
11 
13 
15 
20 
25 
26 class TrackTopology;
27 
30 public:
33 
36 
38  void newEvent(edm::Event const &, edm::EventSetup const &);
39 
42 
45 
48 
50  TrackHistory const &history() const { return tracer_; }
51 
53  TrackQuality const &quality() const { return quality_; }
54 
55 private:
58 
59  double badPull_;
62  unsigned int numberOfInnerLayers_;
63  unsigned int minTrackerSimHits_;
64 
66 
68 
70 
73 
75 
77 
80 
82 
85 
89 
91  void simulationInformation();
92 
95 
97  void hadronFlavor();
98 
100  void processesAtGenerator();
101 
103  void processesAtSimulation();
104 
106  void vertexInformation();
107 
110  GeneratedPrimaryVertex(double x1, double y1, double z1) : x(x1), y(y1), z(z1), ptsq(0), nGenTrk(0) {}
111 
112  bool operator<(GeneratedPrimaryVertex const &reference) const { return ptsq < reference.ptsq; }
113 
114  double x, y, z;
115  double ptsq;
116  int nGenTrk;
117 
118  HepMC::FourVector ptot;
119 
120  std::vector<int> finalstateParticles;
121  std::vector<int> simTrackIndex;
122  std::vector<int> genVertex;
123  };
124 
125  std::vector<GeneratedPrimaryVertex> genpvs_;
126 
127  // Auxiliary function to get the generated primary vertex
129  bool isCharged(const HepMC::GenParticle *);
130  void genPrimaryVertices();
131 };
132 
133 #endif
TrackClassifier::tTopoHandToken_
edm::ESGetToken< TrackerTopology, TrackerTopologyRcd > tTopoHandToken_
Definition: TrackClassifier.h:84
G4toCMSLegacyProcTypeMap
Definition: Utils.h:35
TrackClassifier::magneticField_
edm::ESHandle< MagneticField > magneticField_
Definition: TrackClassifier.h:71
TrackClassifier::TrackClassifier
TrackClassifier(edm::ParameterSet const &, edm::ConsumesCollector &&)
Constructor by ParameterSet.
Definition: TrackClassifier.cc:15
TrackClassifier::quality_
TrackQuality quality_
Definition: TrackClassifier.h:67
TrackClassifier::GeneratedPrimaryVertex::y
double y
Definition: TrackClassifier.h:114
FreeTrajectoryState.h
HLT_FULL_cff.track
track
Definition: HLT_FULL_cff.py:11724
TrackClassifier::beamSpot_
edm::Handle< reco::BeamSpot > beamSpot_
Definition: TrackClassifier.h:81
TrackClassifier::GeneratedPrimaryVertex::finalstateParticles
std::vector< int > finalstateParticles
Definition: TrackClassifier.h:120
TrackClassifier::GeneratedPrimaryVertex::operator<
bool operator<(GeneratedPrimaryVertex const &reference) const
Definition: TrackClassifier.h:112
TrackClassifier::history
const TrackHistory & history() const
Returns a reference to the track history used in the classification.
Definition: TrackClassifier.h:50
TrackQuality.h
TrackClassifier::GeneratedPrimaryVertex::ptot
HepMC::FourVector ptot
Definition: TrackClassifier.h:118
TrackerTopology
Definition: TrackerTopology.h:16
TrackClassifier::tTopo_
const TrackerTopology * tTopo_
Definition: TrackClassifier.h:83
TrackCategories
Definition: TrackCategories.h:8
TrackClassifier::GeneratedPrimaryVertex::z
double z
Definition: TrackClassifier.h:114
TrackClassifier::minTrackerSimHits_
unsigned int minTrackerSimHits_
Definition: TrackClassifier.h:63
TrackClassifier::GeneratedPrimaryVertex::GeneratedPrimaryVertex
GeneratedPrimaryVertex(double x1, double y1, double z1)
Definition: TrackClassifier.h:110
edm::Handle< edm::HepMCProduct >
TrackClassifier::beamSpotLabel_
const edm::InputTag beamSpotLabel_
Definition: TrackClassifier.h:57
edm::Ref< TrackingParticleCollection >
TrackClassifier::hepMCLabel_
const edm::InputTag hepMCLabel_
Definition: TrackClassifier.h:56
testProducerWithPsetDescEmpty_cfi.x1
x1
Definition: testProducerWithPsetDescEmpty_cfi.py:33
TrackClassifier::GeneratedPrimaryVertex
Auxiliary class holding simulated primary vertices.
Definition: TrackClassifier.h:109
testProducerWithPsetDescEmpty_cfi.y1
y1
Definition: testProducerWithPsetDescEmpty_cfi.py:29
TrackClassifier::magneticFieldToken_
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord > magneticFieldToken_
Definition: TrackClassifier.h:72
TrackClassifier::isCharged
bool isCharged(const HepMC::GenParticle *)
Definition: TrackClassifier.cc:492
TrackClassifier::mcInformation_
edm::Handle< edm::HepMCProduct > mcInformation_
Definition: TrackClassifier.h:74
BeamSpot.h
TrackClassifier::processesAtSimulation
void processesAtSimulation()
Get information about conversion and other interactions.
Definition: TrackClassifier.cc:304
TrackClassifier::tracer_
TrackHistory tracer_
Definition: TrackClassifier.h:65
TrackClassifier::evaluate
const TrackClassifier & evaluate(reco::TrackBaseRef const &)
Classify the RecoTrack in categories.
Definition: TrackClassifier.cc:76
IdealMagneticFieldRecord.h
edm::ESHandle< MagneticField >
TrackHistory.h
TrackClassifier::transientTrackBuilderToken_
edm::ESGetToken< TransientTrackBuilder, TransientTrackRecord > transientTrackBuilderToken_
Definition: TrackClassifier.h:79
TrackClassifier::numberOfInnerLayers_
unsigned int numberOfInnerLayers_
Definition: TrackClassifier.h:62
TrackClassifier::hadronFlavor
void hadronFlavor()
Get hadron flavor of the initial hadron.
Definition: TrackClassifier.cc:235
TrackQuality
This class analyses the reconstruction quality for a given track.
Definition: TrackQuality.h:29
TrackClassifier::badPull_
double badPull_
Definition: TrackClassifier.h:59
TrackClassifier::quality
const TrackQuality & quality() const
Returns a reference to the track quality used in the classification.
Definition: TrackClassifier.h:53
CMSProcessTypes.h
TrackClassifier::genpvs_
std::vector< GeneratedPrimaryVertex > genpvs_
Definition: TrackClassifier.h:125
TrackClassifier::processesAtGenerator
void processesAtGenerator()
Get all the information related to decay process.
Definition: TrackClassifier.cc:248
TrackClassifier::GeneratedPrimaryVertex::simTrackIndex
std::vector< int > simTrackIndex
Definition: TrackClassifier.h:121
TransientTrackBuilder.h
edm::ParameterSet
Definition: ParameterSet.h:47
ParticleDataTable.h
TrackClassifier::newEvent
void newEvent(edm::Event const &, edm::EventSetup const &)
Pre-process event information (for accessing reconstraction information)
Definition: TrackClassifier.cc:47
RecoTauValidation_cfi.reference
reference
Definition: RecoTauValidation_cfi.py:233
TrackClassifier::particleDataTable_
edm::ESHandle< ParticleDataTable > particleDataTable_
Definition: TrackClassifier.h:76
TrackClassifier::vertexInformation
void vertexInformation()
Get geometrical information about the vertices.
Definition: TrackClassifier.cc:414
MagneticField.h
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
TransientTrackRecord.h
TSCPBuilderNoMaterial.h
TrackClassifier::vertexClusteringSqDistance_
double vertexClusteringSqDistance_
Definition: TrackClassifier.h:61
edm::ESGetToken< MagneticField, IdealMagneticFieldRecord >
InputTag.h
GenParticle.GenParticle
GenParticle
Definition: GenParticle.py:18
TrackClassifier::evaluate
const TrackClassifier & evaluate(reco::TrackRef const &track)
Classify the RecoTrack in categories.
Definition: TrackClassifier.h:47
TrackClassifier::reconstructionInformation
void reconstructionInformation(reco::TrackBaseRef const &)
Definition: TrackClassifier.cc:154
TrackClassifier::transientTrackBuilder_
edm::ESHandle< TransientTrackBuilder > transientTrackBuilder_
Definition: TrackClassifier.h:78
TrackClassifier::longLivedDecayLength_
double longLivedDecayLength_
Definition: TrackClassifier.h:60
TrackHistory
This class traces the simulated and generated history of a given track.
Definition: TrackHistory.h:17
TrackClassifier::simulationInformation
void simulationInformation()
Get all the information related to the simulation details.
Definition: TrackClassifier.cc:201
edm::RefToBase< reco::Track >
ConsumesCollector.h
TrackClassifier::g4toCMSProcMap_
const G4toCMSLegacyProcTypeMap g4toCMSProcMap_
Definition: TrackClassifier.h:69
ParameterSet.h
TrackClassifier::GeneratedPrimaryVertex::nGenTrk
int nGenTrk
Definition: TrackClassifier.h:116
TrackClassifier
Get track history and classify it in function of their .
Definition: TrackClassifier.h:29
TrackClassifier::GeneratedPrimaryVertex::ptsq
double ptsq
Definition: TrackClassifier.h:115
edm::Event
Definition: Event.h:73
TrackClassifier::genPrimaryVertices
void genPrimaryVertices()
Definition: TrackClassifier.cc:502
TrackCategories.h
TrackClassifier::GeneratedPrimaryVertex::x
double x
Definition: TrackClassifier.h:114
TrackClassifier::isFinalstateParticle
bool isFinalstateParticle(const HepMC::GenParticle *)
Definition: TrackClassifier.cc:490
edm::InputTag
Definition: InputTag.h:15
edm::ConsumesCollector
Definition: ConsumesCollector.h:45
TrackClassifier::GeneratedPrimaryVertex::genVertex
std::vector< int > genVertex
Definition: TrackClassifier.h:122
TrackClassifier::Categories
TrackCategories Categories
Type to the associate category.
Definition: TrackClassifier.h:32