]>
Commit | Line | Data |
---|---|---|
676fb573 | 1 | // $Id$ |
2 | // Category: event | |
3 | // | |
4 | // Particle gun that can be interactively composed by a user. | |
5 | ||
6 | #ifndef ALI_PARTICLE_GUN_H | |
7 | #define ALI_PARTICLE_GUN_H | |
8 | ||
676fb573 | 9 | #include <G4VPrimaryGenerator.hh> |
676fb573 | 10 | #include <globals.hh> |
11 | ||
12 | #include <g4rw/tpordvec.h> | |
13 | ||
c97337f9 | 14 | class AliGunParticle; |
676fb573 | 15 | class AliParticleGunMessenger; |
16 | ||
c97337f9 | 17 | class G4Event; |
18 | ||
676fb573 | 19 | class AliParticleGun : public G4VPrimaryGenerator |
20 | { | |
21 | typedef G4RWTPtrOrderedVector<AliGunParticle> AliGunParticleVector; | |
22 | ||
23 | public: | |
24 | AliParticleGun(); | |
25 | AliParticleGun(const AliParticleGun &right); | |
26 | virtual ~AliParticleGun(); | |
27 | ||
28 | // operators | |
29 | AliParticleGun& operator=(const AliParticleGun& right); | |
30 | ||
31 | // methods | |
32 | void AddParticle(AliGunParticle* particle); | |
33 | void RemoveParticle(G4int iParticle); | |
34 | virtual void GeneratePrimaryVertex(G4Event* evt); | |
35 | void Reset(); | |
36 | void List(); | |
37 | ||
38 | // get methods | |
39 | G4int GetNofGunParticles() const; | |
40 | ||
41 | private: | |
42 | // data members | |
43 | AliGunParticleVector fGunParticlesVector; //vector of AliGunParticle | |
44 | AliParticleGunMessenger* fMessenger; //messenger | |
45 | }; | |
46 | ||
47 | // inline methods | |
48 | ||
49 | inline G4int AliParticleGun::GetNofGunParticles() const | |
50 | { return fGunParticlesVector.entries(); } | |
51 | ||
52 | #endif //ALI_PARTICLE_GUN_H | |
53 | ||
54 | ||
55 | ||
56 | ||
57 | ||
58 | ||
59 |