18 #include "G4GenericMessenger.hh"
20 #include "G4RunManager.hh"
21 #include "G4ScoringManager.hh"
22 #include "G4UIdirectory.hh"
23 #include "G4UnitsTable.hh"
24 #include <CLHEP/Units/SystemOfUnits.h>
31 : verboseLevel(verboseLvl)
34 new G4UnitDefinition(
"milligray",
"mGy",
"Dose",1.
e-3*CLHEP::gray);
35 new G4UnitDefinition(
"microgray",
"muGy",
"Dose",1.
e-6*CLHEP::gray);
36 new G4UnitDefinition(
"nanogray",
"nGy",
"Dose",1.
e-9*CLHEP::gray);
40 messenger =
new G4GenericMessenger(
this,
"/eAST/",
"eAST commands");
41 auto& initCmd =
messenger->DeclareMethod(
"initialize",
43 initCmd.SetToBeBroadcasted(
false);
44 initCmd.SetStates(G4State_PreInit);
46 auto compDir =
new G4UIdirectory(
"/eAST/component/");
47 compDir->SetGuidance(
"Activate a component of EIC detector");
78 auto runManager = G4RunManager::GetRunManager();
79 runManager->SetUserInitialization(
detector);
80 runManager->SetUserInitialization(
physics);
82 if(
verboseLevel>0) G4cout <<
"initializing eAST .........." << G4endl;
83 runManager->Initialize();
86 #include "G4UIExecutive.hh"
94 if(!(ui->IsGUI()))
return;
97 G4UIQt* qt =
dynamic_cast<G4UIQt*
>(ui->GetSession());
100 qt->SetStartPage(std::string(
"<table width='100%'><tr><td width='50%'></td><td><div ")+
101 "style='color: rgb(140, 31, 31); font-size: xx-large; font-family: Garamond, serif; "+
102 "padding-bottom: 0px; font-weight: normal'>eAST "+
103 "</div></td></td></tr></table>"+
106 "<dd><b>eAST (eA Simulation Tool) is meant to be "+
107 "a common tool for detector simulation studies for Electron-Ion Collider experiments "+
108 "built on top of Geant4."+
111 "<div style='background:#EEEEEE;'><b>Tooltips :</b><ul>"+
112 "<li><b>Start an interactive run :</b><br />"+
113 "/control/execute <i>run.mac</i><br />"+
114 "/run/beamOn <i>number_of_events</i></li></ul></div>"+
115 "<div style='background:#EEEEEE;'><b>Documentation :</b><ul>"+
117 "<b>eAST manual</b> is "+
118 "<a href='https://eic.github.io/east/content/manual.html'>"+