CMS 3D CMS Logo

PUEvent.h
Go to the documentation of this file.
1 #ifndef FastSimulation_PileUpProducer_PUEvent_h
2 #define FastSimulation_PileUpProducer_PUEvent_h
3 
4 #include <vector>
5 
6 class PUEvent {
7 public:
8  PUEvent() {}
9  void reset() {
10  PUParticles_.clear();
11  PUMinBiasEvts_.clear();
12  }
13 
14  class PUParticle {
15  public:
16  PUParticle() : px(0.), py(0.), pz(0.), mass(0.), id(0) {}
17  float px;
18  float py;
19  float pz;
20  float mass;
21  int id;
22  };
23 
24  class PUMinBiasEvt {
25  public:
26  PUMinBiasEvt() : first(0), size(0) {}
27  unsigned first;
28  unsigned size;
29  };
30 
31  void addPUParticle(const PUParticle& ptc) { PUParticles_.push_back(ptc); }
32 
33  void addPUMinBiasEvt(const PUMinBiasEvt& idx) { PUMinBiasEvts_.push_back(idx); }
34 
35  const std::vector<PUEvent::PUParticle>& thePUParticles() { return PUParticles_; }
36 
37  const std::vector<PUEvent::PUMinBiasEvt>& thePUMinBiasEvts() { return PUMinBiasEvts_; }
38 
39  unsigned nParticles() const { return PUParticles_.size(); }
40 
41  unsigned nMinBias() const { return PUMinBiasEvts_.size(); }
42 
43 private:
44  std::vector<PUEvent::PUParticle> PUParticles_;
45  std::vector<PUEvent::PUMinBiasEvt> PUMinBiasEvts_;
46 };
47 
48 #endif
PUEvent::thePUParticles
const std::vector< PUEvent::PUParticle > & thePUParticles()
Definition: PUEvent.h:35
PUEvent::addPUParticle
void addPUParticle(const PUParticle &ptc)
Definition: PUEvent.h:31
PUEvent::PUEvent
PUEvent()
Definition: PUEvent.h:8
PUEvent::PUParticle::PUParticle
PUParticle()
Definition: PUEvent.h:16
PUEvent::PUParticle
Definition: PUEvent.h:14
heavyIonCSV_trainingSettings.idx
idx
Definition: heavyIonCSV_trainingSettings.py:5
PUEvent::PUMinBiasEvt::first
unsigned first
Definition: PUEvent.h:27
PUEvent::PUParticle::mass
float mass
Definition: PUEvent.h:20
PUEvent::PUParticle::pz
float pz
Definition: PUEvent.h:19
PUEvent::PUMinBiasEvts_
std::vector< PUEvent::PUMinBiasEvt > PUMinBiasEvts_
Definition: PUEvent.h:45
PUEvent::PUParticles_
std::vector< PUEvent::PUParticle > PUParticles_
Definition: PUEvent.h:44
PUEvent::PUParticle::id
int id
Definition: PUEvent.h:21
PUEvent::reset
void reset()
Definition: PUEvent.h:9
PUEvent::addPUMinBiasEvt
void addPUMinBiasEvt(const PUMinBiasEvt &idx)
Definition: PUEvent.h:33
PUEvent
Definition: PUEvent.h:6
PUEvent::PUMinBiasEvt::PUMinBiasEvt
PUMinBiasEvt()
Definition: PUEvent.h:26
PUEvent::nParticles
unsigned nParticles() const
Definition: PUEvent.h:39
PUEvent::PUParticle::px
float px
Definition: PUEvent.h:17
PUEvent::PUMinBiasEvt
Definition: PUEvent.h:24
PUEvent::PUParticle::py
float py
Definition: PUEvent.h:18
PUEvent::nMinBias
unsigned nMinBias() const
Definition: PUEvent.h:41
PUEvent::PUMinBiasEvt::size
unsigned size
Definition: PUEvent.h:28
PUEvent::thePUMinBiasEvts
const std::vector< PUEvent::PUMinBiasEvt > & thePUMinBiasEvts()
Definition: PUEvent.h:37