#include <assert.h>
-// --- AliRoot header files ---
+// --- Root header files ---
#include <Riostream.h>
#include <TBrowser.h>
#include <TClonesArray.h>
if(fGeoName.Contains("WSUC")) fNumberOfSuperModules = 1; // Jul 12, 2007
fgInit = kTRUE;
- AliInfo(" is ended");
}
void AliEMCALGeometry::PrintGeometry()
}
}
}
- cout<<endl;
}
void AliEMCALGeometry::PrintCellIndexes(Int_t absId, int pri, char *tit)
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
if(!CheckAbsCellId(absId)) return kFALSE;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
}
AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
static Int_t iphim, ietam;
static AliEMCALShishKebabTrd1Module *mod = 0;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
}
AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
// Shift index taking into account the difference between standard SM
// and SM of half size in phi direction
- const Int_t phiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
+ const Int_t kphiIndexShift = fCentersOfCellsPhiDir.GetSize()/4; // Nov 22, 2006; was 6 for cas 2X2
static Int_t nSupMod, nModule, nIphi, nIeta, iphi, ieta;
static Int_t iphim, ietam;
static AliEMCALShishKebabTrd1Module *mod = 0;
if(nSupMod<10) {
yr = fCentersOfCellsPhiDir.At(iphi);
} else {
- yr = fCentersOfCellsPhiDir.At(iphi + phiIndexShift);
+ yr = fCentersOfCellsPhiDir.At(iphi + kphiIndexShift);
}
AliDebug(1,Form("absId %i nSupMod %i iphi %i ieta %i xr %f yr %f zr %f ",absId,nSupMod,iphi,ieta,xr,yr,zr));
fCentersOfCellsPhiDir.Set(fNPhi*fNPHIdiv);
fPhiCentersOfCells.Set(fNPhi*fNPHIdiv);
- Double_t R0 = GetIPDistance() + GetLongModuleSize()/2.;
+ Double_t r0 = GetIPDistance() + GetLongModuleSize()/2.;
for(Int_t it=0; it<fNPhi; it++) { // cycle on modules
ytCenterModule = -fParSM[1] + fPhiModuleSize*(2*it+1)/2; // center of module
for(Int_t ic=0; ic<fNPHIdiv; ic++) { // cycle on cells in module
// Define grid on phi direction
// Grid is not the same for different eta bin;
// Effect is small but is still here
- phi = TMath::ATan2(ytCenterCell, R0);
+ phi = TMath::ATan2(ytCenterCell, r0);
fPhiCentersOfCells.AddAt(phi, ind);
AliDebug(2,Form(" ind %2.2i : y %8.3f ", ind, fCentersOfCellsPhiDir.At(ind)));
if(ind>=0 && ind < GetNumberOfSuperModules()) {
TString volpath = "ALIC_1/XEN1_1/SMOD_";
- volpath += (ind+1);
+ volpath += ind+1;
if(GetKey110DEG() && ind>=10) {
volpath = "ALIC_1/XEN1_1/SM10_";
- volpath += (ind-10+1);
+ volpath += ind-10+1;
}
if(!gGeoManager->cd(volpath.Data()))
- AliFatal(Form("GeoManager cannot find path %s!",volpath.Data()));
+ AliFatal(Form("AliEMCALGeometry::GeoManager cannot find path %s!",volpath.Data()));
TGeoHMatrix* m = gGeoManager->GetCurrentMatrix();
if(m) {
}
}
+//___________________________________________________________________
void AliEMCALGeometry::GetGlobal(Int_t absId , TVector3 &vglob) const
{
// Alice numbering scheme - Jun 03, 2006
}
-void AliEMCALGeometry::GetGlobal(const AliRecPoint *rp, TVector3 &vglob) const
+//____________________________________________________________________________
+void AliEMCALGeometry::GetGlobal(const AliRecPoint* /*rp*/, TVector3& /* vglob */) const
+{
+ AliFatal(Form("Please use GetGlobalEMCAL(recPoint,gpos) instead of GetGlobal!"));
+}
+
+//_________________________________________________________________________________
+void AliEMCALGeometry::GetGlobalEMCAL(const AliEMCALRecPoint *rp, TVector3 &vglob) const
{
// Figure out the global numbering
// of a given supermodule from the
static TVector3 vloc;
static Int_t nSupMod, nModule, nIphi, nIeta;
- AliRecPoint *rpTmp = (AliRecPoint*)rp; // const_cast ??
- if(!rpTmp) return;
- AliEMCALRecPoint *rpEmc = (AliEMCALRecPoint*)rpTmp;
+ const AliEMCALRecPoint *rpTmp = rp;
+ const AliEMCALRecPoint *rpEmc = rpTmp;
GetCellIndex(rpEmc->GetAbsId(0), nSupMod, nModule, nIphi, nIeta);
rpTmp->GetLocalPosition(vloc);
return trd1;
}
-void AliEMCALGeometry::Browse(TBrowser* b)
+void AliEMCALGeometry::Browse(TBrowser* b) const
{
+ //Browse the modules
if(fShishKebabTrd1Modules) b->Add(fShishKebabTrd1Modules);
}
Bool_t AliEMCALGeometry::IsFolder() const
{
+ //Check if fShishKebabTrd1Modules is in folder
if(fShishKebabTrd1Modules) return kTRUE;
else return kFALSE;
}
+
+Double_t AliEMCALGeometry::GetPhiCenterOfSM(Int_t nsupmod) const
+{
+ //returns center of supermodule in phi
+ static int i = nsupmod/2;
+ return fPhiCentersOfSM[i];
+
+}