]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICH.h
AliCRTModule added
[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
cb8189e7 14#include "AliRICHParam.h"
15
c60862bf 16#include "AliRICHSDigit.h"
853634d3 17
c021cb15 18//__________________AliRICHhit______________________________________________________________________
853634d3 19class AliRICHhit : public AliHit
20{
21public:
22 inline AliRICHhit();
23 inline AliRICHhit(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *hits);
af3d25a6 24 AliRICHhit(Int_t tid,TVector3 x3) :AliHit(0,tid) {fInX3=x3;}
25 inline AliRICHhit(Int_t tid,TVector3 x3in,TVector3 x3out,Double_t eloss);
853634d3 26 virtual ~AliRICHhit() {;}
af3d25a6 27
53fd478b 28 Int_t C() const{return fChamber;}
29 Int_t Chamber() const{return fChamber;}
30 Int_t Pid() const{return fPid;}
31 Int_t Particle() const{return fPid;}
53fd478b 32 Float_t Eloss() const{return fEloss;}
53fd478b 33 Float_t MomX() const{return fMomX;}
34 Float_t MomY() const{return fMomY;}
35 Float_t MomZ() const{return fMomZ;}
36 Float_t CerenkovAngle() const{return fCerenkovAngle;}
37 Float_t MomFreoX() const{return fMomFreoX;}
38 Float_t MomFreoY() const{return fMomFreoY;}
39 Float_t MomFreoZ() const{return fMomFreoZ;}
543d5224 40 void Print(Option_t *option="")const; //virtual
853634d3 41protected:
c021cb15 42 Int_t fChamber; //chamber number
c60862bf 43 Int_t fPid; //particle code
ed3ceb24 44 Double_t fEloss; //ionisation energy loss in gas
c021cb15 45 Float_t fMomX,fMomY,fMomZ; //momentum at photochatode entry point
af3d25a6 46 Float_t fNPads; //Pads hit
47 Float_t fCerenkovAngle; //Dummy cerenkov angle
c021cb15 48 Float_t fMomFreoX,fMomFreoY,fMomFreoZ; //momentum at freon entry point
af3d25a6 49 TVector3 fInX3,fOutX3; //3-vectors at the entrance and exit of the GAP
ed3ceb24 50 ClassDef(AliRICHhit,2) //RICH hit class
853634d3 51};//class AliRICHhit
c021cb15 52
53 //__________________________________________________________________________________________________
853634d3 54AliRICHhit::AliRICHhit()
55 :AliHit()
56{//default ctor
c60862bf 57 fChamber=fPid=kBad;
ed3ceb24 58 fEloss=kBad;
c021cb15 59 fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=fMomFreoX=fMomFreoY=fMomFreoZ=kBad;
af3d25a6 60 fInX3.SetXYZ(0,0,0);fOutX3.SetXYZ(0,0,0);
543d5224 61}
c021cb15 62//__________________________________________________________________________________________________
ed3ceb24 63AliRICHhit::AliRICHhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hit)
64 :AliHit(shunt, track)
853634d3 65{//ctor
66 fChamber=vol[0];
c60862bf 67 fPid=(Int_t)hit[0];
c021cb15 68 fX=hit[1];fY=hit[2];fZ=hit[3];
c021cb15 69 fEloss=hit[7];
c021cb15 70 fMomX=hit[14];fMomY=hit[15];fMomZ=hit[16];
c021cb15 71 fCerenkovAngle=hit[18];
72 fMomFreoX=hit[19];fMomFreoY=hit[20];fMomFreoZ=hit[21];
543d5224 73}
c021cb15 74//__________________________________________________________________________________________________
af3d25a6 75AliRICHhit::AliRICHhit(Int_t tid,TVector3 x3in,TVector3 x3out,Double_t eloss)
ed3ceb24 76 :AliHit(0,tid)
c021cb15 77{//ctor
af3d25a6 78 fX=x3out.X();fY=x3out.Y();fZ=x3out.Z();
79 fInX3=x3in;
80 fOutX3=x3out;
c021cb15 81 fEloss=eloss;
543d5224 82}
c021cb15 83
84//__________________AliRICHCerenkov_________________________________________________________________
853634d3 85class AliRICHCerenkov: public AliHit
86{
87public:
88 inline AliRICHCerenkov();
89 inline AliRICHCerenkov(Int_t fIshunt, Int_t track, Int_t *vol, Float_t *Cerenkovs);
90 virtual ~AliRICHCerenkov() {;}
53fd478b 91protected:
c021cb15 92 Int_t fChamber; //chamber number
93 Float_t fTheta,fPhi; //incident theta phi angles in degrees
94 Float_t fTlength; //track length inside the chamber
95 Float_t fEloss; //ionisation energy loss in gas
96 Int_t fPHfirst; //first padhit
97 Int_t fPHlast; //last padhit
98 Int_t fCMother; //index of mother particle
99 Float_t fLoss; //nature of particle loss
100 Float_t fIndex; //index of photon
101 Float_t fProduction; //point of production
102 Float_t fMomX,fMomY,fMomZ; //local Momentum
853634d3 103 Float_t fNPads; // Pads hit
104 Float_t fCerenkovAngle; // Cerenkov Angle
105
106 ClassDef(AliRICHCerenkov,1) //RICH cerenkov class
107};//class AliRICHCerenkov
c021cb15 108
109//__________________________________________________________________________________________________
853634d3 110AliRICHCerenkov::AliRICHCerenkov()
111{//ctor
c021cb15 112 fChamber=kBad;
113 fX=fY=fZ=fTheta=fPhi=fTlength=fEloss=kBad;
114 fPHfirst=fPHlast=fCMother=kBad;
115 fLoss=fIndex=fProduction=fMomX=fMomY=fMomZ=fNPads=fCerenkovAngle=kBad;
543d5224 116}
c021cb15 117//__________________________________________________________________________________________________
853634d3 118AliRICHCerenkov::AliRICHCerenkov(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits)
119 :AliHit(shunt, track)
120{//ctor
121 fChamber=vol[0];
c021cb15 122 fX=hits[1];fY=hits[2];fZ=hits[3];
123 fTheta=hits[4];fPhi=hits[5];
853634d3 124 fTlength=hits[6];
125 fEloss=hits[7];
c021cb15 126 fPHfirst=(Int_t)hits[8];fPHlast=(Int_t)hits[9];
853634d3 127 fCMother=Int_t(hits[10]);
128 fIndex = hits[11];
129 fProduction = hits[12];
130 fLoss=hits[13];
c021cb15 131 fMomX=hits[14];fMomY=hits[15];fMomZ=hits[16];
853634d3 132 fNPads=hits[17];
133 fCerenkovAngle=hits[18];
543d5224 134}
c021cb15 135
136//__________________AliRICHdigit____________________________________________________________________
853634d3 137class AliRICHdigit :public AliDigit
138{
139public:
ed3ceb24 140 AliRICHdigit() {fCombiPid=fChamber=fPadX=fPadY=fTracks[0]=fTracks[1]=fTracks[2]=kBad;fQdc=kBad;}
141 AliRICHdigit(Int_t c,Int_t x,Int_t y,Double_t q,Int_t cpid,Int_t tid0,Int_t tid1,Int_t tid2)
142 {fPadX=x;fPadY=y;fQdc=q;fChamber=10*c+AliRICHParam::Pad2Sec(x,y);fCombiPid=cpid;fTracks[0]=tid0;fTracks[1]=tid1;fTracks[2]=tid2;}
853634d3 143 virtual ~AliRICHdigit() {;}
ed3ceb24 144 Int_t Compare(const TObject *pObj) const //virtual
145 {if(Id()==((AliRICHdigit*)pObj)->Id()) return 0; else if(Id()>((AliRICHdigit*)pObj)->Id()) return 1; else return -1;}
146
c1863e3c 147 Bool_t IsSortable() const{return kTRUE;}//virtual
ed3ceb24 148 Int_t CombiPid() const{return fCombiPid;}
cb8189e7 149 Int_t C() const{return fChamber/10;}
150 Int_t S() const{return fChamber-(fChamber/10)*10;}
151 Int_t Chamber() const{return C();}
152 Int_t Sector() const{return S();}
c1863e3c 153 Int_t X() const{return fPadX;}
154 Int_t Y() const{return fPadY;}
cb8189e7 155 Int_t Id() const{return fChamber*10000000+fPadX*1000+fPadY;}
c1863e3c 156 Double_t Q() const{return fQdc;}
ed3ceb24 157 Int_t Tid(Int_t i) const{return fTracks[i];}
cb8189e7 158 void Print(Option_t *option="")const; //virtual
853634d3 159protected:
ed3ceb24 160 Int_t fCombiPid; //1000000*Ncerenkovs+1000*Nfeedbacks+Nmips
161 Int_t fChamber; //10*chamber number+ sector number
c1863e3c 162 Int_t fPadX; //pad number along X
163 Int_t fPadY; //pad number along Y
ed3ceb24 164 Double_t fQdc; //QDC value, fractions are permitted for summable procedure
165 ClassDef(AliRICHdigit,2) //RICH digit class
853634d3 166};//class AliRICHdigit
cbaf35fb 167
ed3ceb24 168//__________________AliRICHcluster__________________________________________________________________
c1863e3c 169class AliRICHcluster :public TObject
170{
171public:
ed3ceb24 172 enum ClusterStatus {kOK,kEdge,kShape,kSize,kRaw};
53fd478b 173 AliRICHcluster() {fSize=fQdc=fStatus=fChamber=fDimXY=kBad;fX=fY=kBad;fDigits=0;}
174 virtual ~AliRICHcluster() {delete fDigits;}
175 AliRICHcluster& operator=(const AliRICHcluster&) {return *this;}
cb8189e7 176 Int_t Size() const{return fSize;} //
177 Int_t DimXY() const{return fDimXY;} //
178 Int_t C() const{return fChamber/10;} //
179 Int_t S() const{return fChamber-(fChamber/10)*10;} //
180 Int_t Chamber() const{return C();} //
181 Int_t Sector() const{return S();} //
182 Int_t Q() const{return fQdc;} //
183 Double_t X() const{return fX;} //
184 Double_t Y() const{return fY;} //
185 Int_t Status() const{return fStatus;} //
186 void SetStatus(Int_t status) {fStatus=status;} //
ed3ceb24 187 Int_t Nmips() const{return fCombiPid-1000000*Ncerenkovs()-1000*Nfeedbacks();} //
188 Int_t Ncerenkovs() const{return fCombiPid/1000000;} //
189 Int_t Nfeedbacks() const{return (fCombiPid-1000000*Ncerenkovs())/1000;} //
190 Bool_t IsPureMip() const{return fCombiPid<1000;}
191 Bool_t IsPureCerenkov() const{return Nmips()==0&&Nfeedbacks()==0;} //
192 Bool_t IsPureFeedback() const{return Nmips()==0&&Ncerenkovs()==0;} //
193 void SetCombiPid(Int_t ckov,Int_t feeds,Int_t mips) {fCombiPid=1000000*ckov+1000*feeds+mips;} //
cb8189e7 194 TObjArray* Digits() const{return fDigits;} //
195 void Print(Option_t *option="")const; //virtual
196 inline void AddDigit(AliRICHdigit *pDig); //
197 inline void CoG(); //
ed3ceb24 198 void Reset() {fSize=fQdc=fStatus=fChamber=fDimXY=kBad;fX=fY=kBad;delete fDigits;fDigits=0;} //
c1863e3c 199protected:
ed3ceb24 200 Int_t fCombiPid; //1000000*Ncerenkovs+1000*Nfeedbacks+Nmips
c1863e3c 201 Int_t fSize; //how many digits belong to this cluster
202 Int_t fDimXY; //100*xdim+ydim box containing the cluster
203 Int_t fQdc; //QDC value
204 Int_t fChamber; //10*module number+sector number
205 Double_t fX; //local x postion
206 Double_t fY; //local y postion
207 Int_t fStatus; //flag to mark the quality of the cluster
208 TObjArray *fDigits; //! list of digits forming this cluster
ed3ceb24 209 ClassDef(AliRICHcluster,2) //RICH cluster class
c1863e3c 210};//class AliRICHcluster
211//__________________________________________________________________________________________________
212void AliRICHcluster::AddDigit(AliRICHdigit *pDig)
cb8189e7 213{//
ed3ceb24 214 if(!fDigits) {fQdc=fSize=fCombiPid=0;fDigits = new TObjArray;}
cbaf35fb 215 fQdc+=(Int_t)pDig->Q(); fDigits->Add(pDig);
cb8189e7 216 fChamber=10*pDig->C()+pDig->S();
cbaf35fb 217 fSize++;
218}
219//__________________________________________________________________________________________________
220void AliRICHcluster::CoG()
cb8189e7 221{//
222 Int_t xmin=999,ymin=999,xmax=0,ymax=0;
223 Double_t x,y;
224 fX=fY=0;
225 for(Int_t iDig=0;iDig<Size();iDig++) {
226 AliRICHdigit *pDig=(AliRICHdigit*)fDigits->At(iDig);
227 Int_t padX = pDig->X();Int_t padY = pDig->Y();Double_t q=pDig->Q();
228 AliRICHParam::Pad2Loc(padX,padY,x,y);
229 fX += x*q;fY +=y*q;
230 if(padX<xmin)xmin=padX;if(padX>xmax)xmax=padX;if(padY<ymin)ymin=padY;if(padY>ymax)ymax=padY;
cbaf35fb 231 }
cb8189e7 232 fX/=fQdc;fY/=fQdc;//Center of Gravity
233 fDimXY = 100*(xmax-xmin+1)+ymax-ymin+1;//find box containing cluster
234 fStatus=kRaw;
235}//CoG()
af3d25a6 236class AliRICHreco: public TObject
237{
238public:
239 AliRICHreco() {fTid=fNphotons=kBad; fThetaCherenkov=kBad;}
240 AliRICHreco(Int_t tid,Double_t thetaCherenkov,Int_t nPhotons) {fTid=tid;fThetaCherenkov=thetaCherenkov;fNphotons=nPhotons;}
ed3ceb24 241
af3d25a6 242 virtual ~AliRICHreco() {;}
243
244 void Print(Option_t *option="")const; //virtual print
245
246protected:
247 Int_t fTid; // track Id reference
248 Int_t fNphotons; // number of photons contributed to the recontruction
249 Double_t fThetaCherenkov; // reconstructed Theta Cerenkov for a given charged track
250
251 ClassDef(AliRICHreco,1) //RICH reco class
252
253};//class AliRICHreco
c021cb15 254//__________________AliRICH_________________________________________________________________________
3ea9cb08 255class AliRICHParam;
ed3ceb24 256class AliRICHChamber;
3ea9cb08 257class AliRICHSDigit;
258
2f614988 259class AliRICH : public AliDetector
260{
2f614988 261public:
853634d3 262 AliRICH();
af3d25a6 263 AliRICH(const char *name, const char *title);
942194a4 264 AliRICH(const AliRICH& RICH):AliDetector(RICH) {;}
853634d3 265 virtual ~AliRICH();
dfb4e77d 266
942194a4 267 AliRICH& operator=(const AliRICH&) {return *this;}
c60862bf 268 virtual Int_t IsVersion() const =0;
269 void Hits2SDigits(); //virtual
85a5290f 270 AliDigitizer* CreateDigitizer(AliRunDigitizer* manager); //virtual
c60862bf 271 void SDigits2Digits(); //virtual
c021cb15 272
c60862bf 273 inline void CreateHits();
c1863e3c 274 inline void CreateSDigits();
c60862bf 275 inline void CreateDigits();
276 inline void CreateClusters();
af3d25a6 277 inline void CreateRecos();
278 void AddHit(Int_t track, Int_t *vol, Float_t *hits) {TClonesArray &tmp=*fHits; new(tmp[fNhits++])AliRICHhit(fIshunt,track,vol,hits);}//virtual
279 void AddHit(Int_t tid,TVector3 x3) {TClonesArray &tmp=*fHits;new(tmp[fNhits++])AliRICHhit(tid,x3);}
280 void AddHit(Int_t tid,TVector3 x3in,TVector3 x3out,Double_t eloss) {TClonesArray &tmp=*fHits;new(tmp[fNhits++])AliRICHhit(tid,x3in,x3out,eloss);}
ed3ceb24 281 inline void AddSDigit(int c,int x,int y,int q,int pid,int tid);
282 void AddDigit(int c,int x,int y,int q,int cpid,int *tid){TClonesArray &tmp=*((TClonesArray*)fDigitsNew->At(c-1));new(tmp[fNdigitsNew[c-1]++])AliRICHdigit(c,x,y,q,cpid,tid[0],tid[1],tid[2]);}
283 void AddCluster(AliRICHcluster &cl) {TClonesArray &tmp=*((TClonesArray*)fClusters->At(cl.C()-1));new(tmp[fNclusters[cl.C()-1]++])AliRICHcluster(cl);}
af3d25a6 284 void AddReco(Int_t tid,Double_t thetaCherenkov,Int_t nPhotons) {TClonesArray &tmp=*(TClonesArray*)fRecos;new(tmp[fNrecos++])AliRICHreco(tid,thetaCherenkov,nPhotons);}
ed3ceb24 285 void ResetHits() {AliDetector::ResetHits();fNcerenkovs=0;if(fCerenkovs)fCerenkovs->Clear();fNspecials=0;if(fSpecials)fSpecials->Clear();} //virtual
286 void ResetSDigits() {fNsdigits=0; if(fSdigits) fSdigits ->Clear();}
287 void ResetDigits() {if(fDigitsNew)for(int i=0;i<kNCH;i++){fDigitsNew->At(i)->Clear();fNdigitsNew[i]=0;}}
288 void ResetClusters() {if(fClusters) for(int i=0;i<kNCH;i++){fClusters ->At(i)->Clear();fNclusters[i]=0;}}
af3d25a6 289 void ResetRecos() {if(fRecos) fRecos->Clear();fNrecos=0;}
c60862bf 290 //Hits provided by AliDetector
c1863e3c 291 TClonesArray* SDigits() const{return fSdigits;}
543d5224 292 TClonesArray* Digits(Int_t iC) const{if(fDigitsNew) return (TClonesArray *)fDigitsNew->At(iC-1);else return 0;}
c60862bf 293 TClonesArray* Clusters(Int_t iC) const{if(fClusters) return (TClonesArray *)fClusters->At(iC-1);else return 0;}
af3d25a6 294 TClonesArray* Recos() const{return fRecos;}
c60862bf 295
296 AliRICHChamber* C(Int_t iC) const{return (AliRICHChamber*)fChambers->At(iC-1);}
297 AliRICHParam* Param() const{return fpParam;}
ed3ceb24 298 AliRICHParam* P() const{return fpParam;}
3ea9cb08 299 void CreateChambers();
c60862bf 300 void CreateMaterials(); //virtual
301 virtual void BuildGeometry(); //virtual
302 virtual void CreateGeometry(); //virtual
53fd478b 303 Float_t AbsoCH4(Float_t x)const;
304 Float_t Fresnel(Float_t ene,Float_t pdoti, Bool_t pola)const;
3ea9cb08 305
c021cb15 306 virtual void StepManager()=0;
c60862bf 307 void GenerateFeedbacks(Int_t iChamber,Float_t eloss);
308 void Print(Option_t *option)const;//virtual
309 void MakeBranch(Option_t *opt=" ");
310 void SetTreeAddress();//virtual
543d5224 311// OLD staff OLD staff
312 inline void AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs);
53fd478b 313 inline void AddSpecialOld(Int_t *array);
543d5224 314
315 inline void CreateCerenkovsOld();
316 inline void CreateSpecialsOld();
543d5224 317 void ResetSpecialsOld(){fNspecials=0; if(fSpecials) fSpecials->Clear();}
543d5224 318 TClonesArray* Specials() const{return fSpecials;}
319 TClonesArray* Cerenkovs() const{return fCerenkovs;}
c60862bf 320
3ea9cb08 321
c60862bf 322
323 AliRICHChamber& Chamber(Int_t id) {return *((AliRICHChamber *) (*fChambers)[id]);}
c60862bf 324// Int_t DistancetoPrimitive(Int_t /*px*/, Int_t /*py*/) {return 9999;}
2f614988 325
c60862bf 326protected:
53fd478b 327 enum {kCSI=6,kGAP=9};
c021cb15 328 AliRICHParam *fpParam; //main RICH parametrization
329 TObjArray *fChambers; //list of RICH chambers
c60862bf 330 //fHits and fDigits belong to AliDetector
331 TClonesArray *fSdigits; //! List of sdigits
aed240d4 332 Int_t fNsdigits; //! Current number of sdigits
c60862bf 333 TObjArray *fDigitsNew; //! Each chamber holds it's one lists of digits
aed240d4 334 Int_t fNdigitsNew[kNCH]; //! Array of current numbers of digits
c60862bf 335 TObjArray *fClusters; //! Each chamber holds it's one lists of clusters
aed240d4 336 Int_t fNclusters[kNCH]; //! Array of current numbers of raw clusters
af3d25a6 337 TClonesArray *fRecos; //! pointer to the list of recos
338 Int_t fNrecos; //! number of recos
c60862bf 339
340 TClonesArray *fCerenkovs; //! ??? List of cerenkovs
aed240d4 341 Int_t fNcerenkovs; //! ??? Current number of cerenkovs
c60862bf 342 TClonesArray *fSpecials; //! ??? List of specials
aed240d4 343 Int_t fNspecials; //! ??? Current number of specials
dfb4e77d 344 Int_t fCkovNumber; // Number of Cerenkov photons
dfb4e77d 345 Int_t fFreonProd; // Cerenkovs produced in freon
dfb4e77d 346 Int_t fFeedbacks; // Number of feedback photons
ddae0931 347
aed240d4 348 ClassDef(AliRICH,4) //Main RICH class
c60862bf 349};//class AliRICH
ed3ceb24 350
c1863e3c 351//__________________________________________________________________________________________________
c60862bf 352void AliRICH::CreateHits()
353{
354 if(fHits) return;
355 if(GetDebug())Info("CreateHits","creating hits container.");
356 fHits=new TClonesArray("AliRICHhit",10000); fNhits=0;
543d5224 357}
c60862bf 358//__________________________________________________________________________________________________
c1863e3c 359void AliRICH::CreateSDigits()
c60862bf 360{
361 if(fSdigits) return;
c1863e3c 362 if(GetDebug())Info("CreateSDigits","creating sdigits container.");
c60862bf 363 fSdigits=new TClonesArray("AliRICHdigit",10000); fNsdigits=0;
543d5224 364}
c60862bf 365//__________________________________________________________________________________________________
366void AliRICH::CreateDigits()
367{
368 if(fDigitsNew) return;
369 if(GetDebug())Info("CreateDigits","creating digits containers.");
370 fDigitsNew = new TObjArray(kNCH);
371 for(Int_t i=0;i<kNCH;i++) {fDigitsNew->AddAt(new TClonesArray("AliRICHdigit",10000), i); fNdigitsNew[i]=0;}
543d5224 372}
c60862bf 373//__________________________________________________________________________________________________
374void AliRICH::CreateClusters()
375{
376 if(fClusters) return;
377 if(GetDebug())Info("CreateClusters","creating clusters containers.");
378 fClusters = new TObjArray(kNCH);
379 for(Int_t i=0;i<kNCH;i++) {fClusters->AddAt(new TClonesArray("AliRICHcluster",10000), i); fNclusters[i]=0;}
543d5224 380}
ed3ceb24 381//__________________________________________________________________________________________________
af3d25a6 382void AliRICH::CreateRecos()
383{
384 if(fRecos) return;
385 if(GetDebug())Info("CreateRecos","creating recos containers.");
386 fRecos = new TClonesArray("AliRICHreco",1000);fNrecos=0;
387}
388//__________________________________________________________________________________________________
ed3ceb24 389void AliRICH::AddSDigit(int c,int x,int y,int q,int pid,int tid)
390{
391 switch(pid){
392 case 50000048: pid=1000000;break;
393 case 50000052: pid=1000; break;
394 default: pid=1; break;
395 }
396 TClonesArray &tmp=*fSdigits;
397 new(tmp[fNsdigits++])AliRICHdigit(c,x,y,q,pid,tid,kBad,kBad);
398}//AddSDigit()
c60862bf 399
400
ed3ceb24 401//______OLD OLD OLD OLD_____________________________________________________________________________
c60862bf 402void AliRICH::CreateCerenkovsOld()
403{
404 if(fCerenkovs) return;
405 if(GetDebug())Info("CreateCerenkovs","creating cerenkovs container.");
406 fCerenkovs=new TClonesArray("AliRICHCerenkov",10000); fNcerenkovs=0;
543d5224 407}
c60862bf 408//__________________________________________________________________________________________________
409void AliRICH::CreateSpecialsOld()
410{
411 if(fSpecials) return;
412 if(GetDebug())Info("CreateSpecialsOld","creating SDigits special container.");
413 fSpecials=new TClonesArray("AliRICHSDigit",100000); fNspecials=0;
543d5224 414}
c60862bf 415//__________________________________________________________________________________________________
853634d3 416void AliRICH::AddCerenkov(Int_t track, Int_t *vol, Float_t *cerenkovs)
417{//Adds the current RICH cerenkov hit to the Cerenkovs list
418 TClonesArray &tmp=*fCerenkovs;
419 new(tmp[fNcerenkovs++]) AliRICHCerenkov(fIshunt,track,vol,cerenkovs);
420}
c021cb15 421//__________________________________________________________________________________________________
543d5224 422void AliRICH::AddSpecialOld(Int_t *aiSDigit)
c60862bf 423{// Adds the current Sdigit to the RICH list of Specials
424 TClonesArray &lSDigits = *fSpecials;
543d5224 425 new(lSDigits[fNspecials++]) AliRICHSDigit(aiSDigit);
426}
c60862bf 427#endif//#ifndef AliRICH_h