]>
Commit | Line | Data |
---|---|---|
d28dcc0d | 1 | #ifndef ALIFMD_H |
2 | #define ALIFMD_H | |
4347b38f | 3 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights |
4 | * reserved. | |
5 | * | |
6 | * Latest changes by Christian Holm Christensen <cholm@nbi.dk> | |
7 | * | |
8 | * See cxx source for full Copyright notice | |
9 | */ | |
3da30618 | 10 | |
37c4363a | 11 | //____________________________________________________________________ |
12 | // | |
13 | // Manager class for the FMD - Base class. | |
14 | // | |
4347b38f | 15 | #ifndef ALIDETECTOR_H |
16 | # include <AliDetector.h> | |
17 | #endif | |
18 | #ifndef ALIFMDSUBDETECTOR_H | |
19 | # include "AliFMDSubDetector.h" | |
20 | #endif | |
21 | #ifndef ALIFMDRING_H | |
22 | # include "AliFMDRing.h" | |
23 | #endif | |
24 | #ifndef ROOT_TBranch | |
25 | # include <TBranch.h> | |
26 | #endif | |
27 | #ifndef ROOT_TArrayI | |
28 | # include <TArrayI.h> | |
29 | #endif | |
30 | ||
31 | //____________________________________________________________________ | |
32 | class AliFMD : public AliDetector | |
33 | { | |
fe4da5cc | 34 | public: |
35 | AliFMD(); | |
4347b38f | 36 | AliFMD(const char *name, const char *title, bool detailed); |
37 | AliFMD(const AliFMD& FMD) : AliDetector(FMD) {} //copy ctor | |
38 | virtual ~AliFMD(); | |
39 | AliFMD& operator=(const AliFMD&) {return *this;} | |
40 | ||
41 | // GEometry ANd Tracking (GEANT :-) | |
42 | virtual void CreateGeometry(); | |
43 | virtual void CreateMaterials(); | |
fe4da5cc | 44 | virtual void Init(); |
4347b38f | 45 | virtual void StepManager() = 0; |
46 | AliFMDSubDetector* GetFMD1() const { return fFMD1; } | |
47 | AliFMDSubDetector* GetFMD2() const { return fFMD2; } | |
48 | AliFMDSubDetector* GetFMD3() const { return fFMD3; } | |
49 | AliFMDRing* GetInner() const { return fInner; } | |
50 | AliFMDRing* GetOuter() const { return fOuter; } | |
58d6a713 | 51 | |
4347b38f | 52 | // Graphics and event display |
53 | virtual void BuildGeometry(); | |
54 | virtual void DrawDetector(); | |
55 | virtual const Int_t DistanceToPrimitive(Int_t px, Int_t py); | |
3d44ce66 | 56 | |
4347b38f | 57 | // Hit and digit management |
58 | virtual void MakeBranch(Option_t *opt=" "); | |
59 | virtual void SetHitsAddressBranch(TBranch *b); | |
60 | virtual void SetTreeAddress(); | |
61 | virtual TClonesArray* SDigits() { return fSDigits; } | |
62 | virtual void ResetSDigits(); | |
63 | virtual void AddHit(Int_t track, Int_t *vol, Float_t *hits); | |
64 | virtual void AddHit(Int_t track, | |
65 | UShort_t detector, | |
66 | Char_t ring, | |
67 | UShort_t sector, | |
68 | UShort_t strip, | |
69 | Float_t x=0, | |
70 | Float_t y=0, | |
71 | Float_t z=0, | |
72 | Float_t px=0, | |
73 | Float_t py=0, | |
74 | Float_t pz=0, | |
75 | Float_t edep=0, | |
76 | Int_t pdg=0, | |
77 | Float_t t=0); | |
78 | virtual void AddDigit(Int_t *digits); | |
79 | virtual void AddDigit(UShort_t detector=0, | |
80 | Char_t ring='\0', | |
81 | UShort_t sector=0, | |
82 | UShort_t strip=0, | |
83 | UShort_t count1=0, | |
84 | Short_t count2=-1, | |
85 | Short_t count3=-1); | |
86 | virtual void AddSDigit(Int_t *digits); | |
87 | virtual void AddSDigit(UShort_t detector=0, | |
88 | Char_t ring='\0', | |
89 | UShort_t sector=0, | |
90 | UShort_t strip=0, | |
91 | Float_t edep=0, | |
92 | UShort_t count1=0, | |
93 | Short_t count2=-1, | |
94 | Short_t count3=-1); | |
95 | ||
96 | // Digitisation | |
c92eb8ad | 97 | virtual AliDigitizer* CreateDigitizer(AliRunDigitizer* manager) const; |
4347b38f | 98 | virtual void Hits2Digits(); |
99 | virtual void Hits2SDigits(); | |
100 | ||
101 | // Raw data | |
102 | virtual void Digits2Raw(); | |
103 | ||
104 | // Set various parameters | |
105 | void SetLegLength(Double_t length=1); | |
106 | void SetLegRadius(Double_t radius=.5); | |
107 | void SetLegOffset(Double_t offset=.5); | |
108 | void SetModuleSpacing(Double_t spacing=1); | |
109 | ||
110 | // Get various parameters | |
111 | Int_t GetSiId() const { return (*fIdtmed)[kSiId]; } | |
112 | Int_t GetAirId() const { return (*fIdtmed)[kAirId]; } | |
113 | Int_t GetPlasticId() const { return (*fIdtmed)[kPlasticId]; } | |
114 | Int_t GetPcbId() const { return (*fIdtmed)[kPcbId]; } | |
115 | Int_t GetKaptionId() const { return (*fIdtmed)[kKaptionId]; } | |
116 | Int_t GetCarbonId() const { return (*fIdtmed)[kCarbonId]; } | |
117 | Int_t GetPrintboardRotationId() const { return fPrintboardRotationId; } | |
118 | Int_t GetShortLegId() const { return fShortLegId; } | |
119 | Int_t GetLongLegId() const { return fLongLegId; } | |
120 | Double_t GetLegLength() const { return fLegLength; } | |
121 | Double_t GetLegRadius() const { return fLegRadius; } | |
122 | Double_t GetModuleSpacing() const { return fModuleSpacing; } | |
dc8af42e | 123 | |
4347b38f | 124 | // Utility |
125 | void Browse(TBrowser* b); | |
126 | Float_t GetSiDensity() const { return fSiDensity; } | |
127 | enum { | |
128 | kBaseDDL = 0x1000 // DDL offset for the FMD | |
129 | }; | |
130 | protected: | |
131 | enum { | |
132 | kSiId, // ID of Si medium | |
133 | kAirId, // ID of Air medium | |
134 | kPlasticId, // ID of Plastic medium | |
135 | kPcbId, // ID of PCB medium | |
136 | kSiChipId, // ID of Si Chip medium | |
137 | kKaptionId, // ID of Kaption medium | |
138 | kCarbonId // ID of Carbon medium | |
139 | }; | |
37c55dc0 | 140 | |
4347b38f | 141 | void SetSiDensity(Float_t r=2.33) { fSiDensity = r; } |
142 | TClonesArray* HitsArray(); | |
143 | TClonesArray* DigitsArray(); | |
144 | TClonesArray* SDigitsArray(); | |
145 | ||
146 | AliFMDRing* fInner; // Inner ring structure | |
147 | AliFMDRing* fOuter; // Outer ring structure | |
148 | AliFMDSubDetector* fFMD1; // FMD1 structure | |
149 | AliFMDSubDetector* fFMD2; // FMD2 structure | |
150 | AliFMDSubDetector* fFMD3; // FMD3 structure | |
37c55dc0 | 151 | |
4347b38f | 152 | TClonesArray* fSDigits; |
153 | Int_t fNsdigits; | |
154 | ||
155 | Float_t fSiDensity; // Density of Silicon | |
156 | Int_t fPrintboardRotationId; // ID of Rotation of print bard | |
157 | Int_t fIdentityRotationId; // ID of identity matrix | |
158 | Int_t fShortLegId; // ID short leg volume | |
159 | Int_t fLongLegId; // ID long leg volume | |
160 | Double_t fLegLength; // Leg length | |
161 | Double_t fLegRadius; // Leg radius | |
162 | Double_t fModuleSpacing; // Staggering offset | |
163 | ||
164 | ClassDef(AliFMD,8) // Base class FMD entry point | |
fe4da5cc | 165 | }; |
dc8af42e | 166 | |
4347b38f | 167 | #endif |
168 | //____________________________________________________________________ | |
169 | // | |
0d0e6995 | 170 | // Local Variables: |
171 | // mode: C++ | |
172 | // End: | |
173 | // | |
4347b38f | 174 | // EOF |
175 | // |