]>
Commit | Line | Data |
---|---|---|
1 | #ifndef PMD_H | |
2 | #define PMD_H | |
3 | //////////////////////////////////////////////// | |
4 | // Manager and hits classes for set:PMD // | |
5 | //////////////////////////////////////////////// | |
6 | ||
7 | #include "AliDetector.h" | |
8 | #include "AliHit.h" | |
9 | ||
10 | ||
11 | class AliPMD : public AliDetector { | |
12 | ||
13 | protected: | |
14 | Float_t fPar[4]; // pmdin, pmdout, thgas, thcell | |
15 | Float_t fIn[5]; // thmin, thmax, zdist, thlow, thhigh | |
16 | Float_t fGeo[3]; // wafer, edge, numqu | |
17 | Float_t fPadSize[4]; // size of the pads | |
18 | Int_t fNumPads[4]; // number of the pads | |
19 | public: | |
20 | AliPMD(); | |
21 | AliPMD(const char *name, const char *title); | |
22 | virtual ~AliPMD() {} | |
23 | virtual void AddHit(Int_t, Int_t*, Float_t*); | |
24 | virtual void BuildGeometry(); | |
25 | virtual void CreateGeometry() {} | |
26 | virtual void CreateMaterials() {} | |
27 | Int_t DistancetoPrimitive(Int_t, Int_t); | |
28 | virtual Int_t IsVersion() const =0; | |
29 | virtual void SetPAR(Float_t, Float_t, Float_t, Float_t); | |
30 | virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t); | |
31 | virtual void SetGEO(Float_t, Float_t, Float_t); | |
32 | virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t); | |
33 | virtual void StepManager(); | |
34 | ||
35 | ClassDef(AliPMD,1) // Base Class for Photon Multiplicity Detector | |
36 | }; | |
37 | ||
38 | ||
39 | ||
40 | //___________________________________________ | |
41 | ||
42 | class AliPMDhit : public AliHit { | |
43 | public: | |
44 | Int_t fVolume[5]; //array of volumes | |
45 | Float_t fEnergy; //Total energy deposited in eV | |
46 | public: | |
47 | AliPMDhit() {} | |
48 | AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits); | |
49 | AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;} | |
50 | virtual ~AliPMDhit() {} | |
51 | inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];} | |
52 | inline virtual Float_t GetEnergy() {return fEnergy;} | |
53 | inline int operator == (AliPMDhit &cell) { | |
54 | Int_t i; | |
55 | if(fTrack!=cell.GetTrack()) return 0; | |
56 | for (i=0; i<4; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0; | |
57 | return 1; | |
58 | } | |
59 | inline virtual AliPMDhit& operator + (AliPMDhit &cell) { | |
60 | fEnergy+=cell.GetEnergy(); | |
61 | return *this; | |
62 | } | |
63 | virtual void Print(Option_t *) { | |
64 | printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n", | |
65 | fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy); | |
66 | } | |
67 | ||
68 | ||
69 | ClassDef(AliPMDhit,1) //Hits object for set:PMD | |
70 | }; | |
71 | #endif |