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 */
10 #include <TLorentzVector.h>
11 #include "AliRICHParam.h"
15 class AliRICHChamber : public TNamed
18 AliRICHChamber():TNamed(),fpRotMatrix(0) {;}
19 AliRICHChamber(Int_t iChamberN);
20 AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;}
21 virtual ~AliRICHChamber() {;}
22 AliRICHChamber& operator=(const AliRICHChamber&) {return *this;}
24 static Double_t AlphaFeedback(Int_t ) {return 0.030;} //determines number of feedback photons
26 TRotMatrix* RotMatrix() const{return fpRotMatrix;}
27 TString RotMatrixName() const{return "rot"+fName;}
28 TRotation Rot() const{return fRot;}
29 Double_t Rho() const{return fCenterX3.Mag();} //gives distance to chamber center in MRS
30 Double_t ThetaD() const{return fCenterX3.Theta()*TMath::RadToDeg();} //gives polar angle of chamber center in MRS
31 Double_t PhiD() const{return fCenterX3.Phi() *TMath::RadToDeg();} //gives azimuthal angle of chamber center in MRS
32 Double_t ThetaXd() const{return fRot.ThetaX() *TMath::RadToDeg();}
33 Double_t PhiXd() const{return fRot.PhiX() *TMath::RadToDeg();}
34 Double_t ThetaYd() const{return fRot.ThetaY() *TMath::RadToDeg();}
35 Double_t PhiYd() const{return fRot.PhiY() *TMath::RadToDeg();}
36 Double_t ThetaZd() const{return fRot.ThetaZ() *TMath::RadToDeg();}
37 Double_t PhiZd() const{return fRot.PhiZ() *TMath::RadToDeg();}
38 void RotX(Double_t a) {a*=TMath::DegToRad();fRot.RotateX(a);fCenterX3.RotateX(a);fRadX3.RotateX(a);fPcX3.RotateX(a);}//degrees around X
39 void RotY(Double_t a) {a*=TMath::DegToRad();fRot.RotateY(a);fCenterX3.RotateY(a);fRadX3.RotateY(a);fPcX3.RotateY(a);}//degrees around Y
40 void RotZ(Double_t a) {a*=TMath::DegToRad();fRot.RotateZ(a);fCenterX3.RotateZ(a);fRadX3.RotateZ(a);fPcX3.RotateZ(a);}//degrees around Z
41 TVector3 Rad() const{return fRadX3;} //provides center of radiator position in MRS, cm
42 TVector3 Pc() const{return fPcX3;} //provides center of photocathond position in MRS, cm
43 TVector3 Center() const{return fCenterX3;} //provides center of chamber position in MRS, cm
44 void Print(Option_t *sOption)const; //virtual interface from TObject
45 //Transformations for photcathode plane
46 TVector2 Mrs2Pc(TVector3 x3)const{x3-=fPcX3;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());}
47 TVector3 Pc2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fPcX3;return x3;}
48 TVector2 Mrs2Pc(TLorentzVector x4) const{return Mrs2Pc(x4.Vect());}
49 //Transformations for radiator plane
50 TVector2 Mrs2Rad(TVector3 x3)const{x3-=fRadX3;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());}
51 TVector3 Rad2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fRadX3;return x3;}
52 TVector3 PMrs2Loc(TVector3 p3)const{TVector3 ploc=Rot().Invert()*p3;ploc.SetXYZ(-ploc.Px(),ploc.Py(),ploc.Pz()); return ploc;}
54 TVector3 fCenterX3; //chamber center position in MRS (cm)
55 TVector3 fRadX3; //radiator entrance center position in MRS (cm)
56 TVector3 fPcX3; //PC center position in MRS (cm)
57 TRotation fRot; //chamber rotation in MRS
58 TRotMatrix *fpRotMatrix; //rotation matrix of the chamber with respect to MRS
59 ClassDef(AliRICHChamber,7) //single RICH chamber description
60 };//class AliRICHChamber
62 #endif //AliRICHChamber_h