]>
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); |
56b1929b | 37 | AliFMD(const AliFMD& other); |
4347b38f | 38 | virtual ~AliFMD(); |
56b1929b | 39 | AliFMD& operator=(const AliFMD& other); |
4347b38f | 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(); | |
17323043 | 55 | virtual 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); | |
56b1929b | 109 | void SetSiDensity(Float_t r=2.33) { fSiDensity = r; } |
110 | void SetSiThickness(Float_t r=0.03) { fSiThickness = r; } | |
111 | void SetVA1MipRange(UShort_t r=20) { fVA1MipRange = r; } | |
112 | void SetAltroChannelSize(UShort_t s=1024) { fAltroChannelSize = s;} | |
113 | void SetSampleRate(UShort_t r=1) { fSampleRate = (r>2 ? 2 : r);} | |
4347b38f | 114 | |
115 | // Get various parameters | |
56b1929b | 116 | Int_t GetSiId() const { return (*fIdtmed)[kSiId]; } |
117 | Int_t GetAirId() const { return (*fIdtmed)[kAirId]; } | |
118 | Int_t GetPlasticId() const { return (*fIdtmed)[kPlasticId]; } | |
119 | Int_t GetPcbId() const { return (*fIdtmed)[kPcbId]; } | |
120 | Int_t GetAlId() const { return (*fIdtmed)[kAlId]; } | |
121 | Int_t GetCarbonId() const { return (*fIdtmed)[kCarbonId]; } | |
4347b38f | 122 | Int_t GetPrintboardRotationId() const { return fPrintboardRotationId; } |
56b1929b | 123 | Int_t GetShortLegId() const { return fShortLegId; } |
124 | Int_t GetLongLegId() const { return fLongLegId; } | |
125 | Double_t GetLegLength() const { return fLegLength; } | |
126 | Double_t GetLegRadius() const { return fLegRadius; } | |
127 | Double_t GetModuleSpacing() const { return fModuleSpacing; } | |
128 | Float_t GetSiDensity() const { return fSiDensity; } | |
129 | Float_t GetSiThickness() const { return fSiThickness; } | |
130 | UShort_t GetVA1MipRange() const { return fVA1MipRange; } | |
131 | UShort_t GetAltroChannelSize() const { return fAltroChannelSize; } | |
132 | UShort_t GetSampleRate() const { return fSampleRate; } | |
133 | Float_t GetEdepMip() const { | |
134 | return fSiDeDxMip * fSiDensity * fSiThickness; | |
135 | } | |
136 | ||
4347b38f | 137 | // Utility |
138 | void Browse(TBrowser* b); | |
4347b38f | 139 | enum { |
140 | kBaseDDL = 0x1000 // DDL offset for the FMD | |
141 | }; | |
142 | protected: | |
56b1929b | 143 | TClonesArray* HitsArray(); |
144 | TClonesArray* DigitsArray(); | |
145 | TClonesArray* SDigitsArray(); | |
146 | ||
4347b38f | 147 | enum { |
148 | kSiId, // ID of Si medium | |
149 | kAirId, // ID of Air medium | |
150 | kPlasticId, // ID of Plastic medium | |
151 | kPcbId, // ID of PCB medium | |
152 | kSiChipId, // ID of Si Chip medium | |
56b1929b | 153 | kAlId, // ID of Al medium |
4347b38f | 154 | kCarbonId // ID of Carbon medium |
155 | }; | |
4347b38f | 156 | |
56b1929b | 157 | AliFMDRing* fInner; // Inner ring structure |
158 | AliFMDRing* fOuter; // Outer ring structure | |
159 | AliFMDSubDetector* fFMD1; // FMD1 structure | |
160 | AliFMDSubDetector* fFMD2; // FMD2 structure | |
161 | AliFMDSubDetector* fFMD3; // FMD3 structure | |
162 | TClonesArray* fSDigits; // Summable digits | |
163 | Int_t fNsdigits; // Number of digits | |
164 | Int_t fPrintboardRotationId; // ID of Rotation of print bard | |
165 | Int_t fIdentityRotationId; // ID of identity matrix | |
166 | Int_t fShortLegId; // ID short leg volume | |
167 | Int_t fLongLegId; // ID long leg volume | |
168 | Double_t fLegLength; // Leg length | |
169 | Double_t fLegRadius; // Leg radius | |
170 | Double_t fModuleSpacing; // Staggering offset | |
171 | Float_t fSiDensity; // Density of Silicon | |
172 | Float_t fSiThickness; // Thickness of silicon wafers | |
173 | const Float_t fSiDeDxMip; // MIP dE/dx in Silicon | |
174 | UShort_t fVA1MipRange; // # MIPs the pre-amp can do | |
175 | UShort_t fAltroChannelSize; // Largest # to store in 1 ADC ch. | |
176 | UShort_t fSampleRate; // Times the ALTRO samples pre-amp. | |
4347b38f | 177 | |
56b1929b | 178 | ClassDef(AliFMD,9) // Base class FMD entry point |
fe4da5cc | 179 | }; |
dc8af42e | 180 | |
4347b38f | 181 | #endif |
182 | //____________________________________________________________________ | |
183 | // | |
0d0e6995 | 184 | // Local Variables: |
185 | // mode: C++ | |
186 | // End: | |
187 | // | |
4347b38f | 188 | // EOF |
189 | // |