Class Reference for E1039 Core & Analysis Software
Home page
Related Pages
Namespaces
Classes
Files
External Links
File List
File Members
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)
3
#include <
g4detectors/PHG4CollimatorSubsystem.h
>
4
class
SubsysReco
;
5
R__LOAD_LIBRARY(libg4detectors)
6
#endif
7
8
void
SetupBeamline
(
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
PHG4Reco
Runs G4 as a subsystem.
Definition:
PHG4Reco.h:38
PHG4DetectorSubsystem::SuperDetector
void SuperDetector(const std::string &name)
Definition:
PHG4DetectorSubsystem.cc:148
PHG4CollimatorSubsystem
Definition:
PHG4CollimatorSubsystem.h:9
PHG4DetectorSubsystem::set_double_param
void set_double_param(const std::string &name, const double dval)
Definition:
PHG4DetectorSubsystem.cc:155
SubsysReco
Definition:
SubsysReco.h:20
SetupBeamline
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
PHG4DetectorSubsystem::SetActive
void SetActive(const int i=1)
Definition:
PHG4DetectorSubsystem.cc:464
PHG4CollimatorSubsystem.h
PHG4Reco::registerSubsystem
void registerSubsystem(PHG4Subsystem *subsystem)
register subsystem
Definition:
PHG4Reco.h:65
e1039-core
macros
G4_Beamline.C
Built by
Haiwang Yu
. updated:
Wed May 26 2021 21:44:02
using
1.8.5 with
SeaQuest GitHub integration