X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=blobdiff_plain;f=STEER%2FAliMC.cxx;h=e1bde47e0167bf27dea9bf527f4a21961963adaa;hp=a3ed600b345d3910c0a0590d59a7d5205aaf0970;hb=b60e0f5e973d124b1e0ba20fcff9f6868d41ce95;hpb=702ab87e845509d9379dca12e47c7e8a37eba7f6 diff --git a/STEER/AliMC.cxx b/STEER/AliMC.cxx index a3ed600b345..e1bde47e016 100644 --- a/STEER/AliMC.cxx +++ b/STEER/AliMC.cxx @@ -26,9 +26,9 @@ #include #include #include -#include -#include "TGeant3.h" +#include "TGeant3.h" + #include "AliLog.h" #include "AliDetector.h" #include "AliGenerator.h" @@ -144,26 +144,9 @@ void AliMC::Copy(TObject &) const void AliMC::ConstructGeometry() { // - // 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(). + // Create modules, materials, geometry // - 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; @@ -176,9 +159,6 @@ void AliMC::ConstructGeometry() AliInfo(Form("%10s R:%.2fs C:%.2fs", detector->GetName(),stw.RealTime(),stw.CpuTime())); } - - } - } //_______________________________________________________________________ @@ -195,7 +175,6 @@ void AliMC::InitGeometry() 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", @@ -310,9 +289,9 @@ void AliMC::Stepping() AddEnergyDeposit(gMC->CurrentVolID(copy),gMC->Edep()); // // write tracke reference for track which is dissapearing - MI -// if (gMC->IsTrackDisappeared()) { -// if (gMC->Etot()>0.05) AddTrackReference(GetCurrentTrackNumber()); -// } + if (gMC->IsTrackDisappeared()) { + if (gMC->Etot()>0.05) AddTrackReference(GetCurrentTrackNumber()); + } //Call the appropriate stepping routine; AliModule *det = dynamic_cast(gAlice->Modules()->At(id)); @@ -501,12 +480,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(); } //_______________________________________________________________________