Skip to content

Commit 3672317

Browse files
committed
Revert "Improve simulation reproducibility with Geant4"
This reverts commit 6aeb032. There appear to be problems with the randomness in Geant4 simulations.
1 parent d979645 commit 3672317

6 files changed

Lines changed: 0 additions & 119 deletions

File tree

Common/Utils/include/CommonUtils/ConfigurationMacroHelper.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,6 @@ T GetFromMacro(const std::string& file, const std::string& funcname, const std::
6969
return *ptr;
7070
}
7171

72-
// just-in-time interpret some C++ function using ROOT and make result available to runtime
73-
// functiondecl: A string coding the function to call (example "bool foo(){ return true; }")
74-
// funcname: The name of the function to call (example "foo()")
75-
// type: Return type of function (example "bool")
76-
// unique: Some unique string identifier under which the result will be stored in gROOT global variable space
77-
template <typename T>
78-
T JITAndEvalFunction(const std::string& functiondecl, const std::string& funcname, const std::string& type, const std::string& unique)
79-
{
80-
/** interpret and execute a function and retrieve pointer to the returned type **/
81-
auto line = Form("%s; %s __%s__ = %s;", functiondecl.c_str(), type.c_str(), unique.c_str(), funcname.c_str());
82-
gROOT->ProcessLine(line);
83-
auto ptr = (T*)gROOT->GetGlobal(Form("__%s__", unique.c_str()))->GetAddress();
84-
return *ptr;
85-
}
86-
8772
} // namespace conf
8873
} // namespace o2
8974

Detectors/Base/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ o2_add_library(DetectorsBase
2525
src/TFIDInfoHelper.cxx
2626
src/GRPGeomHelper.cxx
2727
src/Stack.cxx
28-
src/VMCSeederService.cxx
2928
PUBLIC_LINK_LIBRARIES FairRoot::Base
3029
O2::CommonUtils
3130
O2::DetectorsCommonDataFormats

Detectors/Base/include/DetectorsBase/VMCSeederService.h

Lines changed: 0 additions & 50 deletions
This file was deleted.

Detectors/Base/src/Stack.cxx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "DetectorsBase/Stack.h"
1717
#include "DetectorsBase/Detector.h"
18-
#include <DetectorsBase/VMCSeederService.h>
1918
#include "DetectorsCommonDataFormats/DetID.h"
2019
#include "SimulationDataFormat/MCTrack.h"
2120

@@ -363,7 +362,6 @@ TParticle* Stack::PopNextTrack(Int_t& iTrack)
363362
// LOG(info) << "SEEDING NEW TRACK USING HASH" << hash;
364363
// init seed per track
365364
gRandom->SetSeed(hash);
366-
o2::base::VMCSeederService::instance().setSeed();
367365
// NOTE: THE BETTER PLACE WOULD BE IN PRETRACK HOOK BUT THIS DOES NOT SEEM TO WORK
368366
// WORKS ONLY WITH G3 SINCE G4 DOES NOT CALL THIS FUNCTION
369367
} // .trackSeed ?

Detectors/Base/src/VMCSeederService.cxx

Lines changed: 0 additions & 49 deletions
This file was deleted.

run/O2SimDevice.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "TVirtualMC.h"
2424
#include "TMessage.h"
2525
#include <DetectorsBase/Stack.h>
26-
#include <DetectorsBase/VMCSeederService.h>
2726
#include <SimulationDataFormat/PrimaryChunk.h>
2827
#include <TRandom.h>
2928
#include <SimConfig/SimConfig.h>
@@ -258,7 +257,6 @@ class O2SimDevice final : public fair::mq::Device
258257
<< "part " << info.part << "/" << info.nparts;
259258
LOG(info) << workerStr() << " Setting seed for this sub-event to " << chunk->mSubEventInfo.seed;
260259
gRandom->SetSeed(chunk->mSubEventInfo.seed);
261-
o2::base::VMCSeederService::instance().setSeed();
262260

263261
// Process one event
264262
auto& conf = o2::conf::SimConfig::Instance();

0 commit comments

Comments
 (0)