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