-
- return rv ;
-}
-
-//____________________________________________________________________________
-
-void AliPHOSGeometry::RelPosInAlice(Int_t id, TVector3 & pos ) const
-{
- // Converts the absolute numbering into the global ALICE coordinate system
-
-
- Int_t relid[4] ;
-
- AbsToRelNumbering(id , relid) ;
-
- Int_t phosmodule = relid[0] ;
-
- Float_t y0 = 0 ;
-
- if ( relid[1] == 0 ) // it is a PbW04 crystal
- y0 = - GetIPtoCrystalSurface() ;
- else
- y0 = - GetIPtoUpperCPVsurface() ;
-
- Float_t x, z ;
- RelPosInModule(relid, x, z) ;
-
- pos.SetX(x) ;
- pos.SetZ(z) ;
- pos.SetY(y0) ;
-
- Float_t phi = GetPHOSAngle( phosmodule) ;
- Double_t const kRADDEG = 180.0 / TMath::Pi() ;
- Float_t rphi = phi / kRADDEG ;
-
- TRotation rot ;
- rot.RotateZ(-rphi) ; // a rotation around Z by angle
-
- TRotation dummy = rot.Invert() ; // to transform from original frame to rotate frame
-
- pos.Transform(rot) ; // rotate the baby
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::RelPosToAbsId(const Int_t module, const Double_t x, const Double_t z, Int_t & AbsId) const
-{
- // converts local PHOS-module (x, z) coordinates to absId
- Int_t relid[4] ;
- relid[0] = module ;
- relid[1] = 0 ;
- relid[2] = static_cast<Int_t>(TMath::Ceil( x/ GetCellStep() + GetNPhi() / 2.) );
- relid[3] = static_cast<Int_t>(TMath::Ceil(-z/ GetCellStep() + GetNZ() / 2.) ) ;
-
- RelToAbsNumbering(relid,AbsId) ;
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::RelPosInModule(const Int_t * relid, Float_t & x, Float_t & z) const
-{
- // Converts the relative numbering into the local PHOS-module (x, z) coordinates
- // Note: sign of z differs from that in the previous version (Yu.Kharlov, 12 Oct 2000)
-
- Int_t row = relid[2] ; //offset along x axis
- Int_t column = relid[3] ; //offset along z axis
-
-
- if ( relid[1] == 0 ) { // its a PbW04 crystal
- x = - ( GetNPhi()/2. - row + 0.5 ) * GetCellStep() ; // position of Xtal with respect
- z = - ( GetNZ() /2. - column + 0.5 ) * GetCellStep() ; // of center of PHOS module
- }
- else {
- x = - ( GetNumberOfCPVPadsPhi()/2. - row - 0.5 ) * GetPadSizePhi() ; // position of pad with respect
- z = - ( GetNumberOfCPVPadsZ() /2. - column - 0.5 ) * GetPadSizeZ() ; // of center of PHOS module