CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups 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 public:
8  NUEvent() {}
9  void reset() {
10  NUParticles_.clear();
11  NUInteractions_.clear();
12  }
13 
14  class NUParticle {
15  public:
16  NUParticle() : 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 NUInteraction {
25  public:
26  NUInteraction() : first(0), last(0) {}
27  unsigned first;
28  unsigned last;
29  };
30 
31  void addNUParticle(const NUParticle& ptc) { NUParticles_.push_back(ptc); }
32 
33  void addNUInteraction(const NUInteraction& idx) { NUInteractions_.push_back(idx); }
34 
35  const std::vector<NUEvent::NUParticle>& theNUParticles() { return NUParticles_; }
36 
37  const std::vector<NUEvent::NUInteraction>& theNUInteractions() { return NUInteractions_; }
38 
39  unsigned nParticles() const { return NUParticles_.size(); }
40 
41  unsigned nInteractions() const { return NUInteractions_.size(); }
42 
43 private:
44  std::vector<NUEvent::NUParticle> NUParticles_;
45  std::vector<NUEvent::NUInteraction> NUInteractions_;
46 };
47 
48 #endif
std::vector< NUEvent::NUParticle > NUParticles_
Definition: NUEvent.h:44
const std::vector< NUEvent::NUParticle > & theNUParticles()
Definition: NUEvent.h:35
unsigned nInteractions() const
Definition: NUEvent.h:41
Definition: NUEvent.h:6
void addNUParticle(const NUParticle &ptc)
Definition: NUEvent.h:31
std::vector< NUEvent::NUInteraction > NUInteractions_
Definition: NUEvent.h:45
void addNUInteraction(const NUInteraction &idx)
Definition: NUEvent.h:33
void reset()
Definition: NUEvent.h:9
unsigned nParticles() const
Definition: NUEvent.h:39
NUEvent()
Definition: NUEvent.h:8
const std::vector< NUEvent::NUInteraction > & theNUInteractions()
Definition: NUEvent.h:37