changed default value for fGeVcharge
[u/mrichter/AliRoot.git] / FMD / AliFMD.h
CommitLineData
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//____________________________________________________________________
32class AliFMD : public AliDetector
33{
fe4da5cc 34public:
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);
824466d5 107 void SetLegOffset(Double_t offset=2);
4347b38f 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 };
7e54281f 142 //
143 static const Char_t* fgkShortLegName; // Format for short support legs
144 static const Char_t* fgkLongLegName; // Format for long support legs
4347b38f 145protected:
56b1929b 146 TClonesArray* HitsArray();
147 TClonesArray* DigitsArray();
148 TClonesArray* SDigitsArray();
149
4347b38f 150 enum {
151 kSiId, // ID of Si medium
152 kAirId, // ID of Air medium
153 kPlasticId, // ID of Plastic medium
154 kPcbId, // ID of PCB medium
155 kSiChipId, // ID of Si Chip medium
56b1929b 156 kAlId, // ID of Al medium
4347b38f 157 kCarbonId // ID of Carbon medium
158 };
4347b38f 159
56b1929b 160 AliFMDRing* fInner; // Inner ring structure
161 AliFMDRing* fOuter; // Outer ring structure
162 AliFMDSubDetector* fFMD1; // FMD1 structure
163 AliFMDSubDetector* fFMD2; // FMD2 structure
164 AliFMDSubDetector* fFMD3; // FMD3 structure
165 TClonesArray* fSDigits; // Summable digits
166 Int_t fNsdigits; // Number of digits
167 Int_t fPrintboardRotationId; // ID of Rotation of print bard
168 Int_t fIdentityRotationId; // ID of identity matrix
169 Int_t fShortLegId; // ID short leg volume
170 Int_t fLongLegId; // ID long leg volume
171 Double_t fLegLength; // Leg length
172 Double_t fLegRadius; // Leg radius
173 Double_t fModuleSpacing; // Staggering offset
174 Float_t fSiDensity; // Density of Silicon
175 Float_t fSiThickness; // Thickness of silicon wafers
176 const Float_t fSiDeDxMip; // MIP dE/dx in Silicon
177 UShort_t fVA1MipRange; // # MIPs the pre-amp can do
178 UShort_t fAltroChannelSize; // Largest # to store in 1 ADC ch.
179 UShort_t fSampleRate; // Times the ALTRO samples pre-amp.
7e54281f 180
56b1929b 181 ClassDef(AliFMD,9) // Base class FMD entry point
fe4da5cc 182};
dc8af42e 183
4347b38f 184#endif
185//____________________________________________________________________
186//
0d0e6995 187// Local Variables:
188// mode: C++
189// End:
190//
4347b38f 191// EOF
192//