CMS 3D CMS Logo

MtdSimTrackster.h
Go to the documentation of this file.
1 // Author: Aurora Perego, Fabio Cossutti - aurora.perego@cern.ch, fabio.cossutti@ts.infn.it
2 // Date: 05/2023
3 
4 #ifndef SimDataFormats_MtdMtdSimTrackster_h
5 #define SimDataFormats_MtdMtdSimTrackster_h
6 
9 #include <vector>
10 
12  friend std::ostream &operator<<(std::ostream &s, MtdSimTrackster const &tp);
13 
14 public:
16 
17  MtdSimTrackster(const SimCluster &sc);
18  MtdSimTrackster(EncodedEventId eventID, uint32_t particleID); // for PU
19  MtdSimTrackster(const SimCluster &sc, const std::vector<uint32_t> SCs, const float time, const GlobalPoint pos);
20 
21  // destructor
23 
25  GlobalPoint position() const { return posAtEntrance_; }
26 
28  float time() const { return timeAtEntrance_; }
29 
31  std::vector<uint32_t> clusters() const { return clusters_; }
32 
34  void addCluster(const uint32_t sc) { clusters_.push_back(sc); }
35 
37  int numberOfClusters() const { return clusters_.size(); }
38 
39 private:
40  float timeAtEntrance_{0.f};
42  // indices of the MtdSimLayerClusters contained in the simTrackster
43  std::vector<uint32_t> clusters_;
44 };
45 
46 #endif // SimDataFormats_MtdSimTrackster_H
void addCluster(const uint32_t sc)
add simhit&#39;s energy to cluster
float time() const
returns the time of the cluster
friend std::ostream & operator<<(std::ostream &s, MtdSimTrackster const &tp)
GlobalPoint position() const
returns the position of the cluster
std::vector< uint32_t > clusters() const
returns the layer clusters indexes in the sim trackster
int numberOfClusters() const
Gives the total number of SimHits, in the cluster.
Monte Carlo truth information used for tracking validation.
Definition: SimCluster.h:33
std::vector< uint32_t > clusters_
GlobalPoint posAtEntrance_