-
- if ( tmpPHOS->IsEmc() ) // it is a EMC crystal
- { gpos.SetY( -(GetIPtoOuterCoverDistance() + GetUpperPlateThickness() +
- GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness()) ) ;
-
- }
- else
- { // it is a PPSD pad
- AliPHOSPpsdRecPoint * tmpPpsd = (AliPHOSPpsdRecPoint *) RecPoint ;
- if (tmpPpsd->GetUp() ) // it is an upper module
- {
- gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() -
- GetLeadToMicro2Gap() - GetLeadConverterThickness() -
- GetMicro1ToLeadGap() - GetMicromegas1Thickness() / 2.0 ) ) ;
- }
- else // it is a lower module
- gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ) ;
- }
-
- Float_t phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ;
- Double_t const kRADDEG = 180.0 / kPI ;
- 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
- gpos.Transform(rot) ; // rotate the baby
-
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::GetGlobal(const AliRecPoint* RecPoint, TVector3 & gpos) const
-{
- // Calculates the coordinates of a RecPoint in the ALICE global coordinate system
-
- AliPHOSRecPoint * tmpPHOS = (AliPHOSRecPoint *) RecPoint ;
- TVector3 localposition ;
- tmpPHOS->GetLocalPosition(gpos) ;
-
-
- if ( tmpPHOS->IsEmc() ) // it is a EMC crystal
- { gpos.SetY( -(GetIPtoOuterCoverDistance() + GetUpperPlateThickness() +
- GetSecondUpperPlateThickness() + GetUpperCoolingPlateThickness()) ) ;
- }
- else
- { // it is a PPSD pad
- AliPHOSPpsdRecPoint * tmpPpsd = (AliPHOSPpsdRecPoint *) RecPoint ;
- if (tmpPpsd->GetUp() ) // it is an upper module
- {
- gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() -
- GetLeadToMicro2Gap() - GetLeadConverterThickness() -
- GetMicro1ToLeadGap() - GetMicromegas1Thickness() / 2.0 ) ) ;
- }
- else // it is a lower module
- gpos.SetY(-( GetIPtoOuterCoverDistance() - GetMicromegas2Thickness() / 2.0) ) ;
- }
-
- Float_t phi = GetPHOSAngle( tmpPHOS->GetPHOSMod()) ;
- Double_t const kRADDEG = 180.0 / kPI ;
- 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
- gpos.Transform(rot) ; // rotate the baby
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::ImpactOnEmc(const Double_t theta, const Double_t phi, Int_t & ModuleNumber, Double_t & z, Double_t & x) const
-{
- // calculates the impact coordinates on PHOS of a neutral particle
- // emitted in the direction theta and phi in the ALICE global coordinate system
-
- // searches for the PHOS EMC module
- ModuleNumber = 0 ;
- Double_t tm, tM, pm, pM ;
- Int_t index = 1 ;
- while ( ModuleNumber == 0 && index <= GetNModules() ) {
- EmcModuleCoverage(index, tm, tM, pm, pM) ;
- if ( (theta >= tm && theta <= tM) && (phi >= pm && phi <= pM ) )
- ModuleNumber = index ;
- index++ ;