Skip to content

Commit

Permalink
Added setters/getters for using the parallel world and overlap detect…
Browse files Browse the repository at this point in the history
…ion feature in AliSimulation
  • Loading branch information
agheata authored and shahor02 committed Dec 16, 2015
1 parent 494827f commit 2a92f61
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
14 changes: 12 additions & 2 deletions STEER/STEER/AliSimulation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,8 @@ AliSimulation::AliSimulation(const char* configFileName,
fWriteSelRawData(kFALSE),
fStopOnError(kFALSE),
fUseMonitoring(kFALSE),
fUsePWnavigation(kFALSE),
fDetectPWoverlaps(kFALSE),
fNEvents(1),
fConfigFileName(configFileName),
fGAliceFileName("galice.root"),
Expand Down Expand Up @@ -608,7 +610,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");

Expand Down Expand Up @@ -1285,7 +1292,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;

Expand Down
6 changes: 6 additions & 0 deletions STEER/STEER/AliSimulation.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -179,6 +183,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
Expand Down

0 comments on commit 2a92f61

Please sign in to comment.