This commit was generated by cvs2svn to compensate for changes in r2,
[u/mrichter/AliRoot.git] / PMD / AliPMD.h
CommitLineData
fe4da5cc 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
11class AliPMD : public AliDetector {
12
13protected:
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
20public:
21 AliPMD();
22 AliPMD(const char *name, const char *title);
23 virtual ~AliPMD() {}
24 virtual void AddHit(Int_t, Int_t*, Float_t*);
25 virtual void BuildGeometry();
26 virtual void CreateGeometry() {}
27 virtual void CreateMaterials() {}
28 virtual void Undulation(char *, Float_t, Float_t, Float_t, Float_t,
29 char (*)[5]);
30 Int_t DistancetoPrimitive(Int_t, Int_t);
31 virtual Int_t IsVersion() const =0;
32 virtual void SetPAR(Float_t, Float_t, Float_t, Float_t);
33 virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t);
34 virtual void SetGEO(Float_t, Float_t, Float_t);
35 virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t);
36 virtual void StepManager();
37
38 ClassDef(AliPMD,1) // Base Class for Photon Multiplicity Detector
39};
40
41
42//___________________________________________
43
44class AliPMDv1 : public AliPMD {
45
46private:
47 Int_t fMedSens;
48
49public:
50 AliPMDv1();
51 AliPMDv1(const char *name, const char *title);
52 virtual ~AliPMDv1() {}
53 virtual void Coordinates();
54 virtual void Coordnew();
55 virtual void CreateGeometry();
56 virtual void CreateInside();
57 virtual void CreatePads();
58 virtual void CreateMaterials();
59 virtual void Init();
60 virtual Int_t IsVersion() const {return 1;}
61 virtual void StepManager();
62 virtual void DrawDetector();
63
64 ClassDef(AliPMDv1,1) //Hits manager for set:PMD
65};
66
67
68//___________________________________________
69
70class AliPMDhit : public AliHit {
71public:
72 Int_t fVolume[4]; //array of volumes
73 Float_t fEnergy; //Total energy deposited in eV
74
75public:
76 AliPMDhit() {}
77 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
78 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
79 virtual ~AliPMDhit() {}
80 inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
81 inline virtual Float_t GetEnergy() {return fEnergy;}
82 inline int operator == (AliPMDhit &cell) {
83 Int_t i;
84 if(fTrack!=cell.GetTrack()) return 0;
85 for (i=0; i<4; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
86 return 1;
87 }
88 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
89 fEnergy+=cell.GetEnergy();
90 return *this;
91 }
92 virtual void Print(Option_t *) {
93 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
94 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
95 }
96
97
98 ClassDef(AliPMDhit,1) //Hits object for set:PMD
99};
100
101#endif