2f614988 |
1 | #ifndef AliRICH_h |
2 | #define AliRICH_h |
2e5f0f7b |
3 | |
3da30618 |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * |
5 | * See cxx source for full Copyright notice */ |
6 | |
c11ee6f0 |
7 | #include <TObjArray.h> |
853634d3 |
8 | #include <TClonesArray.h> |
c021cb15 |
9 | #include <TLorentzVector.h> |
c11ee6f0 |
10 | #include <AliDetector.h> |
853634d3 |
11 | #include <AliHit.h> |
12 | #include <AliDigit.h> |
dfb4e77d |
13 | #include "AliRICHConst.h" |
14 | #include "AliRICHChamber.h" |
853634d3 |
15 | |
c60862bf |
16 | #include "AliRICHDigit.h" |
17 | #include "AliRICHSDigit.h" |
18 | |
2e5f0f7b |
19 | class AliRICHRawCluster; |
a4622d0f |
20 | class AliRICHRecHit1D; |
21 | class AliRICHRecHit3D; |
853634d3 |
22 | |
c021cb15 |
23 | //__________________AliRICHhit______________________________________________________________________ |
24 | //__________________________________________________________________________________________________ |
25 | //__________________________________________________________________________________________________ |
853634d3 |
26 | class AliRICHhit : public AliHit |
27 | { |
28 | public: |
29 | inline AliRICHhit(); |
30 | inline AliRICHhit(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *hits); |
c021cb15 |
31 | inline AliRICHhit(Int_t track,Int_t iPID,Int_t iChamber,TLorentzVector x4,Float_t eloss); |
853634d3 |
32 | virtual ~AliRICHhit() {;} |
33 | |
c60862bf |
34 | Int_t C() {return fChamber;} |
853634d3 |
35 | Int_t Chamber() {return fChamber;} |
c60862bf |
36 | Int_t Pid() {return fPid;} |
37 | Int_t Particle() {return fPid;} |
853634d3 |
38 | Float_t Theta() {return fTheta;} |
39 | Float_t Phi() {return fPhi;} |
40 | Float_t Tlength() {return fTlength;} |
41 | Float_t Eloss() {return fEloss;} |
42 | Float_t Loss() {return fLoss;} |
c021cb15 |
43 | Float_t PHfirst() {return fPHfirst;} |
44 | Float_t PHlast() {return fPHlast;} |
853634d3 |
45 | Float_t MomX() {return fMomX;} |
46 | Float_t MomY() {return fMomY;} |
47 | Float_t MomZ() {return fMomZ;} |
48 | Float_t CerenkovAngle() {return fMomX;} |
49 | Float_t MomFreoX() {return fMomX;} |
50 | Float_t MomFreoY() {return fMomY;} |
51 | Float_t MomFreoZ() {return fMomZ;} |
c60862bf |
52 | void Print(Option_t *option)const; //virtual |
853634d3 |
53 | protected: |
c021cb15 |
54 | Int_t fChamber; //chamber number |
c60862bf |
55 | Int_t fPid; //particle code |
c021cb15 |
56 | Float_t fTheta,fPhi ; //incident theta phi angles in degrees |
57 | Float_t fTlength; //track length inside the chamber |
58 | Float_t fEloss; //ionisation energy loss in gas |
59 | Float_t fPHfirst; //first padhit |
60 | Float_t fPHlast; //last padhit |
61 | Float_t fLoss; // did it hit the freon? |
62 | Float_t fMomX,fMomY,fMomZ; //momentum at photochatode entry point |
63 | Float_t fNPads; // Pads hit |
64 | Float_t fCerenkovAngle; // Dummy cerenkov angle |
65 | Float_t fMomFreoX,fMomFreoY,fMomFreoZ; //momentum at freon entry point |
66 | ClassDef(AliRICHhit,1) //RICH hit class |
853634d3 |
67 | };//class AliRICHhit |
c021cb15 |
68 | |
69 | //__________________________________________________________________________________________________ |
853634d3 |
70 | AliRICHhit::AliRICHhit() |
71 | :AliHit() |
72 | {//default ctor |
c60862bf |
73 | fChamber=fPid=kBad; |
c021cb15 |
74 | fTheta=fPhi=fTlength=fEloss=fPHfirst=fPHlast=fLoss=kBad; |
75 | fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=fMomFreoX=fMomFreoY=fMomFreoZ=kBad; |
853634d3 |
76 | }//AliRICHhit::default ctor |
c021cb15 |
77 | //__________________________________________________________________________________________________ |
78 | AliRICHhit::AliRICHhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hit): |
853634d3 |
79 | AliHit(shunt, track) |
80 | {//ctor |
81 | fChamber=vol[0]; |
c60862bf |
82 | fPid=(Int_t)hit[0]; |
c021cb15 |
83 | fX=hit[1];fY=hit[2];fZ=hit[3]; |
84 | fTheta=hit[4];fPhi=hit[5]; |
85 | fTlength=hit[6]; |
86 | fEloss=hit[7]; |
87 | fPHfirst=(Int_t)hit[8]; |
88 | fPHlast=(Int_t)hit[9]; |
89 | fLoss=hit[13]; |
90 | fMomX=hit[14];fMomY=hit[15];fMomZ=hit[16]; |
91 | fNPads=hit[17]; |
92 | fCerenkovAngle=hit[18]; |
93 | fMomFreoX=hit[19];fMomFreoY=hit[20];fMomFreoZ=hit[21]; |
94 | }//AliRICHhit::ctor |
95 | //__________________________________________________________________________________________________ |
96 | AliRICHhit::AliRICHhit(Int_t track,Int_t iPID,Int_t iChamber,TLorentzVector x4,Float_t eloss): |
97 | AliHit(0, track) |
98 | {//ctor |
99 | fChamber=iChamber; |
c60862bf |
100 | fPid=iPID; |
c021cb15 |
101 | fX=x4.X();fY=x4.Y();fZ=x4.Z(); |
102 | fEloss=eloss; |
853634d3 |
103 | }//AliRICHhit::ctor |
c021cb15 |
104 | |
105 | //__________________AliRICHCerenkov_________________________________________________________________ |
106 | //__________________________________________________________________________________________________ |
107 | //__________________________________________________________________________________________________ |
853634d3 |
108 | class AliRICHCerenkov: public AliHit |
109 | { |
110 | public: |
111 | inline AliRICHCerenkov(); |
112 | inline AliRICHCerenkov(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *Cerenkovs); |
113 | virtual ~AliRICHCerenkov() {;} |
114 | public: |
c021cb15 |
115 | Int_t fChamber; //chamber number |
116 | Float_t fTheta,fPhi; //incident theta phi angles in degrees |
117 | Float_t fTlength; //track length inside the chamber |
118 | Float_t fEloss; //ionisation energy loss in gas |
119 | Int_t fPHfirst; //first padhit |
120 | Int_t fPHlast; //last padhit |
121 | Int_t fCMother; //index of mother particle |
122 | Float_t fLoss; //nature of particle loss |
123 | Float_t fIndex; //index of photon |
124 | Float_t fProduction; //point of production |
125 | Float_t fMomX,fMomY,fMomZ; //local Momentum |
853634d3 |
126 | Float_t fNPads; // Pads hit |
127 | Float_t fCerenkovAngle; // Cerenkov Angle |
128 | |
129 | ClassDef(AliRICHCerenkov,1) //RICH cerenkov class |
130 | };//class AliRICHCerenkov |
c021cb15 |
131 | |
132 | //__________________________________________________________________________________________________ |
853634d3 |
133 | AliRICHCerenkov::AliRICHCerenkov() |
134 | {//ctor |
c021cb15 |
135 | fChamber=kBad; |
136 | fX=fY=fZ=fTheta=fPhi=fTlength=fEloss=kBad; |
137 | fPHfirst=fPHlast=fCMother=kBad; |
138 | fLoss=fIndex=fProduction=fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=kBad; |
853634d3 |
139 | }//AliRICHCerenkov::ctor |
c021cb15 |
140 | //__________________________________________________________________________________________________ |
853634d3 |
141 | AliRICHCerenkov::AliRICHCerenkov(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits) |
142 | :AliHit(shunt, track) |
143 | {//ctor |
144 | fChamber=vol[0]; |
c021cb15 |
145 | fX=hits[1];fY=hits[2];fZ=hits[3]; |
146 | fTheta=hits[4];fPhi=hits[5]; |
853634d3 |
147 | fTlength=hits[6]; |
148 | fEloss=hits[7]; |
c021cb15 |
149 | fPHfirst=(Int_t)hits[8];fPHlast=(Int_t)hits[9]; |
853634d3 |
150 | fCMother=Int_t(hits[10]); |
151 | fIndex = hits[11]; |
152 | fProduction = hits[12]; |
153 | fLoss=hits[13]; |
c021cb15 |
154 | fMomX=hits[14];fMomY=hits[15];fMomZ=hits[16]; |
853634d3 |
155 | fNPads=hits[17]; |
156 | fCerenkovAngle=hits[18]; |
157 | }//AliRICHCerenkov::ctor |
c021cb15 |
158 | |
159 | //__________________AliRICHdigit____________________________________________________________________ |
160 | //__________________________________________________________________________________________________ |
161 | //__________________________________________________________________________________________________ |
853634d3 |
162 | class AliRICHdigit :public AliDigit |
163 | { |
164 | public: |
c60862bf |
165 | AliRICHdigit() {fPadX=fPadY=fChamber=fQdc=fTracks[0]=fTracks[1]=fTracks[2]=kBad;} |
166 | inline AliRICHdigit(Int_t iC,Int_t iX,Int_t iY,Int_t iQdc,Int_t iT1,Int_t iT2,Int_t iT3); |
853634d3 |
167 | virtual ~AliRICHdigit() {;} |
c60862bf |
168 | inline Int_t Compare(const TObject *pObj) const;//virtual |
169 | Bool_t IsSortable() const{return kTRUE;}//virtual |
170 | Int_t C() const{return fChamber;} |
171 | Int_t X() const{return fPadX;} |
172 | Int_t Y() const{return fPadY;} |
173 | Int_t Id() const{return fChamber*1000000+fPadX*1000+fPadY;} |
174 | Int_t Qdc() const{return fQdc;} |
175 | Int_t T(Int_t i) const{return fTracks[i];} |
176 | void Print(Option_t *option)const; //virtual |
853634d3 |
177 | protected: |
178 | Int_t fChamber; //module number |
c021cb15 |
179 | Int_t fPadX; //pad number along X |
180 | Int_t fPadY; //pad number along Y |
c60862bf |
181 | Int_t fQdc; //ADC value |
853634d3 |
182 | ClassDef(AliRICHdigit,1) //RICH digit class |
183 | };//class AliRICHdigit |
c021cb15 |
184 | //__________________________________________________________________________________________________ |
c60862bf |
185 | AliRICHdigit::AliRICHdigit(Int_t iC,Int_t iX,Int_t iY,Int_t iQdc,Int_t iT0,Int_t iT1,Int_t iT2) |
853634d3 |
186 | { |
c60862bf |
187 | fChamber=iC;fPadX=iX;fPadY=iY;fQdc=iQdc; |
853634d3 |
188 | fTracks[0]=iT0;fTracks[1]=iT1;fTracks[2]=iT2; |
189 | }//AliRICHdigit::ctor |
c60862bf |
190 | //__________________________________________________________________________________________________ |
191 | Int_t AliRICHdigit::Compare(const TObject *pObj)const |
192 | { |
193 | if(Id()==((AliRICHdigit*)pObj)->Id()) |
194 | return 0; |
195 | else if(Id()>((AliRICHdigit*)pObj)->Id()) |
196 | return 1; |
197 | else |
198 | return -1; |
199 | }//Int_t AliRICHdigit::Compare(const TObject *pObj) |
200 | |
c021cb15 |
201 | //__________________AliRICH_________________________________________________________________________ |
202 | //__________________________________________________________________________________________________ |
203 | //__________________________________________________________________________________________________ |
3ea9cb08 |
204 | class AliRICHParam; |
205 | class AliRICHSDigit; |
206 | |
2f614988 |
207 | class AliRICH : public AliDetector |
208 | { |
2f614988 |
209 | public: |
853634d3 |
210 | AliRICH(); |
211 | AliRICH(const char *name, const char *title); |
942194a4 |
212 | AliRICH(const AliRICH& RICH):AliDetector(RICH) {;} |
853634d3 |
213 | virtual ~AliRICH(); |
dfb4e77d |
214 | |
942194a4 |
215 | AliRICH& operator=(const AliRICH&) {return *this;} |
c60862bf |
216 | virtual Int_t IsVersion() const =0; |
217 | void Hits2SDigits(); //virtual |
218 | void SDigits2Digits(); //virtual |
219 | void Digits2Reco(); //virtual |
c021cb15 |
220 | |
c60862bf |
221 | inline void CreateHits(); |
222 | inline void CreateSdigits(); |
223 | inline void CreateDigits(); |
224 | inline void CreateClusters(); |
225 | inline void AddHit(Int_t track, Int_t *vol, Float_t *hits); //virtual |
226 | inline void AddHit(Int_t track,Int_t iPID,Int_t iChamber,TLorentzVector x4,Float_t eloss); |
227 | inline void AddSdigit(Int_t iC,Int_t iX,Int_t iY,Int_t iAdc,Int_t iT0,Int_t iT1=kBad,Int_t iT2=kBad); |
228 | inline void AddSdigit(TObject *pDigit); |
229 | inline void AddDigit (Int_t iC,Int_t iX,Int_t iY,Int_t iAdc,Int_t iT0,Int_t iT1=kBad,Int_t iT2=kBad); //virtual |
230 | void AddCluster() {;} |
231 | void ResetHits() {AliDetector::ResetHits();fNcerenkovs=0;if(fCerenkovs)fCerenkovs->Clear();fNspecials=0;if(fSpecials)fSpecials->Clear();} //virtual |
232 | void ResetSdigits() {fNsdigits=0; if(fSdigits) fSdigits ->Clear();} |
233 | void ResetClusters(){if(fClusters)for(int i=0;i<kNCH;i++){fClusters->At(i)->Clear();fNclusters[i]=0;}} |
234 | //Hits provided by AliDetector |
235 | TClonesArray* Sdigits() const{return fSdigits;} |
236 | TClonesArray* Digits(Int_t iC) const{if(fDchambers) return (TClonesArray *)fDchambers->At(iC-1);else return 0;}//virtual |
237 | TClonesArray* Clusters(Int_t iC) const{if(fClusters) return (TClonesArray *)fClusters->At(iC-1);else return 0;} |
238 | |
239 | AliRICHChamber* C(Int_t iC) const{return (AliRICHChamber*)fChambers->At(iC-1);} |
240 | AliRICHParam* Param() const{return fpParam;} |
c021cb15 |
241 | |
c60862bf |
242 | AliRICHhit* FirstHit(Int_t iTrkN) {return (AliRICHhit*)AliDetector::FirstHit(iTrkN);} //virtual |
243 | AliRICHhit* NextHit() {return (AliRICHhit*)AliDetector::NextHit();} //virtual |
244 | |
245 | TClonesArray* Specials() const{return fSpecials;} |
246 | TClonesArray* Cerenkovs() const{return fCerenkovs;} |
c021cb15 |
247 | |
c60862bf |
248 | |
249 | |
250 | |
251 | inline void AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs); |
252 | inline void AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits); |
253 | inline void CreateCerenkovsOld(); |
254 | inline void CreateSpecialsOld(); |
255 | inline void CreateDigitsOld(); |
256 | inline void CreateRawClustersOld(); |
257 | inline void CreateRecos1Old(); |
258 | inline void CreateRecos3Old(); |
259 | void ResetDigits() {if(fDchambers) for(int i=0;i<kNCH;i++){fDchambers->At(i)->Clear();fNdch[i]=0;}} //virtual |
260 | void ResetSpecials(){fNspecials=0; if(fSpecials) fSpecials->Clear();} |
261 | void ResetRawClusters(){if(fRawClusters)for(int i=0;i<kNCH;i++){fRawClusters->At(i)->Clear();fNrawch[i]=0;}} |
262 | void ResetRecHits1D() {if(fRecHits1D) for(int i=0;i<kNCH;i++){fRecHits1D ->At(i)->Clear();fNrechits1D[i]=0;}} |
263 | void ResetRecHits3D() {if(fRecHits3D) for(int i=0;i<kNCH;i++){fRecHits3D ->At(i)->Clear();fNrechits3D[i]=0;}} |
c021cb15 |
264 | |
3ea9cb08 |
265 | void CreateChambers(); |
c60862bf |
266 | void CreateMaterials(); //virtual |
267 | virtual void BuildGeometry(); //virtual |
268 | virtual void CreateGeometry(); //virtual |
dfb4e77d |
269 | Float_t AbsoCH4(Float_t x); |
270 | Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola); |
3ea9cb08 |
271 | |
c021cb15 |
272 | virtual void StepManager()=0; |
c60862bf |
273 | void GenerateFeedbacks(Int_t iChamber,Float_t eloss); |
274 | void Print(Option_t *option)const;//virtual |
275 | void MakeBranch(Option_t *opt=" "); |
276 | void SetTreeAddress();//virtual |
277 | |
3ea9cb08 |
278 | |
c60862bf |
279 | |
280 | AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);} |
281 | inline void AddSDigit(Int_t *); |
3ea9cb08 |
282 | void AddRawCluster(Int_t id, const AliRICHRawCluster& cluster); |
283 | void AddRecHit1D(Int_t id, Float_t* rechit, Float_t* photons, Int_t* padsx, Int_t* padsy); |
284 | void AddRecHit3D(Int_t id, Float_t* rechit, Float_t omega, Float_t theta, Float_t phi); |
c60862bf |
285 | TObjArray *Dchambers() const{return fDchambers;} |
3ba5db3e |
286 | TObjArray *RecHits3D() const{return fRecHits3D;} |
287 | TObjArray *RecHits1D() const{return fRecHits1D;} |
288 | Int_t *Ndch() {return fNdch;} |
289 | Int_t *Nrechits1D() {return fNrechits1D;} |
290 | Int_t *Nrechits3D() {return fNrechits3D;} |
c60862bf |
291 | TClonesArray *DigitsAddress(Int_t id) const{return ((TClonesArray *) (*fDchambers)[id]);} |
3ba5db3e |
292 | TClonesArray *RecHitsAddress1D(Int_t id) const{return ((TClonesArray *) (*fRecHits1D)[id]);} |
293 | TClonesArray *RecHitsAddress3D(Int_t id) const{return ((TClonesArray *) (*fRecHits3D)[id]);} |
294 | TClonesArray *RawClustAddress(Int_t id) const{return ((TClonesArray *) (*fRawClusters)[id]);} |
c60862bf |
295 | // Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/) {return 9999;} |
2f614988 |
296 | |
c60862bf |
297 | protected: |
c021cb15 |
298 | AliRICHParam *fpParam; //main RICH parametrization |
299 | TObjArray *fChambers; //list of RICH chambers |
c60862bf |
300 | //fHits and fDigits belong to AliDetector |
301 | TClonesArray *fSdigits; //! List of sdigits |
853634d3 |
302 | Int_t fNsdigits; //Current number of sdigits |
c60862bf |
303 | TObjArray *fDigitsNew; //! Each chamber holds it's one lists of digits |
304 | Int_t fNdigitsNew[kNCH]; //Array of current numbers of digits |
305 | TObjArray *fClusters; //! Each chamber holds it's one lists of clusters |
306 | Int_t fNclusters[kNCH]; //Array of current numbers of raw clusters |
307 | |
308 | TClonesArray *fCerenkovs; //! ??? List of cerenkovs |
309 | Int_t fNcerenkovs; //??? Current number of cerenkovs |
310 | TClonesArray *fSpecials; //! ??? List of specials |
311 | Int_t fNspecials; //??? Current number of specials |
312 | TObjArray *fDchambers; //! Array of lists of digits |
dfb4e77d |
313 | Int_t fNdch[kNCH]; //Array of current numbers of digits |
c60862bf |
314 | TObjArray *fRawClusters; //! Array of lists of raw clusters |
dfb4e77d |
315 | Int_t fNrawch[kNCH]; //Array of current numbers of raw clusters |
c60862bf |
316 | TObjArray *fRecHits1D; //!List of rec. hits |
dfb4e77d |
317 | Int_t fNrechits1D[kNCH]; //Array of current numbers of rec hits 1D |
c60862bf |
318 | TObjArray *fRecHits3D; //!List of rec. hits |
dfb4e77d |
319 | Int_t fNrechits3D[kNCH]; //Array of current numbers of rec hits 3D |
dfb4e77d |
320 | Int_t fCkovNumber; // Number of Cerenkov photons |
dfb4e77d |
321 | Int_t fFreonProd; // Cerenkovs produced in freon |
dfb4e77d |
322 | Int_t fFeedbacks; // Number of feedback photons |
ddae0931 |
323 | |
c60862bf |
324 | ClassDef(AliRICH,3) //Main RICH class |
325 | };//class AliRICH |
c021cb15 |
326 | //__________________________________________________________________________________________________ |
853634d3 |
327 | void AliRICH::AddHit(Int_t track, Int_t *vol, Float_t *hits) |
328 | {//Adds the current hit to the RICH hits list |
329 | TClonesArray &tmp=*fHits; |
330 | new(tmp[fNhits++])AliRICHhit(fIshunt,track,vol,hits); |
c60862bf |
331 | }//AddHit() old |
c021cb15 |
332 | //__________________________________________________________________________________________________ |
333 | void AliRICH::AddHit(Int_t track,Int_t iPID,Int_t iChamber,TLorentzVector x4,Float_t eloss) |
334 | {//Adds the current hit to the RICH hits list |
335 | TClonesArray &tmp=*fHits; |
336 | new(tmp[fNhits++])AliRICHhit(track,iPID,iChamber,x4,eloss); |
c60862bf |
337 | }//AddHit() new |
338 | //__________________________________________________________________________________________________ |
339 | void AliRICH::AddSdigit(Int_t iC,Int_t iX,Int_t iY,Int_t iAdc,Int_t iT0,Int_t iT1,Int_t iT2) |
340 | {//Adds the current Sdigit to the RICH list of Sdigits |
341 | TClonesArray &tmp=*fSdigits; |
342 | new(tmp[fNsdigits++])AliRICHdigit(iC,iX,iY,iAdc,iT0,iT1,iT2); |
343 | } |
344 | //__________________________________________________________________________________________________ |
345 | void AliRICH::AddSdigit(TObject *pDigit) |
346 | {//Adds the current Sdigit to the RICH list of Sdigits |
347 | TClonesArray &tmp=*fSdigits; |
348 | tmp[fNsdigits++]=pDigit; |
349 | }//AddSdigit() |
350 | //__________________________________________________________________________________________________ |
351 | void AliRICH::AddDigit(Int_t iC,Int_t iX,Int_t iY,Int_t iAdc,Int_t iT0,Int_t iT1,Int_t iT2) |
352 | {//Adds the current digit to the corresponding RICH list of digits (individual list per chamber) |
353 | TClonesArray &tmp=*((TClonesArray*)fDigitsNew->At(iC-1)); |
354 | new(tmp[fNdigitsNew[iC-1]++]) AliRICHdigit(iC,iX,iY,iAdc,iT0,iT1,iT2); |
355 | }//AddDigit() |
356 | //__________________________________________________________________________________________________ |
357 | void AliRICH::CreateHits() |
358 | { |
359 | if(fHits) return; |
360 | if(GetDebug())Info("CreateHits","creating hits container."); |
361 | fHits=new TClonesArray("AliRICHhit",10000); fNhits=0; |
362 | }//CreateHits() |
363 | //__________________________________________________________________________________________________ |
364 | void AliRICH::CreateSdigits() |
365 | { |
366 | if(fSdigits) return; |
367 | if(GetDebug())Info("CreateSdigits","creating sdigits container."); |
368 | fSdigits=new TClonesArray("AliRICHdigit",10000); fNsdigits=0; |
369 | }//CreateSdigits() |
370 | //__________________________________________________________________________________________________ |
371 | void AliRICH::CreateDigits() |
372 | { |
373 | if(fDigitsNew) return; |
374 | if(GetDebug())Info("CreateDigits","creating digits containers."); |
375 | fDigitsNew = new TObjArray(kNCH); |
376 | for(Int_t i=0;i<kNCH;i++) {fDigitsNew->AddAt(new TClonesArray("AliRICHdigit",10000), i); fNdigitsNew[i]=0;} |
377 | }//CreateDigits() |
378 | //__________________________________________________________________________________________________ |
379 | void AliRICH::CreateClusters() |
380 | { |
381 | if(fClusters) return; |
382 | if(GetDebug())Info("CreateClusters","creating clusters containers."); |
383 | fClusters = new TObjArray(kNCH); |
384 | for(Int_t i=0;i<kNCH;i++) {fClusters->AddAt(new TClonesArray("AliRICHcluster",10000), i); fNclusters[i]=0;} |
385 | }//CreateClusters() |
386 | |
387 | |
388 | |
389 | //__________________________________________________________________________________________________ |
390 | void AliRICH::CreateCerenkovsOld() |
391 | { |
392 | if(fCerenkovs) return; |
393 | if(GetDebug())Info("CreateCerenkovs","creating cerenkovs container."); |
394 | fCerenkovs=new TClonesArray("AliRICHCerenkov",10000); fNcerenkovs=0; |
395 | }//CreateCerenkovsOld() |
396 | //__________________________________________________________________________________________________ |
397 | void AliRICH::CreateSpecialsOld() |
398 | { |
399 | if(fSpecials) return; |
400 | if(GetDebug())Info("CreateSpecialsOld","creating SDigits special container."); |
401 | fSpecials=new TClonesArray("AliRICHSDigit",100000); fNspecials=0; |
402 | }//CreateSpecialsOld() |
403 | //__________________________________________________________________________________________________ |
404 | void AliRICH::CreateDigitsOld() |
405 | { |
406 | if(fDchambers) return; |
407 | if(GetDebug())Info("CreateDigitsOld","creating digits containers."); |
408 | fDchambers = new TObjArray(kNCH); |
409 | for(Int_t i=0;i<kNCH;i++) fDchambers->AddAt(new TClonesArray("AliRICHDigit",10000), i); |
410 | }//CreateDigitsOld() |
411 | //__________________________________________________________________________________________________ |
412 | void AliRICH::CreateRawClustersOld() |
413 | { |
414 | if(fRawClusters) return; |
415 | if(GetDebug())Info("CreateClustersOld","creating clusters containers."); |
416 | fRawClusters = new TObjArray(kNCH); |
417 | for(Int_t i=0; i<kNCH ;i++) fRawClusters->AddAt(new TClonesArray("AliRICHRawCluster",10000), i); |
418 | }//CreateRawClustersOld() |
419 | //__________________________________________________________________________________________________ |
420 | void AliRICH::CreateRecos1Old() |
421 | { |
422 | if(fRecHits1D) return; |
423 | if(GetDebug())Info("CreateRecos1DOld","creating recos 1 containers."); |
424 | fRecHits1D = new TObjArray(kNCH); |
425 | for(Int_t i=0; i<kNCH ;i++) fRecHits1D->AddAt(new TClonesArray("AliRICHRecHit1D",1000), i); |
426 | } |
427 | //__________________________________________________________________________________________________ |
428 | void AliRICH::CreateRecos3Old() |
429 | { |
430 | if(fRecHits3D) return; |
431 | if(GetDebug())Info("CreateRecos3DOld","creating recos 3 containers."); |
432 | fRecHits3D = new TObjArray(kNCH); |
433 | for(Int_t i=0; i<kNCH ;i++) fRecHits3D->AddAt(new TClonesArray("AliRICHRecHit3D",1000), i); |
c021cb15 |
434 | } |
435 | //__________________________________________________________________________________________________ |
853634d3 |
436 | void AliRICH::AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs) |
437 | {//Adds the current RICH cerenkov hit to the Cerenkovs list |
438 | TClonesArray &tmp=*fCerenkovs; |
439 | new(tmp[fNcerenkovs++]) AliRICHCerenkov(fIshunt,track,vol,cerenkovs); |
440 | } |
c021cb15 |
441 | //__________________________________________________________________________________________________ |
c60862bf |
442 | void AliRICH::AddSDigit(Int_t *aSDigit) |
443 | {// Adds the current Sdigit to the RICH list of Specials |
444 | TClonesArray &lSDigits = *fSpecials; |
445 | new(lSDigits[fNspecials++]) AliRICHSDigit(aSDigit); |
446 | }//AddSDigit |
c021cb15 |
447 | //__________________________________________________________________________________________________ |
c60862bf |
448 | void AliRICH::AddDigits(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits) |
449 | {// Adds the current digit to the RICH list of S digits |
450 | TClonesArray &ldigits = *((TClonesArray*)fDchambers->At(id)); |
451 | new(ldigits[fNdch[id]++]) AliRICHDigit(tracks,charges,digits); |
452 | }//AddDigits |
c021cb15 |
453 | //__________________________________________________________________________________________________ |
c60862bf |
454 | #endif//#ifndef AliRICH_h |