3 ////////////////////////////////////////////////
4 // Manager and hits classes for set:RICH //
5 ////////////////////////////////////////////////
7 #include "AliDetector.h"
10 class AliRICH : public AliDetector {
13 Int_t fNmips; //Number of mips in RICH
14 Int_t fNckovs; //Number of cerenkovs in RICH
15 Int_t fNpadhits; //Number of pad hits in RICH
17 TClonesArray *fMips; //List of mips
18 TClonesArray *fCkovs; //List of cerenkovs
19 TClonesArray *fPadhits; //List of Padhits
21 Float_t fChslope; //Charge slope
22 Float_t fAlphaFeed; //Feed-back coefficient
23 Float_t fSxcharge; //Charge slope along x
24 Int_t fIritri; //Trigger flag
28 AliRICH(const char *name, const char *title);
30 virtual void AddHit(Int_t, Int_t*, Float_t*);
31 virtual void AddMipHit(Int_t, Int_t*, Float_t*);
32 virtual void AddCkovHit(Int_t, Int_t*, Float_t*);
33 virtual void AddPadHit(Int_t, Int_t*, Float_t*);
34 virtual void BuildGeometry();
35 virtual void CreateGeometry() {}
36 virtual void CreateMaterials() {}
37 Int_t DistancetoPrimitive(Int_t px, Int_t py);
38 inline virtual int GetNmips() {return fNmips;}
39 inline virtual int GetNckovs() {return fNckovs;}
40 inline virtual int GetNpadhits() {return fNpadhits;}
41 virtual Int_t IsVersion() const =0;
43 inline TClonesArray *Mips() {return fMips;}
44 inline TClonesArray *Ckovs() {return fCkovs;}
45 inline TClonesArray *Padhits() {return fPadhits;}
46 void FinishEvent(void){;}
47 virtual void MakeBranch(Option_t *);
48 void SetTreeAddress(void);
49 virtual void StepManager();
50 virtual void PreTrack();
52 virtual void SetSP(Float_t chslope){ fChslope=chslope;}
53 virtual void SetFEED(Float_t alphafeed){fAlphaFeed=alphafeed;}
54 virtual void SetSIGM(Float_t sxcharge){fSxcharge=sxcharge;}
55 virtual void SetTRIG(Int_t iritri) {fIritri=iritri;}
56 virtual void ResetHits();
57 virtual void UpdateMipHit(Float_t*);
58 virtual void RichIntegration();
59 virtual void AnodicWires(Float_t &);
60 virtual void GetChargeMip(Float_t &);
61 virtual void GetCharge(Float_t &);
62 virtual void FeedBack(Float_t *, Float_t );
63 virtual Float_t FMathieson(Float_t , Float_t );
65 ClassDef(AliRICH,1) // Base class for RICH
68 class AliRICHv1 : public AliRICH {
72 AliRICHv1(const char *name, const char *title);
74 virtual void CreateGeometry();
75 virtual void CreateMaterials();
76 virtual Int_t IsVersion() const {return 1;}
77 virtual void DrawDetector();
80 ClassDef(AliRICHv1,1) // RICH version 1
83 //_____________________________________________________________________________
84 class AliRICHhit: public AliHit {
86 Int_t fVolume[2]; //array of volumes
89 Int_t fFirstpad; //First index in padhits
90 Int_t fLastpad; //Last index in padhits
93 Int_t fModule; //Module number
94 Float_t fTheta; //Theta of the particle generating the hit
96 Float_t fArrivaltime;// Time of hit.
97 Int_t fPart; //Particle type
99 // we don't know what is this for :
100 Int_t fFeed; //Type of feedback (origin of charge deposition)
104 AliRICHhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits,
106 virtual ~AliRICHhit(){}
108 void SetLastpad(Int_t lastpad){fLastpad=lastpad;}
110 ClassDef(AliRICHhit,1) // Hits for set RICH
113 //_____________________________________________________________________________
114 class AliRICHmip: public AliRICHhit
117 // Hit information keep
118 Float_t fPhi; //Phi of the particle generating the hit
119 Float_t fPs; //Momentum of the particle generating the hit
120 Float_t fQ; //Charge of the particle
122 // Generated cerenkov information (Z of generation stored in fZ of AliHit)
123 Int_t fFirstCkov; //Index in the ckov TcloneArray of the first generated
124 Int_t fLastCkov; //Here the last.
128 AliRICHmip(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits,
129 Int_t fNckovs, Int_t fNpadhits);
130 virtual ~AliRICHmip() {}
132 Float_t GetZ() { return fZ;}
133 void SetX(Float_t x) { fX = x; }
134 void SetY(Float_t y) { fY = y; }
135 void SetZ(Float_t z) { fZ = z; }
136 void SetLastCkov(Int_t last){ fLastCkov = last; }
137 void SetModule(Int_t module){ fModule = module;}
138 void SetTheta(Float_t theta){ fTheta = theta; }
139 void SetPhi(Float_t phi) { fPhi = phi; }
141 ClassDef(AliRICHmip,1) //Mip hits for RICH
144 //_____________________________________________________________________________
145 class AliRICHckov: public AliRICHhit
148 // Hit information keep
149 Float_t fEnergy; //Photon energy
150 Int_t fStop; //Stop mechanism (cut, threshold, ...)
153 Int_t fParent; //Index in array of mips of parent which generatethis
156 AliRICHckov(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits,
157 Int_t fNmips, Int_t fNpadhits);
158 virtual ~AliRICHckov() {}
160 ClassDef(AliRICHckov,1) //Cerenkov hits for RICH
163 //_____________________________________________________________________________
164 class AliRICHpadhit: public AliHit
167 Int_t fVolume[2]; //array of volumes
170 Int_t fX; //Integer x position in pad
171 Int_t fY; //Integer y position in pad
172 Int_t fModule; //Module number
174 Int_t fParentMip; //Parent particle
175 Int_t fParentCkov; //Parent CKOV
177 Int_t fProd; //Production mechanism
178 Float_t fCharge; //Charge deposited
182 AliRICHpadhit(Int_t shunt, Int_t track, Int_t *vol, Float_t *hits,
183 Int_t fNmips,Int_t fNckovs);
184 virtual ~AliRICHpadhit() {}
186 ClassDef(AliRICHpadhit,1) //Pad hits for RICH