BOSS 7.1.2
BESIII Offline Software System
Loading...
Searching...
No Matches
G4Svc Class Reference

#include <G4Svc.h>

+ Inheritance diagram for G4Svc:

Public Member Functions

 G4Svc (const std::string &name, ISvcLocator *svc)
 
virtual ~G4Svc ()
 
virtual StatusCode initialize ()
 
virtual StatusCode finalize ()
 
G4RunManager * runMgr ()
 
void SetUserInitialization (G4VUserDetectorConstruction *userInit)
 
void SetUserInitialization (G4VUserPhysicsList *physInit)
 
void SetUserInitialization (G4VUserActionInitialization *actionInit)
 
const G4Event * GetCurrentEvent () const
 
const G4Run * GetCurrentRun () const
 
G4UImanager * uiMgr ()
 
void StartUISession ()
 
double GetBeamPosX ()
 
double GetBeamPosY ()
 
double GetBeamPosZ ()
 
double GetBeamSizeX ()
 
double GetBeamSizeY ()
 
double GetBeamSizeZ ()
 
double GetBeamShiftPx ()
 
double GetBeamShiftPy ()
 
double GetBeamShiftPz ()
 
double GetBeamStartTime ()
 
double GetBeamDeltaTime ()
 
double GetNBunch ()
 
double GetBunchTimeSigma ()
 
double GetBeamTime ()
 
void SetBeamTime (double value)
 
std::string GetMdcNoiseFile ()
 
double GetBeamAngle ()
 
bool GetBoostLab ()
 
bool GetSetBeamShift ()
 
int GetMdcDataInput ()
 
int GetMdcDedxFlag ()
 
NTuple::Tuple * GetTupleMdc ()
 
