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:
11  virtual ~NUEvent() {}
12  void reset() {
13  NUParticles_.clear();
14  NUInteractions_.clear();
15  NParticles_ = 0;
16  NInteractions_ = 0;
17  }
18 
19  class NUParticle {
20  public:
21  NUParticle() : px(0.), py(0.), pz(0.),mass(0.),id(0) {}
22  virtual ~NUParticle() {}
23  float px;
24  float py;
25  float pz;
26  float mass;
27  int id;
28  };
29 
30 
31  class NUInteraction {
32  public:
33  NUInteraction() : first(0), last(0) {}
34  virtual ~NUInteraction() {}
35  unsigned first;
36  unsigned last;
37  };
38 
39 
40  void addNUParticle( const NUParticle& ptc ) {
41  NUParticles_.push_back(ptc);
42  ++NParticles_;
43  }
44 
45  void addNUInteraction( const NUInteraction& idx ) {
46  NUInteractions_.push_back(idx);
48  }
49 
50  const std::vector<NUEvent::NUParticle>& theNUParticles()
51  {return NUParticles_;}
52 
53  const std::vector<NUEvent::NUInteraction>& theNUInteractions()
54  {return NUInteractions_;}
55 
56  const unsigned nParticles() const { return NParticles_; }
57 
58  const unsigned nInteractions() const { return NInteractions_; }
59 
60  private:
61 
62  std::vector<NUEvent::NUParticle> NUParticles_;
63  std::vector<NUEvent::NUInteraction> NUInteractions_;
64  unsigned NParticles_;
65  unsigned NInteractions_;
66 
67 };
68 
69 #endif
std::vector< NUEvent::NUParticle > NUParticles_
Definition: NUEvent.h:62
unsigned NInteractions_
Definition: NUEvent.h:65
const std::vector< NUEvent::NUParticle > & theNUParticles()
Definition: NUEvent.h:50
Definition: NUEvent.h:6
void addNUParticle(const NUParticle &ptc)
Definition: NUEvent.h:40
virtual ~NUEvent()
Definition: NUEvent.h:11
std::vector< NUEvent::NUInteraction > NUInteractions_
Definition: NUEvent.h:63
virtual ~NUParticle()
Definition: NUEvent.h:22
void addNUInteraction(const NUInteraction &idx)
Definition: NUEvent.h:45
void reset()
Definition: NUEvent.h:12
virtual ~NUInteraction()
Definition: NUEvent.h:34
const unsigned nParticles() const
Definition: NUEvent.h:56
unsigned NParticles_
Definition: NUEvent.h:64
const unsigned nInteractions() const
Definition: NUEvent.h:58
NUEvent()
Definition: NUEvent.h:10
const std::vector< NUEvent::NUInteraction > & theNUInteractions()
Definition: NUEvent.h:53