1 #ifndef MACRO_FUN4ALLG4EICDETECTOR_C
2 #define MACRO_FUN4ALLG4EICDETECTOR_C
4 #include <anatutorial/AnaTutorial.h>
13 #include <G4_Global.C>
26 R__LOAD_LIBRARY(libfun4all.so)
27 R__LOAD_LIBRARY(libanatutorial.so)
31 const
string &inputFile = "https:
32 const
string &outputFile = "G4EICDetector.
root",
33 const
string &embed_input_file = "https:
35 const
string &outdir = ".")
246 Enable::BBCFAKE =
true;
251 G4PIPE::use_forward_pipes =
false;
253 Enable::HFARFWD_MAGNETS_IP6=
true;
254 Enable::HFARFWD_VIRTUAL_DETECTORS_IP6=
true;
255 Enable::HFARFWD_MAGNETS_IP8=
false;
256 Enable::HFARFWD_VIRTUAL_DETECTORS_IP8=
false;
261 Enable::FGEM_ORIG =
false;
263 Enable::BARREL =
false;
267 G4FST::SETTING::FST_TPC =
true;
273 Enable::TRACKING =
true;
275 G4TRACKING::DISPLACED_VERTEX =
false;
277 G4TRACKING::PROJECTION_EEMC =
false;
278 G4TRACKING::PROJECTION_CEMC =
false;
279 G4TRACKING::PROJECTION_FEMC =
false;
280 G4TRACKING::PROJECTION_FHCAL =
false;
310 Enable::AEROGEL =
true;
315 Enable::FEMC_CLUSTER = Enable::FEMC_TOWER &&
true;
316 Enable::FEMC_EVAL = Enable::FEMC_CLUSTER &&
true;
321 Enable::FHCAL_CLUSTER = Enable::FHCAL_TOWER &&
true;
322 Enable::FHCAL_EVAL = Enable::FHCAL_CLUSTER &&
true;
327 Enable::EEMC_CLUSTER = Enable::EEMC_TOWER &&
true;
328 Enable::EEMC_EVAL = Enable::EEMC_CLUSTER &&
true;
341 Enable::FWDJETS =
true;
342 Enable::FWDJETS_EVAL = Enable::FWDJETS &&
true;
390 if (Enable::BBC || Enable::BBCFAKE)
Bbc_Reco();
457 string outputroot = outputFile;
458 string remove_this =
".root";
459 size_t pos = outputroot.find(remove_this);
460 if (pos != string::npos)
462 outputroot.erase(pos, remove_this.length());
478 if (Enable::FEMC_EVAL)
FEMC_Eval(outputroot +
"_g4femc_eval.root");
480 if (Enable::FHCAL_EVAL)
FHCAL_Eval(outputroot +
"_g4fhcal_eval.root");
482 if (Enable::EEMC_EVAL)
EEMC_Eval(outputroot +
"_g4eemc_eval.root");
486 if (Enable::FWDJETS_EVAL)
Jet_FwdEval(outputroot +
"_g4fwdjet_eval.root");
528 gROOT->ProcessLine(
"Fun4AllServer *se = Fun4AllServer::instance();");
529 gROOT->ProcessLine(
"PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
531 cout <<
"-------------------------------------------------" << endl;
532 cout <<
"You are in event display mode. Run one event with" << endl;
533 cout <<
"se->run(1)" << endl;
534 cout <<
"Run Geant4 command with following examples" << endl;
535 gROOT->ProcessLine(
"displaycmd()");
547 cout <<
"using 0 for number of events is a bad idea when using particle generators" << endl;
548 cout <<
"it will run forever, so I just return without running anything" << endl;
560 std::cout <<
"All done" << std::endl;