#include <AliCDBManager.h> //CreateMaterials()
#include <AliCDBEntry.h> //CreateMaterials()
#include <TGeoPhysicalNode.h> //AddAlignableVolumes()
-
+#include "AliGeomManager.h" //AddAlignableVolumes()
+
ClassImp(AliHMPIDv2)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDv2::AddAlignableVolumes()const
// Associates the symbolic volume name with the corresponding volume path. Interface method from AliModule invoked from AliMC
// Arguments: none
// Returns: none
-
+
+ AliGeomManager::ELayerID idHMPID = AliGeomManager::kHMPID;
+ Int_t modUID, modnum = 0;
+
TGeoHMatrix *pGm = new TGeoHMatrix;
Double_t trans[3]={0.5*131.24,0.5*126.16,0}; //translation from LORS to TGeo RS (half size AllX, half size allY,0)
pGm->SetTranslation(trans);
Double_t ph[7]={10.,10., 30.,30.,30. ,50.,50};
for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
- gGeoManager->SetAlignableEntry(Form("/HMPID/Chamber%i",iCh),Form("ALIC_1/Hmp_%i",iCh)); //aligment without AliCluster3D
- //Get Tracking To Local matrcies for alignment with AliCluster3D
- TGeoPNEntry *eCh = gGeoManager->GetAlignableEntry(Form("/HMPID/Chamber%i",iCh));
- if (eCh) {
- const char *path = eCh->GetTitle();
- if (!gGeoManager->cd(path)) {
- AliFatal(Form("Volume path %s not valid!",path));
- }
- TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
- //Double_t phi = 20.0 * ((iCh+1) / 3) + 10.0;
- Double_t phi = ph[iCh];
- TGeoHMatrix *t2l = new TGeoHMatrix();
- t2l->RotateZ(phi);
- t2l->MultiplyLeft(&(globMatrix->Inverse()));
- eCh->SetMatrix(t2l);
- }//eCh
- else {
- AliError(Form("Alignable entry /HMPID/Chamber%i is not valid!",iCh));
- }
- }//iCh loop
+ modUID = AliGeomManager::LayerToVolUID(idHMPID,modnum++);
+ if(!gGeoManager->SetAlignableEntry(Form("/HMPID/Chamber%i",iCh),Form("ALIC_1/Hmp_%i",iCh),modUID))
+ AliFatal("AliHMPIDv3::Unable to set alignable entry!!"); //aligment without AliCluster3D
+ //Get Tracking To Local matricies for alignment with AliCluster3D
+ TGeoPNEntry *eCh = gGeoManager->GetAlignableEntryByUID(modUID);
+ TGeoHMatrix *globMatrix = eCh->GetGlobalOrig();
+
+ //Double_t phi = 20.0 * ((iCh+1) / 3) + 10.0;
+ Double_t phi = ph[iCh];
+ TGeoHMatrix *t2l = new TGeoHMatrix();
+ t2l->RotateZ(phi);
+ t2l->MultiplyLeft(&(globMatrix->Inverse()));
+ eCh->SetMatrix(t2l);
+ }//iCh loop
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDv2::CreateMaterials()
#include <TGeoXtru.h> //CradleBaseVolume()
#include <TGeoCompositeShape.h> //CradleBaseVolume()
#include <TString.h> //StepManager()
+#include "AliGeomManager.h" //AddAlignableVolumes()
+
ClassImp(AliHMPIDv3)
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDv3::AddAlignableVolumes()const
// Arguments: none
// Returns: none
+ AliGeomManager::ELayerID idHMPID = AliGeomManager::kHMPID;
+ Int_t modUID, modnum = 0;
+
TGeoHMatrix *pGm = new TGeoHMatrix;
Double_t trans[3]={0.5*131.24,0.5*126.16,0}; //translation from LORS to TGeo RS (half size AllX, half size allY,0)
pGm->SetTranslation(trans);
Double_t ph[7]={10.,10., 30.,30.,30. ,50.,50};
for(Int_t iCh=AliHMPIDParam::kMinCh;iCh<=AliHMPIDParam::kMaxCh;iCh++) {
- gGeoManager->SetAlignableEntry(Form("/HMPID/Chamber%i",iCh),Form("ALIC_1/Hmp%i_0",iCh)); //aligment without AliCluster3D
- //Get Tracking To Local matrcies for alignment with AliCluster3D
- TGeoPNEntry *eCh = gGeoManager->GetAlignableEntry(Form("/HMPID/Chamber%i",iCh));
- if (eCh) {
- const char *path = eCh->GetTitle();
- if (!gGeoManager->cd(path)) {
- AliFatal(Form("Volume path %s not valid!",path));
- }
- TGeoHMatrix *globMatrix = gGeoManager->GetCurrentMatrix();
- //Double_t phi = 20.0 * ((iCh+1) / 3) + 10.0;
- Double_t phi = ph[iCh];
- TGeoHMatrix *t2l = new TGeoHMatrix();
- t2l->RotateZ(phi);
- t2l->MultiplyLeft(&(globMatrix->Inverse()));
- eCh->SetMatrix(t2l);
- }//eCh
- else {
- AliError(Form("Alignable entry /HMPID/Chamber%i is not valid!",iCh));
- }
- }//iCh loop
+ modUID = AliGeomManager::LayerToVolUID(idHMPID,modnum++);
+ if(!gGeoManager->SetAlignableEntry(Form("/HMPID/Chamber%i",iCh),Form("ALIC_1/Hmp%i_0",iCh),modUID))
+ AliFatal("AliHMPIDv3::Unable to set alignable entry!!"); //aligment without AliCluster3D
+ //Get Tracking To Local matricies for alignment with AliCluster3D
+ TGeoPNEntry *eCh = gGeoManager->GetAlignableEntryByUID(modUID);
+ TGeoHMatrix *globMatrix = eCh->GetGlobalOrig();
+
+ //Double_t phi = 20.0 * ((iCh+1) / 3) + 10.0;
+ Double_t phi = ph[iCh];
+ TGeoHMatrix *t2l = new TGeoHMatrix();
+ t2l->RotateZ(phi);
+ t2l->MultiplyLeft(&(globMatrix->Inverse()));
+ eCh->SetMatrix(t2l);
+ }//iCh loop
+
}
//++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
void AliHMPIDv3::CreateMaterials()