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
online_distribution
OnlMon
prototype
pythia6
rcdaq
RDBC
tutorials
blob
master
AnaTutorial
block
CaloAna
clusters
Fun4All_G4_Clusters.C
G4TTree.C
CreateSubsysRecoModule
cylinder
eventgenerator_display
IonGun
MagneticField
materialscan
Momentum
myjetanalysis
MyOwnTTree
PHG4DSTReader
sPHENIX_sims
doxygen_mainpage.h
File Members
Examples
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
Fun4All_G4_Clusters.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file Fun4All_G4_Clusters.C
1
int
Min_cemc_layer
= 1;
2
int
Max_cemc_layer
= 1;
3
int
Fun4All_G4_Clusters
(
4
int
nEvents
= 100,
5
const
char
* inputFile =
"/phenix/sim01/sPHENIX/pythia/reference_design/fieldmap/G4Hits_Pythia_0.root"
,
6
const
char
* outputFile =
"G4sPHENIXClusters.root"
7
)
8
{
9
//---------------
10
// Load libraries
11
//---------------
12
13
gSystem->Load(
"libfun4all.so"
);
14
gSystem->Load(
"libg4detectors.so"
);
15
gSystem->Load(
"libphhepmc.so"
);
16
gSystem->Load(
"libg4testbench.so"
);
17
gSystem->Load(
"libg4hough.so"
);
18
gSystem->Load(
"libcemc.so"
);
19
gSystem->Load(
"libg4eval.so"
);
20
21
Fun4AllServer
*se =
Fun4AllServer::instance
();
22
se->
Verbosity
(0);
23
24
//------------------
25
// Detector Division
26
//------------------
27
28
PHG4CylinderCellReco
*cemc_cells =
new
PHG4CylinderCellReco
(
"CEMCCYLCELLRECO"
);
29
cemc_cells->
Detector
(
"CEMC"
);
30
for
(
int
i
=
Min_cemc_layer
;
i
<=
Max_cemc_layer
;
i
++) {
31
cemc_cells->
etaphisize
(
i
, 0.024, 0.024);
32
}
33
se->
registerSubsystem
(cemc_cells);
34
35
//-----------------------------
36
// CEMC towering and clustering
37
//-----------------------------
38
RawTowerBuilder
*TowerBuilder =
new
RawTowerBuilder
(
"EmcRawTowerBuilder"
);
39
TowerBuilder->
Detector
(
"CEMC"
);
40
TowerBuilder->
Verbosity
(0);
41
se->
registerSubsystem
( TowerBuilder );
42
43
RawClusterBuilder* ClusterBuilder =
new
RawClusterBuilder(
"EmcRawClusterBuilder"
);
44
ClusterBuilder->Detector(
"CEMC"
);
45
ClusterBuilder->Verbosity(0);
46
se->
registerSubsystem
( ClusterBuilder );
47
48
49
// Hits file
50
Fun4AllInputManager
*hitsin =
new
Fun4AllDstInputManager
(
"DSTin"
);
51
hitsin->
fileopen
(inputFile);
52
se->
registerInputManager
(hitsin);
53
Fun4AllDstOutputManager
*
out
=
new
Fun4AllDstOutputManager
(
"DSTOUT"
, outputFile);
54
out->
AddNode
(
"G4HIT_CEMC"
);
55
out->
AddNode
(
"G4CELL_CEMC"
);
56
out->
AddNode
(
"TOWER_CEMC"
);
57
out->
AddNode
(
"CLUSTER_CEMC"
);
58
se->
registerOutputManager
(out);
59
60
//-----------------
61
// Event processing
62
//-----------------
63
se->
run
(
nEvents
);
64
65
//-----
66
// Exit
67
//-----
68
69
se->
End
();
70
std::cout <<
"All done"
<< std::endl;
71
delete
se;
72
gSystem->Exit(0);
73
}
tutorials
blob
master
clusters
Fun4All_G4_Clusters.C
Built by
Jin Huang
. updated:
Sat Feb 17 2024 22:18:49
using
1.8.2 with
sPHENIX GitHub integration