- if ( phosmodulenumber > GetNModules() ) { // it is a PPSD or CPV pad
-
- if ( strcmp(fName,"GPS2") == 0 ) {
- id -= GetNPhi() * GetNZ() * GetNModules() ;
- Float_t tempo = 2 * GetNumberOfModulesPhi() * GetNumberOfModulesZ() * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ;
- relid[0] = (Int_t)TMath::Ceil( id / tempo ) ;
- id -= ( relid[0] - 1 ) * tempo ;
- relid[1] = (Int_t)TMath::Ceil( id / ( GetNumberOfPadsPhi() * GetNumberOfPadsZ() ) ) ;
- id -= ( relid[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ;
- relid[2] = (Int_t)TMath::Ceil( id / GetNumberOfPadsPhi() ) ;
- relid[3] = (Int_t) ( id - ( relid[2] - 1 ) * GetNumberOfPadsPhi() ) ;
- }
- else if ( strcmp(fName,"IHEP") == 0 ) {
- 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 if ( strcmp(fName,"MIXT") == 0 ) {
- id -= GetNPhi() * GetNZ() * GetNModules() ;
- Float_t nPPSD = 2 * GetNumberOfModulesPhi() * GetNumberOfModulesZ() * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ;
- Float_t nCPV = GetNumberOfCPVPadsPhi() * GetNumberOfCPVPadsZ() ;
- if (id <= nCPV*GetNCPVModules()) { // this pad belons to CPV
- 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 { // this pad belons to PPSD
- id -= nCPV*GetNCPVModules();
- relid[0] = (Int_t)TMath::Ceil( id / nPPSD );
- id -= ( relid[0] - 1 ) * nPPSD ;
- relid[0] += GetNCPVModules();
- relid[1] = (Int_t)TMath::Ceil( id / ( GetNumberOfPadsPhi() * GetNumberOfPadsZ() ) ) ;
- id -= ( relid[1] - 1 ) * GetNumberOfPadsPhi() * GetNumberOfPadsZ() ;
- relid[2] = (Int_t)TMath::Ceil( id / GetNumberOfPadsPhi() ) ;
- relid[3] = (Int_t) ( id - ( relid[2] - 1 ) * GetNumberOfPadsPhi() ) ;
- }
- }
+ 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() ) ;