pos[2]=(-(relid[3]-1)%fNCellsZInStrip+fNCellsZInStrip/2-0.5)*fCellStep ;
Int_t mod = relid[0] ;
- TGeoHMatrix * m2 = GetMatrixForStrip(mod, strip) ;
+ const TGeoHMatrix * m2 = GetMatrixForStrip(mod, strip) ;
m2->LocalToMaster(pos,posC);
//Return to PHOS local system
Double_t posL2[3]={posC[0],posC[1],posC[2]};
- TGeoHMatrix *mPHOS2 = GetMatrixForModule(mod) ;
+ const TGeoHMatrix *mPHOS2 = GetMatrixForModule(mod) ;
mPHOS2->MasterToLocal(posC,posL2);
x=posL2[0] ;
z=-posL2[2];
pos[2] = - ( fNumberOfCPVPadsZ /2. - column - 0.5 ) * fPadSizeZ ; // of center of PHOS module
//now apply possible shifts and rotations
- TGeoHMatrix *m = GetMatrixForCPV(relid[0]) ;
+ const TGeoHMatrix *m = GetMatrixForCPV(relid[0]) ;
m->LocalToMaster(pos,posC);
//Return to PHOS local system
Double_t posL[3]={0.,0.,0.,} ;
- TGeoHMatrix *mPHOS = GetMatrixForPHOS(relid[0]) ;
+ const TGeoHMatrix *mPHOS = GetMatrixForPHOS(relid[0]) ;
mPHOS->MasterToLocal(posC,posL);
x=posL[0] ;
z=posL[1];
ps[2]=(-(relid[3]-1)%fNCellsZInStrip+fNCellsZInStrip/2-0.5)*fCellStep ;
Int_t mod = relid[0] ;
- TGeoHMatrix * m2 = GetMatrixForStrip(mod, strip) ;
+ const TGeoHMatrix * m2 = GetMatrixForStrip(mod, strip) ;
m2->LocalToMaster(ps,psC);
pos.SetXYZ(psC[0],psC[1],psC[2]) ;
pos[2] = - ( fNumberOfCPVPadsZ /2. - column - 0.5 ) * fPadSizeZ ; // of center of PHOS module
//now apply possible shifts and rotations
- TGeoHMatrix *m = GetMatrixForCPV(relid[0]) ;
+ const TGeoHMatrix *m = GetMatrixForCPV(relid[0]) ;
m->LocalToMaster(ps,psC);
pos.SetXYZ(psC[0],psC[1],-psC[2]) ;
}
{
Double_t posL[3]={x,-fCrystalShift,-z} ; //Only for EMC!!!
Double_t posG[3] ;
- TGeoHMatrix *mPHOS = GetMatrixForModule(mod) ;
+ const TGeoHMatrix *mPHOS = GetMatrixForModule(mod) ;
mPHOS->LocalToMaster(posL,posG);
globalPosition.SetXYZ(posG[0],posG[1],posG[2]) ;
}
//Return to PHOS local system
Double_t posG[3]={globalPosition.X(),globalPosition.Y(),globalPosition.Z()} ;
Double_t posL[3]={0.,0.,0.} ;
- TGeoHMatrix *mPHOS = GetMatrixForModule(module) ;
+ const TGeoHMatrix *mPHOS = GetMatrixForModule(module) ;
mPHOS->MasterToLocal(posG,posL);
localPosition.SetXYZ(posL[0],posL[1]+fCrystalShift,-posL[2]) ;
//create vector from (0,0,0) to center of crystal surface of imod module
Double_t tmp[3]={0.,-fCrystalShift,0.} ;
- TGeoHMatrix *m = GetMatrixForModule(imod) ;
+ const TGeoHMatrix *m = GetMatrixForModule(imod) ;
Double_t posG[3]={0.,0.,0.} ;
m->LocalToMaster(tmp,posG);
TVector3 n(posG[0],posG[1],posG[2]) ;
vInc.SetXYZ(vInc.X()+x,vInc.Y(),vInc.Z()+z) ;
}
//____________________________________________________________________________
-TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForModule(Int_t mod)const {
+const TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForModule(Int_t mod)const {
//Provides shift-rotation matrix for module mod
//If GeoManager exists, take matrixes from it
return 0 ;
}
//____________________________________________________________________________
-TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForStrip(Int_t mod, Int_t strip)const {
+const TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForStrip(Int_t mod, Int_t strip)const {
//Provides shift-rotation matrix for strip unit of the module mod
//If GeoManager exists, take matrixes from it
return 0 ;
}
//____________________________________________________________________________
-TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForCPV(Int_t mod)const {
+const TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForCPV(Int_t mod)const {
//Provides shift-rotation matrix for CPV of the module mod
//If GeoManager exists, take matrixes from it
return 0 ;
}
//____________________________________________________________________________
-TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForPHOS(Int_t mod)const {
+const TGeoHMatrix * AliPHOSGeoUtils::GetMatrixForPHOS(Int_t mod)const {
//Provides shift-rotation matrix for PHOS (EMC+CPV)
//If GeoManager exists, take matrixes from it
return 0 ;
}
//____________________________________________________________________________
-void AliPHOSGeoUtils::SetMisalMatrix(TGeoHMatrix * m, Int_t mod){
+void AliPHOSGeoUtils::SetMisalMatrix(const TGeoHMatrix * m, Int_t mod){
//Fills pointers to geo matrixes
fPHOSMatrix[mod]=m ;
+
//If modules does not exist, make sure all its matrixes are zero
if(m==NULL){
fEMCMatrix[mod]=NULL ;
Double_t globTII[3] ;
TGeoHMatrix * mTII = new((*fMisalArray)[nr])TGeoHMatrix() ;
+ nr++ ;
mTII->SetRotation(rotEMC) ;
mTII->MultiplyLeft(fPHOSMatrix[mod]) ;
fPHOSMatrix[mod]->LocalToMaster(locTII,globTII) ;
loc[2] = (2*icol + 1 - fGeometryEMCA->GetNStripZ()) * strip[2] ;
fEMCMatrix[mod]->LocalToMaster(loc,glob) ;
TGeoHMatrix * mSTR = new((*fMisalArray)[nr])TGeoHMatrix(*(fEMCMatrix[mod])) ; //Use same rotation as PHOS module
+ nr++ ;
mSTR->SetTranslation(glob) ;
fStripMatrix[mod][istrip]=mSTR ;
- nr++ ;
istrip++;
}
}
Double_t rot[9]={1.,0.,0.,0.,0.,1.,0.,-1.,0.} ;
TGeoHMatrix * mCPV = new((*fMisalArray)[nr])TGeoHMatrix() ;
+ nr++ ;
mCPV->SetRotation(rot) ;
mCPV->MultiplyLeft(fPHOSMatrix[mod]) ;
mCPV->ReflectY(kFALSE) ;