Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
193 | f9daq | 1 | // File : BEvent.cc |
2 | // Description : Implementation of BEvent class // |
||
3 | // Author : Ryosuke Itoh, IPNS, KEK // Date : 28 - Jan - 2004 |
||
4 | //- |
||
5 | |||
6 | #include "BEvent.h" |
||
7 | |||
8 | ClassImp(BEvent) |
||
9 | |||
10 | BEvent::BEvent() |
||
11 | { |
||
12 | m_particles = new TClonesArray ( "BParticle", 500 ); |
||
13 | m_evno = 0; |
||
14 | } |
||
15 | |||
16 | BEvent::~BEvent() |
||
17 | { |
||
18 | delete m_particles; |
||
19 | } |
||
20 | |||
21 | void BEvent::EventNo ( int evt ) |
||
22 | { |
||
23 | m_evno = evt; |
||
24 | } |
||
25 | |||
26 | int BEvent::EventNo() |
||
27 | { |
||
28 | return m_evno; |
||
29 | } |
||
30 | |||
31 | void BEvent::AddTrack ( float px, float py, float pz, float e, |
||
32 | float charge, SIMPLEPID pid ) |
||
33 | { |
||
34 | TClonesArray& particles = *m_particles; |
||
35 | new (particles[m_nprt++]) BParticle ( px, py, pz, e, charge, pid ); |
||
36 | } |
||
37 | |||
38 | int BEvent::NParticles() |
||
39 | { |
||
40 | return m_nprt; |
||
41 | } |
||
42 | |||
43 | TClonesArray* BEvent::GetParticleList () { |
||
44 | return m_particles; |
||
45 | } |
||
46 | |||
47 | void BEvent::Clear (Option_t * opt ) |
||
48 | { |
||
49 | m_particles->Clear(); |
||
50 | m_nprt = 0; |
||
51 | } |
||
52 |