8 const int use_g4steps = 1;
9 const double target_l = 7.9;
10 const double target_z = (7.9-target_l)/2.;
12 const bool gen_gun =
false;
13 const bool gen_pythia8 =
false;
14 const bool gen_test =
true;
16 gSystem->Load(
"libfun4all");
17 gSystem->Load(
"libg4detectors");
18 gSystem->Load(
"libg4testbench");
19 gSystem->Load(
"libg4eval");
20 gSystem->Load(
"libtruth_eval.so");
34 TF2 *beam_profile =
new TF2(
"beam_profile",
36 "(((x**2+y**2)<=0.81)*exp(-(x**2+y**2)/0.18))+(((x**2+y**2)>0.81&&(x**2+y**2)<=25)*0.9*exp(-4.5)/(sqrt(x**2+y**2)))",
43 gSystem->Load(
"libPHPythia8.so");
64 gun_mup->
set_mom(mass/2., 0, mass/2.*cot);
72 gun_mum->
set_mom(mass/-2., 0, mass/2.*cot);
81 "/e906/app/users/liuk/seaquest/seaquest/geometry/magnetic_fields/tab.Fmag "
82 "/e906/app/users/liuk/seaquest/seaquest/geometry/magnetic_fields/tab.Kmag",
96 PHG4E1039InsensSubsystem* insens =
new PHG4E1039InsensSubsystem(
"Insens");
99 gROOT->LoadMacro(
"G4_Target.C");
100 SetupTarget(g4Reco, use_g4steps, target_l, target_z);
102 gROOT->LoadMacro(
"G4_DriftChamber.C");
120 string(
"DSTReader.root"));
148 std::cout <<
"All done" << std::endl;
int registerInputManager(Fun4AllInputManager *InManager)
void set_load_all_particle(bool b)
void AddParticles(std::string particles)
PHG4DSTReader save information from DST to an evaluator, which could include hit. particle...
void SetWorldMaterial(const std::string &s)
void SetWorldShape(const std::string &s)
static Fun4AllServer * instance()
static void ExportGeomtry(PHCompositeNode *topNode, const std::string &geometry_file)
DST node -> TGeoManager -> export files, like gdml, .root or .C formats.
int registerSubsystem(SubsysReco *subsystem, const std::string &topnodename="TOP")
void set_config_file(const char *cfg_file)
int run(const int nevnts=0, const bool require_nevents=false)
run n events (0 means up to end of file)
int registerOutputManager(Fun4AllOutputManager *manager)
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 set_save_vertex(bool b)
Switch for vertex.
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 SetupDriftChamber(PHG4Reco *g4Reco, std::string _server_name="seaquestdb01.fnal.gov", int _port=3310, std::string _user_name="seaguest", std::string _password="qqbar2mu+mu-", std::string _input_shcema="geometry_G17_run3")
void AddNode(const std::string &name)
PHCompositeNode * topNode() const
void set_save_particle(bool b)
Switch for saving any particles at all.
int Fun4Sim(const int nEvents=1)
void SetWorldSizeX(const double sx)
void SetPhysicsList(const std::string &s)
virtual void set_vtx(const double x, const double y, const double z)
SubsysReco * getSubsysReco(const std::string &name)
virtual void Verbosity(const int ival)
Sets the verbosity of this module (0 by default=quiet).
void set_load_active_particle(bool b)
load all particle that produced a saved hit
void register_trigger(PHPy8GenTrigger *theTrigger)
set event selection criteria
virtual void set_name(const std::string &particle="proton")
virtual void set_mom(const double x, const double y, const double z)
PHG4ParticleGun * get_gun(const char *name="PGUN")
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
void SetWorldSizeZ(const double sz)
void SetWorldSizeY(const double sy)