CMS 3D CMS Logo

MtdCaloParticle.h
Go to the documentation of this file.
1 #ifndef SimDataFormats_MtdCaloParticle_h
2 #define SimDataFormats_MtdCaloParticle_h
3 
7 
8 #include <vector>
9 
10 class SimTrack;
11 class EncodedEventId;
12 
13 class MtdCaloParticle : public CaloParticle {
14  friend std::ostream &operator<<(std::ostream &s, MtdCaloParticle const &tp);
15 
16 public:
18 
20 
21  MtdCaloParticle(const SimTrack &simtrk);
22  MtdCaloParticle(EncodedEventId eventID, uint32_t particleID); // for PU
23 
24  // destructor
26 
28 
32 
35 
37  float simTime() const { return simhit_time_; }
38 
39  void addSimTime(const float time) { simhit_time_ = time; }
40 
43  simhit_energy_ += hit.energyLoss();
44  ++nsimhits_;
45  }
46 
47 private:
48  float simhit_time_{-99.f};
50 };
51 
52 #endif // SimDataFormats_MtdCaloParticle_H
void addSimHit(PSimHit &hit)
add simhit&#39;s energy to cluster
MtdSimClusterRefVector::iterator mtdsc_iterator
uint64_t nsimhits_
Definition: CaloParticle.h:193
mtdsc_iterator simCluster_end() const
MtdSimClusterRefVector mtdsimClusters_
void addSimTime(const float time)
float simhit_energy_
Definition: CaloParticle.h:197
void clear()
Clear the vector.
Definition: RefVector.h:142
void addSimCluster(const MtdSimClusterRef &ref)
const MtdSimClusterRefVector & simClusters() const
const_iterator end() const
Termination of iteration.
Definition: RefVector.h:228
void push_back(value_type const &ref)
Add a Ref<C, T> to the RefVector.
Definition: RefVector.h:67
float simTime() const
returns the time of the caloparticle
friend std::ostream & operator<<(std::ostream &s, MtdCaloParticle const &tp)
const_iterator begin() const
Initialize an iterator over the RefVector.
Definition: RefVector.h:223
mtdsc_iterator simCluster_begin() const
iterators