- // Converts the absolute numbering into the following array/
- // relid[0] = PHOS Module number 1:fNModules
- // relid[1] = 0 if PbW04
- // = -1 if CPV
- // relid[2] = Row number inside a PHOS module
- // relid[3] = Column number inside a PHOS module
-
- Bool_t rv = kTRUE ;
- Float_t id = AbsId ;
-
- Int_t phosmodulenumber = (Int_t)TMath:: Ceil( id / GetNCristalsInModule() ) ;
-
- if ( phosmodulenumber > GetNModules() ) { // it is a CPV pad
-
- id -= GetNPhi() * GetNZ() * GetNModules() ;
- Float_t nCPV = GetNumberOfCPVPadsPhi() * GetNumberOfCPVPadsZ() ;
- relid[0] = (Int_t) TMath::Ceil( id / nCPV ) ;
- relid[1] = -1 ;
- id -= ( relid[0] - 1 ) * nCPV ;
- relid[2] = (Int_t) TMath::Ceil( id / GetNumberOfCPVPadsZ() ) ;
- relid[3] = (Int_t) ( id - ( relid[2] - 1 ) * GetNumberOfCPVPadsZ() ) ;
- }
- else { // it is a PW04 crystal
-
- relid[0] = phosmodulenumber ;
- relid[1] = 0 ;
- id -= ( phosmodulenumber - 1 ) * GetNPhi() * GetNZ() ;
- relid[2] = (Int_t)TMath::Ceil( id / GetNZ() ) ;
- relid[3] = (Int_t)( id - ( relid[2] - 1 ) * GetNZ() ) ;
- }
- return rv ;
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::EmcModuleCoverage(Int_t mod, Double_t & tm, Double_t & tM, Double_t & pm, Double_t & pM, Option_t * opt) const
-{
- // calculates the angular coverage in theta and phi of one EMC (=PHOS) module
-
- Double_t conv ;
- if ( opt == Radian() )
- conv = 1. ;
- else if ( opt == Degre() )
- conv = 180. / TMath::Pi() ;
- else {
- AliWarning(Form("%s unknown option; result in radian", opt)) ;
- conv = 1. ;
- }
-
- Float_t phi = GetPHOSAngle(mod) * (TMath::Pi() / 180.) ;
- Float_t y0 = GetIPtoCrystalSurface() ;
- Float_t * strip = fGeometryEMCA->GetStripHalfSize() ;
- Float_t x0 = fGeometryEMCA->GetNStripX()*strip[0] ;
- Float_t z0 = fGeometryEMCA->GetNStripZ()*strip[2] ;
- Double_t angle = TMath::ATan( x0 / y0 ) ;
- phi = phi + 1.5 * TMath::Pi() ; // to follow the convention of the particle generator(PHOS is between 220 and 320 deg.)
- Double_t max = phi - angle ;
- Double_t min = phi + angle ;
- pM = TMath::Max(max, min) * conv ;
- pm = TMath::Min(max, min) * conv ;
-
- angle = TMath::ATan( z0 / y0 ) ;
- max = TMath::Pi() / 2. + angle ; // to follow the convention of the particle generator(PHOS is at 90 deg.)
- min = TMath::Pi() / 2. - angle ;
- tM = TMath::Max(max, min) * conv ;
- tm = TMath::Min(max, min) * conv ;
-
-}
-
-//____________________________________________________________________________
-void AliPHOSGeometry::EmcXtalCoverage(Double_t & theta, Double_t & phi, Option_t * opt) const
-{
- // calculates the angular coverage in theta and phi of a single crystal in a EMC(=PHOS) module
-
- Double_t conv ;
- if ( opt == Radian() )
- conv = 1. ;
- else if ( opt == Degre() )
- conv = 180. / TMath::Pi() ;
- else {
- AliWarning(Form("%s unknown option; result in radian", opt)) ;
- conv = 1. ;
- }
-
- Float_t y0 = GetIPtoCrystalSurface() ;
- theta = 2 * TMath::ATan( GetCrystalSize(2) / (2 * y0) ) * conv ;
- phi = 2 * TMath::ATan( GetCrystalSize(0) / (2 * y0) ) * conv ;