EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Fun4All_G4_FullDetectorModularBeast.C
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file Fun4All_G4_FullDetectorModularBeast.C
1 #ifndef MACRO_FUN4ALLG4EICDETECTORMODULAR_C
2 #define MACRO_FUN4ALLG4EICDETECTORMODULAR_C
3 
4 #include <GlobalVariables.C>
5 
6 #include <DisplayOn.C>
8 #include <G4_Bbc.C>
9 #include <G4_CaloTrigger.C>
10 #include <G4_DSTReader_Beast.C>
11 #include <G4_FwdJets.C>
12 #include <G4_Global.C>
13 #include <G4_HIJetReco.C>
14 #include <G4_Input.C>
15 #include <G4_Jets.C>
16 #include <G4_Production.C>
17 #include <G4_User.C>
18 #include <QA.C>
19 
20 #include <TROOT.h>
23 #include <fun4all/Fun4AllServer.h>
24 #include <PHPy6GenTrigger.h>
25 #include <PHPy6ParticleTrigger.h>
26 #include <PHPy6JetTrigger.h>
27 #include <phool/recoConsts.h>
28 #include <phool/PHRandomSeed.h>
29 
30 #include <eiceval/EventEvaluatorEIC.h>
31 
32 R__LOAD_LIBRARY(libfun4all.so)
33 R__LOAD_LIBRARY(libeiceval.so)
34 R__LOAD_LIBRARY(libg4testbench.so)
35 
36 void ParseTString(TString &specialSetting);
37 
39  const int nEvents = 1,
40  const double particlemomMin = -1,
41  const double particlemomMax = -1,
42  TString specialSetting = "ALLSILICON-FTTLS3LC-ETTL-CTTL",
43  TString generatorSettings = "e10p250MB",
44  const string &inputFile = "https://www.phenix.bnl.gov/WWW/publish/phnxbld/sPHENIX/files/sPHENIX_G4Hits_sHijing_9-11fm_00000_00010.root",
45  const string &outputFile = "G4EICDetector.root",
46  const string &embed_input_file = "https://www.phenix.bnl.gov/WWW/publish/phnxbld/sPHENIX/files/sPHENIX_G4Hits_sHijing_9-11fm_00000_00010.root",
47  const int skip = 0,
48  const string &outdir = ".")
49 {
50  // translate the option TString into subsystem namespace options
51  ParseTString(specialSetting);
52  //---------------
53  // Fun4All server
54  //---------------
56  se->Verbosity(0);
57  //Opt to print all random seed used for debugging reproducibility. Comment out to reduce stdout prints.
58  //PHRandomSeed::Verbosity(1);
59 
60  // just if we set some flags somewhere in this macro
62  // By default every random number generator uses
63  // PHRandomSeed() which reads /dev/urandom to get its seed
64  // if the RANDOMSEED flag is set its value is taken as initial seed
65  // which will produce identical results so you can debug your code
66  //rc->set_IntFlag("RANDOMSEED", 12345);
67 
68  //===============
69  // Input options
70  //===============
71 
72  // pythia6
73  // Use Pythia 6
74  if(particlemomMin==-1 && particlemomMax==-1){
75  Input::PYTHIA6 = true;
76  }
77  // Simple multi particle generator in eta/phi/pt ranges
78  Input::SIMPLE = false;
79  if (particlemomMin>-1 && particlemomMax>-1){
80  Input::SIMPLE = true;
82  }
83  // Input::SIMPLE_NUMBER = 2; // if you need 2 of them
84 
85  Input::VERBOSITY = 0;
86  INPUTHEPMC::filename = inputFile;
87 
88 
89  Enable::QA = false;
90 
91  //-----------------
92  // Initialize the selected Input/Event generation
93  //-----------------
94  InputInit();
95  //--------------
96  // Set generator specific options
97  //--------------
98  // can only be set after InputInit() is called
99 
100  // Simple Input generator:
101  // if you run more than one of these Input::SIMPLE_NUMBER > 1
102  // add the settings for other with [1], next with [2]...
103  if (Input::SIMPLE){
104  if (generatorSettings.Contains("SimplePion"))
105  INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("pi-", 1);
106  else if (generatorSettings.Contains("SimpleKaon"))
107  INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("kaon-", 1);
108  else if (generatorSettings.Contains("SimpleProton"))
109  INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("proton", 1);
110  else if (generatorSettings.Contains("SimplePhoton"))
111  INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("gamma", 1);
112  else if (generatorSettings.Contains("SimplePiZero"))
113  INPUTGENERATOR::SimpleEventGenerator[0]->add_particles("pi0", 1);
114  else {
115  std::cout << "You didn't specify which particle you wanted to generate, exiting" << std::endl;
116  return 0;
117  }
118 
119  INPUTGENERATOR::SimpleEventGenerator[0]->set_vertex_distribution_function(PHG4SimpleEventGenerator::Uniform,
122  INPUTGENERATOR::SimpleEventGenerator[0]->set_vertex_distribution_mean(0., 0., 0.);
123  INPUTGENERATOR::SimpleEventGenerator[0]->set_vertex_distribution_width(0., 0., 5.);
124  INPUTGENERATOR::SimpleEventGenerator[0]->set_eta_range(1., 3.7);
125  INPUTGENERATOR::SimpleEventGenerator[0]->set_phi_range(-M_PI, M_PI);
126  INPUTGENERATOR::SimpleEventGenerator[0]->set_pt_range(particlemomMin, particlemomMax);
127 
128  }
129  if(particlemomMin>-1 && particlemomMax == -1){
130  PHG4ParticleGenerator *gen = new PHG4ParticleGenerator("PGENERATOR");
131  gen->set_name("pi-");
132  gen->set_vtx(0, 0, 0);
133  gen->set_eta_range(2.5, 4.2); // around midrapidity
134  if(particlemomMin > -1)
135  gen->set_mom_range(particlemomMin, particlemomMin); // fixed 4 GeV/c
136  else
137  gen->set_mom_range(5, 60); // fixed 4 GeV/c
138  gen->set_phi_range(0., 2* M_PI); // 0-90 deg
139  // gen->Verbosity(1); // 0-90 deg
140  se->registerSubsystem(gen);
141  }
142  // pythia6
143  if (Input::PYTHIA6){
144  if (generatorSettings.Contains("e10p250MB") )
145  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_ep.cfg");
146  else if (generatorSettings.Contains("e10p250pTHard5") )
147  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_ep_MinPartonP5GeV.cfg");
148  else if (generatorSettings.Contains("e10p250pTHard10"))
149  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_ep_MinPartonP10GeV.cfg");
150  else if (generatorSettings.Contains("e10p250pTHard20"))
151  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_ep_MinPartonP20GeV.cfg");
152  else if (generatorSettings.Contains("e5p100MB") )
153  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e5p100.cfg");
154  else if (generatorSettings.Contains("e5p100pTHard5") )
155  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e5p100_MinPartonP5GeV.cfg");
156  else if (generatorSettings.Contains("e10p275MB") )
157  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e10p275.cfg");
158  else if (generatorSettings.Contains("e10p275pTHard5") )
159  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e10p275_MinPartonP5GeV.cfg");
160  else if (generatorSettings.Contains("e10p275pTHard10") )
161  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e10p275_MinPartonP10GeV.cfg");
162  else if (generatorSettings.Contains("e18p275MB") )
163  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e18p275.cfg");
164  else if (generatorSettings.Contains("e18p275pTHard5") )
165  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e18p275_MinPartonP5GeV.cfg");
166  else if (generatorSettings.Contains("e18p275pTHard10") )
167  INPUTGENERATOR::Pythia6->set_config_file(string(getenv("CALIBRATIONROOT")) + "/Generators/phpythia6_e18p275_MinPartonP10GeV.cfg");
168  else
169  INPUTGENERATOR::Pythia6->set_config_file(generatorSettings.Data());
170 
171  if (generatorSettings.Contains("FPartTrigg")){
173  ptrig->SetPtLow(1);
174  ptrig->SetEtaHighLow(1,5);
176  }
177  if (generatorSettings.Contains("FJetTrigg")){
178  PHPy6JetTrigger *trig = new PHPy6JetTrigger();
179  trig->SetEtaHighLow(1,5);
180  if (generatorSettings.Contains("pTHard5"))
181  trig->SetMinJetPt(5);
182  else if (generatorSettings.Contains("pTHard10"))
183  trig->SetMinJetPt(10);
184  else if (generatorSettings.Contains("pTHard20"))
185  trig->SetMinJetPt(20);
186  else
187  trig->SetMinJetPt(1);
188  trig->SetJetR(0.7);
190  }
193 
194  }
195 
196  // register all input generators with Fun4All
197  InputRegister();
198 
199  //======================
200  // Write the DST
201  //======================
202 
203  // Enable::DSTOUT = true;
204  Enable::DSTOUT_COMPRESS = false;
205  DstOut::OutputDir = outdir;
206  DstOut::OutputFile = outputFile;
207 
208  //Option to convert DST to human command readable TTree for quick poke around the outputs
209  Enable::DSTREADER = false;
210 
211  // turn the display on (default off)
212  if(specialSetting.Contains("display"))
213  Enable::DISPLAY = true;
214 
215  bool enableCentral = true;
216  bool enableForwardTracking = true;
217  bool enableElectronSide = true;
218 
219  //======================
220  // What to run
221  //======================
222  // Global options (enabled for all subsystems - if implemented)
223  // Enable::ABSORBER = true;
224  // Enable::OVERLAPCHECK = true;
225  // Enable::VERBOSITY = 1;
226 
227  // Enable::BBC = true;
228  Enable::BBCFAKE = true; // Smeared vtx and t0, use if you don't want real BBC in simulation
229 
230  // whether to simulate the Be section of the beam pipe
231  Enable::PIPE = true;
232  // EIC beam pipe extension beyond the Be-section:
234 
235  // backward GEM
236  if (specialSetting.Contains("EGEM")){
237  Enable::EGEM = true;
238  if (specialSetting.Contains("EGEMOO")) // only last 2 EGEM layers
239  Enable::EGEM_FULL = false;
240  }
241  //Forward GEM
242  if (specialSetting.Contains("FGEM")){
243  Enable::FGEM = true;
244  // FGEM settings
245  if (specialSetting.Contains("FGEMOrg")){
246  Enable::FGEM_ORIG = true;
247  } else {
248  Enable::FGEM_ORIG = false;
249  }
250  }
251 
252  // barrel tracker (LANL)
253  if (specialSetting.Contains("BARREL"))
254  Enable::BARREL = true;
255  if(specialSetting.Contains("FST"))
256  Enable::FST = true;
257 
258  // all silicon tracker version (LBL)
259  if(specialSetting.Contains("ALLSILICON")){
260  Enable::ALLSILICON = true;
262  }
263 
264  // LGAD layers
265  if(specialSetting.Contains("FTTL"))
266  Enable::FTTL = true;
267  if(specialSetting.Contains("ETTL"))
268  Enable::ETTL = true;
269  if(specialSetting.Contains("CTTL"))
270  Enable::CTTL = true;
271 
272  // mvtx/tpc tracker
273  if(specialSetting.Contains("MVTX")){
274  Enable::MVTX = true;
275  Enable::TPC = true;
276  }
277 
278  if(specialSetting.Contains("ENDCAPTPC"))
279  Enable::TPC_ENDCAP = true;
280 
281  Enable::TRACKING = true;
283  if (specialSetting.Contains("TREXTOUT"))
285 
286  G4TRACKING::DISPLACED_VERTEX = true; // this option exclude vertex in the track fitting and use RAVE to reconstruct primary and 2ndary vertexes
287  // projections to calorimeters
288  if (specialSetting.Contains("TRACKEVALHITS")){
293  } else {
298  }
299 
300  Enable::CEMC = true;
301  if(specialSetting.Contains("FHCALSTANDALONE") || specialSetting.Contains("FEMCSTANDALONE") || specialSetting.Contains("CALOSTANDALONE"))
302  Enable::CEMC = false;
303  // Enable::CEMC_ABSORBER = true;
308 
309  Enable::HCALIN = true;
310  if(specialSetting.Contains("FHCALSTANDALONE") || specialSetting.Contains("FEMCSTANDALONE") || specialSetting.Contains("CALOSTANDALONE"))
311  Enable::HCALIN = false;
312  // Enable::HCALIN_ABSORBER = true;
317 
318  Enable::HCALOUT = false;
319  // Enable::HCALOUT_ABSORBER = true;
324 
325  // EICDetector geometry - barrel
326  Enable::DIRC = true;
327 
328  // EICDetector geometry - 'hadron' direction
329  Enable::RICH = true;
330  Enable::AEROGEL = true;
331 
332  Enable::FEMC = true;
333  if(specialSetting.Contains("FHCALSTANDALONE") )
334  Enable::FEMC = false;
335  // Enable::FEMC_ABSORBER = true;
340 
341  Enable::FHCAL = true;
342  if(specialSetting.Contains("FEMCSTANDALONE") )
343  Enable::FHCAL = false;
345  // Enable::FHCAL_ABSORBER = true; // make absorber active volume
346  // Enable::FHCAL_SUPPORT = true; // make support active volume
351 
352  // EICDetector geometry - 'electron' direction
353  Enable::EEMC = true;
354  if(specialSetting.Contains("FHCALSTANDALONE") || specialSetting.Contains("FEMCSTANDALONE") || specialSetting.Contains("CALOSTANDALONE"))
355  Enable::EEMC = false;
360 
361  if (specialSetting.Contains("EHCAL"))
362  Enable::EHCAL = true;
363  if(specialSetting.Contains("FEMCSTANDALONE") )
364  Enable::EHCAL = false;
366  // Enable::EHCAL_ABSORBER = true;
371 
372  Enable::PLUGDOOR = false;
373 
374  // deactivate all detector systems for FHCal standalone studies
375  if(specialSetting.Contains("FHCALSTANDALONE")){
376  Enable::PIPE = false;
378  Enable::TPC_ENDCAP = false;
383  Enable::MAGNET = false;
384  Enable::DIRC = false;
385  Enable::RICH = false;
386  Enable::AEROGEL = false;
387  Enable::FHCAL = true;
388  }
389  // deactivate all detector systems for FHCal standalone studies
390  if(specialSetting.Contains("FEMCSTANDALONE")){
391  Enable::PIPE = false;
393  Enable::TPC_ENDCAP = false;
398  Enable::MAGNET = false;
399  Enable::DIRC = false;
400  Enable::RICH = false;
401  Enable::AEROGEL = false;
402  Enable::FEMC = true;
403  }
404  // deactivate all detector systems for FHCal standalone studies
405  if(specialSetting.Contains("CALOSTANDALONE")){
406  Enable::PIPE = false;
408  Enable::TPC_ENDCAP = false;
413  Enable::MAGNET = false;
414  Enable::DIRC = false;
415  Enable::RICH = false;
416  Enable::AEROGEL = false;
417  Enable::FHCAL = true;
418  Enable::FEMC = true;
419  }
420 
421 
422  // Other options
423  Enable::GLOBAL_RECO = true;
424  Enable::GLOBAL_FASTSIM = true;
425 
427 
428  // Select only one jet reconstruction- they currently use the same
429  // output collections on the node tree!
430  Enable::JETS = false;
432 
433  Enable::FWDJETS = false;
435 
436  // HI Jet Reco for jet simulations in Au+Au (default is false for
437  // single particle / p+p simulations, or for Au+Au simulations which
438  // don't care about jets)
440 
441 
442  Enable::MAGNET = true;
444 
445  // new settings using Enable namespace in GlobalVariables.C
446  Enable::BLACKHOLE = true;
447  //Enable::BLACKHOLE_SAVEHITS = false; // turn off saving of bh hits
448  //BlackHoleGeometry::visible = true;
449 //Enable::USER = true;
450 
451  //---------------
452  // World Settings
453  //---------------
454  // G4WORLD::PhysicsList = "QGSP_BERT"; //FTFP_BERT_HP best for calo
455  // G4WORLD::WorldMaterial = "G4_AIR"; // set to G4_GALACTIC for material scans
456 
457  //---------------
458  // Pythia Decayer
459  //---------------
460  // list of decay types in
461  // $OFFLINE_MAIN/include/g4decayer/EDecayType.hh
462  // default is All:
463  // G4P6DECAYER::decayType = EDecayType::kAll;
464 
465 
466  // establish the geometry and reconstruction setup
467  G4Init();
468 
469  //---------------------
470  // GEANT4 Detector description
471  //---------------------
472 
473  // If "readhepMC" is also set, the Upsilons will be embedded in Hijing events, if 'particles" is set, the Upsilons will be embedded in whatever particles are thrown
474  if (!Input::READHITS) G4Setup(specialSetting);
475 
476  //------------------
477  // Detector Division
478  //------------------
484 
485  //-----------------------------
486  // CEMC towering and clustering
487  //-----------------------------
490 
491  //-----------------------------
492  // HCAL towering and clustering
493  //-----------------------------
496 
497  if (Enable::HCALOUT_TOWER) HCALOuter_Towers();
499 
500  //-----------------------------
501  // e, h direction Calorimeter towering and clustering
502  //-----------------------------
505 
508 
511 
514 
516 
517  //--------------
518  // SVTX tracking
519  //--------------
520  if (Enable::TRACKING) Tracking_Reco(specialSetting);
521 
522  //-----------------
523  // Global Vertexing
524  //-----------------
527 
528  //-----------------
529  // Calo Trigger Simulation
530  //-----------------
532 
533  //---------
534  // Jet reco
535  //---------
536  if (Enable::JETS) Jet_Reco();
537  if (Enable::HIJETS) HIJetReco();
539 
540  string outputroot = outdir + "/" + outputFile;
541  string remove_this = ".root";
542  size_t pos = outputroot.find(remove_this);
543  if (pos != string::npos){
544  outputroot.erase(pos, remove_this.length());
545  }
546 
547  if (Enable::DSTREADER) G4DSTreader(outputroot + "_DSTReader.root");
548 
549  //----------------------
550  // Simulation evaluation
551  //----------------------
552  Bool_t doFullEventTree = kTRUE;
553  if(doFullEventTree){
554  EventEvaluatorEIC *eval = new EventEvaluatorEIC("EVENTEVALUATOR", outputroot + "_eventtree.root");
556  eval->Verbosity(0);
557  if(specialSetting.Contains("FHCALSTANDALONE")){
558  eval->set_do_FHCAL(true);
559  eval->set_do_CLUSTERS(true);
560  } else if(specialSetting.Contains("FEMCSTANDALONE")){
561  eval->set_do_FEMC(true);
562  eval->set_do_CLUSTERS(true);
563  } else if(specialSetting.Contains("CALOSTANDALONE")){
564  eval->set_do_FHCAL(true);
565  eval->set_do_FEMC(true);
566  eval->set_do_CLUSTERS(true);
567  } else {
568  if (Enable::FHCAL)
569  eval->set_do_FHCAL(true);
570  if (Enable::FEMC)
571  eval->set_do_FEMC(true);
572  if (Enable::EHCAL)
573  eval->set_do_EHCAL(true);
575  eval->set_do_CLUSTERS(true);
576 // if (Enable::DRCALO)
577 // eval->set_do_DRCALO(false);
578 
579  if (Enable::TRACKING){
580  eval->set_do_TRACKS(true);
581  eval->set_do_HITS(true);
582  eval->set_do_PROJECTIONS(true);
584  }
585  }
586  eval->set_do_MCPARTICLES(true);
587  se->registerSubsystem(eval);
588  }
589 
590  if (specialSetting.Contains("TRACKEVALHITS")) Tracking_Eval(outputroot + "_g4tracking_eval.root", specialSetting);
591 
592  //--------------
593  // Set up Input Managers
594  //--------------
595 
596  InputManagers();
597 
598  //--------------
599  // Set up Output Manager
600  //--------------
601  if (Enable::PRODUCTION){
603  }
604 
605  if (Enable::DSTOUT){
606  string FullOutFile = DstOut::OutputDir + "/" + DstOut::OutputFile;
607  Fun4AllDstOutputManager *out = new Fun4AllDstOutputManager("DSTOUT", FullOutFile);
609  se->registerOutputManager(out);
610  }
611 
612  //-----------------
613  // Event processing
614  //-----------------
615  if (Enable::DISPLAY){
616  DisplayOn();
617  // gROOT->ProcessLine("PHG4Reco *g4 = QTGui();"); // alternative to DisplayOn
618  gROOT->ProcessLine("Fun4AllServer *se = Fun4AllServer::instance();");
619  gROOT->ProcessLine("PHG4Reco *g4 = (PHG4Reco *) se->getSubsysReco(\"PHG4RECO\");");
620 
621  cout << "-------------------------------------------------" << endl;
622  cout << "You are in event display mode. Run one event with" << endl;
623  cout << "se->run(1)" << endl;
624  cout << "Run Geant4 command with following examples" << endl;
625  gROOT->ProcessLine("displaycmd()");
626 
627  return 0;
628  }
629  // if we use a negative number of events we go back to the command line here
630  if (nEvents < 0){
631  return 0;
632  }
633  // if we run any of the particle generators and use 0 it'll run forever
634  if (nEvents == 0 && !Input::READHITS && !Input::HEPMC && !Input::READEIC){
635  cout << "using 0 for number of events is a bad idea when using particle generators" << endl;
636  cout << "it will run forever, so I just return without running anything" << endl;
637  return 0;
638  }
639 
640  se->skip(skip);
641  se->run(nEvents);
642 
643  if (Enable::QA) QA_Output(outputroot + "_qa.root");
644 
645  //-----
646  // Exit
647  //-----
648 
649  se->End();
650  std::cout << "All done" << std::endl;
651  delete se;
652  if (Enable::PRODUCTION){
654  }
655  gSystem->Exit(0);
656  return 0;
657 }
658 
659 void ParseTString(TString &specialSetting)
660 {
661 // Barrel settings
662  if (specialSetting.Contains("BARRELV1"))
663  {
665  }
666  else if (specialSetting.Contains("BARRELV2"))
667  {
669  }
670  else if (specialSetting.Contains("BARRELV3"))
671  {
673  }
674  else if (specialSetting.Contains("BARRELV4"))
675  {
677  }
678  else if (specialSetting.Contains("BARREL"))
679  {
681  }
682 
683 // FST settings
684  if (specialSetting.Contains("FSTV1"))
685  {
686  G4FST::SETTING::FSTV1 = true;
687  }
688  else if (specialSetting.Contains("FSTV2"))
689  {
690  G4FST::SETTING::FSTV2 = true;
691  }
692  else if (specialSetting.Contains("FSTV3"))
693  {
694  G4FST::SETTING::FSTV3 = true;
695  }
696  else if (specialSetting.Contains("FSTV4"))
697  {
698  G4FST::SETTING::FSTV4 = true;
699  }
700  else if (specialSetting.Contains("FSTV41"))
701  {
702  G4FST::SETTING::FSTV41 = true;
703  }
704  else if (specialSetting.Contains("FSTV42"))
705  {
706  G4FST::SETTING::FSTV42 = true;
707  }
708  else if (specialSetting.Contains("FSTVTPC"))
709  {
711  }
712  else if (specialSetting.Contains("FST"))
713  {
714  G4FST::SETTING::FSTV0 = true;
715  }
716 
717  // FHCAL/FEMC settings
718  if (specialSetting.Contains("fsPHENIX"))
719  {
721  }
722  else if (specialSetting.Contains("EC2x"))
723  {
724  G4FEMC::SETTING::EC2x = true;
725  }
726 
727  if (specialSetting.Contains("FullEtaAcc")) // common for FHCAL and FEMC
728  {
731  }
732  if (specialSetting.Contains("HC2x"))
733  {
734  G4FHCAL::SETTING::HC2x = true;
735  }
736  else if (specialSetting.Contains("HC4x"))
737  {
738  G4FHCAL::SETTING::HC4x = true;
739  }
740 
741 
742  if (specialSetting.Contains("towercalib1"))
743  {
745  }
746  else if (specialSetting.Contains("towercalibSiPM"))
747  {
749  }
750  else if (specialSetting.Contains("towercalibHCALIN"))
751  {
753  }
754  else if (specialSetting.Contains("towercalib3"))
755  {
757  }
758 }
759 
760 #endif
761