From: hristov Date: Mon, 20 Jun 2005 00:34:07 +0000 (+0000) Subject: Possibility to store and retrieve TGeo geometry to/from file (R.Grosso) X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=4a9de4afd662a8edd3465f75afbc9be3be45d940 Possibility to store and retrieve TGeo geometry to/from file (R.Grosso) --- diff --git a/CRT/AliCRT.cxx b/CRT/AliCRT.cxx index 502f411b031..87a430d8e24 100644 --- a/CRT/AliCRT.cxx +++ b/CRT/AliCRT.cxx @@ -119,21 +119,21 @@ void AliCRT::CreateMaterials() Float_t epsil, stmin, tmaxfd, deemax, stemax; // // Aluminum - AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(9, "ALUMINIUM0$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(29, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(49, "ALUMINIUM2$", 26.98, 13., 2.7, 8.9, 37.2); // // Iron - AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(10, "IRON0$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(30, "IRON1$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(50, "IRON2$ ", 55.85, 26., 7.87, 1.76, 17.1); // // Air - AliMaterial(15, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.); - AliMaterial(35, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.); - AliMaterial(55, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.); - AliMaterial(75, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.); - AliMaterial(95, "AIR$ ", 14.61, 7.3, .001205, 30423.24, 67500.); + AliMaterial(15, "AIR0$ ", 14.61, 7.3, .001205, 30423.24, 67500.); + AliMaterial(35, "AIR1$ ", 14.61, 7.3, .001205, 30423.24, 67500.); + AliMaterial(55, "AIR2$ ", 14.61, 7.3, .001205, 30423.24, 67500.); + AliMaterial(75, "AIR3$ ", 14.61, 7.3, .001205, 30423.24, 67500.); + AliMaterial(95, "AIR4$ ", 14.61, 7.3, .001205, 30423.24, 67500.); // Scintillator material polystyrene @@ -187,9 +187,9 @@ void AliCRT::CreateMaterials() // The scintillator of the CPV made of Polystyrene // scintillator -> idtmed[1112] - AliMedium(12 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); - AliMedium(13 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); - AliMedium(14 , "CPV scint. ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); + AliMedium(12 , "CPV scint.0 ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); + AliMedium(13 , "CPV scint.1 ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); + AliMedium(14 , "CPV scint.2 ", 13, 1, isxfld, sxmgmx, 10., stemax, deemax, epsil, stmin); // Molasse -> idtmed[1123] AliMedium(24 , "Molasse ", 24, 0, xfield, xfieldm, tmaxfd, stemax, deemax, xepsil, stmin); diff --git a/FMD/AliFMDGeoSimulator.cxx b/FMD/AliFMDGeoSimulator.cxx index 3799dd52c6e..cbcdc64c703 100644 --- a/FMD/AliFMDGeoSimulator.cxx +++ b/FMD/AliFMDGeoSimulator.cxx @@ -157,13 +157,13 @@ AliFMDGeoSimulator::DefineMaterials() return; } AliFMDSimulator::DefineMaterials(); - fSi = gGeoManager->GetMedium("FMDSi$"); - fC = gGeoManager->GetMedium("FMDCarbon$"); - fAl = gGeoManager->GetMedium("FMDAluminum$"); - fChip = gGeoManager->GetMedium("FMDChip$"); - fAir = gGeoManager->GetMedium("FMDAir$"); - fPCB = gGeoManager->GetMedium("FMDPCB$"); - fPlastic = gGeoManager->GetMedium("FMDPlastic$"); + fSi = gGeoManager->GetMedium("FMD_Si$"); + fC = gGeoManager->GetMedium("FMD_Carbon$"); + fAl = gGeoManager->GetMedium("FMD_Aluminum$"); + fChip = gGeoManager->GetMedium("FMD_Chip$"); + fAir = gGeoManager->GetMedium("FMD_Air$"); + fPCB = gGeoManager->GetMedium("FMD_PCB$"); + fPlastic = gGeoManager->GetMedium("FMD_Plastic$"); } //____________________________________________________________________ diff --git a/FMD/AliFMDSimulator.cxx b/FMD/AliFMDSimulator.cxx index d70ac4591c6..bdba7b83426 100644 --- a/FMD/AliFMDSimulator.cxx +++ b/FMD/AliFMDSimulator.cxx @@ -196,9 +196,9 @@ AliFMDSimulator::DefineMaterials() precision = .001; minStepSize = .001; id = kSiId; - fFMD->AliMaterial(id, "FMD Si$", + fFMD->AliMaterial(id, "Si$", a, z, density, radiationLength, absorbtionLength); - fFMD->AliMedium(kSiId, "FMD Si$", + fFMD->AliMedium(kSiId, "Si$", id,1,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); @@ -213,9 +213,9 @@ AliFMDSimulator::DefineMaterials() precision = .003; minStepSize = .003; id = kCarbonId; - fFMD->AliMaterial(id, "FMD Carbon$", + fFMD->AliMaterial(id, "Carbon$", a, z, density, radiationLength, absorbtionLength); - fFMD->AliMedium(kCarbonId, "FMD Carbon$", + fFMD->AliMedium(kCarbonId, "Carbon$", id,0,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); @@ -225,9 +225,9 @@ AliFMDSimulator::DefineMaterials() density = 2.7; radiationLength = 8.9; id = kAlId; - fFMD->AliMaterial(id, "FMD Aluminum$", + fFMD->AliMaterial(id, "Aluminum$", a, z, density, radiationLength, absorbtionLength); - fFMD->AliMedium(kAlId, "FMD Aluminum$", + fFMD->AliMedium(kAlId, "Aluminum$", id, 0, fieldType, maxField, maxBending, maxStepSize, maxEnergyLoss, precision, minStepSize); @@ -246,8 +246,8 @@ AliFMDSimulator::DefineMaterials() precision = .003; minStepSize = .003; id = kSiChipId; - fFMD->AliMixture(id, "FMD Si Chip$", as, zs, density, 6, ws); - fFMD->AliMedium(kSiChipId, "FMD Si Chip$", + fFMD->AliMixture(id, "Si Chip$", as, zs, density, 6, ws); + fFMD->AliMedium(kSiChipId, "Si Chip$", id, 0, fieldType, maxField, maxBending, maxStepSize, maxEnergyLoss, precision, minStepSize); } @@ -264,8 +264,8 @@ AliFMDSimulator::DefineMaterials() precision = .001; minStepSize = .001; id = KaptionId; - fFMD->AliMixture(id, "FMD Kaption$", as, zs, density, 4, ws); - fFMD->AliMedium(kAlId, "FMD Kaption$", + fFMD->AliMixture(id, "Kaption$", as, zs, density, 4, ws); + fFMD->AliMedium(kAlId, "Kaption$", id,0,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); } @@ -282,8 +282,8 @@ AliFMDSimulator::DefineMaterials() precision = .001; minStepSize = .001; id = kAirId; - fFMD->AliMixture(id, "FMD Air$", as, zs, density, 4, ws); - fFMD->AliMedium(kAirId, "FMD Air$", + fFMD->AliMixture(id, "Air$", as, zs, density, 4, ws); + fFMD->AliMedium(kAirId, "Air$", id,0,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); } @@ -308,8 +308,8 @@ AliFMDSimulator::DefineMaterials() precision = .001; minStepSize = .001; id = kPcbId; - fFMD->AliMixture(id, "FMD PCB$", as, zs, density, 14, ws); - fFMD->AliMedium(kPcbId, "FMD PCB$", + fFMD->AliMixture(id, "PCB$", as, zs, density, 14, ws); + fFMD->AliMedium(kPcbId, "PCB$", id,0,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); } @@ -325,8 +325,8 @@ AliFMDSimulator::DefineMaterials() precision = .003; minStepSize = .003; id = kPlasticId; - fFMD->AliMixture(id, "FMD Plastic$", as, zs, density, -2, ws); - fFMD->AliMedium(kPlasticId, "FMD Plastic$", + fFMD->AliMixture(id, "Plastic$", as, zs, density, -2, ws); + fFMD->AliMedium(kPlasticId, "Plastic$", id,0,fieldType,maxField,maxBending, maxStepSize,maxEnergyLoss,precision,minStepSize); } diff --git a/MUON/AliMUONCommonGeometryBuilder.cxx b/MUON/AliMUONCommonGeometryBuilder.cxx index 1bb97bb0dcd..647af93d236 100644 --- a/MUON/AliMUONCommonGeometryBuilder.cxx +++ b/MUON/AliMUONCommonGeometryBuilder.cxx @@ -129,8 +129,8 @@ void AliMUONCommonGeometryBuilder::CreateMaterials() Float_t sXMGMX = gAlice->Field()->Max(); // // --- Define the various materials for GEANT --- - fMUON->AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - fMUON->AliMaterial(10, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); + fMUON->AliMaterial(9, "ALUMINIUM0$", 26.98, 13., 2.7, 8.9, 37.2); + fMUON->AliMaterial(10, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2); fMUON->AliMaterial(49, "Kapton$", 12.01,6,1.42,-28.6,999); // from DPG fMUON->AliMaterial(42, "Copper$", 63.546,29.,8.96,-1.43,9.6); fMUON->AliMaterial(43, "FR4$", 17.749, 8.875, 1.7, -19.4, 999.); // from DPG @@ -207,9 +207,9 @@ void AliMUONCommonGeometryBuilder::CreateMaterials() // // Aluminum - fMUON->AliMedium(4, "ALU_CH_US ", 9, 0, iSXFLD, sXMGMX, tmaxfd, maxStepAlu, + fMUON->AliMedium(4, "ALU_CH_US0 ", 9, 0, iSXFLD, sXMGMX, tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin); - fMUON->AliMedium(5, "ALU_CH_US ", 10, 0, iSXFLD, sXMGMX, tmaxfd, maxStepAlu, + fMUON->AliMedium(5, "ALU_CH_US1 ", 10, 0, iSXFLD, sXMGMX, tmaxfd, maxStepAlu, maxDestepAlu, epsil, stmin); // // Ar-isoC4H10 gas diff --git a/MUON/AliMUONGeometryBuilder.cxx b/MUON/AliMUONGeometryBuilder.cxx index 083884d2bfd..2cfd668a431 100644 --- a/MUON/AliMUONGeometryBuilder.cxx +++ b/MUON/AliMUONGeometryBuilder.cxx @@ -34,6 +34,8 @@ #include "AliMUONGeometryConstituent.h" #include "AliModule.h" #include "AliLog.h" +#include "AliRun.h" + ClassImp(AliMUONGeometryBuilder) @@ -377,9 +379,16 @@ void AliMUONGeometryBuilder::InitGeometry() AliMUONVGeometryBuilder* builder = (AliMUONVGeometryBuilder*)fGeometryBuilders->At(i); + // Read alignement data if geometry is read from Root file + if (gAlice->IsRootGeometry()) { + fAlign = true; + builder->ReadTransformations(); + } + // Set sesitive volumes with each builder builder->SetSensitiveVolumes(); + // Read sensitive volume map from a file builder->ReadSVMap(); if (!fAlign) builder->FillTransformations(); diff --git a/START/AliSTARTv1.cxx b/START/AliSTARTv1.cxx index 778244b4eed..b7cef7a6fc8 100755 --- a/START/AliSTARTv1.cxx +++ b/START/AliSTARTv1.cxx @@ -466,9 +466,9 @@ void AliSTARTv1::CreateMaterials() Float_t densupport=0.1; //*** Definition Of avaible START materials *** - AliMaterial(0, "START Steel$", 55.850,26.,7.87,1.76,999); - AliMaterial(1, "START Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999); - AliMixture(2, "START Air$", aAir, zAir, dAir,4,wAir); + AliMaterial(0, "Steel$", 55.850,26.,7.87,1.76,999); + AliMaterial(1, "Vacuum$", 1.e-16,1.e-16,1.e-16,1.e16,999); + AliMixture(2, "Air$", aAir, zAir, dAir,4,wAir); AliMaterial(10, "CarbonPlastic$", 12.01, 6.0, 2.26, 18.8,999); AliMaterial(11, "Aliminium$", 26.98, 13.0, 2.7, 8.9,999); diff --git a/STEER/AliMC.cxx b/STEER/AliMC.cxx index e1bde47e016..16a642ff6fb 100644 --- a/STEER/AliMC.cxx +++ b/STEER/AliMC.cxx @@ -26,6 +26,7 @@ #include #include #include +#include #include "TGeant3.h" @@ -144,9 +145,24 @@ void AliMC::Copy(TObject &) const void AliMC::ConstructGeometry() { // - // Create modules, materials, geometry + // Either load geometry from file or create it through usual + // loop on detectors. In the first case the method + // AliModule::CreateMaterials() only builds fIdtmed and is postponed + // at InitGeometry(). // + if(gAlice->IsRootGeometry()){ + // Load geometry + const char *geomfilename = gAlice->GetGeometryFileName(); + if(gSystem->ExpandPathName(geomfilename)){ + AliInfo(Form("Loading geometry from file:\n %40s\n\n",geomfilename)); + TGeoManager::Import(geomfilename); + }else{ + AliInfo(Form("Geometry file %40s not found!\n",geomfilename)); + return; + } + }else{ + // Create modules, materials, geometry TStopwatch stw; TIter next(gAlice->Modules()); AliModule *detector; @@ -159,6 +175,8 @@ void AliMC::ConstructGeometry() AliInfo(Form("%10s R:%.2fs C:%.2fs", detector->GetName(),stw.RealTime(),stw.CpuTime())); } + } + } //_______________________________________________________________________ @@ -168,19 +186,20 @@ void AliMC::InitGeometry() // Initialize detectors and display geometry // - AliInfo("Initialisation:"); - TStopwatch stw; - TIter next(gAlice->Modules()); - AliModule *detector; - while((detector = dynamic_cast(next()))) { - stw.Start(); - // Initialise detector and display geometry - detector->Init(); - detector->BuildGeometry(); - AliInfo(Form("%10s R:%.2fs C:%.2fs", - detector->GetName(),stw.RealTime(),stw.CpuTime())); - } - + AliInfo("Initialisation:"); + TStopwatch stw; + TIter next(gAlice->Modules()); + AliModule *detector; + while((detector = dynamic_cast(next()))) { + stw.Start(); + // Initialise detector and display geometry + if(gAlice->IsRootGeometry()) detector->CreateMaterials(); + detector->Init(); + detector->BuildGeometry(); + AliInfo(Form("%10s R:%.2fs C:%.2fs", + detector->GetName(),stw.RealTime(),stw.CpuTime())); + } + } //_______________________________________________________________________ @@ -480,12 +499,12 @@ void AliMC::ResetHits() void AliMC::PostTrack() { // Posts tracks for each module - TObjArray &dets = *gAlice->Modules(); - AliModule *module; - - for(Int_t i=0; i<=gAlice->GetNdets(); i++) - if((module = dynamic_cast(dets[i]))) - module->PostTrack(); + TObjArray &dets = *gAlice->Modules(); + AliModule *module; + + for(Int_t i=0; i<=gAlice->GetNdets(); i++) + if((module = dynamic_cast(dets[i]))) + module->PostTrack(); } //_______________________________________________________________________ diff --git a/STEER/AliModule.cxx b/STEER/AliModule.cxx index 88f641f7bd5..15e06c96e2f 100644 --- a/STEER/AliModule.cxx +++ b/STEER/AliModule.cxx @@ -40,6 +40,8 @@ #include #include #include +#include +#include #include "AliLog.h" #include "AliConfig.h" @@ -242,8 +244,19 @@ void AliModule::AliMaterial(Int_t imat, const char* name, Float_t a, // nwbuf number of user words // Int_t kmat; - gMC->Material(kmat, name, a, z, dens, radl, absl, buf, nwbuf); - (*fIdmate)[imat]=kmat; + //Build the string uniquename as "DET_materialname" + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + //if geometry loaded from file only fill fIdmate, else create material too + if(gAlice->IsRootGeometry()){ + TGeoMaterial *mat = gGeoManager->GetMaterial(uniquename.Data()); + kmat = mat->GetUniqueID(); + (*fIdmate)[imat]=kmat; + }else{ + gMC->Material(kmat, uniquename.Data(), a, z, dens, radl, absl, buf, nwbuf); + (*fIdmate)[imat]=kmat; + } } //_______________________________________________________________________ @@ -297,8 +310,19 @@ void AliModule::AliMixture(Int_t imat, const char *name, Float_t *a, // wmat array of concentrations // Int_t kmat; - gMC->Mixture(kmat, name, a, z, dens, nlmat, wmat); - (*fIdmate)[imat]=kmat; + //Build the string uniquename as "DET_mixturename" + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + //if geometry loaded from file only fill fIdmate, else create mixture too + if(gAlice->IsRootGeometry()){ + TGeoMaterial *mat = gGeoManager->GetMaterial(uniquename.Data()); + kmat = mat->GetUniqueID(); + (*fIdmate)[imat]=kmat; + }else{ + gMC->Mixture(kmat, uniquename.Data(), a, z, dens, nlmat, wmat); + (*fIdmate)[imat]=kmat; + } } //_______________________________________________________________________ @@ -330,9 +354,20 @@ void AliModule::AliMedium(Int_t numed, const char *name, Int_t nmat, // = 3 constant magnetic field along z // Int_t kmed; - gMC->Medium(kmed,name, (*fIdmate)[nmat], isvol, ifield, fieldm, - tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf); - (*fIdtmed)[numed]=kmed; + //Build the string uniquename as "DET_mediumname" + TString uniquename = GetName(); + uniquename.Append("_"); + uniquename.Append(name); + //if geometry loaded from file only fill fIdtmed, else create medium too + if(gAlice->IsRootGeometry()){ + TGeoMedium *med = gGeoManager->GetMedium(uniquename.Data()); + kmed = med->GetId(); + (*fIdtmed)[numed]=kmed; + }else{ + gMC->Medium(kmed, uniquename.Data(), (*fIdmate)[nmat], isvol, ifield, + fieldm, tmaxfd, stemax, deemax, epsil, stmin, ubuf, nbuf); + (*fIdtmed)[numed]=kmed; + } } //_______________________________________________________________________ diff --git a/STEER/AliRun.cxx b/STEER/AliRun.cxx index 14a3ac58554..481580699d0 100644 --- a/STEER/AliRun.cxx +++ b/STEER/AliRun.cxx @@ -49,6 +49,7 @@ #include #include #include +#include // #include "AliLog.h" #include "AliDetector.h" @@ -89,6 +90,7 @@ AliRun::AliRun(): fPDGDB(0), //Particle factory object fConfigFunction("\0"), fRandom(0), + fIsRootGeometry(kFALSE), fRunLoader(0x0) { // @@ -117,6 +119,7 @@ AliRun::AliRun(const AliRun& arun): fPDGDB(0), //Particle factory object fConfigFunction("\0"), fRandom(0), + fIsRootGeometry(kFALSE), fRunLoader(0x0) { // @@ -144,6 +147,7 @@ AliRun::AliRun(const char *name, const char *title): fPDGDB(TDatabasePDG::Instance()), //Particle factory object! fConfigFunction("Config();"), fRandom(new TRandom3()), + fIsRootGeometry(kFALSE), fRunLoader(0x0) { // @@ -280,6 +284,13 @@ void AliRun::SetField(AliMagF* magField) fField->ReadField(); } +//_______________________________________________________________________ +void AliRun::SetRootGeometry(Bool_t flag) +{ +// Instruct application that the geometry is to be retreived from a root file. + fIsRootGeometry = flag; + if (flag) gMC->SetRootGeometry(); +} //_______________________________________________________________________ void AliRun::SetField(Int_t type, Int_t version, Float_t scale, Float_t maxField, const char* filename) diff --git a/STEER/AliRun.h b/STEER/AliRun.h index e97ba7673d7..855b1cafede 100644 --- a/STEER/AliRun.h +++ b/STEER/AliRun.h @@ -79,7 +79,10 @@ public: virtual void Init(const char *setup="Config.C") {InitMC(setup);} Bool_t IsFolder() const {return kTRUE;} virtual AliLego* Lego() const {return fLego;} - + Bool_t IsRootGeometry() const {return fIsRootGeometry;} + void SetRootGeometry(Bool_t flag=kTRUE); + const char* GetGeometryFileName() const {return fGeometryFileName.Data();} + void SetGeometryFileName(const char *name) {fGeometryFileName = name;} virtual void ResetDigits(); virtual void ResetSDigits(); virtual void ResetPoints(); @@ -156,7 +159,8 @@ protected: TString fConfigFunction; // Configuration file to be executed TRandom *fRandom; // Pointer to the random number generator TString fBaseFileName; // Name of the base root file - + Bool_t fIsRootGeometry; //! Flag telling if the geometry is loaded from file + TString fGeometryFileName; //! Name of the geometry file AliRunLoader *fRunLoader; //!run getter - written as a separate object private: void Copy(TObject &arun) const; diff --git a/STRUCT/AliABSO.cxx b/STRUCT/AliABSO.cxx index 10536f51bb3..c24b5251a19 100644 --- a/STRUCT/AliABSO.cxx +++ b/STRUCT/AliABSO.cxx @@ -144,79 +144,79 @@ void AliABSO::CreateMaterials() Float_t epsil, stmin, tmaxfd, deemax, stemax; // // Carbon - AliMaterial( 6, "CARBON$ ", 12.01, 6., 1.75, 24.4, 49.9); - AliMaterial(26, "CARBON$ ", 12.01, 6., 1.75, 24.4, 49.9); - AliMaterial(46, "CARBON$ ", 12.01, 6., 1.75, 24.4, 49.9); + AliMaterial( 6, "CARBON0$ ", 12.01, 6., 1.75, 24.4, 49.9); + AliMaterial(26, "CARBON1$ ", 12.01, 6., 1.75, 24.4, 49.9); + AliMaterial(46, "CARBON2$ ", 12.01, 6., 1.75, 24.4, 49.9); // // Aluminum - AliMaterial(9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(9, "ALUMINIUM0$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(29, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(49, "ALUMINIUM2$", 26.98, 13., 2.7, 8.9, 37.2); // // Iron - AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(10, "IRON0$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(30, "IRON1$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(50, "IRON2$ ", 55.85, 26., 7.87, 1.76, 17.1); // // Copper - AliMaterial(11, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); - AliMaterial(31, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); - AliMaterial(51, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(11, "COPPER0$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(31, "COPPER1$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(51, "COPPER2$ ", 63.55, 29., 8.96, 1.43, 15.1); // // Tungsten - AliMaterial(12, "TUNGSTEN$ ", 183.85, 74., 19.3, .35, 10.3); - AliMaterial(32, "TUNGSTEN$ ", 183.85, 74., 19.3, .35, 10.3); - AliMaterial(52, "TUNGSTEN$ ", 183.85, 74., 19.3, .35, 10.3); + AliMaterial(12, "TUNGSTEN0$ ", 183.85, 74., 19.3, .35, 10.3); + AliMaterial(32, "TUNGSTEN1$ ", 183.85, 74., 19.3, .35, 10.3); + AliMaterial(52, "TUNGSTEN2$ ", 183.85, 74., 19.3, .35, 10.3); // // Ni-W-Cu - AliMixture(21, "Ni-W-Cu$", aniwcu, zniwcu, 18.78, 3, wniwcu); - AliMixture(41, "Ni-W-Cu$", aniwcu, zniwcu, 18.78, 3, wniwcu); - AliMixture(61, "Ni-W-Cu$", aniwcu, zniwcu, 18.78, 3, wniwcu); + AliMixture(21, "Ni-W-Cu0$", aniwcu, zniwcu, 18.78, 3, wniwcu); + AliMixture(41, "Ni-W-Cu1$", aniwcu, zniwcu, 18.78, 3, wniwcu); + AliMixture(61, "Ni-W-Cu2$", aniwcu, zniwcu, 18.78, 3, wniwcu); // // Lead - AliMaterial(13, "LEAD$ ", 207.19, 82., 11.35, .56, 18.5); - AliMaterial(33, "LEAD$ ", 207.19, 82., 11.35, .56, 18.5); - AliMaterial(53, "LEAD$ ", 207.19, 82., 11.35, .56, 18.5); + AliMaterial(13, "LEAD0$ ", 207.19, 82., 11.35, .56, 18.5); + AliMaterial(33, "LEAD1$ ", 207.19, 82., 11.35, .56, 18.5); + AliMaterial(53, "LEAD2$ ", 207.19, 82., 11.35, .56, 18.5); // // Air - AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(55, "AIR$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(55, "AIR2$ ", aAir, zAir, dAir, 4, wAir); // // Vacuum - AliMixture(16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); - AliMixture(36, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); - AliMixture(56, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(16, "VACUUM0$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(36, "VACUUM1$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(56, "VACUUM2$ ", aAir, zAir, dAir1, 4, wAir); // // Concrete - AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); - AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); - AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); + AliMixture(17, "CONCRETE0$", aconc, zconc, 2.35, 10, wconc); + AliMixture(37, "CONCRETE1$", aconc, zconc, 2.35, 10, wconc); + AliMixture(57, "CONCRETE2$", aconc, zconc, 2.35, 10, wconc); // // Poly CH2 - AliMixture(18, "POLYETHYLEN$", apoly, zpoly, .95, -2, wpoly); + AliMixture(18, "POLYETHYLEN0$", apoly, zpoly, .95, -2, wpoly); // // After a call with ratios by number (negative number of elements), // the ratio array is changed to the ratio by weight, so all successive // calls with the same array must specify the number of elements as // positive // - AliMixture(38, "POLYETHYLEN$", apoly, zpoly, .95, 2, wpoly); - AliMixture(58, "POLYETHYLEN$", apoly, zpoly, .95, 2, wpoly); + AliMixture(38, "POLYETHYLEN1$", apoly, zpoly, .95, 2, wpoly); + AliMixture(58, "POLYETHYLEN2$", apoly, zpoly, .95, 2, wpoly); // // stainless Steel - AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); - AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); - AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(19, "STAINLESS STEEL0$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(39, "STAINLESS STEEL1$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(59, "STAINLESS STEEL2$", asteel, zsteel, 7.88, 4, wsteel); // // Insulation powder - AliMixture(14, "INSULATION$", ains, zins, 0.41, 4, wins); - AliMixture(34, "INSULATION$", ains, zins, 0.41, 4, wins); - AliMixture(54, "INSULATION$", ains, zins, 0.41, 4, wins); + AliMixture(14, "INSULATION0$", ains, zins, 0.41, 4, wins); + AliMixture(34, "INSULATION1$", ains, zins, 0.41, 4, wins); + AliMixture(54, "INSULATION2$", ains, zins, 0.41, 4, wins); // Polymere Concrete - AliMixture(20, "Poly Concrete$", aPolyCc, zPolyCc, 3.53, -9, wPolyCc); - AliMixture(40, "Poly Concrete$", aPolyCc, zPolyCc, 3.53, 9, wPolyCc); - AliMixture(60, "Poly Concrete$", aPolyCc, zPolyCc, 3.53, 9, wPolyCc); + AliMixture(20, "Poly Concrete0$", aPolyCc, zPolyCc, 3.53, -9, wPolyCc); + AliMixture(40, "Poly Concrete1$", aPolyCc, zPolyCc, 3.53, 9, wPolyCc); + AliMixture(60, "Poly Concrete2$", aPolyCc, zPolyCc, 3.53, 9, wPolyCc); // // **************** diff --git a/STRUCT/AliDIPOv2.cxx b/STRUCT/AliDIPOv2.cxx index f3fbbc5c841..14f6fdfbd36 100644 --- a/STRUCT/AliDIPOv2.cxx +++ b/STRUCT/AliDIPOv2.cxx @@ -852,46 +852,46 @@ void AliDIPOv2::CreateMaterials() // --- Define the various materials for GEANT --- // Aluminum - AliMaterial( 9, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(29, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(49, "ALUMINIUM$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial( 9, "ALUMINIUM0$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(29, "ALUMINIUM1$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(49, "ALUMINIUM2$", 26.98, 13., 2.7, 8.9, 37.2); // Iron - AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(10, "IRON0$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(30, "IRON1$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(50, "IRON2$ ", 55.85, 26., 7.87, 1.76, 17.1); // Copper - AliMaterial(17, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); - AliMaterial(37, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); - AliMaterial(57, "COPPER$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(17, "COPPER0$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(37, "COPPER1$ ", 63.55, 29., 8.96, 1.43, 15.1); + AliMaterial(57, "COPPER2$ ", 63.55, 29., 8.96, 1.43, 15.1); // Air - AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(55, "AIR$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(55, "AIR2$ ", aAir, zAir, dAir, 4, wAir); // Vacuum - AliMixture(16, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); - AliMixture(36, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); - AliMixture(56, "VACUUM$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(16, "VACUUM0$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(36, "VACUUM1$ ", aAir, zAir, dAir1, 4, wAir); + AliMixture(56, "VACUUM2$ ", aAir, zAir, dAir1, 4, wAir); // stainless Steel - AliMixture(19, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); - AliMixture(39, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); - AliMixture(59, "STAINLESS STEEL$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(19, "STAINLESS STEEL0$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(39, "STAINLESS STEEL1$", asteel, zsteel, 7.88, 4, wsteel); + AliMixture(59, "STAINLESS STEEL2$", asteel, zsteel, 7.88, 4, wsteel); // Coil - AliMixture(14, "Al$", acoil, zcoil, 2.122, 3, wcoil); - AliMixture(34, "Al$", acoil, zcoil, 2.122, 3, wcoil); - AliMixture(54, "Al$", acoil, zcoil, 2.122, 3, wcoil); + AliMixture(14, "Al0$", acoil, zcoil, 2.122, 3, wcoil); + AliMixture(34, "Al1$", acoil, zcoil, 2.122, 3, wcoil); + AliMixture(54, "Al2$", acoil, zcoil, 2.122, 3, wcoil); //RESIN - AliMixture(13, "RESIN$", aresi, zresi, 1.05, 3, wresi); - AliMixture(33, "RESIN$", aresi, zresi, 1.05, 3, wresi); - AliMixture(53, "RESIN$", aresi, zresi, 1.05, 3, wresi); + AliMixture(13, "RESIN0$", aresi, zresi, 1.05, 3, wresi); + AliMixture(33, "RESIN1$", aresi, zresi, 1.05, 3, wresi); + AliMixture(53, "RESIN2$", aresi, zresi, 1.05, 3, wresi); //G10 - AliMixture(11, "G10$", aG10, zG10, 1.7, 5, wG10); - AliMixture(31, "G10$", aG10, zG10, 1.7, 5, wG10); - AliMixture(51, "G10$", aG10, zG10, 1.7, 5, wG10); + AliMixture(11, "G100$", aG10, zG10, 1.7, 5, wG10); + AliMixture(31, "G101$", aG10, zG10, 1.7, 5, wG10); + AliMixture(51, "G102$", aG10, zG10, 1.7, 5, wG10); // **************** // Defines tracking media parameters. diff --git a/STRUCT/AliHALL.cxx b/STRUCT/AliHALL.cxx index bc1cdbb06ad..fa5216a7704 100644 --- a/STRUCT/AliHALL.cxx +++ b/STRUCT/AliHALL.cxx @@ -299,17 +299,17 @@ void AliHALL::CreateMaterials() // FOR CONCRETE - AliMaterial(10, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(30, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(50, "IRON$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(10, "IRON0$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(30, "IRON1$ ", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(50, "IRON2$ ", 55.85, 26., 7.87, 1.76, 17.1); - AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(55, "AIR$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(55, "AIR2$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(17, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); - AliMixture(37, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); - AliMixture(57, "CONCRETE$", aconc, zconc, 2.35, 10, wconc); + AliMixture(17, "CONCRETE0$", aconc, zconc, 2.35, 10, wconc); + AliMixture(37, "CONCRETE1$", aconc, zconc, 2.35, 10, wconc); + AliMixture(57, "CONCRETE2$", aconc, zconc, 2.35, 10, wconc); // **************** // Defines tracking media parameters. diff --git a/STRUCT/AliMAG.cxx b/STRUCT/AliMAG.cxx index ad8178ffcef..3145a5dec48 100644 --- a/STRUCT/AliMAG.cxx +++ b/STRUCT/AliMAG.cxx @@ -242,16 +242,16 @@ void AliMAG::CreateMaterials() // Aluminum - AliMaterial(9, "Al$", 26.98, 13., 2.7, 8.9, 37.2); - AliMaterial(29, "Al$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(9, "Al0$", 26.98, 13., 2.7, 8.9, 37.2); + AliMaterial(29, "Al1$", 26.98, 13., 2.7, 8.9, 37.2); // Iron - AliMaterial(10, "Fe$", 55.85, 26., 7.87, 1.76, 17.1); - AliMaterial(30, "Fe$", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(10, "Fe0$", 55.85, 26., 7.87, 1.76, 17.1); + AliMaterial(30, "Fe1$", 55.85, 26., 7.87, 1.76, 17.1); // Air - AliMixture(15, "AIR$ ", aAir, zAir, dAir, 4, wAir); - AliMixture(35, "AIR$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(15, "AIR0$ ", aAir, zAir, dAir, 4, wAir); + AliMixture(35, "AIR1$ ", aAir, zAir, dAir, 4, wAir); // **************** // Defines tracking media parameters. diff --git a/ZDC/AliZDCv2.cxx b/ZDC/AliZDCv2.cxx index afabfc84aab..64a3f33d949 100644 --- a/ZDC/AliZDCv2.cxx +++ b/ZDC/AliZDCv2.cxx @@ -937,11 +937,11 @@ void AliZDCv2::CreateMaterials() // --- Iron (energy loss taken into account) ubuf[0] = 1.1; - AliMaterial(7, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); + AliMaterial(7, "IRON0", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); // --- Iron (no energy loss) ubuf[0] = 1.1; - AliMaterial(8, "IRON", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); + AliMaterial(8, "IRON1", 55.85, 26., 7.87, 1.76, 0., ubuf, 1); // --------------------------------------------------------- Float_t aResGas[3]={1.008,12.0107,15.9994};