void SetTupleMdc (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleTof1 ()
 
void SetTupleTof1 (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleTof2 ()
 
void SetTupleTof2 (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleTof3 ()
 
void SetTupleTof3 (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleEmc1 ()
 
void SetTupleEmc1 (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleEmc2 ()
 
void SetTupleEmc2 (NTuple::Tuple *tuple)
 
NTuple::Tuple * GetTupleMuc ()
 
void SetTupleMuc (NTuple::Tuple *tuple)
 
bool MdcRootFlag ()
 
bool TofRootFlag ()
 
bool EmcRootFlag ()
 
bool MucRootFlag ()
 
bool TofSaturationFlag ()
 
bool EmcLightOutput ()
 
double EmcIncoherentNoise ()
 
double EmcCoherentNoise ()
 
double EmcNoiseMean ()
 
double EmcNoiseSigma ()
 
double EmcNoiseThreshold ()
 
int EmcNoiseLevel ()
 
int EmcTime ()
 
int EmcElecSaturation ()
 
int EmcElecSatuDead ()
 
int MucNoiseMode ()
 
int LogLevel ()
 
void G4Init ()
 
void RunInitialize ()
 
void RunTerminate ()
 
void SimulateEvents (int)
 

Friends

class SvcFactory< G4Svc >
 

Detailed Description

Definition at line 32 of file G4Svc.h.

Constructor & Destructor Documentation

◆ G4Svc()

G4Svc::G4Svc ( const std::string & name,
ISvcLocator * svc )

Definition at line 38 of file G4Svc.cpp.

38 :
39 base_class(name, svc), p_runMgr(0), p_uiMgr(0), p_visMgr(0),
40 _init(false), m_beamTime(0)
41{
42 //declareProperty( "PhysicsList", m_PhysicsList="none");
43 //declareProperty( "DefaultPhysicsCut", m_PhysicsCut=-1.);
44 declareProperty( "Visualize", m_vis=false);
45 //declareProperty( "VisType", m_visType="VRML1FILE");
46
47 declareProperty( "RunVerbosity", m_runVerb=0);
48 declareProperty( "EventVerbosity", m_eventVerb=0);
49 declareProperty( "TrackingVerbosity", m_trackVerb=0);
50
51 declareProperty( "FADSmacro",m_macroName="none" );
52 declareProperty( "MdcNoiseFile", m_mdcNoiseFile="none");
53
54 //declareProperty( "SaveHits", m_saveHits=true);
55 //declareProperty( "SaveTracks", m_saveTracks=false);
56 declareProperty( "LogLevel", m_logLevel=6);
57
58 declareProperty( "InteractiveG4" , m_interactiveG4=false);
59
60 declareProperty("BesGenAction", m_besGenAction=false);
61
62 declareProperty("BeamPosX",m_beamPosX=0);
63 declareProperty("BeamPosY",m_beamPosY=0);
64 declareProperty("BeamPosZ",m_beamPosZ=0);
65
66 declareProperty("BeamSizeX", m_beamSizeX=10);
67 declareProperty("BeamSizeY", m_beamSizeY=20);
68 declareProperty("BeamSizeZ", m_beamSizeZ=30);
69
70 declareProperty("BeamStartTime",m_beamStartTime=0);
71 declareProperty("BeamDeltaTime",m_beamDeltaTime=0);
72 declareProperty("NBunch",m_nBunch=1);
73
74 declareProperty("BunchTimeSigma",m_bunchTimeSigma=0);
75
76 declareProperty("MdcDataInput",m_mdcDataInput=1);
77 declareProperty("MdcDedxFlag",m_mdcDedxFlag=1);
78
79 declareProperty("BoostLab",m_boostLab=false);
80 declareProperty("BeamAngle",m_beamAngle=11);
81
82 declareProperty("SetBeamShift",m_setBeamShift= false);
83 declareProperty("BeamShiftPx" ,m_beamShiftPx=39.45); // in unit MeV
84 declareProperty("BeamShiftPy" ,m_beamShiftPy=-0.98);
85 declareProperty("BeamShiftPz" ,m_beamShiftPz=3.70);
86
87 declareProperty("MdcRootFlag",m_mdcRootFlag=false);
88 declareProperty("TofRootFlag",m_tofRootFlag=false);
89 declareProperty("EmcRootFlag",m_emcRootFlag=false);
90 declareProperty("MucRootFlag",m_mucRootFlag=false);
91
92 // Switch for ADC Saturation in Bhabha events
93 declareProperty("TofSaturationFlag",m_tofSaturationFlag=true);
94
95 declareProperty("EmcLightOutput",m_emcLightOutput=true);
96 declareProperty("EmcIncoherentNoise",m_emcIncoherentNoise=0.2);
97 declareProperty("EmcCoherentNoise",m_emcCoherentNoise=0.);
98 declareProperty("EmcNoiseMean",m_emcNoiseMean=1.16);
99 declareProperty("EmcNoiseSigma",m_emcNoiseSigma=0.23);
100 declareProperty("EmcNoiseThreshold",m_emcNoiseThreshold=0.5);
101 declareProperty("EmcNoiseLevel",m_emcNoiseLevel=3);
102 declareProperty("EmcTime",m_emcTime=20);
103 declareProperty("EmcELecSaturation",m_emcELecSaturation=1);
104 declareProperty("EmcELecSatuDead",m_emcELecSatuDead=0);
105 declareProperty("MucNoiseMode", m_mucNoiseMode=1);
106}

◆ ~G4Svc()

G4Svc::~G4Svc ( )
virtual

Definition at line 110 of file G4Svc.cpp.

110 {
111// std::cout<<"G4Svc::~G4Svc()"<<std::endl;
112// if (p_runMgr != 0) {
113// delete p_runMgr;
114// }
115//#ifdef G4VIS_USE
116// if (p_visMgr != 0) {
117// delete p_visMgr;
118// }
119//#endif
120
121}

Member Function Documentation

◆ EmcCoherentNoise()

double G4Svc::EmcCoherentNoise ( )
inline

Definition at line 134 of file G4Svc.h.

134{return m_emcCoherentNoise;}

Referenced by BesEmcDigitizer::Digitize().

◆ EmcElecSatuDead()

int G4Svc::EmcElecSatuDead ( )
inline

Definition at line 141 of file G4Svc.h.

141{return m_emcELecSatuDead;}

Referenced by BesEmcDigitizer::Digitize().

◆ EmcElecSaturation()

int G4Svc::EmcElecSaturation ( )
inline

Definition at line 140 of file G4Svc.h.

140{return m_emcELecSaturation;}

Referenced by BesEmcDigitizer::Digitize().

◆ EmcIncoherentNoise()

double G4Svc::EmcIncoherentNoise ( )
inline

Definition at line 133 of file G4Svc.h.

133{return m_emcIncoherentNoise;}

Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().

◆ EmcLightOutput()

bool G4Svc::EmcLightOutput ( )
inline

Definition at line 132 of file G4Svc.h.

132{return m_emcLightOutput;}

Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().

◆ EmcNoiseLevel()

int G4Svc::EmcNoiseLevel ( )
inline

Definition at line 138 of file G4Svc.h.

138{return m_emcNoiseLevel;}

Referenced by BesEmcDigitizer::Digitize().

◆ EmcNoiseMean()

double G4Svc::EmcNoiseMean ( )
inline

Definition at line 135 of file G4Svc.h.

135{return m_emcNoiseMean;}

Referenced by BesEmcDigitizer::AddNoiseAll().

◆ EmcNoiseSigma()

double G4Svc::EmcNoiseSigma ( )
inline

Definition at line 136 of file G4Svc.h.

136{return m_emcNoiseSigma;}

Referenced by BesEmcDigitizer::AddNoiseAll().

◆ EmcNoiseThreshold()

double G4Svc::EmcNoiseThreshold ( )
inline

Definition at line 137 of file G4Svc.h.

137{return m_emcNoiseThreshold;}

Referenced by BesEmcDigitizer::AddNoise5x5(), and BesEmcDigitizer::AddNoiseAll().

◆ EmcRootFlag()

bool G4Svc::EmcRootFlag ( )
inline

Definition at line 127 of file G4Svc.h.

127{return m_emcRootFlag;}

Referenced by BesEmcDigitizer::BesEmcDigitizer(), BesEmcDigitizer::Digitize(), and BesSim::initialize().

◆ EmcTime()

int G4Svc::EmcTime ( )
inline

Definition at line 139 of file G4Svc.h.

139{return m_emcTime;}

Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().

◆ finalize()

StatusCode G4Svc::finalize ( )
virtual

Definition at line 168 of file G4Svc.cpp.

168 {
169
170 MsgStream log( msgSvc(), name() );
171 StatusCode status = Service::finalize();
172
173 if ( status.isSuccess() )
174 log << MSG::INFO << "Service finalised successfully" << endreq;
175
176 return status;
177}
IMessageSvc * msgSvc()

◆ G4Init()

void G4Svc::G4Init ( )

Definition at line 303 of file G4Svc.cpp.

303 {
304
305 MsgStream log( msgSvc(), name() );
306
307 log << MSG::VERBOSE << "Attempting G4 Initialization" << endreq;
308
309 if (!_init) {
310 // Tracking
311 //if (m_saveTracks) {
312 // log << MSG::INFO << "turning tracking on" << std::endl;
313 // uiMgr()->ApplyCommand("/tracking/storeTrajectory 1");
314 //}
315
316 // Visualization manager
317#ifdef G4VIS_USE
318 if (m_vis) {
319 log << MSG::INFO << "Initializing G4SvcVisManager" << endreq;
320 //p_visMgr = new G4SvcVisManager;
321 p_visMgr = new G4VisExecutive;
322 p_visMgr->Initialize();
323 }
324#else
325 m_vis = false;
326#endif
327
328 if (!m_vis) {
329 log << MSG::INFO << "Not including Visualization" << endreq;
330 }
331
332 // Verbosity
333 log << MSG::DEBUG << "Setting verbosity levels - "
334 << "run: " << m_runVerb << " event: " << m_eventVerb
335 << " track: " << m_trackVerb << endreq;
336
337 {
338 std::ostrstream ost;
339 ost << "/run/verbose " << m_runVerb << std::ends;
340 uiMgr()->ApplyCommand(ost.str());
341 }
342 {
343 std::ostrstream ost;
344 ost << "/event/verbose " << m_eventVerb << std::ends;
345 uiMgr()->ApplyCommand(ost.str());
346 }
347 {
348 std::ostrstream ost;
349 ost << "/tracking/verbose " << m_trackVerb << std::ends;
350 uiMgr()->ApplyCommand(ost.str());
351 }
352
353 log << MSG::DEBUG << "Initializing G4 kernel" << endreq;
354 p_runMgr->Initialize();
355 _init = true;
356
357 if (m_macroName!="none"){
358 log << MSG::INFO << "Running G4 macro "<<m_macroName<< endreq;
359 uiMgr()->ApplyCommand("/control/execute "+m_macroName);
360 }
361 if (m_interactiveG4) {
363 }
364
365 }else {
366 log << MSG::ERROR << "G4 kernel already initialized" << endreq;
367 }
368}
G4UImanager * uiMgr()
Definition G4Svc.cpp:215
void StartUISession()
Definition G4Svc.cpp:290

Referenced by BesSim::beginRun().

◆ GetBeamAngle()

double G4Svc::GetBeamAngle ( )
inline

Definition at line 97 of file G4Svc.h.

97{return m_beamAngle;}

◆ GetBeamDeltaTime()

double G4Svc::GetBeamDeltaTime ( )
inline

Definition at line 89 of file G4Svc.h.

89{return m_beamDeltaTime;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamPosX()

double G4Svc::GetBeamPosX ( )
inline

Definition at line 76 of file G4Svc.h.

76{return m_beamPosX;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamPosY()

double G4Svc::GetBeamPosY ( )
inline

Definition at line 77 of file G4Svc.h.

77{return m_beamPosY;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamPosZ()

double G4Svc::GetBeamPosZ ( )
inline

Definition at line 78 of file G4Svc.h.

78{return m_beamPosZ;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamShiftPx()

double G4Svc::GetBeamShiftPx ( )
inline

Definition at line 84 of file G4Svc.h.

84{return m_beamShiftPx;}

Referenced by G4HepMCInterface::Boost().

◆ GetBeamShiftPy()

double G4Svc::GetBeamShiftPy ( )
inline

Definition at line 85 of file G4Svc.h.

85{return m_beamShiftPy;}

Referenced by G4HepMCInterface::Boost().

◆ GetBeamShiftPz()

double G4Svc::GetBeamShiftPz ( )
inline

Definition at line 86 of file G4Svc.h.

86{return m_beamShiftPz;}

Referenced by G4HepMCInterface::Boost().

◆ GetBeamSizeX()

double G4Svc::GetBeamSizeX ( )
inline

Definition at line 80 of file G4Svc.h.

80{return m_beamSizeX;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamSizeY()

double G4Svc::GetBeamSizeY ( )
inline

Definition at line 81 of file G4Svc.h.

81{return m_beamSizeY;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamSizeZ()

double G4Svc::GetBeamSizeZ ( )
inline

Definition at line 82 of file G4Svc.h.

82{return m_beamSizeZ;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamStartTime()

double G4Svc::GetBeamStartTime ( )
inline

Definition at line 88 of file G4Svc.h.

88{return m_beamStartTime;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBeamTime()

double G4Svc::GetBeamTime ( )
inline

◆ GetBoostLab()

bool G4Svc::GetBoostLab ( )
inline

Definition at line 98 of file G4Svc.h.

98{return m_boostLab;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetBunchTimeSigma()

double G4Svc::GetBunchTimeSigma ( )
inline

Definition at line 91 of file G4Svc.h.

91{return m_bunchTimeSigma;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetCurrentEvent()

const G4Event * G4Svc::GetCurrentEvent ( ) const

Definition at line 194 of file G4Svc.cpp.

194 {
195
196 const G4Event *evt = p_runMgr->GetCurrentEvent();
197
198 if (evt == 0) {
199 MsgStream log( msgSvc(), name() );
200 log << MSG::ERROR << "Could not get current G4Event" << endreq;
201 }
202
203 return ( evt );
204
205}

◆ GetCurrentRun()

const G4Run * G4Svc::GetCurrentRun ( ) const

Definition at line 208 of file G4Svc.cpp.

208 {
209
210 return ( p_runMgr->GetCurrentRun() );
211
212}

◆ GetMdcDataInput()

int G4Svc::GetMdcDataInput ( )
inline

Definition at line 101 of file G4Svc.h.

101{ return m_mdcDataInput; }

Referenced by BesMdcGeoParameter::BesMdcGeoParameter().

◆ GetMdcDedxFlag()

int G4Svc::GetMdcDedxFlag ( )
inline

Definition at line 102 of file G4Svc.h.

102{return m_mdcDedxFlag;}

Referenced by BesMdcSD::BesMdcSD(), BesMdcSD::ProcessHits(), and BesRawDataWriter::SaveMdcDigits().

◆ GetMdcNoiseFile()

std::string G4Svc::GetMdcNoiseFile ( )
inline

Definition at line 95 of file G4Svc.h.

95{return m_mdcNoiseFile;}

Referenced by BesMdcDigitizer::BesMdcDigitizer().

◆ GetNBunch()

double G4Svc::GetNBunch ( )
inline

Definition at line 90 of file G4Svc.h.

90{return m_nBunch;}

Referenced by G4HepMCInterface::HepMC2G4().

◆ GetSetBeamShift()

bool G4Svc::GetSetBeamShift ( )
inline

Definition at line 99 of file G4Svc.h.

99{return m_setBeamShift;}

◆ GetTupleEmc1()

NTuple::Tuple * G4Svc::GetTupleEmc1 ( )
inline

Definition at line 116 of file G4Svc.h.

116{return m_tupleEmc1;}

Referenced by BesEmcDigitizer::BesEmcDigitizer().

◆ GetTupleEmc2()

NTuple::Tuple * G4Svc::GetTupleEmc2 ( )
inline

Definition at line 119 of file G4Svc.h.

119{return m_tupleEmc2;}

Referenced by BesEmcDigitizer::BesEmcDigitizer().

◆ GetTupleMdc()

NTuple::Tuple * G4Svc::GetTupleMdc ( )
inline

Definition at line 104 of file G4Svc.h.

104{return m_tupleMdc;}

Referenced by BesMdcSD::BesMdcSD().

◆ GetTupleMuc()

NTuple::Tuple * G4Svc::GetTupleMuc ( )
inline

Definition at line 122 of file G4Svc.h.

122{return m_tupleMuc;}

Referenced by BesMucDigitizer::BesMucDigitizer().

◆ GetTupleTof1()

NTuple::Tuple * G4Svc::GetTupleTof1 ( )
inline

Definition at line 107 of file G4Svc.h.

107{return m_tupleTof1;}

Referenced by BesTofDigitizerV::BesTofDigitizerV().

◆ GetTupleTof2()

NTuple::Tuple * G4Svc::GetTupleTof2 ( )
inline

Definition at line 110 of file G4Svc.h.

110{return m_tupleTof2;}

Referenced by BesTofDigitizerV::BesTofDigitizerV().

◆ GetTupleTof3()

NTuple::Tuple * G4Svc::GetTupleTof3 ( )
inline

Definition at line 113 of file G4Svc.h.

113{return m_tupleTof3;}

Referenced by BesTofDigitizerV::BesTofDigitizerV().

◆ initialize()

StatusCode G4Svc::initialize ( )
virtual

Definition at line 141 of file G4Svc.cpp.

141 {
142
143 MsgStream log( msgSvc(), name() );
144
145 StatusCode status = Service::initialize();
146 log << MSG::INFO << "Service initialized" << endreq;
147
148 //get IRealizationSvc
149 IRealizationSvc *tmpReal;
150 status = service("RealizationSvc", tmpReal);
151 if (!status.isSuccess())
152 {
153 log << MSG::ERROR << " Could not initialize Realization Service" << endreq;
154 return status;
155 } else {
156 log << MSG::INFO << "got the RealizationSvc" << endreq;
157 m_RealizationSvc=dynamic_cast<RealizationSvc*>(tmpReal);
158 }
159
160 m_runID = m_RealizationSvc->getRunId();
161
162 runMgr();
163 return status;
164}
G4RunManager * runMgr()
Definition G4Svc.cpp:124

◆ LogLevel()

int G4Svc::LogLevel ( )
inline

Definition at line 145 of file G4Svc.h.

145{return m_logLevel;}

Referenced by BesSim::initialize().

◆ MdcRootFlag()

bool G4Svc::MdcRootFlag ( )
inline

Definition at line 125 of file G4Svc.h.

125{return m_mdcRootFlag;}

Referenced by BesMdcSD::BesMdcSD(), and BesSim::initialize().

◆ MucNoiseMode()

int G4Svc::MucNoiseMode ( )
inline

Definition at line 143 of file G4Svc.h.

143{return m_mucNoiseMode;}

Referenced by BesMucSD::BesMucSD().

◆ MucRootFlag()

bool G4Svc::MucRootFlag ( )
inline

Definition at line 128 of file G4Svc.h.

128{return m_mucRootFlag;}

Referenced by BesMucDigitizer::BesMucDigitizer(), BesMucDigitizer::Digitize(), and BesSim::initialize().

◆ RunInitialize()

void G4Svc::RunInitialize ( )

Definition at line 371 of file G4Svc.cpp.

372{
373 bool cond = p_runMgr->ConfirmBeamOnCondition();
374 if(cond)
375 {
376 std::cout<<"########### initializing the G4Run ############"<<
377 std::endl;
378 p_runMgr->SetRunIDCounter( -std::abs(m_runID) );
379 p_runMgr->RunInitialization();
380 }
381}

Referenced by BesSim::beginRun().

◆ runMgr()

G4RunManager * G4Svc::runMgr ( )

Definition at line 124 of file G4Svc.cpp.

124 {
125 //std::cout<<"G4Svc::runMgr()"<<std::endl;
126 MsgStream log( msgSvc(), name() );
127
128 if (p_runMgr == 0) {
129 p_runMgr = new G4SvcRunManager();
130 p_runMgr->SetLogLevel( m_logLevel );
131 //p_runMgr->SetSaveHits( m_saveHits );
132 //p_runMgr->SetSaveTracks( m_saveTracks );
133 }
134
135 return p_runMgr;
136
137}

Referenced by BesSim::finalize(), and initialize().

◆ RunTerminate()

void G4Svc::RunTerminate ( )

Definition at line 383 of file G4Svc.cpp.

384{
385 p_runMgr->RunTermination();
386}

Referenced by BesSim::finalize().

◆ SetBeamTime()

void G4Svc::SetBeamTime ( double value)
inline

Definition at line 94 of file G4Svc.h.

94{m_beamTime = value;}

Referenced by BesTuningIO::GetTofRootHits(), and G4HepMCInterface::HepMC2G4().

◆ SetTupleEmc1()

void G4Svc::SetTupleEmc1 ( NTuple::Tuple * tuple)
inline

Definition at line 117 of file G4Svc.h.

117{m_tupleEmc1 = tuple;}

Referenced by BesSim::bookEmcRootFile().

◆ SetTupleEmc2()

void G4Svc::SetTupleEmc2 ( NTuple::Tuple * tuple)
inline

Definition at line 120 of file G4Svc.h.

120{m_tupleEmc2 = tuple;}

Referenced by BesSim::bookEmcRootFile().

◆ SetTupleMdc()

void G4Svc::SetTupleMdc ( NTuple::Tuple * tuple)
inline

Definition at line 105 of file G4Svc.h.

105{m_tupleMdc = tuple;}

Referenced by BesSim::bookMdcRootFile().

◆ SetTupleMuc()

void G4Svc::SetTupleMuc ( NTuple::Tuple * tuple)
inline

Definition at line 123 of file G4Svc.h.

123{m_tupleMuc = tuple;}

Referenced by BesSim::bookMucRootFile().

◆ SetTupleTof1()

void G4Svc::SetTupleTof1 ( NTuple::Tuple * tuple)
inline

Definition at line 108 of file G4Svc.h.

108{m_tupleTof1 = tuple;}

Referenced by BesSim::bookTofRootFile().

◆ SetTupleTof2()

void G4Svc::SetTupleTof2 ( NTuple::Tuple * tuple)
inline

Definition at line 111 of file G4Svc.h.

111{m_tupleTof2 = tuple;}

Referenced by BesSim::bookTofRootFile().

◆ SetTupleTof3()

void G4Svc::SetTupleTof3 ( NTuple::Tuple * tuple)
inline

Definition at line 114 of file G4Svc.h.

114{m_tupleTof3 = tuple;}

Referenced by BesSim::bookTofRootFile().

◆ SetUserInitialization() [1/3]

void G4Svc::SetUserInitialization ( G4VUserActionInitialization * actionInit)

Definition at line 238 of file G4Svc.cpp.

238 {
239 if (p_runMgr != 0) {
240 p_runMgr->SetUserInitialization(userInit);
241 }
242}

◆ SetUserInitialization() [2/3]

void G4Svc::SetUserInitialization ( G4VUserDetectorConstruction * userInit)

Definition at line 224 of file G4Svc.cpp.

224 {
225 if (p_runMgr != 0) {
226 p_runMgr->SetUserInitialization(userInit);
227 }
228}

Referenced by BesSim::initialize().

◆ SetUserInitialization() [3/3]

void G4Svc::SetUserInitialization ( G4VUserPhysicsList * physInit)

Definition at line 232 of file G4Svc.cpp.

232 {
233 if (p_runMgr != 0) {
234 p_runMgr->SetUserInitialization(userInit);
235 }
236}

◆ SimulateEvents()

void G4Svc::SimulateEvents ( int i)

Definition at line 388 of file G4Svc.cpp.

389{
390 p_runMgr->SimulateEvent(i);
391}
void SimulateEvent(int i)

Referenced by BesSim::execute().

◆ StartUISession()

void G4Svc::StartUISession ( )

Definition at line 290 of file G4Svc.cpp.

290 {
291
292 MsgStream log( msgSvc(), name() );
293 log << MSG::DEBUG << "Starting G4 terminal" << endreq;
294
295 G4UIsession * ses = new G4UIterminal(new G4UItcsh);
296 ses->SessionStart();
297
298 delete ses;
299}

Referenced by G4Init().

◆ TofRootFlag()

◆ TofSaturationFlag()

bool G4Svc::TofSaturationFlag ( )
inline

Definition at line 130 of file G4Svc.h.

130{return m_tofSaturationFlag;} // Tof Q Saturation in bhabha events

Referenced by BesTofDigitizerBrV2::TofPmtRspns(), and BesTofDigitizerEcV3::TofPmtRspns().

◆ uiMgr()

G4UImanager * G4Svc::uiMgr ( )

Definition at line 215 of file G4Svc.cpp.

215 {
216 if (p_uiMgr == 0) {
217 p_uiMgr = G4UImanager::GetUIpointer();
218 }
219 return ( p_uiMgr );
220}

Referenced by G4Init().

Friends And Related Symbol Documentation

◆ SvcFactory< G4Svc >

friend class SvcFactory< G4Svc >
friend

Definition at line 155 of file G4Svc.h.


The documentation for this class was generated from the following files: