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