CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
8 
9  public:
11  virtual ~PUEvent() {}
12  void reset() {
13  PUParticles_.clear();
14  PUMinBiasEvts_.clear();
15  NParticles_ = 0;
16  NMinBias_ = 0;
17  }
18 
19  class PUParticle {
20  public:
21  PUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {}
22  virtual ~PUParticle() {}
23  float px;
24  float py;
25  float pz;
26  float mass;
27  int id;
28  };
29 
30 
31  class PUMinBiasEvt {
32  public:
33  PUMinBiasEvt() : first(0), size(0) {}
34  virtual ~PUMinBiasEvt() {}
35  unsigned first;
36  unsigned size;
37  };
38 
39 
40  void addPUParticle( const PUParticle& ptc ) {
41  PUParticles_.push_back(ptc);
42  ++NParticles_;
43  }
44 
45  void addPUMinBiasEvt( const PUMinBiasEvt& idx ) {
46  PUMinBiasEvts_.push_back(idx);
47  ++NMinBias_;
48  }
49 
50  const std::vector<PUEvent::PUParticle>& thePUParticles()
51  {return PUParticles_;}
52 
53  const std::vector<PUEvent::PUMinBiasEvt>& thePUMinBiasEvts()
54  {return PUMinBiasEvts_;}
55 
56  const unsigned nParticles() const { return NParticles_; }
57 
58  const unsigned nMinBias() const { return NMinBias_; }
59 
60  private:
61 
62  std::vector<PUEvent::PUParticle> PUParticles_;
63  std::vector<PUEvent::PUMinBiasEvt> PUMinBiasEvts_;
64  unsigned NParticles_;
65  unsigned NMinBias_;
66 
67 };
68 
69 #endif
const std::vector< PUEvent::PUMinBiasEvt > & thePUMinBiasEvts()
Definition: PUEvent.h:53
virtual ~PUParticle()
Definition: PUEvent.h:22
void addPUMinBiasEvt(const PUMinBiasEvt &idx)
Definition: PUEvent.h:45
PUEvent()
Definition: PUEvent.h:10
virtual ~PUEvent()
Definition: PUEvent.h:11
const std::vector< PUEvent::PUParticle > & thePUParticles()
Definition: PUEvent.h:50
unsigned NMinBias_
Definition: PUEvent.h:65
const unsigned nParticles() const
Definition: PUEvent.h:56
const unsigned nMinBias() const
Definition: PUEvent.h:58
std::vector< PUEvent::PUParticle > PUParticles_
Definition: PUEvent.h:62
void addPUParticle(const PUParticle &ptc)
Definition: PUEvent.h:40
void reset()
Definition: PUEvent.h:12
std::vector< PUEvent::PUMinBiasEvt > PUMinBiasEvts_
Definition: PUEvent.h:63
virtual ~PUMinBiasEvt()
Definition: PUEvent.h:34
Definition: PUEvent.h:6
unsigned NParticles_
Definition: PUEvent.h:64