fe4da5cc |
1 | #ifndef RICH_H |
2 | #define RICH_H |
3 | //////////////////////////////////////////////// |
4 | // Manager and hits classes for set:RICH // |
5 | //////////////////////////////////////////////// |
6 | |
7 | #include "AliDetector.h" |
8 | #include "AliHit.h" |
9 | |
10 | class AliRICH : public AliDetector { |
11 | |
12 | protected: |
13 | Int_t fNmips; //Number of mips in RICH |
14 | Int_t fNckovs; //Number of cerenkovs in RICH |
15 | Int_t fNpadhits; //Number of pad hits in RICH |
16 | |
17 | TClonesArray *fMips; //List of mips |
18 | TClonesArray *fCkovs; //List of cerenkovs |
19 | TClonesArray *fPadhits; //List of Padhits |
20 | |
21 | Float_t fChslope; //Charge slope |
22 | Float_t fAlphaFeed; //Feed-back coefficient |
23 | Float_t fSxcharge; //Charge slope along x |
24 | Int_t fIritri; //Trigger flag |
25 | |
26 | public: |
27 | AliRICH(); |
28 | AliRICH(const char *name, const char *title); |
29 | virtual ~AliRICH(); |
30 | virtual void AddHit(Int_t, Int_t*, Float_t*); |
31 | virtual void AddMipHit(Int_t, Int_t*, Float_t*); |
32 | virtual void AddCkovHit(Int_t, Int_t*, Float_t*); |
33 | virtual void AddPadHit(Int_t, Int_t*, Float_t*); |
34 | virtual void BuildGeometry(); |
35 | virtual void CreateGeometry() {} |
36 | virtual void CreateMaterials() {} |
37 | Int_t DistancetoPrimitive(Int_t px, Int_t py); |
38 | inline virtual int GetNmips() {return fNmips;} |
39 | inline virtual int GetNckovs() {return fNckovs;} |
40 | inline virtual int GetNpadhits() {return fNpadhits;} |
41 | virtual Int_t IsVersion() const =0; |
42 | virtual void Init(); |
43 | inline TClonesArray *Mips() {return fMips;} |
44 | inline TClonesArray *Ckovs() {return fCkovs;} |
45 | inline TClonesArray *Padhits() {return fPadhits;} |
46 | void FinishEvent(void){;} |
47 | virtual void MakeBranch(Option_t *); |
48 | void SetTreeAddress(void); |
49 | virtual void StepManager(); |
50 | virtual void PreTrack(); |
51 | |
52 | virtual void SetSP(Float_t chslope){ fChslope=chslope;} |
53 | virtual void SetFEED(Float_t alphafeed){fAlphaFeed=alphafeed;} |
54 | virtual void SetSIGM(Float_t sxcharge){fSxcharge=sxcharge;} |
55 | virtual void SetTRIG(Int_t iritri) {fIritri=iritri;} |
56 | virtual void ResetHits(); |
57 | virtual void UpdateMipHit(Float_t*); |
58 | virtual void RichIntegration(); |
59 | virtual void AnodicWires(Float_t &); |
60 | virtual void GetChargeMip(Float_t &); |
61 | virtual void GetCharge(Float_t &); |
62 | virtual void FeedBack(Float_t *, Float_t ); |
63 | virtual Float_t FMathieson(Float_t , Float_t ); |
64 | |
65 | ClassDef(AliRICH,1) // Base class for RICH |
66 | }; |
67 | |
68 | class AliRICHv1 : public AliRICH { |
69 | |
70 | public: |
71 | AliRICHv1(); |
72 | AliRICHv1(const char *name, const char *title); |
73 | virtual ~AliRICHv1(); |
74 | virtual void CreateGeometry(); |
75 | virtual void CreateMaterials(); |
76 | virtual Int_t IsVersion() const {return 1;} |
860ec329 |
77 | virtual void DrawModule(); |
fe4da5cc |
78 | |
79 | |
80 | ClassDef(AliRICHv1,1) // RICH version 1 |
81 | }; |
82 | |
83 | //_____________________________________________________________________________ |
84 | class AliRICHhit: public AliHit { |
85 | public: |
86 | Int_t fVolume[2]; //array of volumes |
87 | |
88 | //Pad informations |
89 | Int_t fFirstpad; //First index in padhits |
90 | Int_t fLastpad; //Last index in padhits |
91 | |
92 | //Hit information |
93 | Int_t fModule; //Module number |
94 | Float_t fTheta; //Theta of the particle generating the hit |
95 | |
96 | Float_t fArrivaltime;// Time of hit. |
97 | Int_t fPart; //Particle type |
98 | |
99 | // we don't know what is this for : |
100 | Int_t fFeed; //Type of feedback (origin of charge deposition) |
101 | |
102 | public: |
103 | AliRICHhit() {} |
104 | AliRICHhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits, |
105 | Int_t fNpadhits); |
106 | virtual ~AliRICHhit(){} |
107 | |
108 | void SetLastpad(Int_t lastpad){fLastpad=lastpad;} |
109 | |
110 | ClassDef(AliRICHhit,1) // Hits for set RICH |
111 | }; |
112 | |
113 | //_____________________________________________________________________________ |
114 | class AliRICHmip: public AliRICHhit |
115 | { |
116 | public: |
117 | // Hit information keep |
118 | Float_t fPhi; //Phi of the particle generating the hit |
119 | Float_t fPs; //Momentum of the particle generating the hit |
120 | Float_t fQ; //Charge of the particle |
121 | |
122 | // Generated cerenkov information (Z of generation stored in fZ of AliHit) |
123 | Int_t fFirstCkov; //Index in the ckov TcloneArray of the first generated |
124 | Int_t fLastCkov; //Here the last. |
125 | |
126 | public: |
127 | AliRICHmip() {} |
128 | AliRICHmip(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits, |
129 | Int_t fNckovs, Int_t fNpadhits); |
130 | virtual ~AliRICHmip() {} |
131 | |
132 | Float_t GetZ() { return fZ;} |
133 | void SetX(Float_t x) { fX = x; } |
134 | void SetY(Float_t y) { fY = y; } |
135 | void SetZ(Float_t z) { fZ = z; } |
136 | void SetLastCkov(Int_t last){ fLastCkov = last; } |
137 | void SetModule(Int_t module){ fModule = module;} |
138 | void SetTheta(Float_t theta){ fTheta = theta; } |
139 | void SetPhi(Float_t phi) { fPhi = phi; } |
140 | |
141 | ClassDef(AliRICHmip,1) //Mip hits for RICH |
142 | }; |
143 | |
144 | //_____________________________________________________________________________ |
145 | class AliRICHckov: public AliRICHhit |
146 | { |
147 | public: |
148 | // Hit information keep |
149 | Float_t fEnergy; //Photon energy |
150 | Int_t fStop; //Stop mechanism (cut, threshold, ...) |
151 | |
152 | //Parent info |
153 | Int_t fParent; //Index in array of mips of parent which generatethis |
154 | public: |
155 | AliRICHckov() {} |
156 | AliRICHckov(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits, |
157 | Int_t fNmips, Int_t fNpadhits); |
158 | virtual ~AliRICHckov() {} |
159 | |
160 | ClassDef(AliRICHckov,1) //Cerenkov hits for RICH |
161 | }; |
162 | |
163 | //_____________________________________________________________________________ |
164 | class AliRICHpadhit: public AliHit |
165 | { |
166 | public: |
167 | Int_t fVolume[2]; //array of volumes |
168 | |
169 | // Hit information |
170 | Int_t fX; //Integer x position in pad |
171 | Int_t fY; //Integer y position in pad |
172 | Int_t fModule; //Module number |
173 | // Particle info |
174 | Int_t fParentMip; //Parent particle |
175 | Int_t fParentCkov; //Parent CKOV |
176 | // physics info |
177 | Int_t fProd; //Production mechanism |
178 | Float_t fCharge; //Charge deposited |
179 | |
180 | public: |
181 | AliRICHpadhit(){} |
182 | AliRICHpadhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits, |
183 | Int_t fNmips,Int_t fNckovs); |
184 | virtual ~AliRICHpadhit() {} |
185 | |
186 | ClassDef(AliRICHpadhit,1) //Pad hits for RICH |
187 | }; |
188 | |
189 | #endif |
190 | |
191 | |
192 | |