1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#ifndef FastSimulation_MaterialEffects_NUEvent_h
#define FastSimulation_MaterialEffects_NUEvent_h
#include <vector>
class NUEvent {
public:
NUEvent() {}
void reset() {
NUParticles_.clear();
NUInteractions_.clear();
}
class NUParticle {
public:
NUParticle() : px(0.), py(0.), pz(0.), mass(0.), id(0) {}
float px;
float py;
float pz;
float mass;
int id;
};
class NUInteraction {
public:
NUInteraction() : first(0), last(0) {}
unsigned first;
unsigned last;
};
void addNUParticle(const NUParticle& ptc) { NUParticles_.push_back(ptc); }
void addNUInteraction(const NUInteraction& idx) { NUInteractions_.push_back(idx); }
const std::vector<NUEvent::NUParticle>& theNUParticles() { return NUParticles_; }
const std::vector<NUEvent::NUInteraction>& theNUInteractions() { return NUInteractions_; }
unsigned nParticles() const { return NUParticles_.size(); }
unsigned nInteractions() const { return NUInteractions_.size(); }
private:
std::vector<NUEvent::NUParticle> NUParticles_;
std::vector<NUEvent::NUInteraction> NUInteractions_;
};
#endif
|