]>
Commit | Line | Data |
---|---|---|
06b2d19f | 1 | #ifndef AliRICHChamber_h |
2 | #define AliRICHChamber_h | |
2e5f0f7b | 3 | |
4 | /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. * | |
5 | * See cxx source for full Copyright notice */ | |
6 | ||
2e5f0f7b | 7 | #include <TRotMatrix.h> |
06b2d19f | 8 | #include <TVector3.h> |
9 | #include <TMath.h> | |
853634d3 | 10 | #include <TRotation.h> |
3ea9cb08 | 11 | #include "AliRICHConst.h" |
2e5f0f7b | 12 | |
4faf338d | 13 | #include "AliRICHTresholdMap.h" |
a2f7eaf6 | 14 | #include "AliSegmentation.h" |
237c933d | 15 | #include "AliRICHGeometry.h" |
16 | #include "AliRICHResponse.h" | |
2e5f0f7b | 17 | |
18 | class AliRICHClusterFinder; | |
237c933d | 19 | |
0ffe413c | 20 | typedef enum {kMip, kPhoton} ResponseType; |
853634d3 | 21 | class AliRICHParam; |
2e5f0f7b | 22 | |
853634d3 | 23 | class AliRICHChamber : public TNamed |
2e5f0f7b | 24 | { |
06b2d19f | 25 | public: |
2e5f0f7b | 26 | |
06b2d19f | 27 | Int_t fIndexMap[50]; //indeces of tresholds |
28 | AliRICHTresholdMap* fTresh; //map of tresholds | |
29 | ||
30 | public: | |
3ea9cb08 | 31 | AliRICHChamber(); |
853634d3 | 32 | AliRICHChamber(Int_t iModuleN,AliRICHParam *pParam); |
3ea9cb08 | 33 | AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;} |
34 | virtual ~AliRICHChamber() {;} | |
0ffe413c | 35 | AliRICHChamber& operator=(const AliRICHChamber&) {return *this;} |
36 | ||
853634d3 | 37 | TRotMatrix* RotMatrix() const{return fpRotMatrix;} |
38 | const char* RotMatrixName() const{return "rot"+fName;} | |
3ea9cb08 | 39 | TRotation Rot() {return fRot;} |
853634d3 | 40 | Double_t Rho() const{return fCenterV3.Mag();} |
0ffe413c | 41 | Double_t ThetaD() const{return fCenterV3.Theta()*r2d;} |
42 | Double_t PhiD() const{return fCenterV3.Phi()*r2d;} | |
3ea9cb08 | 43 | Double_t ThetaXd() const{return fRot.ThetaX()*r2d;} |
44 | Double_t PhiXd() const{return fRot.PhiX()*r2d;} | |
45 | Double_t ThetaYd() const{return fRot.ThetaY()*r2d;} | |
46 | Double_t PhiYd() const{return fRot.PhiY()*r2d;} | |
47 | Double_t ThetaZd() const{return fRot.ThetaZ()*r2d;} | |
48 | Double_t PhiZd() const{return fRot.PhiZ()*r2d;} | |
853634d3 | 49 | void RotateX(Double_t a) {fRot.RotateX(a);fCenterV3.RotateX(a);} |
50 | void RotateY(Double_t a) {fRot.RotateY(a);fCenterV3.RotateY(a);} | |
51 | void RotateZ(Double_t a) {fRot.RotateZ(a);fCenterV3.RotateZ(a);} | |
52 | Double_t X() const{return fCenterV3.X();} | |
53 | Double_t Y() const{return fCenterV3.Y();} | |
54 | Double_t Z() const{return fCenterV3.Z();} | |
0ffe413c | 55 | TVector3 L2G(TVector3 v3) const{v3.Transform(fRot.Inverse());v3+=fCenterV3;return v3;} |
56 | TVector3 L2G(Double_t x,Double_t y,Double_t z) const{TVector3 v3(x,y,z);return L2G(v3);} | |
57 | TVector3 G2L(TVector3 v3) const{v3-=fCenterV3; v3.Transform(fRot);return v3;} | |
58 | TVector3 G2L(Double_t x,Double_t y,Double_t z) const{TVector3 v3(x,y,z);return G2L(v3);} | |
59 | // TLorentzVector L2G(TLorentzVector v4) const{v4.Transform(fRot.Inverse());v4+=fCenterV3;return v4;}??? | |
60 | void Print(Option_t *sOption)const;//virtual | |
61 | ||
62 | void LocaltoGlobal(Float_t pos[3],Float_t Localpos[3]);//Transformation from local to global coordinates, chamber-dependant | |
63 | void GlobaltoLocal(Float_t pos[3],Float_t localpos[3]);//Transformation from Global to local coordinates, chamber-dependant | |
64 | void GenerateTresholds(); //Generate pad dependent tresholds | |
65 | void DisIntegration(Float_t eloss, Float_t xhit, Float_t yhit, Int_t&x, Float_t newclust[6][500], ResponseType res);// Cluster formation method | |
66 | void Init(Int_t id) {fSegmentation->Init(id);} // Recalculates all the values after some of them have been changed | |
67 | void SetGeometryModel(AliRICHGeometry* pRICHGeometry) {fGeometry=pRICHGeometry;} | |
68 | AliRICHGeometry* GetGeometryModel() const{return fGeometry;} | |
69 | void SetResponseModel(AliRICHResponse* pRICHResponse) {fResponse=pRICHResponse;} | |
70 | AliRICHResponse* GetResponseModel() const{return fResponse;} | |
71 | void SetSegmentationModel(AliSegmentation* pRICHSegmentation) {fSegmentation=pRICHSegmentation;} | |
72 | AliSegmentation* GetSegmentationModel() const{return fSegmentation;} | |
73 | void SetReconstructionModel(AliRICHClusterFinder *pRICHReconstruction) {fReconstruction=pRICHReconstruction;} | |
74 | AliRICHClusterFinder* &GetReconstructionModel() {return fReconstruction;} | |
75 | void SigGenInit(Float_t x, Float_t y, Float_t z) {fSegmentation->SigGenInit(x, y, z) ;} | |
76 | Int_t SigGenCond(Float_t x, Float_t y, Float_t z) {return fSegmentation->SigGenCond(x, y, z);} | |
77 | 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 | |
78 | void SetPadSize(Float_t p1, Float_t p2) {fSegmentation->SetPadSize(p1,p2);} | |
853634d3 | 79 | Double_t GetX() const{return fX;} |
80 | Double_t GetY() const{return fY;} | |
81 | Double_t GetZ() const{return fZ;} | |
853634d3 | 82 | inline void SetCenter(Double_t x,Double_t y,Double_t z); |
83 | TRotMatrix *GetRotMatrix() const{return fpRotMatrix;} | |
84 | void SetChamberTransform(Float_t x,Float_t y,Float_t z,TRotMatrix *pRotMatrix) {fX=x; fY=y; fZ=z; fpRotMatrix=pRotMatrix;} | |
85 | ||
853634d3 | 86 | protected: |
853634d3 | 87 | Float_t fX,fY,fZ; // Position of the center of the chamber in MRS (cm) |
237c933d | 88 | |
0ffe413c | 89 | AliSegmentation *fSegmentation; //???Segmentation model for each chamber |
90 | AliRICHResponse *fResponse; //???Response model for each chamber | |
91 | AliRICHGeometry *fGeometry; //???Geometry model for each chamber | |
92 | AliRICHClusterFinder *fReconstruction; //???Reconstruction model for each chamber | |
06b2d19f | 93 | |
853634d3 | 94 | TVector3 fCenterV3; //chamber center position in MRS (cm) |
95 | TRotation fRot; //chamber rotation in MRS | |
96 | TRotMatrix *fpRotMatrix; //rotation matrix of the chamber with respect to MRS | |
97 | AliRICHParam *fpParam; //main RICH parameters description | |
ac4ea1ec | 98 | ClassDef(AliRICHChamber,2) //single RICH chamber description |
853634d3 | 99 | };//class AliRICHChamber |
06b2d19f | 100 | |
853634d3 | 101 | void AliRICHChamber::SetCenter(Double_t x,Double_t y,Double_t z) |
06b2d19f | 102 | { |
853634d3 | 103 | fCenterV3.SetXYZ(x,y,z); |
104 | fX=x;fY=y;fZ=z; | |
105 | } | |
106 | ||
06b2d19f | 107 | #endif //AliRICHChamber_h |