]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
set size of geometry data member fParSM to 3, change corresponding method to get...
authorgconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 19:43:42 +0000 (19:43 +0000)
committergconesab <gconesab@f7af4fe6-9843-0410-8265-dc069ae4e863>
Sat, 29 Jan 2011 19:43:42 +0000 (19:43 +0000)
EMCAL/AliEMCALEMCGeometry.h
EMCAL/AliEMCALGeoUtils.cxx
EMCAL/AliEMCALGeoUtils.h
EMCAL/AliEMCALGeometry.h
EMCAL/AliEMCALSurvey.cxx
EMCAL/AliEMCALUnfolding.cxx
EMCAL/AliEMCALv0.cxx

index 707dd2a8f1859f402894027ba439a5ed230c086b..6cabc0adf69095b9f2c064f9742843e21d272699 100644 (file)
@@ -114,7 +114,7 @@ public:
   Int_t   GetNTowers() const {return fNPhi * fNZ ;}
   //
   Double_t GetPhiCenterOfSM(Int_t nsupmod) const;
-  Float_t *GetSuperModulesPars() {return fParSM;}
+  Float_t GetSuperModulesPar(Int_t ipar) {return fParSM[ipar];}
   //
   Bool_t   GetPhiBoundariesOfSM   (Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const;
   Bool_t   GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const;
index 497ec00817c65050a3317a5a178255759025003c..f0499957600aad661c3ba823a34f53d304348331 100644 (file)
@@ -64,7 +64,7 @@ AliEMCALGeoUtils::AliEMCALGeoUtils():
   fCentersOfCellsPhiDir(0x0),fEtaCentersOfCells(0x0),
   fNCells(0),fNPhi(0),fCentersOfCellsXDir(0x0),fArm1EtaMin(0),
   fArm1EtaMax(0),fArm1PhiMin(0),fArm1PhiMax(0),fEtaMaxOfTRD1(0),
-  fShishKebabTrd1Modules(0),fParSM(0x0),fPhiModuleSize(0.),
+  fShishKebabTrd1Modules(0),fPhiModuleSize(0.),
   fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fNZ(0),
   fIPDistance(0.),fLongModuleSize(0.),fShellThickness(0.),
   fZLength(0.),fSampling(0.)
@@ -74,6 +74,9 @@ AliEMCALGeoUtils::AliEMCALGeoUtils():
   fEnvelop[0] = 0.;
   fEnvelop[1] = 0.;
   fEnvelop[2] = 0.;
+  fParSM[0]   = 0.;
+  fParSM[1]   = 0.;
+  fParSM[2]   = 0.;
   for(Int_t i=0;i<12;i++)fkSModuleMatrix[i]=0 ;
 
   for (Int_t i = 0; i < 48; i++)
@@ -90,7 +93,7 @@ AliEMCALGeoUtils::AliEMCALGeoUtils(const AliEMCALGeoUtils & geo)
     fCentersOfCellsPhiDir(geo.fCentersOfCellsPhiDir),fEtaCentersOfCells(geo.fEtaCentersOfCells),
     fNCells(geo.fNCells),fNPhi(geo.fNPhi),fCentersOfCellsXDir(geo.fCentersOfCellsXDir),fArm1EtaMin(geo.fArm1EtaMin),
     fArm1EtaMax(geo.fArm1EtaMax),fArm1PhiMin(geo.fArm1PhiMin),fArm1PhiMax(geo.fArm1PhiMax),fEtaMaxOfTRD1(geo.fEtaMaxOfTRD1),
-    fShishKebabTrd1Modules(geo.fShishKebabTrd1Modules),fParSM(geo.fParSM),fPhiModuleSize(geo.fPhiModuleSize),
+    fShishKebabTrd1Modules(geo.fShishKebabTrd1Modules),fPhiModuleSize(geo.fPhiModuleSize),
     fEtaModuleSize(geo.fEtaModuleSize),fPhiTileSize(geo.fPhiTileSize),fEtaTileSize(geo.fEtaTileSize),fNZ(geo.fNZ),
     fIPDistance(geo.fIPDistance),fLongModuleSize(geo.fLongModuleSize),fShellThickness(geo.fShellThickness),
     fZLength(geo.fZLength),fSampling(geo.fSampling)
@@ -98,6 +101,9 @@ AliEMCALGeoUtils::AliEMCALGeoUtils(const AliEMCALGeoUtils & geo)
   fEnvelop[0] = geo.fEnvelop[0];
   fEnvelop[1] = geo.fEnvelop[1];
   fEnvelop[2] = geo.fEnvelop[2];
+  fParSM[0]   = geo.fParSM[0];
+  fParSM[1]   = geo.fParSM[1];
+  fParSM[2]   = geo.fParSM[2];
   for(Int_t i=0;i<12;i++)fkSModuleMatrix[i]=0 ;
   
   for (Int_t i = 0; i < 48; i++)
@@ -114,7 +120,7 @@ AliEMCALGeoUtils::AliEMCALGeoUtils(const Text_t* name, const Text_t* title)
     fCentersOfCellsPhiDir(0x0),fEtaCentersOfCells(0x0),
     fNCells(0),fNPhi(0),fCentersOfCellsXDir(0x0),fArm1EtaMin(0),
     fArm1EtaMax(0),fArm1PhiMin(0),fArm1PhiMax(0),fEtaMaxOfTRD1(0),
-    fShishKebabTrd1Modules(0),fParSM(0x0),fPhiModuleSize(0.),
+    fShishKebabTrd1Modules(0),fPhiModuleSize(0.),
     fEtaModuleSize(0.),fPhiTileSize(0.),fEtaTileSize(0.),fNZ(0),
     fIPDistance(0.),fLongModuleSize(0.),fShellThickness(0.),
     fZLength(0.),fSampling(0.)
@@ -151,20 +157,22 @@ AliEMCALGeoUtils::AliEMCALGeoUtils(const Text_t* name, const Text_t* title)
   fEnvelop[0] = fEMCGeometry->GetEnvelop(0);
   fEnvelop[1] = fEMCGeometry->GetEnvelop(1);
   fEnvelop[2] = fEMCGeometry->GetEnvelop(2);
+  fParSM[0]   = fEMCGeometry->GetSuperModulesPar(0);
+  fParSM[1]   = fEMCGeometry->GetSuperModulesPar(1);
+  fParSM[2]   = fEMCGeometry->GetSuperModulesPar(2);
   fArm1EtaMin = fEMCGeometry->GetArm1EtaMin();
   fArm1EtaMax = fEMCGeometry->GetArm1EtaMax();
   fArm1PhiMin = fEMCGeometry->GetArm1PhiMin();
   fArm1PhiMax = fEMCGeometry->GetArm1PhiMax();
   fShellThickness = fEMCGeometry->GetShellThickness();
-  fZLength = fEMCGeometry->GetZLength();
-  fSampling = fEMCGeometry->GetSampling();
-  fParSM = fEMCGeometry->GetSuperModulesPars();
+  fZLength    = fEMCGeometry->GetZLength();
+  fSampling   = fEMCGeometry->GetSampling();
   fEtaModuleSize = fEMCGeometry->GetEtaModuleSize();
   fPhiModuleSize = fEMCGeometry->GetPhiModuleSize();
   fEtaTileSize = fEMCGeometry->GetEtaTileSize();
   fPhiTileSize = fEMCGeometry->GetPhiTileSize();
-  fNZ = fEMCGeometry->GetNZ();
-  fIPDistance = fEMCGeometry->GetIPDistance();
+  fNZ          = fEMCGeometry->GetNZ();
+  fIPDistance  = fEMCGeometry->GetIPDistance();
   fLongModuleSize = fEMCGeometry->GetLongModuleSize();
 
   CreateListOfTrd1Modules();
index e623d57205c9e1920ca145c22245936e0883b008..9bd8fd91f5802191ed8b200d673105325f8f0344 100644 (file)
@@ -203,7 +203,7 @@ protected:
   Float_t  fArm1PhiMax;              // Maximum angular position of EMCAL in Phi (degrees)
   Float_t  fEtaMaxOfTRD1;            // Max eta in case of TRD1 geometry (see AliEMCALShishKebabTrd1Module)
   TList    *fShishKebabTrd1Modules;  //! list of modules
-  Float_t  *fParSM;                  // SM sizes as in GEANT (TRD1)
+  Float_t  fParSM[3];                  // SM sizes as in GEANT (TRD1)
   Float_t  fPhiModuleSize;           // Phi -> X 
   Float_t  fEtaModuleSize;           // Eta -> Y 
   Float_t  fPhiTileSize;             // Size of phi tile
index 787ef4c86c18172f82ef762ce7879b00faf3fa96..1ca41f6bbc3ec2dc2a7ec87e9f09a1f7b23a5c10 100644 (file)
@@ -123,7 +123,7 @@ public:
   Int_t    GetNTowers(void) const {return fEMCGeometry->GetNTowers();}
   //
   Double_t GetPhiCenterOfSM(Int_t nsupmod) const {return fEMCGeometry->GetPhiCenterOfSM(nsupmod);}
-  Float_t *GetSuperModulesPars(void) const {return fEMCGeometry->GetSuperModulesPars();}
+  Float_t  GetSuperModulesPar(Int_t ipar) const {return fEMCGeometry->GetSuperModulesPar(ipar);}
   //
   Bool_t   GetPhiBoundariesOfSM(Int_t nSupMod, Double_t &phiMin, Double_t &phiMax) const {return fEMCGeometry->GetPhiBoundariesOfSM(nSupMod, phiMin, phiMax);}
   Bool_t   GetPhiBoundariesOfSMGap(Int_t nPhiSec, Double_t &phiMin, Double_t &phiMax) const {return fEMCGeometry->GetPhiBoundariesOfSMGap(nPhiSec, phiMin, phiMax);}
index 9275f6167358a1eef426d3f0fd5c7c557f27ee60..d984064946d491b1ba069ef5f3ef1be0548fdfca 100644 (file)
@@ -294,7 +294,7 @@ void AliEMCALSurvey::InitSuperModuleData(const TObjArray *svypts)
   
   AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance();
   //Center of supermodules
-  Float_t *pars = geom->GetSuperModulesPars();
+  Float_t pars[] = {geom->GetSuperModulesPar(0),geom->GetSuperModulesPar(1),geom->GetSuperModulesPar(2)};
   Double_t rpos = (geom->GetEnvelop(0) + geom->GetEnvelop(1))/2.;
   Double_t phi=0, phiRad=0, xpos=0, ypos=0, zpos=0;
   
@@ -506,7 +506,7 @@ void AliEMCALSurvey::InitSuperModuleData(const Double_t *xReal, const Double_t *
   //////////////////////////////////////
   AliEMCALGeometry *geom = AliEMCALGeometry::GetInstance();
   //Center of supermodules
-  Float_t *pars = geom->GetSuperModulesPars();
+  Float_t pars[] = {geom->GetSuperModulesPar(0),geom->GetSuperModulesPar(1),geom->GetSuperModulesPar(2)};
   Double_t rpos = (geom->GetEnvelop(0) + geom->GetEnvelop(1))/2.;
   Double_t phi=0, phiRad=0, xpos=0, ypos=0, zpos=0;
 
index cffddabfee1e4d52c567e39552e1b922e1735579..ebf6316557a51c16e8db3233cc862ba42973248a 100644 (file)
@@ -76,7 +76,7 @@ AliEMCALUnfolding::AliEMCALUnfolding():
   fDigitsArr(NULL)\r
 {\r
   // ctor with the indication of the file where header Tree and digits Tree are stored\r
-  \r
\r
   Init() ;\r
 }\r
 \r
@@ -127,9 +127,9 @@ void AliEMCALUnfolding::Init()
 {\r
   // Make all memory allocations which can not be done in default constructor.\r
   // Attach the Clusterizer task to the list of EMCAL tasks\r
-  \r
+\r
   AliRunLoader *rl = AliRunLoader::Instance();\r
-  if (rl->GetAliRun()){\r
+  if (rl && rl->GetAliRun()){\r
     AliEMCAL* emcal = dynamic_cast<AliEMCAL*>(rl->GetAliRun()->GetDetector("EMCAL"));\r
     if(emcal)fGeom = emcal->GetGeometry();\r
   }\r
index 5a831e954b621c88224e0802493a429bb76f7e38..97d122e167ed6a5076e430cf622b11f0314c1c23 100644 (file)
@@ -376,7 +376,7 @@ void AliEMCALv0::CreateSmod(const char* mother)
   } else {
     par[2]  = 350./2.; // 11-oct-04 - for 26 division
     AliDebug(2,Form(" par[0] %7.2f (old) \n",  par[0]));
-    Float_t *parSM = g->GetSuperModulesPars(); 
+    Float_t parSM[] = {g->GetSuperModulesPar(0),g->GetSuperModulesPar(1),g->GetSuperModulesPar(2)};
     for(int i=0; i<3; i++) par[i] = parSM[i];
   }
   gMC->Gsvolu("SMOD", "BOX", fIdTmedArr[kIdAIR], par, 3);
@@ -969,7 +969,7 @@ void AliEMCALv0::AddAlignableVolumesInALICE() const
   // eventual changes in the geometry.
   //
 
-  Float_t * pars = GetGeometry()->GetSuperModulesPars();
+  Float_t pars[] = {GetGeometry()->GetSuperModulesPar(0),GetGeometry()->GetSuperModulesPar(1),GetGeometry()->GetSuperModulesPar(2)};
   double rpos = (GetGeometry()->GetEnvelop(0) + GetGeometry()->GetEnvelop(1))/2.;
   double phi, phiRad, xpos, ypos, zpos;