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 committed Jan 12, 2015
1 parent ef2f741 commit 63c81f6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
14 changes: 12 additions & 2 deletions STEER/STEER/AliSimulation.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down Expand Up @@ -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");

Expand Down Expand Up @@ -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;

Expand Down
8 changes: 7 additions & 1 deletion 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 @@ -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
Expand Down Expand Up @@ -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

0 comments on commit 63c81f6

Please sign in to comment.