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:
10  PUEvent() {}
11  void reset() {
12  PUParticles_.clear();
13  PUMinBiasEvts_.clear();
14  }
15 
16  class PUParticle {
17  public:
18  PUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {}
19  float px;
20  float py;
21  float pz;
22  float mass;
23  int id;
24  };
25 
26 
27  class PUMinBiasEvt {
28  public:
29  PUMinBiasEvt() : first(0), size(0) {}
30  unsigned first;
31  unsigned size;
32  };
33 
34 
35  void addPUParticle( const PUParticle& ptc ) {
36  PUParticles_.push_back(ptc);
37  }
38 
39  void addPUMinBiasEvt( const PUMinBiasEvt& idx ) {
40  PUMinBiasEvts_.push_back(idx);
41  }
42 
43  const std::vector<PUEvent::PUParticle>& thePUParticles()
44  {return PUParticles_;}
45 
46  const std::vector<PUEvent::PUMinBiasEvt>& thePUMinBiasEvts()
47  {return PUMinBiasEvts_;}
48 
49  unsigned nParticles() const { return PUParticles_.size(); }
50 
51  unsigned nMinBias() const { return PUMinBiasEvts_.size(); }
52 
53  private:
54 
55  std::vector<PUEvent::PUParticle> PUParticles_;
56  std::vector<PUEvent::PUMinBiasEvt> PUMinBiasEvts_;
57 
58 };
59 
60 #endif
const std::vector< PUEvent::PUMinBiasEvt > & thePUMinBiasEvts()
Definition: PUEvent.h:46
void addPUMinBiasEvt(const PUMinBiasEvt &idx)
Definition: PUEvent.h:39
PUEvent()
Definition: PUEvent.h:10
const std::vector< PUEvent::PUParticle > & thePUParticles()
Definition: PUEvent.h:43
unsigned nMinBias() const
Definition: PUEvent.h:51
std::vector< PUEvent::PUParticle > PUParticles_
Definition: PUEvent.h:55
void addPUParticle(const PUParticle &ptc)
Definition: PUEvent.h:35
tuple idx
DEBUGGING if hasattr(process,&quot;trackMonIterativeTracking2012&quot;): print &quot;trackMonIterativeTracking2012 D...
void reset()
Definition: PUEvent.h:11
std::vector< PUEvent::PUMinBiasEvt > PUMinBiasEvts_
Definition: PUEvent.h:56
unsigned nParticles() const
Definition: PUEvent.h:49
Definition: PUEvent.h:6