Class Reference for E1039 Core & Analysis Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
G4_Beamline.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 
9  PHG4Reco* g4Reco,
10  const bool toggle_collimator = true,
11  const double collimator_pos_z = -300,
12  const int register_hits = 0)
13 {
14  if(toggle_collimator) {
15  PHG4CollimatorSubsystem* collimator = new PHG4CollimatorSubsystem("Collimator",0);
16  collimator->SuperDetector("Collimator");
17  collimator->set_double_param("place_z", collimator_pos_z);//-302.36 cm
18  collimator->set_double_param("size_z", 121.92);
19  collimator->SetActive(register_hits);
20  g4Reco->registerSubsystem(collimator);
21  }
22 
23  return;
24 }
25 
Runs G4 as a subsystem.
Definition: PHG4Reco.h:38
void SuperDetector(const std::string &name)
void set_double_param(const std::string &name, const double dval)
void SetupBeamline(PHG4Reco *g4Reco, const bool toggle_collimator=true, const double collimator_pos_z=-300, const int register_hits=0)
Definition: G4_Beamline.C:8
void SetActive(const int i=1)
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
Definition: PHG4Reco.h:65