File tree Expand file tree Collapse file tree 4 files changed +9
-75
lines changed
Expand file tree Collapse file tree 4 files changed +9
-75
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -52,8 +52,14 @@ namespace o2
5252 if ( mFraction != -1 ) {
5353 // This line assumes that the current generator is run in a cocktail with another generator
5454 // which is run before the current one in a sequential way
55- mNUE = genList .front ()-> getParticles ().size ();
56- LOG (debug ) << "Number of tracks from UE is " << mNUE ;
55+ if (!mGenList ) {
56+ auto & hybridInstance = GeneratorHybrid ::Instance ();
57+ mGenList = & hybridInstance .getGenerators ();
58+ }
59+ if (!mGenList -> empty ()) {
60+ mNUE = mGenList -> front ()-> getParticles ().size ();
61+ LOG (debug ) << "Number of tracks from UE is " << mNUE ;
62+ }
5763 }
5864 unsigned short nSig = (mFraction == -1 ) ? mNSig : std ::lround (mFraction * mNUE );
5965 LOG (debug ) << "Generating additional " << nSig << " particles" ;
@@ -69,7 +75,7 @@ namespace o2
6975 unsigned int mNUE = 0 ; // Number of tracks in the Underlying event
7076 unsigned short int mTag = 1 ; // Tag to select the generation function
7177 std ::unique_ptr < DecayerPythia8 > mDecayer ; // Pythia8 decayer for particles not present in the physics list of Geant4 (like Z0)
72- const std ::vector < std ::shared_ptr < o2 ::eventgen ::Generator >> genList = GeneratorHybrid :: getGenerators ();
78+ const std ::vector < std ::shared_ptr < o2 ::eventgen ::Generator >>* mGenList = nullptr ; // Cached generators list
7379 std ::map < unsigned short int , std ::function < TParticle ()>> genMap ;
7480 UInt_t mGenID = 42 ;
7581
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments