]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - RICH/AliRICHChamber.h
Additional protection
[u/mrichter/AliRoot.git] / RICH / AliRICHChamber.h
index 08ebdb9db52829d7009d058712c6c8ccd774fc41..006bb8bd98cb383466436a5020beba99452d7603 100644 (file)
@@ -20,49 +20,48 @@ public:
            AliRICHChamber(const AliRICHChamber &chamber):TNamed(chamber) {;}
   virtual ~AliRICHChamber()                                              {;}
            AliRICHChamber& operator=(const AliRICHChamber&)              {return *this;}
-  
+
+  static Double_t AlphaFeedback(Int_t )      {return 0.02;}  //determines number of feedback photons updated to 9/11/04 by Di Mauro
   TRotMatrix* RotMatrix()          const{return fpRotMatrix;}
-  TString RotMatrixName()          const{return "rot"+fName;}
+  TString     RotMatrixName()      const{return "rot"+fName;}
   TRotation   Rot()                const{return fRot;}
-  Double_t    Rho()                const{return fCenterV3.Mag();}                                //gives  distance to chamber center in MRS
-  Double_t    ThetaD()             const{return fCenterV3.Theta()*TMath::RadToDeg();}            //gives polar angle of chamber center in MRS
-  Double_t    PhiD()               const{return fCenterV3.Phi()  *TMath::RadToDeg();}            //gives azimuthal angle of chamber center in MRS
-  Double_t    ThetaXd()            const{return fRot.ThetaX()    *TMath::RadToDeg();}    
-  Double_t    PhiXd()              const{return fRot.PhiX()      *TMath::RadToDeg();}    
-  Double_t    ThetaYd()            const{return fRot.ThetaY()    *TMath::RadToDeg();}    
-  Double_t    PhiYd()              const{return fRot.PhiY()      *TMath::RadToDeg();}    
-  Double_t    ThetaZd()            const{return fRot.ThetaZ()    *TMath::RadToDeg();}    
-  Double_t    PhiZd()              const{return fRot.PhiZ()      *TMath::RadToDeg();}    
-  void        RotateX(Double_t a)       {fRot.RotateX(a);fCenterV3.RotateX(a);fPcX3.RotateX(a);} //rotate chamber around X by "a" degrees
-  void        RotateY(Double_t a)       {fRot.RotateY(a);fCenterV3.RotateY(a);fPcX3.RotateY(a);} //rotate chamber around Y by "a" degrees
-  void        RotateZ(Double_t a)       {fRot.RotateZ(a);fCenterV3.RotateZ(a);fPcX3.RotateZ(a);} //rotate chamber around Z by "a" degrees
-  Double_t    X()                  const{return fCenterV3.X();}  
-  Double_t    Y()                  const{return fCenterV3.Y();}   
-  Double_t    Z()                  const{return fCenterV3.Z();}
-  TVector2    Glob2Loc(TVector3 x3)const{x3-=fPcX3;x3.Transform(fRot.Inverse());return TVector2(x3.Z()+0.5*AliRICHParam::PcSizeX(),-x3.X()+0.5*AliRICHParam::PcSizeY());}//Y and Z are misplaced?????
-  TVector3    Loc2Glob(TVector2 x2)const{TVector3 x3(-x2.Y()+0.5*AliRICHParam::PcSizeY(),0,x2.X()-0.5*AliRICHParam::PcSizeX());x3.Transform(fRot); x3+=fPcX3;return x3;}
-  
-  TVector2    Glob2Loc(TLorentzVector x4)            const{return Glob2Loc(x4.Vect());}
-  
-  void        Print(Option_t *sOption)const;//virtual      
-   
-
-  inline void SetToZenith();
-  TRotMatrix *GetRotMatrix()       const{return fpRotMatrix;}  
+  Double_t    Rho()                const{return fCenter.Mag();}                                //gives  distance to chamber center in MRS
+  Double_t    ThetaD()             const{return fCenter.Theta()*TMath::RadToDeg();}            //gives polar angle of chamber center in MRS
+  Double_t    PhiD()               const{return fCenter.Phi()  *TMath::RadToDeg();}            //gives azimuthal angle of chamber center in MRS
+  Double_t    ThetaXd()            const{return fRot.ThetaX()  *TMath::RadToDeg();}    
+  Double_t    PhiXd()              const{return fRot.PhiX()    *TMath::RadToDeg();}    
+  Double_t    ThetaYd()            const{return fRot.ThetaY()  *TMath::RadToDeg();}    
+  Double_t    PhiYd()              const{return fRot.PhiY()    *TMath::RadToDeg();}    
+  Double_t    ThetaZd()            const{return fRot.ThetaZ()  *TMath::RadToDeg();}    
+  Double_t    PhiZd()              const{return fRot.PhiZ()    *TMath::RadToDeg();}    
+  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
+  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
+  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
+  TVector3    Rad()               const{return fRad;}         //provides center of radiator position in MRS, cm   
+  TVector3    Anod()              const{return fAnod;}        //provides center of anod wires plane in MRS, cm   
+  TVector3    Pc()                const{return fPc;}          //provides center of photocathode position in MRS, cm
+  TVector3    Center()            const{return fCenter;}      //provides center of chamber position (exit from quartz window) in MRS, cm
+  void        Print(Option_t *sOption)const;                    
+  TVector3    PMrs2Loc(TVector3 p3)const{TVector3 ploc=Rot().Invert()*p3;ploc.SetXYZ(-ploc.Px(),ploc.Py(),ploc.Pz()); return ploc;} //momentum MARS-local 
+//Transformations for radiator plane  
+  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());}
+  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;}  
+//Transformations for anod wires plane  
+  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());}
+  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;}  
+//Transformations for photcathode plane  
+  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());}
+  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;}  
+  TVector2    Mrs2Pc(TLorentzVector x4)            const{return Mrs2Pc(x4.Vect());}
 protected:
-  TVector3      fCenterV3;        //chamber center position in MRS (cm) 
-  TVector3      fPcX3;            //PC center position in MRS (cm)
+  TVector3      fRad;             //radiator entrance center position in MRS (cm)
+  TVector3      fCenter;          //chamber center position (quartz window exit) in MRS (cm) 
+  TVector3      fAnod;            //anod wires plane center position in MRS (cm)
+  TVector3      fPc;              //PC center position in MRS (cm)
   TRotation     fRot;             //chamber rotation in MRS
   TRotMatrix   *fpRotMatrix;      //rotation matrix of the chamber with respect to MRS 
-  ClassDef(AliRICHChamber,6)      //single RICH chamber description
+  ClassDef(AliRICHChamber,8)      //single RICH chamber description
 };//class AliRICHChamber
-//__________________________________________________________________________________________________
-void AliRICHChamber::SetToZenith()
-{
-//Put the chamber to zenith. Position of PC is shifted in X-Z plane since the origin of chamber local system is in
-//left hand down coner.     
-  fCenterV3.SetXYZ(0,AliRICHParam::Offset()-AliRICHParam::GapThickness()/2           ,0); 
-      fPcX3.SetXYZ(0,AliRICHParam::Offset()-AliRICHParam::GapThickness()/2+5.276+0.25,0);   
-}
-//__________________________________________________________________________________________________
+
 #endif //AliRICHChamber_h