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