diff --git a/STEER/STEER/AliSimulation.cxx b/STEER/STEER/AliSimulation.cxx index 1cb0143daf4..25ae38d48d4 100644 --- a/STEER/STEER/AliSimulation.cxx +++ b/STEER/STEER/AliSimulation.cxx @@ -193,6 +193,8 @@ AliSimulation::AliSimulation(const char* configFileName, fWriteSelRawData(kFALSE), fStopOnError(kFALSE), fUseMonitoring(kFALSE), + fUsePWnavigation(kFALSE), + fDetectPWoverlaps(kFALSE), fNEvents(1), fConfigFileName(configFileName), fGAliceFileName("galice.root"), @@ -606,7 +608,12 @@ Bool_t AliSimulation::MisalignGeometry(AliRunLoader *runLoader) // Close the Parallel World pw->CloseGeometry(); - gGeoManager->SetUseParallelWorldNav(kTRUE); + gGeoManager->SetUseParallelWorldNav(fUsePWnavigation); + if (fDetectPWoverlaps) { + pw->SetUseOverlaps(kFALSE); + // Reset overlaps defined by detectors + pw->ResetOverlaps(); + } //Export misaligned geometry // gGeoManager->Export("misaligned.root"); @@ -1265,7 +1272,10 @@ Bool_t AliSimulation::RunSimulation(Int_t nEvents) // End of this run, close files if(nEvents>0) FinishRun(); - + if (fUsePWnavigation && fDetectPWoverlaps) { + TGeoParallelWorld *pw = gGeoManager->GetParallelWorld(); + if (pw) pw->PrintDetectedOverlaps(); + } AliSysInfo::AddStamp("Stop_ProcessRun"); delete runLoader; diff --git a/STEER/STEER/AliSimulation.h b/STEER/STEER/AliSimulation.h index 9cf13ffab54..1af213f5afe 100644 --- a/STEER/STEER/AliSimulation.h +++ b/STEER/STEER/AliSimulation.h @@ -72,6 +72,10 @@ class AliSimulation: public TNamed { {fAlignObjArray = array; fLoadAlignFromCDB = kFALSE;} void SetUseMonitoring(Bool_t flag=kTRUE) {fUseMonitoring = flag;} + void SetUsePWnavigation(Bool_t flag=kTRUE) {fUsePWnavigation = flag;} + Bool_t IsUsingPWnavigation() const {return fUsePWnavigation;} + void SetDetectPWoverlaps(Bool_t flag=kTRUE) {fDetectPWoverlaps = flag;} + Bool_t IsDetectingPWoverlaps() const {return fDetectPWoverlaps;} Bool_t MisalignGeometry(AliRunLoader *runLoader = NULL); @@ -175,6 +179,8 @@ class AliSimulation: public TNamed { Bool_t fWriteSelRawData; // write detectors raw data in a separate file accoring to the trigger cluster Bool_t fStopOnError; // stop or continue on errors Bool_t fUseMonitoring; // monitor simulation timing per volume + Bool_t fUsePWnavigation; // Use parallel world navigation (false by default) + Bool_t fDetectPWoverlaps; // Parallel world in detect overlap mode (false by default) Int_t fNEvents; // number of events TString fConfigFileName; // name of the config file @@ -224,7 +230,7 @@ class AliSimulation: public TNamed { Bool_t fWriteGRPEntry; // Write or not GRP entry corresponding to the settings in Config.C - ClassDef(AliSimulation, 13) // class for running generation, simulation and digitization + ClassDef(AliSimulation, 14) // class for running generation, simulation and digitization }; #endif