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
blob
master
A_N
Ana
AndersonAnalysisModules
AntiSigma
BBCStudy
Calo_Validation_Package
Calo_waveform_sim
Calorimeter
CalorimeterEmbedding
CalorimeterJets
cdbEMCalExample
cemcRecoAna
Centrality_Validation_Package
dNdEta_Run2023
EIC-IR
EIC-SynRad
EICAnalysis
EICMCAnalysis
EICTrigger
ElectronID
EMCal-analysis
EMCal-calibration
EMCal-commissioning
EMCal-LEDs
EMCal-position-dependent-calibration
EMCal-QA
EMCal_pi0_Calib_2023
EMCTemplateFitting
EpFinder
Event-Display
EventMix
FilterEvents
FilterEventsUpsilon
Fluence
ForwardCalo
ForwardTracking
FrawleyTrackEvalMacros
hbcup
HCal-analysis
HCalCosmicCalib
HCalHotTowerFinder
HCalib
HcalSingleHadronCalib
HF-Jet
HF-Particle
isoCluster
IsolatedTrackAnalysis
JS-Jet
mbdAnalysis
MBDStudy
MultiDetectorMultiplicity
MvtxTelescope
mybuild
ParticleID
PHFlowJetMaker
PhotonConversion
PhotonJet
pi0ClusterAna
pi0Efficiency
macros
gen
DisplayOn.C
Fun4All_G4_Calo.C
Fun4All_Pi0Gen_sPHENIX.C
Fun4All_RunPi0Efficiency.C
G4_CEmc_Spacal.C
G4Setup_sPHENIX.C
offline
src
Pi0MassAnalysis
Prototype2
Prototype3
Prototype4
psTOF
pythiaEMCalAna
pythiaInfo
QuarkoniaBG
quickHIJING
ResonanceJetTaggingOutputs
runTrackingDiagnostics
Shift_emcal_g4hits
SimpleTrackingAnalysis
singlePhotonClusterAna
sPhenixAj
SvtxSimPerformanceCheckReco
TemplateCreation
Test
TowerInfoExample
TPC
TPC-ClusterAnimation
TPC-GemGain
Tracking
TrackPid
TreeMaker
ZDC-CALIB
analysis_tpc_prototype
coresoftware
Doxygen_Assist
g4exampledetector
GenFit
JETSCAPE
KFParticle
macros
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
DisplayOn.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file DisplayOn.C
1
#pragma once
2
3
#include <
g4main/PHG4Reco.h
>
4
5
#include <
fun4all/Fun4AllServer.h
>
6
7
R__LOAD_LIBRARY(libfun4all.so)
8
R__LOAD_LIBRARY(libg4testbench.so)
9
//R__LOAD_LIBRARY(libphg4reco.so)
10
11
namespace Enable
12
{
13
bool
DISPLAY
=
false
;
14
}
15
16
// This starts the QT based G4 gui which takes control
17
// when x'ed out it will return a pointer to PHG4Reco so
18
// the gui can be startrd again
19
PHG4Reco
*
QTGui
()
20
{
21
Fun4AllServer
*se =
Fun4AllServer::instance
();
22
PHG4Reco
*
g4
= (
PHG4Reco
*) se->
getSubsysReco
(
"PHG4RECO"
);
23
g4->
InitRun
(se->
topNode
());
24
g4->
ApplyDisplayAction
();
25
g4->
StartGui
();
26
return
g4
;
27
}
28
29
// stupid macro to turn on the geant4 display
30
// we ask Fun4All for a pointer to PHG4Reco
31
// using the ApplyCommand will start up the
32
// G4 cmd interpreter and graphics system
33
// the vis.mac contains the necessary commands to
34
// start up the visualization, the next event will
35
// be displayed. Do not execute this macro
36
// before PHG4Reco was registered with Fun4All
37
PHG4Reco
*
DisplayOn
(
const
char
*mac =
"vis.mac"
)
38
{
39
char
cmd
[100];
40
Fun4AllServer
*se =
Fun4AllServer::instance
();
41
PHG4Reco
*
g4
= (
PHG4Reco
*) se->
getSubsysReco
(
"PHG4RECO"
);
42
g4->
InitRun
(se->
topNode
());
43
g4->
ApplyDisplayAction
();
44
sprintf(cmd,
"/control/execute %s"
, mac);
45
g4->
ApplyCommand
(cmd);
46
return
g4
;
47
}
48
// print out the commands I always forget
49
void
displaycmd
()
50
{
51
cout <<
"draw axis: "
<< endl;
52
cout <<
" g4->ApplyCommand(\"/vis/scene/add/axes 0 0 0 50 cm\")"
<< endl;
53
cout <<
"zoom"
<< endl;
54
cout <<
" g4->ApplyCommand(\"/vis/viewer/zoom 1\")"
<< endl;
55
cout <<
"viewpoint:"
<< endl;
56
cout <<
" g4->ApplyCommand(\"/vis/viewer/set/viewpointThetaPhi 0 0\")"
<< endl;
57
cout <<
"panTo:"
<< endl;
58
cout <<
" g4->ApplyCommand(\"/vis/viewer/panTo 0 0 cm\")"
<< endl;
59
cout <<
"print to eps:"
<< endl;
60
cout <<
" g4->ApplyCommand(\"/vis/ogl/printEPS\")"
<< endl;
61
cout <<
"set background color:"
<< endl;
62
cout <<
" g4->ApplyCommand(\"/vis/viewer/set/background white\")"
<< endl;
63
cout <<
"Overlap check:"
<< endl;
64
cout <<
" g4->ApplyCommand(\"/geometry/test/run\")"
<< endl;
65
}
analysis
blob
master
pi0Efficiency
macros
gen
DisplayOn.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:17:48
using
1.8.2 with
sPHENIX GitHub integration