]>
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 | ||
e980662a | 13 | #include "AliVerbose.h" |
14 | #include "AliParticleGunMessenger.h" | |
15 | ||
676fb573 | 16 | #include <G4VPrimaryGenerator.hh> |
676fb573 | 17 | #include <globals.hh> |
ad42298e | 18 | #include <g4std/vector> |
676fb573 | 19 | |
676fb573 | 20 | |
c97337f9 | 21 | class AliGunParticle; |
676fb573 | 22 | |
c97337f9 | 23 | class G4Event; |
24 | ||
e980662a | 25 | class AliParticleGun : public G4VPrimaryGenerator, |
26 | public AliVerbose | |
676fb573 | 27 | { |
ad42298e | 28 | typedef G4std::vector<AliGunParticle*> GunParticleVector; |
29 | typedef GunParticleVector::iterator GunParticleIterator; | |
30 | typedef GunParticleVector::const_iterator GunParticleConstIterator; | |
676fb573 | 31 | |
32 | public: | |
33 | AliParticleGun(); | |
34 | AliParticleGun(const AliParticleGun &right); | |
35 | virtual ~AliParticleGun(); | |
36 | ||
37 | // operators | |
38 | AliParticleGun& operator=(const AliParticleGun& right); | |
39 | ||
40 | // methods | |
41 | void AddParticle(AliGunParticle* particle); | |
42 | void RemoveParticle(G4int iParticle); | |
43 | virtual void GeneratePrimaryVertex(G4Event* evt); | |
44 | void Reset(); | |
45 | void List(); | |
46 | ||
47 | // get methods | |
48 | G4int GetNofGunParticles() const; | |
49 | ||
50 | private: | |
51 | // data members | |
ad42298e | 52 | GunParticleVector fGunParticleVector; //vector of AliGunParticle |
53 | AliParticleGunMessenger fMessenger; //messenger | |
676fb573 | 54 | }; |
55 | ||
56 | // inline methods | |
57 | ||
58 | inline G4int AliParticleGun::GetNofGunParticles() const | |
ad42298e | 59 | { return fGunParticleVector.size(); } |
676fb573 | 60 | |
61 | #endif //ALI_PARTICLE_GUN_H | |
62 | ||
63 | ||
64 | ||
65 | ||
66 | ||
67 | ||
68 |