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