5, 5, // PHOS,CPV
7, // HMPID ??
1, // MUON ??
- 12 // EMCAL
+ 22 // EMCAL and DCAL
};
const char* AliGeomManager::fgLayerName[kLastLayer - kFirstLayer] = {
0x0
};
-const char* AliGeomManager::fgkDetectorName[AliGeomManager::fgkNDetectors] = {"GRP","ITS","TPC","TRD","TOF","PHOS","HMPID","EMCAL","MUON","FMD","ZDC","PMD","T0","VZERO","ACORDE","AD","MFT"};
+const char* AliGeomManager::fgkDetectorName[AliGeomManager::fgkNDetectors] =
+{"GRP","ITS","TPC","TRD","TOF","PHOS","HMPID","EMCAL","MUON","FMD","ZDC","PMD","T0","VZERO","ACORDE","AD","MFT","FIT"};
Int_t AliGeomManager::fgNalignable[fgkNDetectors] = {0,0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
TGeoManager* AliGeomManager::fgGeometry = 0x0;
+//_____________________________________________________________________________
+void AliGeomManager::Destroy()
+{
+ // destroy the manager as well as gGeoManager (if it was not attached to fgGeometry)
+ TGeoManager::UnlockGeometry();
+ delete gGeoManager;
+ fgGeometry = gGeoManager = 0;
+ ResetPNEntriesLUT();
+}
+
//_____________________________________________________________________________
void AliGeomManager::LoadGeometry(const char *geomFileName)
{
// Check over the ten EMCAL full supermodules and the two EMCAL half supermodules
TString emcalSM;
- TString baseEmcalSM("ALIC_1/XEN1_1/SM");
+ TString baseEmcalSM("ALIC_1/XEN1_1/");
Bool_t emcalActive=kFALSE;
- Bool_t emcalSMs[12] = {kFALSE};
- for(Int_t sm=0; sm<12; sm++)
+ Bool_t emcalSMs[22] = {kFALSE};
+ for(Int_t sm=0; sm<22; sm++)
{
emcalSM=baseEmcalSM;
if(sm<10){
- emcalSM += "OD_";
- emcalSM += (sm+1);
- }else{
- emcalSM += "10_";
- emcalSM += (sm-9);
+ emcalSM += "SMOD_";
+ emcalSM += (sm+1);
+ }else if(sm/2 == 5){
+ emcalSM += "SM10_";
+ emcalSM += (sm-9);
+ }else if(sm > 11){
+ emcalSM += "DCSM_";
+ emcalSM += (sm-11);
}
if(fgGeometry->CheckPath(emcalSM.Data()))
{
TString str = "EMCAL/FullSupermodule";
modnum=0;
- for (Int_t iModule=1; iModule <= 12; iModule++) {
- if(!emcalSMs[iModule-1]) continue;
+ for (Int_t iModule=0; iModule < 22; iModule++) {
+ if(!emcalSMs[iModule]) continue;
symname = str;
- symname += iModule;
- if(iModule >10) {
+ symname += iModule+1;
+ if(iModule/2 == 5) {// 10,11
symname = "EMCAL/HalfSupermodule";
- symname += iModule-10;
+ symname += iModule-9;
+ }else if(iModule > 11) {// 12 ~ 21
+ symname = "EMCAL/DCALSupermodule";
+ symname += iModule-11;
}
- modnum = iModule-1;
+ modnum = iModule;
uid = LayerToVolUID(kEMCAL,modnum);
pne = fgGeometry->GetAlignableEntryByUID(uid);
if(!pne)
}
//_____________________________________________________________________________
-Bool_t AliGeomManager::ApplyAlignObjsFromCDB(const char* AlignDetsList)
+Bool_t AliGeomManager::ApplyAlignObjsFromCDB(const char* alignDetsList)
{
// Calls AddAlignObjsFromCDBSingleDet for the detectors appearing in
// the list passed as argument (called by AliSimulation and
TString alObjsNotLoaded="";
TString alObjsLoaded="";
- TString AlignDetsString(AlignDetsList);
- TObjArray *detsarr = AlignDetsString.Tokenize(' ');
+ TString alignDetsString(alignDetsList);
+ TObjArray *detsarr = alignDetsString.Tokenize(' ');
TIter iter(detsarr);
TObjString *str = 0;
}
-//_____________________________________________________________________________
-Bool_t AliGeomManager::ApplyAlignObjsToGeom(AliCDBParam* param, AliCDBId& Id)
-{
- // read collection of alignment objects (AliAlignObj derived) saved
- // in the TClonesArray ClArrayName in the AliCDBEntry identified by
- // param (to get the AliCDBStorage) and Id; apply the alignment objects
- // to the geometry
- //
-
- AliCDBStorage* storage = AliCDBManager::Instance()->GetStorage(param);
- AliCDBEntry* entry = storage->Get(Id);
- TClonesArray* alignObjArray = ((TClonesArray*) entry->GetObject());
-
- return ApplyAlignObjsToGeom(*alignObjArray);
-
-}
-
//_____________________________________________________________________________
Bool_t AliGeomManager::ApplyAlignObjsToGeom(const char* uri, const char* path, Int_t runnum, Int_t version, Int_t sversion)
{
// to the geometry
//
- AliCDBParam* param = AliCDBManager::Instance()->CreateParameter(uri);
+ AliCDBStorage* storage = AliCDBManager::Instance()->GetStorage(uri);
AliCDBId id(path, runnum, runnum, version, sversion);
+ AliCDBEntry* entry = storage->Get(id);
+ TClonesArray* alignObjArray = dynamic_cast<TClonesArray*>(entry->GetObject());
- return ApplyAlignObjsToGeom(param, id);
+ return ApplyAlignObjsToGeom(*alignObjArray);
}