]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RICH/AliRICHChamber.h
- Remove double declaration in Digitizer
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.h
CommitLineData
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
06b2d19f 7#include <TVector3.h>
8#include <TMath.h>
853634d3 9#include <TRotation.h>
c60862bf 10#include <TLorentzVector.h>
c64f7552 11#include "AliRICHParam.h"
53fd478b 12class TRotMatrix;
2e5f0f7b 13
2e5f0f7b 14
853634d3 15class AliRICHChamber : public TNamed
2e5f0f7b 16{
06b2d19f 17public:
e42a7b46 18 AliRICHChamber():TNamed(),fpRotMatrix(0) {;}
19 AliRICHChamber(Int_t iChamberN);
3ea9cb08 20 AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;}
21 virtual ~AliRICHChamber() {;}
0ffe413c 22 AliRICHChamber& operator=(const AliRICHChamber&) {return *this;}
998b831f 23
d3eb6079 24 static Double_t AlphaFeedback(Int_t ) {return 0.02;} //determines number of feedback photons updated to 9/11/04 by Di Mauro
998b831f 25
853634d3 26 TRotMatrix* RotMatrix() const{return fpRotMatrix;}
998b831f 27 TString RotMatrixName() const{return "rot"+fName;}
53fd478b 28 TRotation Rot() const{return fRot;}
d3eb6079 29 Double_t Rho() const{return fCenter.Mag();} //gives distance to chamber center in MRS
30 Double_t ThetaD() const{return fCenter.Theta()*TMath::RadToDeg();} //gives polar angle of chamber center in MRS
31 Double_t PhiD() const{return fCenter.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);fRad.RotateX(a);fCenter.RotateX(a);fAnod.RotateX(a);fPc.RotateX(a);}//degrees around X
39 void RotY(Double_t a) {a*=TMath::DegToRad();fRot.RotateY(a);fRad.RotateY(a);fCenter.RotateY(a);fAnod.RotateY(a);fPc.RotateY(a);}//degrees around Y
40 void RotZ(Double_t a) {a*=TMath::DegToRad();fRot.RotateZ(a);fRad.RotateZ(a);fCenter.RotateZ(a);fAnod.RotateZ(a);fPc.RotateZ(a);}//degrees around Z
41 TVector3 Rad() const{return fRad;} //provides center of radiator position in MRS, cm
42 TVector3 Anod() const{return fAnod;} //provides center of anod wires plane in MRS, cm
43 TVector3 Pc() const{return fPc;} //provides center of photocathode position in MRS, cm
44 TVector3 Center() const{return fCenter;} //provides center of chamber position (exit from quartz window) in MRS, cm
45 void Print(Option_t *sOption)const;
46 TVector3 PMrs2Loc(TVector3 p3)const{TVector3 ploc=Rot().Invert()*p3;ploc.SetXYZ(-ploc.Px(),ploc.Py(),ploc.Pz()); return ploc;} //momentum MARS-local
47//Transformations for radiator plane
48 TVector2 Mrs2Rad(TVector3 x3)const{x3-=fRad;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());}
49 TVector3 Rad2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fRad;return x3;}
50//Transformations for anod wires plane
51 TVector2 Mrs2Anod(TVector3 x3)const{x3-=fAnod;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());}
52 TVector3 Anod2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fAnod;return x3;}
998b831f 53//Transformations for photcathode plane
d3eb6079 54 TVector2 Mrs2Pc(TVector3 x3)const{x3-=fPc;x3.Transform(fRot.Inverse());return TVector2(-x3.X()+0.5*AliRICHParam::PcSizeX(),x3.Y()+0.5*AliRICHParam::PcSizeY());}
55 TVector3 Pc2Mrs(TVector2 x2)const{TVector3 x3(-x2.X()+0.5*AliRICHParam::PcSizeX(),x2.Y()-0.5*AliRICHParam::PcSizeY(),0);x3.Transform(fRot); x3+=fPc;return x3;}
998b831f 56 TVector2 Mrs2Pc(TLorentzVector x4) const{return Mrs2Pc(x4.Vect());}
853634d3 57protected:
d3eb6079 58 TVector3 fRad; //radiator entrance center position in MRS (cm)
59 TVector3 fCenter; //chamber center position (quartz window exit) in MRS (cm)
60 TVector3 fAnod; //anod wires plane center position in MRS (cm)
61 TVector3 fPc; //PC center position in MRS (cm)
853634d3 62 TRotation fRot; //chamber rotation in MRS
63 TRotMatrix *fpRotMatrix; //rotation matrix of the chamber with respect to MRS
d3eb6079 64 ClassDef(AliRICHChamber,8) //single RICH chamber description
853634d3 65};//class AliRICHChamber
998b831f 66
06b2d19f 67#endif //AliRICHChamber_h