Analysis Software
Documentation for
sPHENIX
simulation software
Home page
Related Pages
Modules
Namespaces
Classes
Files
Examples
External Links
File List
File Members
Analysis Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
acts-fatras
analysis
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
blob
master
calibrations
CaloProduction
CDBTest
common
CDBUtils.C
DisplayOn.C
Fun4All_CaloProduction.C
G4_ActsGeom.C
G4_BeamLine.C
G4_BlackHole.C
G4_CaloTrigger.C
G4_CEmc_Albedo.C
G4_CEmc_Spacal.C
G4_Centrality.C
G4_DSTReader.C
G4_EPD.C
G4_Global.C
G4_HcalIn_ref.C
G4_HcalOut_ref.C
G4_HIJetReco.C
G4_Input.C
G4_Jets.C
G4_KFParticle.C
G4_Magnet.C
G4_Mbd.C
G4_ParticleFlow.C
G4_Pipe.C
G4_PlugDoor.C
G4_Production.C
G4_PSTOF.C
G4_TopoClusterReco.C
G4_Tracking.C
G4_Tracking_Cosmics.C
G4_TrkrSimulation.C
G4_TrkrVariables.C
G4_User.C
G4_World.C
G4_ZDC.C
GlobalVariables.C
HIJetReco.C
QA.C
sPhenixStyle.C
sPhenixStyle.h
Trkr_Clustering.C
Trkr_CommissioningReco.C
Trkr_Diagnostics.C
Trkr_Eval.C
Trkr_LaserClustering.C
Trkr_QA.C
Trkr_Reco.C
Trkr_Reco_Cosmics.C
Trkr_RecoInit.C
Trkr_TruthReco.C
Trkr_TruthTables.C
detectors
eventcombine
InttProduction
macros
MvtxProduction
StreamingProduction
TpcProduction
TrackingProduction
validation
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
G4_World.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file G4_World.C
1
#ifndef MACRO_G4WORLD_C
2
#define MACRO_G4WORLD_C
3
4
#include <
GlobalVariables.C
>
5
6
#include <
g4main/PHG4Reco.h
>
7
8
R__LOAD_LIBRARY(libg4testbench.so)
9
10
namespace G4WORLD
11
{
12
double
AddSpace
= 100.;
// add this much space in cm around edge of detector
13
string
WorldMaterial
=
"G4_AIR"
;
// default world material, use G4_Galactic for material scan
14
string
PhysicsList
=
"FTFP_BERT"
;
// for calorimeters use HP lists
15
}
// namespace G4WORLD
16
17
void
WorldInit
(
PHG4Reco
*g4Reco)
18
{
19
g4Reco->
SetWorldMaterial
(
G4WORLD::WorldMaterial
);
20
g4Reco->
SetPhysicsList
(
G4WORLD::PhysicsList
);
21
}
22
23
void
WorldSize
(
PHG4Reco
*g4Reco,
double
radius)
24
{
25
double
world_radius = std::max((
BlackHoleGeometry::max_radius
+
BlackHoleGeometry::gap
), radius);
26
g4Reco->
SetWorldSizeY
(std::max(g4Reco->
GetWorldSizeY
(), world_radius +
G4WORLD::AddSpace
));
27
// our world is a symmetric cylinder so the center is at 0/0/0, pick the largest of abs(min_z) || abs(max_z)
28
double
min_zval =
std::min
((
BlackHoleGeometry::min_z
-
BlackHoleGeometry::gap
), -((g4Reco->
GetWorldSizeZ
() - 100) / 2.));
29
double
max_zval = std::max((
BlackHoleGeometry::max_z
+
BlackHoleGeometry::gap
), (g4Reco->
GetWorldSizeZ
() - 100) / 2.);
30
double
final_zval = std::max(fabs(min_zval), fabs(max_zval) +
G4WORLD::AddSpace
);
31
g4Reco->
SetWorldSizeZ
(std::max(g4Reco->
GetWorldSizeZ
(), 2 * (final_zval)));
32
return
;
33
}
34
#endif
macros
blob
master
common
G4_World.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:27
using
1.8.2 with
sPHENIX GitHub integration