// local numbering and the transformation
// matrix stored by the geometry manager (allows for misaligned
// geometry)
-
-// if(ind>=0 && ind < fEMCGeometry->GetNumberOfSuperModules()) {
-// TString volpath = "ALIC_1/XEN1_1/SMOD_";
-// volpath += ind+1;
-//
-// if(fKey110DEG && ind>=10) {
-// volpath = "ALIC_1/XEN1_1/SM10_";
-// volpath += ind-10+1;
-// }
-//
-// if(!gGeoManager->cd(volpath.Data()))
-// AliFatal(Form("AliEMCALGeometry::GeoManager cannot find path %s!",volpath.Data()));
-//
-// TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
const TGeoHMatrix* m = GetMatrixForSuperModule(ind);
if(m) {
} else {
AliFatal("Geo matrixes are not loaded \n") ;
}
-// }
}
//________________________________________________________________________________________________
static Int_t nSupMod, nModule, nIphi, nIeta;
static double loc[3];
- if (!gGeoManager || !gGeoManager->IsClosed()) {
- AliError("Can't get the global coordinates! gGeoManager doesn't exist or it is still open!");
- return;
- }
-
glob[0]=glob[1]=glob[2]=0.0; // bad case
if(RelPosCellInSModule(absId, loc)) {
GetCellIndex(absId, nSupMod, nModule, nIphi, nIeta);
-// TString volpath = "ALIC_1/XEN1_1/SMOD_";
-// volpath += (nSupMod+1);
-//
-// if(fKey110DEG && nSupMod>=10) {
-// volpath = "ALIC_1/XEN1_1/SM10_";
-// volpath += (nSupMod-10+1);
-// }
-// if(!gGeoManager->cd(volpath.Data()))
-// AliFatal(Form("GeoManager cannot find path %s!",volpath.Data()));
-//
-// TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
const TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod);
if(m) {
m->LocalToMaster(loc, glob);
Double_t factor = (fIPDistance-vtx[1])/p[1];
direction = vtx + factor*p;
- if (!gGeoManager){
- AliFatal("Geo manager not initialized\n");
- }
//from particle direction -> tower hitted
GetAbsCellIdFromEtaPhi(direction.Eta(),direction.Phi(),absId);
//3rd point on emcal cell plane
if(!RelPosCellInSModule(absId3,loc3)) return;
-// TString volpath = "ALIC_1/XEN1_1/SMOD_";
-// volpath += (nSupMod+1);
-//
-// if(fKey110DEG && nSupMod>=10) {
-// volpath = "ALIC_1/XEN1_1/SM10_";
-// volpath += (nSupMod-10+1);
-// }
-// if(!gGeoManager->cd(volpath.Data())){
-// AliFatal(Form("GeoManager cannot find path %s!",volpath.Data()))
-// return;
-// }
-// TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
+ // Get Matrix
const TGeoHMatrix* m = GetMatrixForSuperModule(nSupMod);
if(m) {
m->LocalToMaster(loc, glob);
//________________________________________________________________________________________________
Bool_t AliEMCALGeoUtils::GetAbsFastORIndexFromTRU(const Int_t iTRU, const Int_t iADC, Int_t& id) const
{
+ //Trigger mapping method, get FastOr Index from TRU
+
if (iTRU > 31 || iTRU < 0 || iADC > 95 || iADC < 0)
{
AliError("TRU out of range!");
//________________________________________________________________________________________________
Bool_t AliEMCALGeoUtils::GetTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iADC) const
{
+
+ //Trigger mapping method, get TRU number from FastOr Index
+
if (id > 3071 || id < 0)
{
AliError("Id out of range!");
//________________________________________________________________________________________________
Bool_t AliEMCALGeoUtils::GetPositionInTRUFromAbsFastORIndex(const Int_t id, Int_t& iTRU, Int_t& iEta, Int_t& iPhi) const
{
+ //Trigger mapping method, get position in TRU from FasOr Index
+
Int_t iADC;
Bool_t isOK = GetTRUFromAbsFastORIndex(id, iTRU, iADC);
//________________________________________________________________________________________________
Bool_t AliEMCALGeoUtils::GetPositionInSMFromAbsFastORIndex(const Int_t id, Int_t& iSM, Int_t& iEta, Int_t& iPhi) const
{
+ //Trigger mapping method, get position in Super Module from FasOr Index
+
Int_t iTRU;
Bool_t isOK = GetPositionInTRUFromAbsFastORIndex(id, iTRU, iEta, iPhi);
//________________________________________________________________________________________________
Bool_t AliEMCALGeoUtils::GetAbsFastORIndexFromPositionInTRU(const Int_t iTRU, const Int_t iEta, const Int_t iPhi, Int_t& id) const
{
+ //Trigger mapping method, get Index if FastOr from Position in TRU
+
if (iTRU < 0 || iTRU > 31 || iEta < 0 || iEta > 23 || iPhi < 0 || iPhi > 3) return kFALSE;
if ( int( iTRU / 3 ) % 2 ) // C side
//____________________________________________________________________________
const TGeoHMatrix * AliEMCALGeoUtils::GetMatrixForSuperModule(Int_t smod) const {
+
//Provides shift-rotation matrix for EMCAL
if(smod < 0 || smod > fEMCGeometry->GetNumberOfSuperModules())
}
return gGeoManager->GetCurrentMatrix();
}
-
+
if(fkSModuleMatrix[smod]){
return fkSModuleMatrix[smod] ;
}
else{
- printf("Can not find EMCAL misalignment matrixes\n") ;
- printf("Either import TGeoManager from geometry.root or \n");
- printf("read stored matrixes from AliESD Header: \n") ;
- printf("AliEMCALGeoUtils::SetMisalMatrixes(header->GetEMCALMisalMatrix()) \n") ;
+ AliInfo("Stop:");
+ printf("\t Can not find EMCAL misalignment matrixes\n") ;
+ printf("\t Either import TGeoManager from geometry.root or \n");
+ printf("\t read stored matrixes from AliESD Header: \n") ;
+ printf("\t AliEMCALGeoUtils::SetMisalMatrixes(header->GetEMCALMisalMatrix()) \n") ;
abort() ;
}
return 0 ;