CMS 3D CMS Logo

Trackster.h
Go to the documentation of this file.
1 // Author: Felice Pantaleo - felice.pantaleo@cern.ch
2 // Date: 09/2018
3 
4 #ifndef DataFormats_HGCalReco_Trackster_h
5 #define DataFormats_HGCalReco_Trackster_h
6 
7 #include <array>
8 #include <vector>
10 
11 // A Trackster is a Direct Acyclic Graph created when
12 // pattern recognition algorithms connect hits or
13 // layer clusters together in a 3D object.
14 
15 namespace ticl {
16  struct Trackster {
17  // The vertices of the DAG are the indices of the
18  // 2d objects in the global collection
19  std::vector<unsigned int> vertices;
20  std::vector<uint8_t> vertex_multiplicity;
21 
22  // The edges connect two vertices together in a directed doublet
23  // ATTENTION: order matters!
24  // A doublet generator should create edges in which:
25  // the first element is on the inner layer and
26  // the outer element is on the outer layer.
27  std::vector<std::array<unsigned int, 2> > edges;
28 
30  int seedIndex;
31 
32  // regressed energy
34 
35  // types considered by the particle identification
36  enum class ParticleType {
37  photon = 0,
38  electron,
39  muon,
43  ambiguous,
44  unknown,
45  };
46 
47  // trackster ID probabilities
48  std::array<float, 8> id_probabilities;
49 
50  // convenience method to return the ID probability for a certain particle type
51  inline float id_probability(ParticleType type) const {
52  // probabilities are stored in the same order as defined in the ParticleType enum
53  return id_probabilities[(int)type];
54  }
55  };
56 } // namespace ticl
57 #endif
type
Definition: HCALResponse.h:21
std::vector< uint8_t > vertex_multiplicity
Definition: Trackster.h:20
std::vector< unsigned int > vertices
Definition: Trackster.h:19
edm::ProductID seedID
Definition: Trackster.h:29
float regressed_energy
Definition: Trackster.h:33
std::vector< std::array< unsigned int, 2 > > edges
Definition: Trackster.h:27
float id_probability(ParticleType type) const
Definition: Trackster.h:51
std::array< float, 8 > id_probabilities
Definition: Trackster.h:48