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