Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4_EMCal.C
Go to the documentation of this file.
1 #pragma once
2 #if ROOT_VERSION_CODE >= ROOT_VERSION(6,00,0)
4 class SubsysReco;
5 R__LOAD_LIBRARY(libg4detectors)
6 #endif
7 
8 void SetupEMCal(
9  PHG4Reco* g4Reco,
10  const std::string name = "EMCal",
11  const double place_x = 0.,
12  const double place_y = 0.,
13  const double place_z = 0.,
14  const int n_super_h = 6,
15  const int n_super_v = 3,
16  const int verbose = 0)
17 {
18  PHG4EMCalSubsystem* emcal = new PHG4EMCalSubsystem(name.c_str(), 0);
19  emcal->SuperDetector(name.c_str());
20  emcal->set_int_param("n_towers_x", n_super_h*6*2); //1 super module = 6x6 module, 1 module = 2x2 tower
21  emcal->set_int_param("n_towers_y", n_super_v*6*2);
22  emcal->set_double_param("place_x", place_x);
23  emcal->set_double_param("place_y", place_y);
24  emcal->set_double_param("place_z", place_z);
25  emcal->Verbosity(verbose);
26  //emcal->set_int_param("absorberactive", 1);
27  g4Reco->registerSubsystem(emcal);
28 
29  return;
30 }
31 
Runs G4 as a subsystem.
Definition: PHG4Reco.h:38
void set_int_param(const std::string &name, const int ival)
void SuperDetector(const std::string &name)
void set_double_param(const std::string &name, const double dval)
void SetupEMCal(PHG4Reco *g4Reco, const std::string name="EMCal", const double place_x=0., const double place_y=0., const double place_z=0., const int n_super_h=6, const int n_super_v=3, const int verbose=0)
Definition: G4_EMCal.C:8
virtual void Verbosity(const int ival)
Sets the verbosity of this module (0 by default=quiet).
Definition: Fun4AllBase.h:58
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
Definition: PHG4Reco.h:65