CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
RunManager.cc
Go to the documentation of this file.
10 
20 
23 
27 
32 
34 
36 
39 
40 #include "HepPDT/defs.h"
41 #include "HepPDT/TableBuilder.hh"
42 #include "HepPDT/ParticleDataTable.hh"
44 
45 #include "G4StateManager.hh"
46 #include "G4ApplicationState.hh"
47 #include "G4RunManagerKernel.hh"
48 #include "G4UImanager.hh"
49 
50 #include "G4EventManager.hh"
51 #include "G4Run.hh"
52 #include "G4Event.hh"
53 #include "G4TransportationManager.hh"
54 #include "G4ParticleTable.hh"
55 
56 #include "G4GDMLParser.hh"
57 #include "G4SystemOfUnits.hh"
58 
59 #include <iostream>
60 #include <sstream>
61 #include <fstream>
62 #include <memory>
63 
65 
67 
68 static
70  SimActivityRegistry& iReg,
71  std::vector<boost::shared_ptr<SimWatcher> >& oWatchers,
72  std::vector<boost::shared_ptr<SimProducer> >& oProds
73  )
74 {
75  using namespace std;
76  using namespace edm;
77  vector<ParameterSet> watchers;
78  try {
79  watchers = iP.getParameter<vector<ParameterSet> >("Watchers");
80  } catch( edm::Exception) {
81  }
82 
83  for(vector<ParameterSet>::iterator itWatcher = watchers.begin();
84  itWatcher != watchers.end();
85  ++itWatcher) {
86  std::auto_ptr<SimWatcherMakerBase> maker(
88  (itWatcher->getParameter<std::string> ("type")) );
89  if(maker.get()==0) {
90  throw SimG4Exception("Unable to find the requested Watcher");
91  }
92 
93  boost::shared_ptr<SimWatcher> watcherTemp;
94  boost::shared_ptr<SimProducer> producerTemp;
95  maker->make(*itWatcher,iReg,watcherTemp,producerTemp);
96  oWatchers.push_back(watcherTemp);
97  if(producerTemp) {
98  oProds.push_back(producerTemp);
99  }
100  }
101 }
102 
103 // RunManager * RunManager::me = 0;
104 /*
105 RunManager * RunManager::init(edm::ParameterSet const & p)
106 {
107  if (me != 0) abort();
108  me = new RunManager(p);
109  return me;
110 }
111 
112 RunManager * RunManager::instance()
113 {
114  if (me==0) abort();
115  return me;
116 }
117 */
118 
120  : m_generator(0), m_nonBeam(p.getParameter<bool>("NonBeamEvent")),
121  m_primaryTransformer(0),
122  m_managerInitialized(false),
123  //m_geometryInitialized(true), m_physicsInitialized(true),
124  m_runInitialized(false), m_runTerminated(false), m_runAborted(false),
125  firstRun(true),
126  m_pUseMagneticField(p.getParameter<bool>("UseMagneticField")),
127  m_currentRun(0), m_currentEvent(0), m_simEvent(0),
128  m_PhysicsTablesDir(p.getParameter<std::string>("PhysicsTablesDirectory")),
129  m_StorePhysicsTables(p.getParameter<bool>("StorePhysicsTables")),
130  m_RestorePhysicsTables(p.getParameter<bool>("RestorePhysicsTables")),
131  m_EvtMgrVerbosity(p.getUntrackedParameter<int>("G4EventManagerVerbosity",0)),
132  //m_Override(p.getParameter<bool>("OverrideUserStackingAction")),
133  m_pField(p.getParameter<edm::ParameterSet>("MagneticField")),
134  m_pGenerator(p.getParameter<edm::ParameterSet>("Generator")),
135  m_pPhysics(p.getParameter<edm::ParameterSet>("Physics")),
136  m_pRunAction(p.getParameter<edm::ParameterSet>("RunAction")),
137  m_pEventAction(p.getParameter<edm::ParameterSet>("EventAction")),
138  m_pStackingAction(p.getParameter<edm::ParameterSet>("StackingAction")),
139  m_pTrackingAction(p.getParameter<edm::ParameterSet>("TrackingAction")),
140  m_pSteppingAction(p.getParameter<edm::ParameterSet>("SteppingAction")),
141  m_G4Commands(p.getParameter<std::vector<std::string> >("G4Commands")),
142  m_p(p), m_fieldBuilder(0),
143  m_theLHCTlinkTag(p.getParameter<edm::InputTag>("theLHCTlinkTag"))
144 {
145  m_kernel = G4RunManagerKernel::GetRunManagerKernel();
146  if (m_kernel==0) m_kernel = new G4RunManagerKernel();
147 
149 
150  m_check = p.getUntrackedParameter<bool>("CheckOverlap",false);
151  m_WriteFile = p.getUntrackedParameter<std::string>("FileNameGDML","");
152 
153  //Look for an outside SimActivityRegistry
154  // this is used by the visualization code
155  edm::Service<SimActivityRegistry> otherRegistry;
156  if(otherRegistry){
157  m_registry.connect(*otherRegistry);
158  }
159 
161 }
162 
164 {
165  if (m_kernel!=0) delete m_kernel;
166 }
167 
169 {
170  bool geomChanged = idealGeomRcdWatcher_.check(es);
171  if (geomChanged && (!firstRun)) {
172  throw cms::Exception("BadConfig")
173  << "[SimG4Core RunManager]\n"
174  << "The Geometry configuration is changed during the job execution\n"
175  << "this is not allowed, the geometry must stay unchanged\n";
176  }
177  if (m_pUseMagneticField) {
178  bool magChanged = idealMagRcdWatcher_.check(es);
179  if (magChanged && (!firstRun)) {
180  throw cms::Exception("BadConfig")
181  << "[SimG4Core RunManager]\n"
182  << "The MagneticField configuration is changed during the job execution\n"
183  << "this is not allowed, the MagneticField must stay unchanged\n";
184  }
185  }
186 
187  if (m_managerInitialized) return;
188 
189  // DDDWorld: get the DDCV from the ES and use it to build the World
191  es.get<IdealGeometryRecord>().get(pDD);
192 
194  SensitiveDetectorCatalog catalog_;
195  const DDDWorld * world = new DDDWorld(&(*pDD), map_, catalog_, m_check);
197 
198  if("" != m_WriteFile) {
199  G4GDMLParser gdml;
200  gdml.Write(m_WriteFile, world->GetWorldVolume());
201  }
202 
204  {
205  // setup the magnetic field
207  es.get<IdealMagneticFieldRecord>().get(pMF);
208  const GlobalPoint g(0.,0.,0.);
209 
210  m_fieldBuilder = new sim::FieldBuilder(&(*pMF), m_pField);
211  G4TransportationManager * tM =
212  G4TransportationManager::GetTransportationManager();
213  m_fieldBuilder->build( tM->GetFieldManager(),tM->GetPropagatorInField());
214  }
215 
216  // we need the track manager now
217  m_trackManager = std::auto_ptr<SimTrackManager>(new SimTrackManager);
218 
219  // attach sensitive detector
220  m_attach = new AttachSD;
221 
222  std::pair< std::vector<SensitiveTkDetector*>,
223  std::vector<SensitiveCaloDetector*> > sensDets =
224  m_attach->create(*world,(*pDD),catalog_,m_p,m_trackManager.get(),m_registry);
225 
226  m_sensTkDets.swap(sensDets.first);
227  m_sensCaloDets.swap(sensDets.second);
228 
229 
230 
231  edm::LogInfo("SimG4CoreApplication") << " RunManager: Sensitive Detector "
232  << "building finished; found "
233  << m_sensTkDets.size()
234  << " Tk type Producers, and "
235  << m_sensCaloDets.size()
236  << " Calo type producers ";
237 
239  es.get<PDTRecord>().get(fTable);
240  const HepPDT::ParticleDataTable *fPDGTable = &(*fTable);
241 
243  m_InTag = m_pGenerator.getParameter<std::string>("HepMCProductLabel") ;
245 
246  std::auto_ptr<PhysicsListMakerBase>
247  physicsMaker(PhysicsListFactory::get()->create(
248  m_pPhysics.getParameter<std::string> ("type")));
249  if (physicsMaker.get()==0) {
250  throw SimG4Exception("Unable to find the Physics list requested");
251  }
252  m_physicsList =
253  physicsMaker->make(map_,fPDGTable,m_fieldBuilder,m_pPhysics,m_registry);
254 
255  PhysicsList* phys = m_physicsList.get();
256  if (phys==0) { throw SimG4Exception("Physics list construction failed!"); }
257 
258  // adding GFlash, Russian Roulette for eletrons and gamma, step limiters
259  // on top of any Physics Lists
260  phys->RegisterPhysics(new ParametrisedEMPhysics("EMoptions",m_pPhysics));
261 
262  m_kernel->SetPhysics(phys);
263  m_kernel->InitializePhysics();
264 
265  m_physicsList->ResetStoredInAscii();
266  std::string tableDir = m_PhysicsTablesDir;
268  m_physicsList->SetPhysicsTableRetrieved(tableDir);
269  }
270  if (m_kernel->RunInitialization()) { m_managerInitialized = true; }
271  else { throw SimG4Exception("G4RunManagerKernel initialization failed!"); }
272 
274  {
275  std::ostringstream dir;
276  dir << tableDir << '\0';
277  std::string cmd = std::string("/control/shell mkdir -p ")+tableDir;
278  if (!std::ifstream(dir.str().c_str(), std::ios::in))
279  G4UImanager::GetUIpointer()->ApplyCommand(cmd);
280  m_physicsList->StorePhysicsTable(tableDir);
281  }
282 
283  //tell all interesting parties that we are beginning the job
284  BeginOfJob aBeginOfJob(&es);
285  m_registry.beginOfJobSignal_(&aBeginOfJob);
286 
288 
289  for (unsigned it=0; it<m_G4Commands.size(); it++) {
290  edm::LogInfo("SimG4CoreApplication") << "RunManager:: Requests UI: "
291  << m_G4Commands[it];
292  G4UImanager::GetUIpointer()->ApplyCommand(m_G4Commands[it]);
293  }
294 
295  // If the Geant4 particle table is needed, decomment the lines below
296  //
297  // G4cout << "Output of G4ParticleTable DumpTable:" << G4endl;
298  // G4ParticleTable::GetParticleTable()->DumpTable("ALL");
299 
300  initializeRun();
301  firstRun= false;
302 
303 }
304 
306 {
307  m_currentEvent = generateEvent(inpevt);
308  m_simEvent = new G4SimEvent;
311  if (m_generator->genVertex() !=0 ) {
314  m_generator->genVertex()->y()/centimeter,
315  m_generator->genVertex()->z()/centimeter,
316  m_generator->genVertex()->t()/second));
317  }
318  if (m_currentEvent->GetNumberOfPrimaryVertex()==0) {
319  edm::LogError("SimG4CoreApplication")
320  << " RunManager::produce event " << inpevt.id().event()
321  << " with no G4PrimaryVertices \n Aborting Run" ;
322 
323  abortRun(false);
324  } else {
325  m_kernel->GetEventManager()->ProcessOneEvent(m_currentEvent);
326  }
327 
328  edm::LogInfo("SimG4CoreApplication")
329  << " RunManager: saved : Event " << inpevt.id().event()
330  << " of weight " << m_simEvent->weight()
331  << " with " << m_simEvent->nTracks() << " tracks and "
332  << m_simEvent->nVertices()
333  << " vertices, generated by " << m_simEvent->nGenParts() << " particles ";
334 }
335 
337 {
338  if (m_currentEvent!=0) { delete m_currentEvent; }
339  m_currentEvent = 0;
340  if (m_simEvent!=0) { delete m_simEvent; }
341  m_simEvent = 0;
342  G4Event * evt = new G4Event(inpevt.id().event());
343 
345 
346  inpevt.getByLabel( m_InTag, HepMCEvt ) ;
347 
348  m_generator->setGenEvent(HepMCEvt->GetEvent());
349 
350  // required to reset the GenParticle Id for particles transported
351  // along the beam pipe
352  // to their original value for SimTrack creation
353  resetGenParticleId( inpevt );
354 
355  if (!m_nonBeam)
356  {
357  m_generator->HepMC2G4(HepMCEvt->GetEvent(),evt);
358  }
359  else
360  {
361  m_generator->nonBeamEvent2G4(HepMCEvt->GetEvent(),evt);
362  }
363 
364  return evt;
365 }
366 
368 {
369  G4Track* t =
370  m_kernel->GetEventManager()->GetTrackingManager()->GetTrack();
371  t->SetTrackStatus(fStopAndKill) ;
372 
373  // CMS-specific act
374  //
375  TrackingAction* uta =
376  (TrackingAction*)m_kernel->GetEventManager()->GetUserTrackingAction() ;
377  uta->PostUserTrackingAction(t) ;
378 
379  m_currentEvent->SetEventAborted();
380 
381  // do NOT call this method for now
382  // because it'll set abortRequested=true (withing G4EventManager)
383  // this will make Geant4, in the event *next* after the aborted one
384  // NOT to get the primamry, thus there's NOTHING to trace, and it goes
385  // to the end of G4Event::DoProcessing(G4Event*), where abortRequested
386  // will be reset to true again
387  //
388  //m_kernel->GetEventManager()->AbortCurrentEvent();
389  //
390  // instead, mimic what it does, except (re)setting abortRequested
391  //
392  m_kernel->GetEventManager()->GetStackManager()->clear() ;
393  m_kernel->GetEventManager()->GetTrackingManager()->EventAborted() ;
394 
395  G4StateManager* stateManager = G4StateManager::GetStateManager();
396  stateManager->SetNewState(G4State_GeomClosed);
397 
398  return;
399 }
400 
402 {
403  RunAction* userRunAction = new RunAction(m_pRunAction,this);
404  m_userRunAction = userRunAction;
407 
408  G4EventManager * eventManager = m_kernel->GetEventManager();
409  eventManager->SetVerboseLevel(m_EvtMgrVerbosity);
410 
411  if (m_generator!=0) {
412  EventAction * userEventAction =
413  new EventAction(m_pEventAction,this,m_trackManager.get());
416  eventManager->SetUserAction(userEventAction);
417 
418  TrackingAction* userTrackingAction =
419  new TrackingAction(userEventAction,m_pTrackingAction);
422  eventManager->SetUserAction(userTrackingAction);
423 
424  SteppingAction* userSteppingAction =
425  new SteppingAction(userEventAction,m_pSteppingAction);
426  userSteppingAction->m_g4StepSignal.connect(m_registry.g4StepSignal_);
427  eventManager->SetUserAction(userSteppingAction);
428  eventManager->SetUserAction(new StackingAction(userEventAction,m_pStackingAction));
429 
430  } else {
431  edm::LogWarning("SimG4CoreApplication") << " RunManager: WARNING : "
432  << "No generator; initialized "
433  << "only RunAction!";
434  }
435  return;
436 }
437 
439 {
440  m_runInitialized = false;
441  if (m_currentRun==0) { m_currentRun = new G4Run(); }
442  G4StateManager::GetStateManager()->SetNewState(G4State_GeomClosed);
443  if (m_userRunAction!=0) { m_userRunAction->BeginOfRunAction(m_currentRun); }
444  m_runAborted = false;
445  m_runInitialized = true;
446  return;
447 }
448 
450 {
451  m_runTerminated = false;
452  if (m_userRunAction!=0) {
453  m_userRunAction->EndOfRunAction(m_currentRun);
454  delete m_userRunAction;
455  m_userRunAction = 0;
456  }
457  if (m_currentRun!=0) {
458  delete m_currentRun;
459  m_currentRun = 0;
460  }
461  if (m_kernel!=0) {
462  m_kernel->RunTermination();
463  m_runInitialized = false;
464  m_runTerminated = true;
465  }
466  return;
467 }
468 
469 void RunManager::abortRun(bool softAbort)
470 {
471  m_runAborted = false;
472  if (!softAbort) { abortEvent(); }
473  if (m_currentRun!=0) { delete m_currentRun; m_currentRun = 0; }
474  m_runInitialized = false;
475  m_runAborted = true;
476  return;
477 }
478 
480 {
482  inpevt.getByLabel( m_theLHCTlinkTag, theLHCTlink );
483  if ( theLHCTlink.isValid() ) {
484  m_trackManager->setLHCTransportLink( theLHCTlink.product() );
485  }
486  return;
487 }
T getParameter(std::string const &) const
bool m_check
Definition: RunManager.h:107
EventNumber_t event() const
Definition: EventID.h:44
edm::ParameterSet m_pGenerator
Definition: RunManager.h:110
T getUntrackedParameter(std::string const &, T const &) const
std::auto_ptr< SimTrackManager > m_trackManager
Definition: RunManager.h:130
std::pair< std::vector< SensitiveTkDetector * >, std::vector< SensitiveCaloDetector * > > create(const DDDWorld &w, const DDCompactView &cpv, SensitiveDetectorCatalog &clg, edm::ParameterSet const &p, const SimTrackManager *m, SimActivityRegistry &reg) const
Definition: AttachSD.cc:23
virtual const math::XYZTLorentzVector * genVertex() const
Definition: Generator.h:31
edm::ESWatcher< IdealMagneticFieldRecord > idealMagRcdWatcher_
Definition: RunManager.h:134
const G4VPhysicalVolume * GetWorldVolume() const
Definition: DDDWorld.h:17
G4UserRunAction * m_userRunAction
Definition: RunManager.h:101
virtual const double eventWeight() const
Definition: Generator.h:32
ROOT::Math::LorentzVector< ROOT::Math::PxPyPzE4D< double > > XYZTLorentzVectorD
Lorentz vector with cylindrical internal representation using pseudorapidity.
Definition: LorentzVector.h:14
G4Event * m_currentEvent
Definition: RunManager.h:99
void abortRun(bool softAbort=false)
Definition: RunManager.cc:469
SimActivityRegistry m_registry
Definition: RunManager.h:126
virtual const HepMC::GenEvent * genEvent() const
Definition: Generator.h:30
edm::ParameterSet m_p
Definition: RunManager.h:119
SimActivityRegistry::G4StepSignal m_g4StepSignal
HepPDT::ParticleDataTable ParticleDataTable
void initializeRun()
Definition: RunManager.cc:438
void HepMC2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:78
EndOfEventSignal endOfEventSignal_
void initializeUserActions()
Definition: RunManager.cc:401
SimActivityRegistry::EndOfRunSignal m_endOfRunSignal
Definition: RunAction.h:23
Generator * m_generator
Definition: RunManager.h:84
void build(G4FieldManager *fM=0, G4PropagatorInField *fP=0)
Definition: FieldBuilder.cc:47
BeginOfRunSignal beginOfRunSignal_
string firstRun
Definition: dataset.py:395
SimActivityRegistry::EndOfEventSignal m_endOfEventSignal
Definition: EventAction.h:46
bool m_pUseMagneticField
Definition: RunManager.h:97
edm::ESWatcher< IdealGeometryRecord > idealGeomRcdWatcher_
Definition: RunManager.h:133
ExceptionHandler * m_CustomExceptionHandler
Definition: RunManager.h:120
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e g
Definition: Activities.doc:4
void abortEvent()
Definition: RunManager.cc:367
std::vector< SensitiveCaloDetector * > m_sensCaloDets
Definition: RunManager.h:124
std::vector< SensitiveTkDetector * > m_sensTkDets
Definition: RunManager.h:123
BeginOfJobSignal beginOfJobSignal_
bool m_nonBeam
Definition: RunManager.h:87
U second(std::pair< T, U > const &p)
void weight(float w)
Definition: G4SimEvent.h:27
int m_EvtMgrVerbosity
Definition: RunManager.h:105
std::auto_ptr< PhysicsList > m_physicsList
Definition: RunManager.h:88
std::string m_WriteFile
Definition: RunManager.h:138
bool firstRun
Definition: RunManager.h:96
void terminateRun()
Definition: RunManager.cc:449
edm::serviceregistry::AllArgsMaker< DTDataMonitorInterface, DTDataIntegrityTask > maker
Definition: plugins.cc:73
string cmd
Definition: asciidump.py:19
bool m_RestorePhysicsTables
Definition: RunManager.h:104
void hepEvent(const HepMC::GenEvent *r)
Definition: G4SimEvent.h:25
void setGenEvent(const HepMC::GenEvent *inpevt)
Definition: Generator.h:26
BeginOfEventSignal beginOfEventSignal_
SimActivityRegistry::EndOfTrackSignal m_endOfTrackSignal
bool isValid() const
Definition: HandleBase.h:76
G4Run * m_currentRun
Definition: RunManager.h:98
void resetGenParticleId(edm::Event &inpevt)
Definition: RunManager.cc:479
EndOfRunSignal endOfRunSignal_
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
Definition: Event.h:390
edm::ParameterSet m_pStackingAction
Definition: RunManager.h:115
unsigned int nTracks() const
Definition: G4SimEvent.h:22
void connect(Observer< const T * > *iObs)
does not take ownership of memory
Definition: Signaler.h:59
edm::ParameterSet m_pEventAction
Definition: RunManager.h:114
bool m_runTerminated
Definition: RunManager.h:94
unsigned int nVertices() const
Definition: G4SimEvent.h:23
edm::ParameterSet m_pField
Definition: RunManager.h:109
edm::ParameterSet m_pPhysics
Definition: RunManager.h:112
edm::ParameterSet m_pSteppingAction
Definition: RunManager.h:117
virtual void PostUserTrackingAction(const G4Track *aTrack)
unsigned int nGenParts() const
Definition: G4SimEvent.h:24
DDDWorldSignal dddWorldSignal_
const T & get() const
Definition: EventSetup.h:55
T const * product() const
Definition: Handle.h:81
void nonBeamEvent2G4(const HepMC::GenEvent *g, G4Event *e)
Definition: Generator.cc:421
bool check(const edm::EventSetup &iSetup)
Definition: ESWatcher.h:58
std::string m_InTag
Definition: RunManager.h:85
G4Event * generateEvent(edm::Event &inpevt)
Definition: RunManager.cc:336
bool m_runInitialized
Definition: RunManager.h:93
SimActivityRegistry::BeginOfRunSignal m_beginOfRunSignal
Definition: RunAction.h:22
edm::EventID id() const
Definition: EventBase.h:56
static void createWatchers(const edm::ParameterSet &iP, SimActivityRegistry &iReg, std::vector< boost::shared_ptr< SimWatcher > > &oWatchers, std::vector< boost::shared_ptr< SimProducer > > &oProds)
Definition: RunManager.cc:69
AttachSD * m_attach
Definition: RunManager.h:122
PrimaryTransformer * m_primaryTransformer
Definition: RunManager.h:89
sim::FieldBuilder * m_fieldBuilder
Definition: RunManager.h:131
std::string m_PhysicsTablesDir
Definition: RunManager.h:102
bool m_StorePhysicsTables
Definition: RunManager.h:103
void connect(SimActivityRegistry &iOther)
forwards our signals to slots connected to iOther
dbl *** dir
Definition: mlp_gen.cc:35
volatile std::atomic< bool > shutdown_flag false
EndOfTrackSignal endOfTrackSignal_
std::vector< boost::shared_ptr< SimProducer > > m_producers
Definition: RunManager.h:128
std::vector< boost::shared_ptr< SimWatcher > > m_watchers
Definition: RunManager.h:127
edm::ParameterSet m_pRunAction
Definition: RunManager.h:113
RunManager(edm::ParameterSet const &p)
Definition: RunManager.cc:119
edm::ParameterSet m_pTrackingAction
Definition: RunManager.h:116
void collisionPoint(const math::XYZTLorentzVectorD &v)
Definition: G4SimEvent.h:29
std::vector< std::string > m_G4Commands
Definition: RunManager.h:118
SurfaceDeformation * create(int type, const std::vector< double > &params)
SimActivityRegistry::BeginOfEventSignal m_beginOfEventSignal
Definition: EventAction.h:45
G4SimEvent * m_simEvent
Definition: RunManager.h:100
bool m_managerInitialized
Definition: RunManager.h:90
void initG4(const edm::EventSetup &es)
Definition: RunManager.cc:168
T get(const Candidate &c)
Definition: component.h:55
edm::InputTag m_theLHCTlinkTag
Definition: RunManager.h:136
BeginOfTrackSignal beginOfTrackSignal_
G4RunManagerKernel * m_kernel
Definition: RunManager.h:82
bool m_runAborted
Definition: RunManager.h:95
void produce(edm::Event &inpevt, const edm::EventSetup &es)
Definition: RunManager.cc:305
SimActivityRegistry::BeginOfTrackSignal m_beginOfTrackSignal