1 #include <top/G4_Beamline.C>
2 #include <top/G4_Target.C>
3 #include <top/G4_InsensitiveVolumes.C>
4 #include <top/G4_SensitiveDetectors.C>
6 R__LOAD_LIBRARY(libfun4all)
7 R__LOAD_LIBRARY(libPHPythia8)
8 R__LOAD_LIBRARY(libg4detectors)
9 R__LOAD_LIBRARY(libg4testbench)
10 R__LOAD_LIBRARY(libg4eval)
11 R__LOAD_LIBRARY(libg4dst)
12 R__LOAD_LIBRARY(libdptrigger)
13 R__LOAD_LIBRARY(libembedding)
14 R__LOAD_LIBRARY(libevt_filter)
15 R__LOAD_LIBRARY(libktracker)
16 R__LOAD_LIBRARY(libSQPrimaryGen)
21 const double target_coil_pos_z = -300;
23 int embedding_opt = 0;
24 const bool legacy_rec_container =
true;
26 const bool do_collimator =
true;
27 const bool do_target =
true;
28 const bool do_e1039_shielding =
true;
29 const bool do_fmag =
true;
30 const bool do_kmag =
true;
31 const bool do_absorber =
true;
32 const bool do_dphodo =
true;
33 const bool do_station1DC =
false;
35 const double target_l = 7.9;
36 const double target_z = (7.9-target_l)/2.;
37 const int use_g4steps = 1;
39 const double FMAGSTR = -1.054;
40 const double KMAGSTR = -0.951;
42 const bool gen_pythia8 =
true;
43 const bool gen_cosmic =
false;
44 const bool gen_gun =
false;
45 const bool gen_particle =
false;
46 const bool read_hepmc =
false;
47 const bool gen_e906legacy =
false;
48 const bool save_in_acc =
false;
102 if(gen_pythia8 || read_hepmc) {
173 const bool pythia_gen =
false;
174 const bool drellyan_gen =
true;
175 const bool JPsi_gen =
false;
176 const bool Psip_gen =
false;
213 Form(
"%f",FMAGSTR) +
" " +
214 Form(
"%f",KMAGSTR) +
" " +
232 SetupBeamline(g4Reco, do_collimator, target_coil_pos_z - 302.36);
235 SetupTarget(g4Reco, target_coil_pos_z, target_l, target_z, use_g4steps);
260 if(embedding_opt == 1) {
341 std::cout <<
"All done" << std::endl;
int registerInputManager(Fun4AllInputManager *InManager)
virtual void set_DoubleFlag(const std::string &name, const double flag)
void set_in_tree_name(const std::string &inTreeName)
virtual void set_BoolFlag(const std::string &name, const bool 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 init(int runNo=0, bool verbose=false)
initialize the constants by the runNo - not implemented yet
void add_particles(const std::string &name, const unsigned int count)
interface for adding particles by name
void Print() const
print all the parameters
An SubsysReco module to create a set of SQ nodes for the simulation true info.
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 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_xfRange(const double xmin, const double xmax)
void set_config_file(const char *cfg_file)
void SetPzHighLow(double pzHigh, double pzLow)
void set_enable_KF(bool enable)
void set_road_set_file_name(const std::string &roadSetFileName)
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_enable_st1dc(const bool en)
enable/disable certain detectors
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.)
void set_massRange(const double mmin, const double mmax)
void set_in_name(const std::string &inName)
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)
An SubsysReco module to select in-acceptance events.
PHCompositeNode * topNode() const
virtual const std::string get_CharFlag(const std::string &flag) const
int Fun4Sim(const int nEvents=1)
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
virtual void set_vtx(const double x, const double y, const double z)
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 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)
void set_enable_dphodo(const bool en)
virtual void set_name(const std::string &particle="proton")
virtual void set_mom(const double x, const double y, const double z)
void set_trigger_bit(int triggerBit)
void set_embedding_id(int id)
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 add_eval_list(int listID)
void SetWorldSizeZ(const double sz)
void SetWorldSizeY(const double sy)