]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMD.h
New versions of the PMD from S.Chattopadhyay.
[u/mrichter/AliRoot.git] / PMD / AliPMD.h
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   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  
41  
42 //___________________________________________
43  
44 class AliPMDhit : public AliHit {
45 public:
46   Int_t      fVolume[5];  //array of volumes
47   Float_t    fEnergy;     //Total energy deposited in eV
48 public:
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 };
73 #endif