#include <G4Svc.h>
Inheritance diagram for G4Svc:
Public Member Functions | |
virtual StatusCode | initialize () |
virtual StatusCode | finalize () |
virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvInterface) |
G4RunManager * | runMgr () |
void | SetUserInitialization (G4VUserDetectorConstruction *userInit) |
void | SetUserInitialization (G4VUserPhysicsList *physInit) |
void | SetUserAction (G4UserRunAction *) |
void | SetUserAction (G4UserEventAction *) |
void | SetUserAction (G4VUserPrimaryGeneratorAction *) |
void | SetUserAction (G4UserStackingAction *) |
void | SetUserAction (G4UserTrackingAction *) |
void | SetUserAction (G4UserSteppingAction *) |
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 | MucNoiseMode () |
int | LogLevel () |
void | G4Init () |
void | RunInitialize () |
void | RunTerminate () |
void | SimulateEvents (int) |
Static Public Member Functions | |
static const InterfaceID & | interfaceID () |
Retrieve interface ID. | |
Protected Member Functions | |
G4Svc (const std::string &name, ISvcLocator *svc) | |
virtual | ~G4Svc () |
Private Attributes | |
G4SvcRunManager * | p_runMgr |
G4UImanager * | p_uiMgr |
bool | m_vis |
std::string | m_macroName |
std::string | m_mdcNoiseFile |
int | m_logLevel |
int | m_runVerb |
int | m_eventVerb |
int | m_trackVerb |
bool | _init |
bool | m_interactiveG4 |
bool | m_besGenAction |
int | m_runID |
int | m_mdcDataInput |
int | m_mdcDedxFlag |
double | m_beamPosX |
double | m_beamPosY |
double | m_beamPosZ |
double | m_beamSizeX |
double | m_beamSizeY |
double | m_beamSizeZ |
double | m_beamStartTime |
double | m_beamDeltaTime |
double | m_nBunch |
double | m_bunchTimeSigma |
double | m_beamTime |
double | m_beamShiftPx |
double | m_beamShiftPy |
double | m_beamShiftPz |
bool | m_boostLab |
bool | m_setBeamShift |
double | m_beamAngle |
NTuple::Tuple * | m_tupleMdc |
bool | m_mdcRootFlag |
NTuple::Tuple * | m_tupleTof1 |
NTuple::Tuple * | m_tupleTof2 |
NTuple::Tuple * | m_tupleTof3 |
bool | m_tofRootFlag |
bool | m_tofSaturationFlag |
NTuple::Tuple * | m_tupleEmc1 |
NTuple::Tuple * | m_tupleEmc2 |
bool | m_emcRootFlag |
bool | m_emcLightOutput |
double | m_emcIncoherentNoise |
double | m_emcCoherentNoise |
double | m_emcNoiseMean |
double | m_emcNoiseSigma |
double | m_emcNoiseThreshold |
int | m_emcNoiseLevel |
int | m_emcTime |
int | m_emcELecSaturation |
int | m_mucNoiseMode |
NTuple::Tuple * | m_tupleMuc |
bool | m_mucRootFlag |
RealizationSvc * | m_RealizationSvc |
Friends | |
class | SvcFactory< G4Svc > |
Definition at line 31 of file G4Svc.h.
G4Svc::G4Svc | ( | const std::string & | name, | |
ISvcLocator * | svc | |||
) | [protected] |
Definition at line 37 of file G4Svc.cpp.
References m_beamAngle, m_beamDeltaTime, m_beamPosX, m_beamPosY, m_beamPosZ, m_beamShiftPx, m_beamShiftPy, m_beamShiftPz, m_beamSizeX, m_beamSizeY, m_beamSizeZ, m_beamStartTime, m_besGenAction, m_boostLab, m_bunchTimeSigma, m_emcCoherentNoise, m_emcELecSaturation, m_emcIncoherentNoise, m_emcLightOutput, m_emcNoiseLevel, m_emcNoiseMean, m_emcNoiseSigma, m_emcNoiseThreshold, m_emcRootFlag, m_emcTime, m_eventVerb, m_interactiveG4, m_logLevel, m_macroName, m_mdcDataInput, m_mdcDedxFlag, m_mdcNoiseFile, m_mdcRootFlag, m_mucNoiseMode, m_mucRootFlag, m_nBunch, m_runVerb, m_setBeamShift, m_tofRootFlag, m_tofSaturationFlag, m_trackVerb, and m_vis.
00037 : 00038 Service( name, svc ), p_runMgr(0), p_uiMgr(0), p_visMgr(0), 00039 _init(false), m_beamTime(0) 00040 { 00041 //declareProperty( "PhysicsList", m_PhysicsList="none"); 00042 //declareProperty( "DefaultPhysicsCut", m_PhysicsCut=-1.); 00043 declareProperty( "Visualize", m_vis=false); 00044 //declareProperty( "VisType", m_visType="VRML1FILE"); 00045 00046 declareProperty( "RunVerbosity", m_runVerb=0); 00047 declareProperty( "EventVerbosity", m_eventVerb=0); 00048 declareProperty( "TrackingVerbosity", m_trackVerb=0); 00049 00050 declareProperty( "FADSmacro",m_macroName="none" ); 00051 declareProperty( "MdcNoiseFile", m_mdcNoiseFile="none"); 00052 00053 //declareProperty( "SaveHits", m_saveHits=true); 00054 //declareProperty( "SaveTracks", m_saveTracks=false); 00055 declareProperty( "LogLevel", m_logLevel=6); 00056 00057 declareProperty( "InteractiveG4" , m_interactiveG4=false); 00058 00059 declareProperty("BesGenAction", m_besGenAction=false); 00060 00061 declareProperty("BeamPosX",m_beamPosX=0); 00062 declareProperty("BeamPosY",m_beamPosY=0); 00063 declareProperty("BeamPosZ",m_beamPosZ=0); 00064 00065 declareProperty("BeamSizeX", m_beamSizeX=10); 00066 declareProperty("BeamSizeY", m_beamSizeY=20); 00067 declareProperty("BeamSizeZ", m_beamSizeZ=30); 00068 00069 declareProperty("BeamStartTime",m_beamStartTime=0); 00070 declareProperty("BeamDeltaTime",m_beamDeltaTime=0); 00071 declareProperty("NBunch",m_nBunch=1); 00072 00073 declareProperty("BunchTimeSigma",m_bunchTimeSigma=0); 00074 00075 declareProperty("MdcDataInput",m_mdcDataInput=1); 00076 declareProperty("MdcDedxFlag",m_mdcDedxFlag=1); 00077 00078 declareProperty("BoostLab",m_boostLab=false); 00079 declareProperty("BeamAngle",m_beamAngle=11); 00080 00081 declareProperty("SetBeamShift",m_setBeamShift= false); 00082 declareProperty("BeamShiftPx" ,m_beamShiftPx=39.45); // in unit MeV 00083 declareProperty("BeamShiftPy" ,m_beamShiftPy=-0.98); 00084 declareProperty("BeamShiftPz" ,m_beamShiftPz=3.70); 00085 00086 declareProperty("MdcRootFlag",m_mdcRootFlag=false); 00087 declareProperty("TofRootFlag",m_tofRootFlag=false); 00088 declareProperty("EmcRootFlag",m_emcRootFlag=false); 00089 declareProperty("MucRootFlag",m_mucRootFlag=false); 00090 00091 // Switch for ADC Saturation in Bhabha events 00092 declareProperty("TofSaturationFlag",m_tofSaturationFlag=true); 00093 00094 declareProperty("EmcLightOutput",m_emcLightOutput=true); 00095 declareProperty("EmcIncoherentNoise",m_emcIncoherentNoise=0.2); 00096 declareProperty("EmcCoherentNoise",m_emcCoherentNoise=0.); 00097 declareProperty("EmcNoiseMean",m_emcNoiseMean=1.16); 00098 declareProperty("EmcNoiseSigma",m_emcNoiseSigma=0.23); 00099 declareProperty("EmcNoiseThreshold",m_emcNoiseThreshold=0.5); 00100 declareProperty("EmcNoiseLevel",m_emcNoiseLevel=3); 00101 declareProperty("EmcTime",m_emcTime=20); 00102 declareProperty("EmcELecSaturation",m_emcELecSaturation=1); 00103 00104 declareProperty("MucNoiseMode", m_mucNoiseMode=1); 00105 }
G4Svc::~G4Svc | ( | ) | [protected, virtual] |
double G4Svc::EmcCoherentNoise | ( | ) | [inline] |
Definition at line 126 of file G4Svc.h.
References m_emcCoherentNoise.
Referenced by BesEmcDigitizer::Digitize().
00126 {return m_emcCoherentNoise;}
int G4Svc::EmcElecSaturation | ( | ) | [inline] |
Definition at line 132 of file G4Svc.h.
References m_emcELecSaturation.
Referenced by BesEmcDigitizer::Digitize().
00132 {return m_emcELecSaturation;}
double G4Svc::EmcIncoherentNoise | ( | ) | [inline] |
Definition at line 125 of file G4Svc.h.
References m_emcIncoherentNoise.
Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().
00125 {return m_emcIncoherentNoise;}
bool G4Svc::EmcLightOutput | ( | ) | [inline] |
Definition at line 124 of file G4Svc.h.
References m_emcLightOutput.
Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().
00124 {return m_emcLightOutput;}
int G4Svc::EmcNoiseLevel | ( | ) | [inline] |
Definition at line 130 of file G4Svc.h.
References m_emcNoiseLevel.
Referenced by BesEmcDigitizer::Digitize().
00130 {return m_emcNoiseLevel;}
double G4Svc::EmcNoiseMean | ( | ) | [inline] |
Definition at line 127 of file G4Svc.h.
References m_emcNoiseMean.
Referenced by BesEmcDigitizer::AddNoiseAll().
00127 {return m_emcNoiseMean;}
double G4Svc::EmcNoiseSigma | ( | ) | [inline] |
Definition at line 128 of file G4Svc.h.
References m_emcNoiseSigma.
Referenced by BesEmcDigitizer::AddNoiseAll().
00128 {return m_emcNoiseSigma;}
double G4Svc::EmcNoiseThreshold | ( | ) | [inline] |
Definition at line 129 of file G4Svc.h.
References m_emcNoiseThreshold.
Referenced by BesEmcDigitizer::AddNoise5x5(), and BesEmcDigitizer::AddNoiseAll().
00129 {return m_emcNoiseThreshold;}
bool G4Svc::EmcRootFlag | ( | ) | [inline] |
Definition at line 119 of file G4Svc.h.
References m_emcRootFlag.
Referenced by BesEmcDigitizer::BesEmcDigitizer(), BesEmcDigitizer::Digitize(), and BesSim::initialize().
00119 {return m_emcRootFlag;}
int G4Svc::EmcTime | ( | ) | [inline] |
Definition at line 131 of file G4Svc.h.
References m_emcTime.
Referenced by BesEmcDigitizer::AddNoise5x5(), BesEmcDigitizer::AddNoiseAll(), and BesEmcDigitizer::Digitize().
00131 {return m_emcTime;}
StatusCode G4Svc::finalize | ( | ) | [virtual] |
Definition at line 167 of file G4Svc.cpp.
References Bes_Common::INFO, and msgSvc().
00167 { 00168 00169 MsgStream log( msgSvc(), name() ); 00170 StatusCode status = Service::finalize(); 00171 00172 if ( status.isSuccess() ) 00173 log << MSG::INFO << "Service finalised successfully" << endreq; 00174 00175 return status; 00176 }
void G4Svc::G4Init | ( | ) | [virtual] |
Implements IG4Svc.
Definition at line 296 of file G4Svc.cpp.
References _init, Bes_Common::DEBUG, calibUtil::ERROR, Bes_Common::INFO, m_eventVerb, m_interactiveG4, m_macroName, m_runVerb, m_trackVerb, m_vis, msgSvc(), p_runMgr, StartUISession(), uiMgr(), and VERBOSE.
Referenced by BesSim::beginRun().
00296 { 00297 00298 MsgStream log( msgSvc(), name() ); 00299 00300 log << MSG::VERBOSE << "Attempting G4 Initialization" << endreq; 00301 00302 if (!_init) { 00303 // Tracking 00304 //if (m_saveTracks) { 00305 // log << MSG::INFO << "turning tracking on" << std::endl; 00306 // uiMgr()->ApplyCommand("/tracking/storeTrajectory 1"); 00307 //} 00308 00309 // Visualization manager 00310 #ifdef G4VIS_USE 00311 if (m_vis) { 00312 log << MSG::INFO << "Initializing G4SvcVisManager" << endreq; 00313 //p_visMgr = new G4SvcVisManager; 00314 p_visMgr = new G4VisExecutive; 00315 p_visMgr->Initialize(); 00316 } 00317 #else 00318 m_vis = false; 00319 #endif 00320 00321 if (!m_vis) { 00322 log << MSG::INFO << "Not including Visualization" << endreq; 00323 } 00324 00325 // Verbosity 00326 log << MSG::DEBUG << "Setting verbosity levels - " 00327 << "run: " << m_runVerb << " event: " << m_eventVerb 00328 << " track: " << m_trackVerb << endreq; 00329 00330 { 00331 std::ostrstream ost; 00332 ost << "/run/verbose " << m_runVerb << std::ends; 00333 uiMgr()->ApplyCommand(ost.str()); 00334 } 00335 { 00336 std::ostrstream ost; 00337 ost << "/event/verbose " << m_eventVerb << std::ends; 00338 uiMgr()->ApplyCommand(ost.str()); 00339 } 00340 { 00341 std::ostrstream ost; 00342 ost << "/tracking/verbose " << m_trackVerb << std::ends; 00343 uiMgr()->ApplyCommand(ost.str()); 00344 } 00345 00346 log << MSG::DEBUG << "Initializing G4 kernel" << endreq; 00347 p_runMgr->Initialize(); 00348 _init = true; 00349 00350 if (m_macroName!="none"){ 00351 log << MSG::INFO << "Running G4 macro "<<m_macroName<< endreq; 00352 uiMgr()->ApplyCommand("/control/execute "+m_macroName); 00353 } 00354 if (m_interactiveG4) { 00355 StartUISession(); 00356 } 00357 00358 }else { 00359 log << MSG::ERROR << "G4 kernel already initialized" << endreq; 00360 } 00361 }
double G4Svc::GetBeamAngle | ( | ) | [inline] |
double G4Svc::GetBeamDeltaTime | ( | ) | [inline] |
Definition at line 81 of file G4Svc.h.
References m_beamDeltaTime.
Referenced by G4HepMCInterface::HepMC2G4().
00081 {return m_beamDeltaTime;}
double G4Svc::GetBeamPosX | ( | ) | [inline] |
Definition at line 68 of file G4Svc.h.
References m_beamPosX.
Referenced by G4HepMCInterface::HepMC2G4().
00068 {return m_beamPosX;}
double G4Svc::GetBeamPosY | ( | ) | [inline] |
Definition at line 69 of file G4Svc.h.
References m_beamPosY.
Referenced by G4HepMCInterface::HepMC2G4().
00069 {return m_beamPosY;}
double G4Svc::GetBeamPosZ | ( | ) | [inline] |
Definition at line 70 of file G4Svc.h.
References m_beamPosZ.
Referenced by G4HepMCInterface::HepMC2G4().
00070 {return m_beamPosZ;}
double G4Svc::GetBeamShiftPx | ( | ) | [inline] |
Definition at line 76 of file G4Svc.h.
References m_beamShiftPx.
Referenced by G4HepMCInterface::Boost().
00076 {return m_beamShiftPx;}
double G4Svc::GetBeamShiftPy | ( | ) | [inline] |
Definition at line 77 of file G4Svc.h.
References m_beamShiftPy.
Referenced by G4HepMCInterface::Boost().
00077 {return m_beamShiftPy;}
double G4Svc::GetBeamShiftPz | ( | ) | [inline] |
Definition at line 78 of file G4Svc.h.
References m_beamShiftPz.
Referenced by G4HepMCInterface::Boost().
00078 {return m_beamShiftPz;}
double G4Svc::GetBeamSizeX | ( | ) | [inline] |
Definition at line 72 of file G4Svc.h.
References m_beamSizeX.
Referenced by G4HepMCInterface::HepMC2G4().
00072 {return m_beamSizeX;}
double G4Svc::GetBeamSizeY | ( | ) | [inline] |
Definition at line 73 of file G4Svc.h.
References m_beamSizeY.
Referenced by G4HepMCInterface::HepMC2G4().
00073 {return m_beamSizeY;}
double G4Svc::GetBeamSizeZ | ( | ) | [inline] |
Definition at line 74 of file G4Svc.h.
References m_beamSizeZ.
Referenced by G4HepMCInterface::HepMC2G4().
00074 {return m_beamSizeZ;}
double G4Svc::GetBeamStartTime | ( | ) | [inline] |
Definition at line 80 of file G4Svc.h.
References m_beamStartTime.
Referenced by BesMdcDigitizer::AddNoise(), and G4HepMCInterface::HepMC2G4().
00080 {return m_beamStartTime;}
double G4Svc::GetBeamTime | ( | ) | [inline] |
Definition at line 85 of file G4Svc.h.
References m_beamTime.
Referenced by BesTofDigitizerEcV3::Digitize(), BesTofDigitizerEcV2::Digitize(), BesTofDigitizerBrV2::Digitize(), and BesRootIO::SaveTofHitRoot().
00085 {return m_beamTime;}
bool G4Svc::GetBoostLab | ( | ) | [inline] |
Definition at line 90 of file G4Svc.h.
References m_boostLab.
Referenced by G4HepMCInterface::HepMC2G4().
00090 {return m_boostLab;}
double G4Svc::GetBunchTimeSigma | ( | ) | [inline] |
Definition at line 83 of file G4Svc.h.
References m_bunchTimeSigma.
Referenced by G4HepMCInterface::HepMC2G4().
00083 {return m_bunchTimeSigma;}
const G4Event * G4Svc::GetCurrentEvent | ( | ) | const [virtual] |
Implements IG4Svc.
Definition at line 193 of file G4Svc.cpp.
References calibUtil::ERROR, msgSvc(), and p_runMgr.
00193 { 00194 00195 const G4Event *evt = p_runMgr->GetCurrentEvent(); 00196 00197 if (evt == 0) { 00198 MsgStream log( msgSvc(), name() ); 00199 log << MSG::ERROR << "Could not get current G4Event" << endreq; 00200 } 00201 00202 return ( evt ); 00203 00204 }
const G4Run * G4Svc::GetCurrentRun | ( | ) | const [virtual] |
int G4Svc::GetMdcDataInput | ( | ) | [inline] |
Definition at line 93 of file G4Svc.h.
References m_mdcDataInput.
Referenced by BesMdcGeoParameter::BesMdcGeoParameter().
00093 { return m_mdcDataInput; }
int G4Svc::GetMdcDedxFlag | ( | ) | [inline] |
Definition at line 94 of file G4Svc.h.
References m_mdcDedxFlag.
Referenced by BesMdcSD::BesMdcSD(), BesMdcSD::ProcessHits(), and BesRawDataWriter::SaveMdcDigits().
00094 {return m_mdcDedxFlag;}
std::string G4Svc::GetMdcNoiseFile | ( | ) | [inline] |
Definition at line 87 of file G4Svc.h.
References m_mdcNoiseFile.
Referenced by BesMdcDigitizer::BesMdcDigitizer().
00087 {return m_mdcNoiseFile;}
double G4Svc::GetNBunch | ( | ) | [inline] |
Definition at line 82 of file G4Svc.h.
References m_nBunch.
Referenced by G4HepMCInterface::HepMC2G4().
00082 {return m_nBunch;}
bool G4Svc::GetSetBeamShift | ( | ) | [inline] |
NTuple::Tuple* G4Svc::GetTupleEmc1 | ( | ) | [inline] |
Definition at line 108 of file G4Svc.h.
References m_tupleEmc1.
Referenced by BesEmcDigitizer::BesEmcDigitizer().
00108 {return m_tupleEmc1;}
NTuple::Tuple* G4Svc::GetTupleEmc2 | ( | ) | [inline] |
Definition at line 111 of file G4Svc.h.
References m_tupleEmc2.
Referenced by BesEmcDigitizer::BesEmcDigitizer().
00111 {return m_tupleEmc2;}
NTuple::Tuple* G4Svc::GetTupleMdc | ( | ) | [inline] |
Definition at line 96 of file G4Svc.h.
References m_tupleMdc.
Referenced by BesMdcSD::BesMdcSD().
00096 {return m_tupleMdc;}
NTuple::Tuple* G4Svc::GetTupleMuc | ( | ) | [inline] |
Definition at line 114 of file G4Svc.h.
References m_tupleMuc.
Referenced by BesMucDigitizer::BesMucDigitizer().
00114 {return m_tupleMuc;}
NTuple::Tuple* G4Svc::GetTupleTof1 | ( | ) | [inline] |
Definition at line 99 of file G4Svc.h.
References m_tupleTof1.
Referenced by BesTofDigitizerV::BesTofDigitizerV().
00099 {return m_tupleTof1;}
NTuple::Tuple* G4Svc::GetTupleTof2 | ( | ) | [inline] |
Definition at line 102 of file G4Svc.h.
References m_tupleTof2.
Referenced by BesTofDigitizerV::BesTofDigitizerV().
00102 {return m_tupleTof2;}
NTuple::Tuple* G4Svc::GetTupleTof3 | ( | ) | [inline] |
Definition at line 105 of file G4Svc.h.
References m_tupleTof3.
Referenced by BesTofDigitizerV::BesTofDigitizerV().
00105 {return m_tupleTof3;}
StatusCode G4Svc::initialize | ( | ) | [virtual] |
Definition at line 140 of file G4Svc.cpp.
References calibUtil::ERROR, RealizationSvc::getRunId(), Bes_Common::INFO, m_RealizationSvc, m_runID, msgSvc(), and runMgr().
00140 { 00141 00142 MsgStream log( msgSvc(), name() ); 00143 00144 StatusCode status = Service::initialize(); 00145 log << MSG::INFO << "Service initialized" << endreq; 00146 00147 //get IRealizationSvc 00148 IRealizationSvc *tmpReal; 00149 status = service("RealizationSvc", tmpReal); 00150 if (!status.isSuccess()) 00151 { 00152 log << MSG::ERROR << " Could not initialize Realization Service" << endreq; 00153 return status; 00154 } else { 00155 log << MSG::INFO << "got the RealizationSvc" << endreq; 00156 m_RealizationSvc=dynamic_cast<RealizationSvc*>(tmpReal); 00157 } 00158 00159 m_runID = m_RealizationSvc->getRunId(); 00160 00161 runMgr(); 00162 return status; 00163 }
static const InterfaceID& IG4Svc::interfaceID | ( | ) | [inline, static, inherited] |
Retrieve interface ID.
Definition at line 56 of file IG4Svc.h.
References IID_IG4Svc().
00056 { return IID_IG4Svc; }
int G4Svc::LogLevel | ( | ) | [inline] |
Definition at line 137 of file G4Svc.h.
References m_logLevel.
Referenced by BesSim::initialize().
00137 {return m_logLevel;}
bool G4Svc::MdcRootFlag | ( | ) | [inline] |
Definition at line 117 of file G4Svc.h.
References m_mdcRootFlag.
Referenced by BesMdcSD::BesMdcSD(), BesMdcSD::dedxSample(), and BesSim::initialize().
00117 {return m_mdcRootFlag;}
int G4Svc::MucNoiseMode | ( | ) | [inline] |
Definition at line 135 of file G4Svc.h.
References m_mucNoiseMode.
Referenced by BesMucSD::BesMucSD().
00135 {return m_mucNoiseMode;}
bool G4Svc::MucRootFlag | ( | ) | [inline] |
Definition at line 120 of file G4Svc.h.
References m_mucRootFlag.
Referenced by BesMucDigitizer::BesMucDigitizer(), BesMucDigitizer::Digitize(), and BesSim::initialize().
00120 {return m_mucRootFlag;}
StatusCode G4Svc::queryInterface | ( | const InterfaceID & | riid, | |
void ** | ppvInterface | |||
) | [virtual] |
Definition at line 179 of file G4Svc.cpp.
References IID_IG4Svc().
00180 { 00181 StatusCode sc = StatusCode::FAILURE; 00182 00183 if (riid == IID_IG4Svc) { 00184 *ppvInterface = dynamic_cast<IG4Svc*>(this); 00185 sc = StatusCode::SUCCESS; 00186 } else { 00187 sc = Service::queryInterface( riid, ppvInterface ); 00188 } 00189 return sc; 00190 }
void G4Svc::RunInitialize | ( | ) |
Definition at line 364 of file G4Svc.cpp.
References abs, m_runID, and p_runMgr.
Referenced by BesSim::beginRun().
00365 { 00366 bool cond = p_runMgr->ConfirmBeamOnCondition(); 00367 if(cond) 00368 { 00369 std::cout<<"########### initializing the G4Run ############"<< 00370 std::endl; 00371 p_runMgr->SetRunIDCounter( -std::abs(m_runID) ); 00372 p_runMgr->RunInitialization(); 00373 } 00374 }
G4RunManager * G4Svc::runMgr | ( | ) | [virtual] |
Implements IG4Svc.
Definition at line 123 of file G4Svc.cpp.
References m_logLevel, msgSvc(), p_runMgr, and G4SvcRunManager::SetLogLevel().
Referenced by BesSim::finalize(), and initialize().
00123 { 00124 //std::cout<<"G4Svc::runMgr()"<<std::endl; 00125 MsgStream log( msgSvc(), name() ); 00126 00127 if (p_runMgr == 0) { 00128 p_runMgr = new G4SvcRunManager(); 00129 p_runMgr->SetLogLevel( m_logLevel ); 00130 //p_runMgr->SetSaveHits( m_saveHits ); 00131 //p_runMgr->SetSaveTracks( m_saveTracks ); 00132 } 00133 00134 return p_runMgr; 00135 00136 }
void G4Svc::RunTerminate | ( | ) |
Definition at line 376 of file G4Svc.cpp.
References p_runMgr.
Referenced by BesSim::finalize().
00377 { 00378 p_runMgr->RunTermination(); 00379 }
void G4Svc::SetBeamTime | ( | double | value | ) | [inline] |
Definition at line 86 of file G4Svc.h.
References m_beamTime.
Referenced by BesTuningIO::GetTofRootHits(), and G4HepMCInterface::HepMC2G4().
00086 {m_beamTime = value;}
void G4Svc::SetTupleEmc1 | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 109 of file G4Svc.h.
References m_tupleEmc1.
Referenced by BesSim::bookEmcRootFile().
00109 {m_tupleEmc1 = tuple;}
void G4Svc::SetTupleEmc2 | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 112 of file G4Svc.h.
References m_tupleEmc2.
Referenced by BesSim::bookEmcRootFile().
00112 {m_tupleEmc2 = tuple;}
void G4Svc::SetTupleMdc | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 97 of file G4Svc.h.
References m_tupleMdc.
Referenced by BesSim::bookMdcRootFile().
00097 {m_tupleMdc = tuple;}
void G4Svc::SetTupleMuc | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 115 of file G4Svc.h.
References m_tupleMuc.
Referenced by BesSim::bookMucRootFile().
00115 {m_tupleMuc = tuple;}
void G4Svc::SetTupleTof1 | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 100 of file G4Svc.h.
References m_tupleTof1.
Referenced by BesSim::bookTofRootFile().
00100 {m_tupleTof1 = tuple;}
void G4Svc::SetTupleTof2 | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 103 of file G4Svc.h.
References m_tupleTof2.
Referenced by BesSim::bookTofRootFile().
00103 {m_tupleTof2 = tuple;}
void G4Svc::SetTupleTof3 | ( | NTuple::Tuple * | tuple | ) | [inline] |
Definition at line 106 of file G4Svc.h.
References m_tupleTof3.
Referenced by BesSim::bookTofRootFile().
00106 {m_tupleTof3 = tuple;}
void G4Svc::SetUserAction | ( | G4UserSteppingAction * | ) | [virtual] |
void G4Svc::SetUserAction | ( | G4UserTrackingAction * | ) | [virtual] |
void G4Svc::SetUserAction | ( | G4UserStackingAction * | ) | [virtual] |
void G4Svc::SetUserAction | ( | G4VUserPrimaryGeneratorAction * | ) | [virtual] |
Implements IG4Svc.
Definition at line 253 of file G4Svc.cpp.
References m_besGenAction, and p_runMgr.
00253 { 00254 if (p_runMgr != 0) { 00255 if(m_besGenAction) 00256 p_runMgr->SetUserAction( action ); 00257 } 00258 }
void G4Svc::SetUserAction | ( | G4UserEventAction * | ) | [virtual] |
void G4Svc::SetUserAction | ( | G4UserRunAction * | ) | [virtual] |
void G4Svc::SetUserInitialization | ( | G4VUserPhysicsList * | physInit | ) | [virtual] |
void G4Svc::SetUserInitialization | ( | G4VUserDetectorConstruction * | userInit | ) | [virtual] |
void G4Svc::SimulateEvents | ( | int | ) |
Definition at line 381 of file G4Svc.cpp.
References p_runMgr, and G4SvcRunManager::SimulateEvent().
Referenced by BesSim::execute().
00382 { 00383 p_runMgr->SimulateEvent(i); 00384 }
void G4Svc::StartUISession | ( | ) | [virtual] |
Implements IG4Svc.
Definition at line 283 of file G4Svc.cpp.
References Bes_Common::DEBUG, and msgSvc().
Referenced by G4Init().
00283 { 00284 00285 MsgStream log( msgSvc(), name() ); 00286 log << MSG::DEBUG << "Starting G4 terminal" << endreq; 00287 00288 G4UIsession * ses = new G4UIterminal(new G4UItcsh); 00289 ses->SessionStart(); 00290 00291 delete ses; 00292 }
bool G4Svc::TofRootFlag | ( | ) | [inline] |
Definition at line 118 of file G4Svc.h.
References m_tofRootFlag.
Referenced by BesTofDigitizerV::BesTofDigitizerV(), BesTofDigitizerEcV3::Digitize(), BesTofDigitizerBrV2::Digitize(), BesSim::initialize(), BesTofDigitizerEcV3::TofPmtAccum(), BesTofDigitizerBrV2::TofPmtAccum(), BesTofDigitizerEcV3::TofPmtInit(), BesTofDigitizerBrV2::TofPmtInit(), BesTofDigitizerEcV3::TofPmtRspns(), and BesTofDigitizerBrV2::TofPmtRspns().
00118 {return m_tofRootFlag;}
bool G4Svc::TofSaturationFlag | ( | ) | [inline] |
Definition at line 122 of file G4Svc.h.
References m_tofSaturationFlag.
Referenced by BesTofDigitizerEcV3::TofPmtRspns(), and BesTofDigitizerBrV2::TofPmtRspns().
00122 {return m_tofSaturationFlag;} // Tof Q Saturation in bhabha events
G4UImanager * G4Svc::uiMgr | ( | ) | [virtual] |
bool G4Svc::_init [private] |
double G4Svc::m_beamAngle [private] |
double G4Svc::m_beamDeltaTime [private] |
double G4Svc::m_beamPosX [private] |
double G4Svc::m_beamPosY [private] |
double G4Svc::m_beamPosZ [private] |
double G4Svc::m_beamShiftPx [private] |
double G4Svc::m_beamShiftPy [private] |
double G4Svc::m_beamShiftPz [private] |
double G4Svc::m_beamSizeX [private] |
double G4Svc::m_beamSizeY [private] |
double G4Svc::m_beamSizeZ [private] |
double G4Svc::m_beamStartTime [private] |
double G4Svc::m_beamTime [private] |
bool G4Svc::m_besGenAction [private] |
bool G4Svc::m_boostLab [private] |
double G4Svc::m_bunchTimeSigma [private] |
double G4Svc::m_emcCoherentNoise [private] |
int G4Svc::m_emcELecSaturation [private] |
double G4Svc::m_emcIncoherentNoise [private] |
bool G4Svc::m_emcLightOutput [private] |
int G4Svc::m_emcNoiseLevel [private] |
double G4Svc::m_emcNoiseMean [private] |
double G4Svc::m_emcNoiseSigma [private] |
double G4Svc::m_emcNoiseThreshold [private] |
bool G4Svc::m_emcRootFlag [private] |
int G4Svc::m_emcTime [private] |
int G4Svc::m_eventVerb [private] |
bool G4Svc::m_interactiveG4 [private] |
int G4Svc::m_logLevel [private] |
std::string G4Svc::m_macroName [private] |
int G4Svc::m_mdcDataInput [private] |
int G4Svc::m_mdcDedxFlag [private] |
std::string G4Svc::m_mdcNoiseFile [private] |
bool G4Svc::m_mdcRootFlag [private] |
int G4Svc::m_mucNoiseMode [private] |
bool G4Svc::m_mucRootFlag [private] |
double G4Svc::m_nBunch [private] |
RealizationSvc* G4Svc::m_RealizationSvc [private] |
int G4Svc::m_runID [private] |
int G4Svc::m_runVerb [private] |
bool G4Svc::m_setBeamShift [private] |
bool G4Svc::m_tofRootFlag [private] |
bool G4Svc::m_tofSaturationFlag [private] |
int G4Svc::m_trackVerb [private] |
NTuple::Tuple* G4Svc::m_tupleEmc1 [private] |
NTuple::Tuple* G4Svc::m_tupleEmc2 [private] |
NTuple::Tuple* G4Svc::m_tupleMdc [private] |
NTuple::Tuple* G4Svc::m_tupleMuc [private] |
NTuple::Tuple* G4Svc::m_tupleTof1 [private] |
NTuple::Tuple* G4Svc::m_tupleTof2 [private] |
NTuple::Tuple* G4Svc::m_tupleTof3 [private] |
bool G4Svc::m_vis [private] |
G4SvcRunManager* G4Svc::p_runMgr [private] |
Definition at line 160 of file G4Svc.h.
Referenced by G4Init(), GetCurrentEvent(), GetCurrentRun(), RunInitialize(), runMgr(), RunTerminate(), SetUserAction(), SetUserInitialization(), and SimulateEvents().
G4UImanager* G4Svc::p_uiMgr [private] |