1 #ifndef AliRICHChamber_h
2 #define AliRICHChamber_h
4 /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5 * See cxx source for full Copyright notice */
9 #include <TRotMatrix.h>
12 #include <TRotation.h>
13 #include "AliRICHConst.h"
15 #include "AliRICHTresholdMap.h"
16 #include "AliSegmentation.h"
17 #include "AliRICHGeometry.h"
18 #include "AliRICHResponse.h"
20 class AliRICHClusterFinder;
22 typedef enum {kMip, kCerenkov} ResponseType;
25 class AliRICHChamber : public TNamed
29 Int_t fIndexMap[50]; //indeces of tresholds
30 AliRICHTresholdMap* fTresh; //map of tresholds
34 AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam);
35 AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;}
36 virtual ~AliRICHChamber() {;}
37 AliRICHChamber& operator=(const AliRICHChamber&) {return *this;}
38 void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);//Transformation from local to global coordinates, chamber-dependant
39 void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]);//Transformation from Global to local coordinates, chamber-dependant
40 void GenerateTresholds(); //Generate pad dependent tresholds
41 void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);// Cluster formation method
42 void Init(Int_t id) {fSegmentation->Init(id);} // Recalculates all the values after some of them have been changed
43 void SetGid(Int_t id) {fGid=id;} // Set and get GEANT id
44 Int_t GetGid() const{return fGid;} // Get GEANT id
45 void SetRInner(Float_t rmin) {frMin=rmin;} // Set inner radius of sensitive volume
46 Float_t RInner() const{return frMin;} // Return inner radius of sensitive volume
47 void SetROuter(Float_t rmax) {frMax=rmax;} // Set outer radius of sensitive volum
48 Float_t ROuter() const{return frMax;} // Return outer radius of sensitive volum
49 void SetZPOS(Float_t p1) {fzPos=p1;}
50 Float_t ZPosition() const{return fzPos;}
51 void SetGeometryModel(AliRICHGeometry* pRICHGeometry) {fGeometry=pRICHGeometry;}
52 AliRICHGeometry* GetGeometryModel() const{return fGeometry;}
53 void SetResponseModel(AliRICHResponse* pRICHResponse) {fResponse=pRICHResponse;}
54 AliRICHResponse* GetResponseModel() const{return fResponse;}
55 void SetSegmentationModel(AliSegmentation* pRICHSegmentation) {fSegmentation=pRICHSegmentation;}
56 AliSegmentation* GetSegmentationModel() const{return fSegmentation;}
57 void SetReconstructionModel(AliRICHClusterFinder *pRICHReconstruction) {fReconstruction=pRICHReconstruction;}
58 AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;}
59 void SigGenInit(Float_t x, Float_t y, Float_t z) {fSegmentation->SigGenInit(x, y, z) ;}
60 Int_t SigGenCond(Float_t x, Float_t y, Float_t z) {return fSegmentation->SigGenCond(x, y, z);}
61 Int_t Sector(Float_t x, Float_t y) {return fSegmentation->Sector((Int_t)x, (Int_t)y);} // Returns number of sector containing (x,y) position
62 void SetPadSize(Float_t p1, Float_t p2) {fSegmentation->SetPadSize(p1,p2);}
63 Float_t IntPH(Float_t eloss, Float_t yhit) {return fResponse->IntPH(eloss,yhit);}
64 Float_t IntPH(Float_t yhit) {return fResponse->IntPH(yhit);}
65 void SetSigmaIntegration(Float_t p) {fResponse->SetSigmaIntegration(p);}
66 void SetChargeSlope(Float_t p) {fResponse->SetChargeSlope(p);}
67 void SetChargeSpread(Float_t p1, Float_t p2) {fResponse->SetChargeSpread(p1,p2);}
68 void SetMaxAdc(Float_t p) {fResponse->SetMaxAdc(p);}
69 void SetSqrtKx3(Float_t p) {fResponse->SetSqrtKx3(p);}
70 void SetKx2(Float_t p) {fResponse->SetKx2(p);}
71 void SetKx4(Float_t p) {fResponse->SetKx4(p);}
72 void SetSqrtKy3(Float_t p) {fResponse->SetSqrtKy3(p);}
73 void SetKy2(Float_t p) {fResponse->SetKy2(p);}
74 void SetKy4(Float_t p) {fResponse->SetKy4(p);}
75 void SetPitch(Float_t p) {fResponse->SetPitch(p);}
76 void SetWireSag(Int_t p) {fResponse->SetWireSag(p);}
77 void SetVoltage(Int_t p) {fResponse->SetVoltage(p);}
78 void SetGapThickness(Float_t thickness) {fGeometry->SetGapThickness(thickness);}
79 void SetProximityGapThickness(Float_t thickness) {fGeometry->SetProximityGapThickness(thickness);}
80 void SetQuartzLength(Float_t length) {fGeometry->SetQuartzLength(length);}
81 void SetQuartzWidth(Float_t width) {fGeometry->SetQuartzWidth(width);}
82 void SetQuartzThickness(Float_t thickness) {fGeometry->SetQuartzThickness(thickness);}
83 void SetOuterFreonLength(Float_t length) {fGeometry->SetOuterFreonLength(length);}
84 void SetOuterFreonWidth(Float_t width) {fGeometry->SetOuterFreonWidth(width);}
85 void SetInnerFreonLength(Float_t length) {fGeometry->SetInnerFreonLength(length);}
86 void SetInnerFreonWidth(Float_t width) {fGeometry->SetInnerFreonWidth(width);}
87 void SetFreonThickness(Float_t thickness) {fGeometry->SetFreonThickness(thickness);}
88 TRotMatrix* RotMatrix() const{return fpRotMatrix;}
89 const char* RotMatrixName() const{return "rot"+fName;}
90 TRotation Rot() {return fRot;}
91 Double_t Rho() const{return fCenterV3.Mag();}
92 Double_t Theta() const{return fCenterV3.Theta();}
93 Double_t Phi() const{return fCenterV3.Phi();}
94 Double_t ThetaXd() const{return fRot.ThetaX()*r2d;}
95 Double_t PhiXd() const{return fRot.PhiX()*r2d;}
96 Double_t ThetaYd() const{return fRot.ThetaY()*r2d;}
97 Double_t PhiYd() const{return fRot.PhiY()*r2d;}
98 Double_t ThetaZd() const{return fRot.ThetaZ()*r2d;}
99 Double_t PhiZd() const{return fRot.PhiZ()*r2d;}
100 void RotateX(Double_t a) {fRot.RotateX(a);fCenterV3.RotateX(a);}
101 void RotateY(Double_t a) {fRot.RotateY(a);fCenterV3.RotateY(a);}
102 void RotateZ(Double_t a) {fRot.RotateZ(a);fCenterV3.RotateZ(a);}
103 Double_t X() const{return fCenterV3.X();}
104 Double_t Y() const{return fCenterV3.Y();}
105 Double_t Z() const{return fCenterV3.Z();}
106 Double_t GetX() const{return fX;}
107 Double_t GetY() const{return fY;}
108 Double_t GetZ() const{return fZ;}
109 Double_t GetOffset() const{return TMath::Sqrt(fX*fX+fY*fY+fZ*fZ);}
110 inline void SetCenter(Double_t x,Double_t y,Double_t z);
111 TRotMatrix *GetRotMatrix() const{return fpRotMatrix;}
112 void SetChamberTransform(Float_t x,Float_t y,Float_t z,TRotMatrix *pRotMatrix) {fX=x; fY=y; fZ=z; fpRotMatrix=pRotMatrix;}
114 virtual void Print(Option_t *sOption)const;
116 Float_t frMin; // Minimum Chamber size
117 Float_t frMax; // Maximum Chamber size
118 Int_t fGid; // Id tag
119 Float_t fzPos; // z-position of this chamber
121 Float_t fX,fY,fZ; // Position of the center of the chamber in MRS (cm)
123 AliSegmentation *fSegmentation; // ??????????Segmentation model for each chamber
124 AliRICHResponse *fResponse; // ??????????Response model for each chamber
125 AliRICHGeometry *fGeometry; // ??????????Geometry model for each chamber
126 AliRICHClusterFinder *fReconstruction; // ??????????Reconstruction model for each chamber
128 TVector3 fCenterV3; //chamber center position in MRS (cm)
129 TRotation fRot; //chamber rotation in MRS
130 TRotMatrix *fpRotMatrix; //rotation matrix of the chamber with respect to MRS
131 AliRICHParam *fpParam; //main RICH parameters description
132 ClassDef(AliRICHChamber,2) //single RICH chamber description
133 };//class AliRICHChamber
135 void AliRICHChamber::SetCenter(Double_t x,Double_t y,Double_t z)
137 fCenterV3.SetXYZ(x,y,z);
141 #endif //AliRICHChamber_h