CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
NUEvent.h
Go to the documentation of this file.
1 #ifndef FastSimulation_MaterialEffects_NUEvent_h
2 #define FastSimulation_MaterialEffects_NUEvent_h
3 
4 #include <vector>
5 
6 class NUEvent {
7 
8 
9  public:
10  NUEvent() {}
11  void reset() {
12  NUParticles_.clear();
13  NUInteractions_.clear();
14  }
15 
16  class NUParticle {
17  public:
18  NUParticle() : 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 NUInteraction {
28  public:
29  NUInteraction() : first(0), last(0) {}
30  unsigned first;
31  unsigned last;
32  };
33 
34 
35  void addNUParticle( const NUParticle& ptc ) {
36  NUParticles_.push_back(ptc);
37  }
38 
39  void addNUInteraction( const NUInteraction& idx ) {
40  NUInteractions_.push_back(idx);
41  }
42 
43  const std::vector<NUEvent::NUParticle>& theNUParticles()
44  {return NUParticles_;}
45 
46  const std::vector<NUEvent::NUInteraction>& theNUInteractions()
47  {return NUInteractions_;}
48 
49  unsigned nParticles() const { return NUParticles_.size(); }
50 
51  unsigned nInteractions() const { return NUInteractions_.size(); }
52 
53  private:
54 
55  std::vector<NUEvent::NUParticle> NUParticles_;
56  std::vector<NUEvent::NUInteraction> NUInteractions_;
57 
58 };
59 
60 #endif
std::vector< NUEvent::NUParticle > NUParticles_
Definition: NUEvent.h:55
const std::vector< NUEvent::NUParticle > & theNUParticles()
Definition: NUEvent.h:43
unsigned nInteractions() const
Definition: NUEvent.h:51
Definition: NUEvent.h:6
void addNUParticle(const NUParticle &ptc)
Definition: NUEvent.h:35
std::vector< NUEvent::NUInteraction > NUInteractions_
Definition: NUEvent.h:56
void addNUInteraction(const NUInteraction &idx)
Definition: NUEvent.h:39
void reset()
Definition: NUEvent.h:11
unsigned nParticles() const
Definition: NUEvent.h:49
NUEvent()
Definition: NUEvent.h:10
const std::vector< NUEvent::NUInteraction > & theNUInteractions()
Definition: NUEvent.h:46