3 #include <top/G4_Beamline.C>
4 #include <top/G4_Target.C>
5 #include <top/G4_InsensitiveVolumes.C>
6 #include <top/G4_SensitiveDetectors.C>
8 R__LOAD_LIBRARY(libfun4all)
9 R__LOAD_LIBRARY(libPHPythia8)
10 R__LOAD_LIBRARY(libg4detectors)
11 R__LOAD_LIBRARY(libg4testbench)
12 R__LOAD_LIBRARY(libg4eval)
13 R__LOAD_LIBRARY(libg4dst)
14 R__LOAD_LIBRARY(libdptrigger)
15 R__LOAD_LIBRARY(libktracker)
16 R__LOAD_LIBRARY(libevt_filter)
17 R__LOAD_LIBRARY(libana_trkqa)
29 const bool single_gun =
true;
30 const bool dimuon_gun =
false;
32 const bool do_collimator =
true;
33 const bool do_target =
true;
34 const bool do_shielding =
true;
35 const bool do_fmag =
true;
36 const bool do_kmag =
true;
37 const bool do_absorber =
true;
39 const double collimator_pos_z = -602.36;
40 const double target_coil_pos_z = -300.;
41 const double target_l = 7.9;
42 const double target_z = (7.9-target_l)/2.;
44 const double FMAGSTR = -1.054;
45 const double KMAGSTR = -0.951;
135 Form(
"%f",FMAGSTR) +
" " +
136 Form(
"%f",KMAGSTR) +
" " +
152 SetupTarget(g4Reco, target_coil_pos_z, target_l, target_z, 1, 0);
233 std::cout <<
"All done" << std::endl;
int registerInputManager(Fun4AllInputManager *InManager)
virtual void set_DoubleFlag(const std::string &name, const double flag)
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 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)
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 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_enable_KF(bool enable)
void set_out_name(const std::string &outName)
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
void set_eval_file_name(const TString &evalFileName)
void set_vertex_distribution_mean(const double x, const double y, const double z)
set the mean value of the vertex distribution
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 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.)
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)
PHCompositeNode * topNode() const
virtual const std::string get_CharFlag(const std::string &flag) const
int Fun4Sim_TrkQA(const int nevent=10)
void SetWorldSizeX(const double sx)
void setInputTy(SQReco::INPUT_TYPE input_ty)
void set_evt_reducer_opt(const TString &opt)
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_enable_eval(bool enable)
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 SetupBeamline(PHG4Reco *g4Reco, const bool toggle_collimator=true, const double collimator_pos_z=-300, const int register_hits=0)
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
void setFitterTy(SQReco::FITTER_TYPE fitter_ty)
void set_enable_eval_dst(bool enable)
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)