New versions of the PMD from S.Chattopadhyay.
[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
fe4da5cc 19public:
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 virtual void Undulation(char *, Float_t, Float_t, Float_t, Float_t,
28 char (*)[5]);
29 Int_t DistancetoPrimitive(Int_t, Int_t);
30 virtual Int_t IsVersion() const =0;
31 virtual void SetPAR(Float_t, Float_t, Float_t, Float_t);
32 virtual void SetIN(Float_t, Float_t, Float_t, Float_t, Float_t);
33 virtual void SetGEO(Float_t, Float_t, Float_t);
34 virtual void SetPadSize(Float_t, Float_t, Float_t, Float_t);
35 virtual void StepManager();
36
37 ClassDef(AliPMD,1) // Base Class for Photon Multiplicity Detector
38};
39
40
fe4da5cc 41
42//___________________________________________
43
44class AliPMDhit : public AliHit {
45public:
6edc06da 46 Int_t fVolume[5]; //array of volumes
fe4da5cc 47 Float_t fEnergy; //Total energy deposited in eV
fe4da5cc 48public:
49 AliPMDhit() {}
50 AliPMDhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits);
51 AliPMDhit(AliPMDhit* oldhit) {*this=*oldhit;}
52 virtual ~AliPMDhit() {}
53 inline virtual Int_t GetVolume(Int_t i) {return fVolume[i];}
54 inline virtual Float_t GetEnergy() {return fEnergy;}
55 inline int operator == (AliPMDhit &cell) {
56 Int_t i;
57 if(fTrack!=cell.GetTrack()) return 0;
58 for (i=0; i<4; i++) if(fVolume[i]!=cell.GetVolume(i)) return 0;
59 return 1;
60 }
61 inline virtual AliPMDhit& operator + (AliPMDhit &cell) {
62 fEnergy+=cell.GetEnergy();
63 return *this;
64 }
65 virtual void Print(Option_t *) {
66 printf("PMD Cell %d %d %d %d\n Primary %d - Energy %f\n",
67 fVolume[0],fVolume[1],fVolume[2],fVolume[3],fTrack,fEnergy);
68 }
69
70
71 ClassDef(AliPMDhit,1) //Hits object for set:PMD
72};
fe4da5cc 73#endif