3 #include <top/G4_Beamline.C>
4 #include <top/G4_Target.C>
5 #include <top/G4_InsensitiveVolumes.C>
6 #include <top/G4_SensitiveDetectors.C>
9 R__LOAD_LIBRARY(libfun4all)
10 R__LOAD_LIBRARY(libPHPythia8)
11 R__LOAD_LIBRARY(libg4detectors)
12 R__LOAD_LIBRARY(libg4testbench)
13 R__LOAD_LIBRARY(libg4eval)
14 R__LOAD_LIBRARY(libg4dst)
15 R__LOAD_LIBRARY(libdptrigger)
16 R__LOAD_LIBRARY(libktracker)
17 R__LOAD_LIBRARY(libevt_filter)
28 const bool dimuon =
false;
29 const bool single = !dimuon;
31 const bool do_collimator =
true;
32 const bool do_target =
true;
33 const bool do_shielding =
true;
34 const bool do_fmag =
true;
35 const bool do_kmag =
true;
36 const bool do_absorber =
true;
38 const double collimator_pos_z = -602.36;
39 const double target_coil_pos_z = -300.;
40 const double target_l = 7.9;
41 const double target_z = (7.9-target_l)/2.;
43 const double FMAGSTR = -1.054;
44 const double KMAGSTR = -0.951;
49 rc->
set_CharFlag(
"AlignmentMille",
"support/align_mille.txt");
50 rc->
set_CharFlag(
"fMagFile",
"$E1039_RESOURCE/geometry/magnetic_fields/tab.Fmag");
51 rc->
set_CharFlag(
"kMagFile",
"$E1039_RESOURCE/geometry/magnetic_fields/tab.Kmag");
108 Form(
"%f",FMAGSTR) +
" " +
109 Form(
"%f",KMAGSTR) +
" " +
122 SetupTarget(g4Reco, target_coil_pos_z, target_l, target_z, 1, 0);
187 std::cout <<
"All done" << std::endl;
int registerInputManager(Fun4AllInputManager *InManager)
virtual void set_DoubleFlag(const std::string &name, const double flag)
void insert_particle_filter_pid(const int a)
void SetupSensitiveDetectors(PHG4Reco *g4Reco, bool toggle_dphodo=true, bool toggle_dc1=false, std::string chamberGas="SQ_ArCO2", std::string hodoMat="SQ_Scintillator", const int verbosity=0)
void AddParticles(std::string particles)
void SetWorldMaterial(const std::string &s)
void add_particles(const std::string &name, const unsigned int count)
interface for adding particles by name
void Print() const
print all the parameters
void SetWorldShape(const std::string &s)
void set_particle_filter_on(const bool a)
static Fun4AllServer * instance()
void PrintTimer(const std::string &name="")
static void ExportGeomtry(PHCompositeNode *topNode, const std::string &geometry_file)
DST node -> TGeoManager -> export files, like gdml, .root or .C formats.
static recoConsts * instance()
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)
void set_vertex_distribution_function(FUNCTION x, FUNCTION y, FUNCTION z)
toss a new vertex according to a Uniform or Gaus distribution
int registerSubsystem(SubsysReco *subsystem, const std::string &topnodename="TOP")
void set_config_file(const char *cfg_file)
void SetPzHighLow(double pzHigh, double pzLow)
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
void set_vertex_distribution_mean(const double x, const double y, const double z)
set the mean value of the vertex distribution
int registerOutputManager(Fun4AllOutputManager *manager)
void set_vertex_distribution_width(const double x, const double y, const double z)
set the width of the vertex distribution function about the mean
void set_field_map(const std::string &fmap, const PHFieldConfig::FieldConfigTypes dim)
void set_vertex_distribution_mean(const double x, const double y, const double z, const double t)
set the mean value of the vertex distribution, use PHENIX units of cm, ns
void SetupInsensitiveVolumes(PHG4Reco *g4Reco, const bool toggle_shielding=true, const bool toggle_fmag=true, const bool toggle_kmag=true, const bool toggle_absorber=true, const int enable_fmag_filter=0, const double filter_max_slope=0.25, const double filter_min_energy=5.)
int Fun4DQ(const int nevent=10)
void SetupTarget(PHG4Reco *g4Reco, const double target_coil_pos_z=-300, const double target_l=7.9, const double target_z=0., const int use_g4steps=1, const int register_hits=0)
void registerEMCal(std::string ecalName, int ecalID=100)
Register additional EMCal detector for digitizing.
PHCompositeNode * topNode() const
virtual const std::string get_CharFlag(const std::string &flag) const
void SetWorldSizeX(const double sx)
void SetPhysicsList(const std::string &s)
void set_vertex_size_parameters(const double mean, const double width)
set the dimensions of the distribution of particles about the vertex
void set_vertex_size_function(FUNCTION r)
set the distribution function of particles about the vertex
virtual void Verbosity(const int ival)
Sets the verbosity of this module (0 by default=quiet).
static GeomSvc * instance()
singlton instance
void register_trigger(PHPy8GenTrigger *theTrigger)
set event selection criteria
void SetupBeamline(PHG4Reco *g4Reco, const bool toggle_collimator=true, const double collimator_pos_z=-300, const int register_hits=0)
virtual void set_CharFlag(const std::string &name, const std::string &flag)
overide the virtual function to expand the environmental variables
void set_seed(const unsigned int iseed)
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
void set_pxpypz_range(const double x_min, const double x_max, const double y_min, const double y_max, const double z_min, const double z_max)
void SetWorldSizeZ(const double sz)
void SetWorldSizeY(const double sy)