EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
simulation.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file simulation.C
1
2
3
void
simulation
(
int
nEvents
= 2000)
4
{
5
// Create simulation run manager; use GEANT3 for tracking excercises here;
6
auto
fRun =
new
EicRunSim
(
"TGeant3"
);
7
fRun->SetOutputFile(
"simulation.root"
);
8
9
// Suppress secondary particle production (work with primary electrons);
10
fRun->SuppressSecondaries();
11
12
// Beam pipe;
13
fRun->AddModule(
new
EicDummyDetector
(
"BEAMPIPE"
,
"BEAMPIPE/beampipe.root"
));
14
15
// Silicon detectors;
16
fRun->AddModule(
new
EicMaps
(
"VST"
,
"MAPS/vst-v01.0-ss.root"
,
qVST
));
17
fRun->AddModule(
new
EicMaps
(
"FST"
,
"MAPS/fst-v01.0-ss.root"
,
qFST
));
18
fRun->AddModule(
new
EicMaps
(
"BST"
,
"MAPS/bst-v01.0-ss.root"
,
qBST
));
19
20
// GEM disks;
21
fRun->AddModule(
new
EicGem
(
"FGT"
,
"GEM/fgt-v01.0.root"
,
qFGT
));
22
fRun->AddModule(
new
EicGem
(
"BGT"
,
"GEM/bgt-v01.0.root"
,
qBGT
));
23
24
// TPC;
25
fRun->AddModule(
new
EicTpc
(
"TPC/tpc-v01.0-ns.root"
));
26
27
// Create and set up physics Event Generator;
28
{
29
// Input ASCII file name (PYTHIA 20x250 GeV, Q^2>0.8 cut applied;
30
TString evFile =
"../pythia.ep.20x250.5Mevents.1.RadCor=0.Q2-0.8..100k-lines.txt"
;
31
32
// An interface to eic-smear (which is able to import PYTHIA, DJANGOH, ... files);
33
auto
evtGen =
new
EicEventGenerator
(evFile.Data());
34
// Select primary electrons only; ignore all the rest;
35
evtGen->
SelectPdgCode
(11);
36
evtGen->SelectLeadingParticle();
37
38
fRun->AddGenerator(evtGen);
39
}
40
41
// Create and set up the Apr'2016 solenoid field;
42
fRun->AddField(
new
PndSolenoidMap
(
"SolenoidMap8"
,
"R"
));
43
44
// Initialize and run the simulation; exit at the end;
45
fRun->Run(
nEvents
);
46
}
// simulation()
EicRoot
blob
master
examples
physics
config.1
simulation.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration