]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICH.h
No longer needed as all deals with the old IO as well as old digit-cluster structure
[u/mrichter/AliRoot.git] / RICH / AliRICH.h
CommitLineData
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>
543d5224 13
dfb4e77d 14#include "AliRICHConst.h"
15#include "AliRICHChamber.h"
cb8189e7 16#include "AliRICHParam.h"
17
853634d3 18
c60862bf 19#include "AliRICHDigit.h"
20#include "AliRICHSDigit.h"
543d5224 21#include "AliRICHRawCluster.h"
853634d3 22
c021cb15 23//__________________AliRICHhit______________________________________________________________________
24//__________________________________________________________________________________________________
25//__________________________________________________________________________________________________
853634d3 26class AliRICHhit : public AliHit
27{
28public:
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;}
1774a484 48 Float_t CerenkovAngle() {return fCerenkovAngle;}
49 Float_t MomFreoX() {return fMomFreoX;}
50 Float_t MomFreoY() {return fMomFreoY;}
51 Float_t MomFreoZ() {return fMomFreoZ;}
543d5224 52 void Print(Option_t *option="")const; //virtual
853634d3 53protected:
c021cb15 54 Int_t fChamber; //chamber number
c60862bf 55 Int_t fPid; //particle code
1774a484 56 Float_t fTheta,fPhi ; //incident theta phi angles in degrees
c021cb15 57 Float_t fTlength; //track length inside the chamber
1774a484 58 Float_t fEloss; //ionisation energy loss in gas
c021cb15 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 70AliRICHhit::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;
543d5224 76}
c021cb15 77//__________________________________________________________________________________________________
78AliRICHhit::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];
543d5224 94}
c021cb15 95//__________________________________________________________________________________________________
96AliRICHhit::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;
543d5224 103}
c021cb15 104
105//__________________AliRICHCerenkov_________________________________________________________________
106//__________________________________________________________________________________________________
107//__________________________________________________________________________________________________
853634d3 108class AliRICHCerenkov: public AliHit
109{
110public:
111 inline AliRICHCerenkov();
112 inline AliRICHCerenkov(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *Cerenkovs);
113 virtual ~AliRICHCerenkov() {;}
114public:
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 133AliRICHCerenkov::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;
543d5224 139}
c021cb15 140//__________________________________________________________________________________________________
853634d3 141AliRICHCerenkov::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];
543d5224 157}
c021cb15 158
159//__________________AliRICHdigit____________________________________________________________________
160//__________________________________________________________________________________________________
161//__________________________________________________________________________________________________
853634d3 162class AliRICHdigit :public AliDigit
163{
164public:
c1863e3c 165 AliRICHdigit() {fPadX=fPadY=fChamber=fTracks[0]=fTracks[1]=fTracks[2]=kBad;fQdc=kBad;}
166 inline AliRICHdigit(Int_t iC,Int_t iX,Int_t iY,Double_t iQdc,Int_t iT1,Int_t iT2,Int_t iT3);
853634d3 167 virtual ~AliRICHdigit() {;}
c1863e3c 168 inline Int_t Compare(const TObject *pObj) const; //virtual
169 Bool_t IsSortable() const{return kTRUE;}//virtual
cb8189e7 170 Int_t C() const{return fChamber/10;}
171 Int_t S() const{return fChamber-(fChamber/10)*10;}
172 Int_t Chamber() const{return C();}
173 Int_t Sector() const{return S();}
c1863e3c 174 Int_t X() const{return fPadX;}
175 Int_t Y() const{return fPadY;}
cb8189e7 176 Int_t Id() const{return fChamber*10000000+fPadX*1000+fPadY;}
c1863e3c 177 Double_t Q() const{return fQdc;}
178 Int_t T(Int_t i) const{return fTracks[i];}
cb8189e7 179 void Print(Option_t *option="")const; //virtual
853634d3 180protected:
cb8189e7 181 Int_t fChamber; //10*module number+ sector number
c1863e3c 182 Int_t fPadX; //pad number along X
183 Int_t fPadY; //pad number along Y
184 Double_t fQdc; //QDC value, fractions are permitted for summable procedure
853634d3 185 ClassDef(AliRICHdigit,1) //RICH digit class
186};//class AliRICHdigit
c021cb15 187//__________________________________________________________________________________________________
cb8189e7 188AliRICHdigit::AliRICHdigit(Int_t iC,Int_t iPadX,Int_t iPadY,Double_t q,Int_t iT0,Int_t iT1,Int_t iT2)
853634d3 189{
cb8189e7 190 fPadX=iPadX;fPadY=iPadY;fQdc=q;
191 fChamber=10*iC+AliRICHParam::Pad2Sec(iPadX,iPadY);
853634d3 192 fTracks[0]=iT0;fTracks[1]=iT1;fTracks[2]=iT2;
543d5224 193}
c60862bf 194//__________________________________________________________________________________________________
195Int_t AliRICHdigit::Compare(const TObject *pObj)const
196{
197 if(Id()==((AliRICHdigit*)pObj)->Id())
198 return 0;
199 else if(Id()>((AliRICHdigit*)pObj)->Id())
200 return 1;
201 else
202 return -1;
543d5224 203}
c1863e3c 204//__________________AliRICHcluster__________________________________________________________________
205//__________________________________________________________________________________________________
cbaf35fb 206
207enum ClusterStatus {kOK,kEdge,kShape,kSize,kRaw};
208
c1863e3c 209//__________________________________________________________________________________________________
210class AliRICHcluster :public TObject
211{
212public:
cb8189e7 213 AliRICHcluster() {fSize=fQdc=fStatus=fChamber=fDimXY=kBad;fX=fY=kBad;fDigits=0;}
c1863e3c 214 virtual ~AliRICHcluster() {delete fDigits;}
cb8189e7 215 Int_t Size() const{return fSize;} //
216 Int_t DimXY() const{return fDimXY;} //
217 Int_t C() const{return fChamber/10;} //
218 Int_t S() const{return fChamber-(fChamber/10)*10;} //
219 Int_t Chamber() const{return C();} //
220 Int_t Sector() const{return S();} //
221 Int_t Q() const{return fQdc;} //
222 Double_t X() const{return fX;} //
223 Double_t Y() const{return fY;} //
224 Int_t Status() const{return fStatus;} //
225 void SetStatus(Int_t status) {fStatus=status;} //
226 TObjArray* Digits() const{return fDigits;} //
227 void Print(Option_t *option="")const; //virtual
228 inline void AddDigit(AliRICHdigit *pDig); //
229 inline void CoG(); //
9d6f9427 230 void Reset() {fSize=fQdc=fStatus=fChamber=fDimXY=kBad;fX=fY=kBad;delete fDigits;fDigits=0;} // //
c1863e3c 231protected:
232 Int_t fSize; //how many digits belong to this cluster
233 Int_t fDimXY; //100*xdim+ydim box containing the cluster
234 Int_t fQdc; //QDC value
235 Int_t fChamber; //10*module number+sector number
236 Double_t fX; //local x postion
237 Double_t fY; //local y postion
238 Int_t fStatus; //flag to mark the quality of the cluster
239 TObjArray *fDigits; //! list of digits forming this cluster
cb8189e7 240 ClassDef(AliRICHcluster,1) //RICH cluster class
c1863e3c 241};//class AliRICHcluster
242//__________________________________________________________________________________________________
243void AliRICHcluster::AddDigit(AliRICHdigit *pDig)
cb8189e7 244{//
245 if(!fDigits) {fQdc=fSize=0;fDigits = new TObjArray;}
cbaf35fb 246 fQdc+=(Int_t)pDig->Q(); fDigits->Add(pDig);
cb8189e7 247 fChamber=10*pDig->C()+pDig->S();
cbaf35fb 248 fSize++;
249}
250//__________________________________________________________________________________________________
251void AliRICHcluster::CoG()
cb8189e7 252{//
253 Int_t xmin=999,ymin=999,xmax=0,ymax=0;
254 Double_t x,y;
255 fX=fY=0;
256 for(Int_t iDig=0;iDig<Size();iDig++) {
257 AliRICHdigit *pDig=(AliRICHdigit*)fDigits->At(iDig);
258 Int_t padX = pDig->X();Int_t padY = pDig->Y();Double_t q=pDig->Q();
259 AliRICHParam::Pad2Loc(padX,padY,x,y);
260 fX += x*q;fY +=y*q;
261 if(padX<xmin)xmin=padX;if(padX>xmax)xmax=padX;if(padY<ymin)ymin=padY;if(padY>ymax)ymax=padY;
cbaf35fb 262 }
cb8189e7 263 fX/=fQdc;fY/=fQdc;//Center of Gravity
264 fDimXY = 100*(xmax-xmin+1)+ymax-ymin+1;//find box containing cluster
265 fStatus=kRaw;
266}//CoG()
c021cb15 267//__________________AliRICH_________________________________________________________________________
268//__________________________________________________________________________________________________
269//__________________________________________________________________________________________________
3ea9cb08 270class AliRICHParam;
271class AliRICHSDigit;
272
2f614988 273class AliRICH : public AliDetector
274{
2f614988 275public:
853634d3 276 AliRICH();
277 AliRICH(const char *name, const char *title);
942194a4 278 AliRICH(const AliRICH& RICH):AliDetector(RICH) {;}
853634d3 279 virtual ~AliRICH();
dfb4e77d 280
942194a4 281 AliRICH& operator=(const AliRICH&) {return *this;}
c60862bf 282 virtual Int_t IsVersion() const =0;
283 void Hits2SDigits(); //virtual
284 void SDigits2Digits(); //virtual
285 void Digits2Reco(); //virtual
c021cb15 286
c60862bf 287 inline void CreateHits();
c1863e3c 288 inline void CreateSDigits();
c60862bf 289 inline void CreateDigits();
290 inline void CreateClusters();
291 inline void AddHit(Int_t track, Int_t *vol, Float_t *hits); //virtual
c1863e3c 292 inline void AddSDigit(Int_t iC,Int_t iX,Int_t iY,Double_t q,Int_t iT0,Int_t iT1=kBad,Int_t iT2=kBad);
293 inline void AddDigit (Int_t iC,Int_t iX,Int_t iY,Int_t iQ,Int_t iT0,Int_t iT1=kBad,Int_t iT2=kBad);
cb8189e7 294 inline void AddCluster(AliRICHcluster &clus);
543d5224 295 void ResetHits() {AliDetector::ResetHits();fNcerenkovs=0;if(fCerenkovs)fCerenkovs->Clear();fNspecials=0;if(fSpecials)fSpecials->Clear();} //virtual
c1863e3c 296 void ResetSDigits() {fNsdigits=0; if(fSdigits) fSdigits ->Clear();}
543d5224 297 void ResetDigits() {if(fDigitsNew)for(int i=0;i<kNCH;i++){fDigitsNew->At(i)->Clear();fNdigitsNew[i]=0;}}
298 void ResetClusters() {if(fClusters) for(int i=0;i<kNCH;i++){fClusters ->At(i)->Clear();fNclusters[i]=0;}}
c60862bf 299 //Hits provided by AliDetector
c1863e3c 300 TClonesArray* SDigits() const{return fSdigits;}
543d5224 301 TClonesArray* Digits(Int_t iC) const{if(fDigitsNew) return (TClonesArray *)fDigitsNew->At(iC-1);else return 0;}
c60862bf 302 TClonesArray* Clusters(Int_t iC) const{if(fClusters) return (TClonesArray *)fClusters->At(iC-1);else return 0;}
303
304 AliRICHChamber* C(Int_t iC) const{return (AliRICHChamber*)fChambers->At(iC-1);}
305 AliRICHParam* Param() const{return fpParam;}
c021cb15 306
5d12ce38 307 // AliRICHhit* FirstHit(Int_t iTrkN) {return (AliRICHhit*)AliDetector::FirstHit(iTrkN);} //virtual
308 // AliRICHhit* NextHit() {return (AliRICHhit*)AliDetector::NextHit();} //virtual
c60862bf 309
3ea9cb08 310 void CreateChambers();
c60862bf 311 void CreateMaterials(); //virtual
312 virtual void BuildGeometry(); //virtual
313 virtual void CreateGeometry(); //virtual
dfb4e77d 314 Float_t AbsoCH4(Float_t x);
315 Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola);
3ea9cb08 316
c021cb15 317 virtual void StepManager()=0;
c60862bf 318 void GenerateFeedbacks(Int_t iChamber,Float_t eloss);
319 void Print(Option_t *option)const;//virtual
320 void MakeBranch(Option_t *opt=" ");
321 void SetTreeAddress();//virtual
543d5224 322// OLD staff OLD staff
323 inline void AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs);
324 inline void AddSpecialOld(Int_t *);
325 inline void AddDigitOld(Int_t id, Int_t *tracks, Int_t *charges, Int_t *digits);
326 inline void AddClusterOld(Int_t iChamber, const AliRICHRawCluster& cluster);
543d5224 327
328 inline void CreateCerenkovsOld();
329 inline void CreateSpecialsOld();
330 inline void CreateDigitsOld();
331 inline void CreateRawClustersOld();
543d5224 332 void ResetDigitsOld() {if(fDchambers) for(int i=0;i<kNCH;i++){fDchambers->At(i)->Clear();fNdch[i]=0;}} //virtual
333 void ResetSpecialsOld(){fNspecials=0; if(fSpecials) fSpecials->Clear();}
334 void ResetRawClusters(){if(fRawClusters)for(int i=0;i<kNCH;i++){fRawClusters->At(i)->Clear();fNrawch[i]=0;}}
543d5224 335
336 TClonesArray* DigitsOld(Int_t iC) const{if(fDchambers) return (TClonesArray *)fDchambers->At(iC-1);else return 0;}
337 TClonesArray* ClustersOld(Int_t iC) const{if(fRawClusters)return (TClonesArray *)fRawClusters->At(iC-1);else return 0;}
338 TClonesArray* Specials() const{return fSpecials;}
339 TClonesArray* Cerenkovs() const{return fCerenkovs;}
c60862bf 340
3ea9cb08 341
c60862bf 342
343 AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);}
c60862bf 344 TObjArray *Dchambers() const{return fDchambers;}
3ba5db3e 345 Int_t *Ndch() {return fNdch;}
c60862bf 346 TClonesArray *DigitsAddress(Int_t id) const{return ((TClonesArray *) (*fDchambers)[id]);}
3ba5db3e 347 TClonesArray *RawClustAddress(Int_t id) const{return ((TClonesArray *) (*fRawClusters)[id]);}
c60862bf 348// Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/) {return 9999;}
2f614988 349
c60862bf 350protected:
c021cb15 351 AliRICHParam *fpParam; //main RICH parametrization
352 TObjArray *fChambers; //list of RICH chambers
c60862bf 353 //fHits and fDigits belong to AliDetector
354 TClonesArray *fSdigits; //! List of sdigits
853634d3 355 Int_t fNsdigits; //Current number of sdigits
c60862bf 356 TObjArray *fDigitsNew; //! Each chamber holds it's one lists of digits
357 Int_t fNdigitsNew[kNCH]; //Array of current numbers of digits
358 TObjArray *fClusters; //! Each chamber holds it's one lists of clusters
359 Int_t fNclusters[kNCH]; //Array of current numbers of raw clusters
360
361 TClonesArray *fCerenkovs; //! ??? List of cerenkovs
362 Int_t fNcerenkovs; //??? Current number of cerenkovs
363 TClonesArray *fSpecials; //! ??? List of specials
364 Int_t fNspecials; //??? Current number of specials
365 TObjArray *fDchambers; //! Array of lists of digits
dfb4e77d 366 Int_t fNdch[kNCH]; //Array of current numbers of digits
c60862bf 367 TObjArray *fRawClusters; //! Array of lists of raw clusters
dfb4e77d 368 Int_t fNrawch[kNCH]; //Array of current numbers of raw clusters
dfb4e77d 369 Int_t fCkovNumber; // Number of Cerenkov photons
dfb4e77d 370 Int_t fFreonProd; // Cerenkovs produced in freon
dfb4e77d 371 Int_t fFeedbacks; // Number of feedback photons
ddae0931 372
c60862bf 373 ClassDef(AliRICH,3) //Main RICH class
374};//class AliRICH
c021cb15 375//__________________________________________________________________________________________________
853634d3 376void AliRICH::AddHit(Int_t track, Int_t *vol, Float_t *hits)
377{//Adds the current hit to the RICH hits list
378 TClonesArray &tmp=*fHits;
379 new(tmp[fNhits++])AliRICHhit(fIshunt,track,vol,hits);
543d5224 380}
c60862bf 381//__________________________________________________________________________________________________
c1863e3c 382void AliRICH::AddSDigit(Int_t iC,Int_t iX,Int_t iY,Double_t q,Int_t iT0,Int_t iT1,Int_t iT2)
c60862bf 383{//Adds the current Sdigit to the RICH list of Sdigits
384 TClonesArray &tmp=*fSdigits;
c1863e3c 385 new(tmp[fNsdigits++])AliRICHdigit(iC,iX,iY,q,iT0,iT1,iT2);
c60862bf 386}
387//__________________________________________________________________________________________________
c60862bf 388void AliRICH::AddDigit(Int_t iC,Int_t iX,Int_t iY,Int_t iAdc,Int_t iT0,Int_t iT1,Int_t iT2)
389{//Adds the current digit to the corresponding RICH list of digits (individual list per chamber)
390 TClonesArray &tmp=*((TClonesArray*)fDigitsNew->At(iC-1));
391 new(tmp[fNdigitsNew[iC-1]++]) AliRICHdigit(iC,iX,iY,iAdc,iT0,iT1,iT2);
543d5224 392}
c60862bf 393//__________________________________________________________________________________________________
cb8189e7 394void AliRICH::AddCluster(AliRICHcluster &cluster)
c1863e3c 395{//Adds the current cluster to the corresponding RICH list of clusters (individual list per chamber)
cb8189e7 396 cluster.Print();
397 TClonesArray &tmp=*((TClonesArray*)fClusters->At(cluster.Chamber()-1));
398 new(tmp[fNclusters[cluster.Chamber()-1]++]) AliRICHcluster(cluster);
c1863e3c 399}
400//__________________________________________________________________________________________________
c60862bf 401void AliRICH::CreateHits()
402{
403 if(fHits) return;
404 if(GetDebug())Info("CreateHits","creating hits container.");
405 fHits=new TClonesArray("AliRICHhit",10000); fNhits=0;
543d5224 406}
c60862bf 407//__________________________________________________________________________________________________
c1863e3c 408void AliRICH::CreateSDigits()
c60862bf 409{
410 if(fSdigits) return;
c1863e3c 411 if(GetDebug())Info("CreateSDigits","creating sdigits container.");
c60862bf 412 fSdigits=new TClonesArray("AliRICHdigit",10000); fNsdigits=0;
543d5224 413}
c60862bf 414//__________________________________________________________________________________________________
415void AliRICH::CreateDigits()
416{
417 if(fDigitsNew) return;
418 if(GetDebug())Info("CreateDigits","creating digits containers.");
419 fDigitsNew = new TObjArray(kNCH);
420 for(Int_t i=0;i<kNCH;i++) {fDigitsNew->AddAt(new TClonesArray("AliRICHdigit",10000), i); fNdigitsNew[i]=0;}
543d5224 421}
c60862bf 422//__________________________________________________________________________________________________
423void AliRICH::CreateClusters()
424{
425 if(fClusters) return;
426 if(GetDebug())Info("CreateClusters","creating clusters containers.");
427 fClusters = new TObjArray(kNCH);
428 for(Int_t i=0;i<kNCH;i++) {fClusters->AddAt(new TClonesArray("AliRICHcluster",10000), i); fNclusters[i]=0;}
543d5224 429}
c60862bf 430
431
432
433//__________________________________________________________________________________________________
434void AliRICH::CreateCerenkovsOld()
435{
436 if(fCerenkovs) return;
437 if(GetDebug())Info("CreateCerenkovs","creating cerenkovs container.");
438 fCerenkovs=new TClonesArray("AliRICHCerenkov",10000); fNcerenkovs=0;
543d5224 439}
c60862bf 440//__________________________________________________________________________________________________
441void AliRICH::CreateSpecialsOld()
442{
443 if(fSpecials) return;
444 if(GetDebug())Info("CreateSpecialsOld","creating SDigits special container.");
445 fSpecials=new TClonesArray("AliRICHSDigit",100000); fNspecials=0;
543d5224 446}
c60862bf 447//__________________________________________________________________________________________________
448void AliRICH::CreateDigitsOld()
449{
450 if(fDchambers) return;
451 if(GetDebug())Info("CreateDigitsOld","creating digits containers.");
452 fDchambers = new TObjArray(kNCH);
453 for(Int_t i=0;i<kNCH;i++) fDchambers->AddAt(new TClonesArray("AliRICHDigit",10000), i);
543d5224 454}
c60862bf 455//__________________________________________________________________________________________________
456void AliRICH::CreateRawClustersOld()
457{
458 if(fRawClusters) return;
459 if(GetDebug())Info("CreateClustersOld","creating clusters containers.");
460 fRawClusters = new TObjArray(kNCH);
461 for(Int_t i=0; i<kNCH ;i++) fRawClusters->AddAt(new TClonesArray("AliRICHRawCluster",10000), i);
543d5224 462}
c60862bf 463//__________________________________________________________________________________________________
853634d3 464void AliRICH::AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs)
465{//Adds the current RICH cerenkov hit to the Cerenkovs list
466 TClonesArray &tmp=*fCerenkovs;
467 new(tmp[fNcerenkovs++]) AliRICHCerenkov(fIshunt,track,vol,cerenkovs);
468}
c021cb15 469//__________________________________________________________________________________________________
543d5224 470void AliRICH::AddSpecialOld(Int_t *aiSDigit)
c60862bf 471{// Adds the current Sdigit to the RICH list of Specials
472 TClonesArray &lSDigits = *fSpecials;
543d5224 473 new(lSDigits[fNspecials++]) AliRICHSDigit(aiSDigit);
474}
c021cb15 475//__________________________________________________________________________________________________
543d5224 476void AliRICH::AddDigitOld(Int_t iChamber, Int_t *tracks, Int_t *charges, Int_t *digits)
c60862bf 477{// Adds the current digit to the RICH list of S digits
543d5224 478 TClonesArray &ldigits = *((TClonesArray*)fDchambers->At(iChamber-1));
479 new(ldigits[fNdch[iChamber-1]++]) AliRICHDigit(tracks,charges,digits);
480}
481//__________________________________________________________________________________________________
482void AliRICH::AddClusterOld(Int_t iChamber, const AliRICHRawCluster& c)
483{// Add a RICH raw cluster to the list
484 TClonesArray &tmp= *((TClonesArray*)fRawClusters->At(iChamber-1));
485 new(tmp[fNrawch[iChamber-1]++]) AliRICHRawCluster(c);
486}
c021cb15 487//__________________________________________________________________________________________________
c60862bf 488#endif//#ifndef AliRICH_h