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
digitization.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file digitization.C
1
2
//
3
// This script converts MC points to hits in the silicon layers; both discrete
4
// and gaussian smearing possible; "ideal" model (one hit per MC point);
5
//
6
7
void
digitization
()
8
{
9
// Load basic libraries;
10
gROOT->Macro(
"$VMCWORKDIR/gconfig/rootlogon.C"
);
11
12
// Create generic analysis run manager; configure it for MC hit digitization;
13
EicRunAna
*fRun =
new
EicRunAna
();
14
// Import the file with simulated events;
15
fRun->
SetInputFile
(
"simulation.root"
);
16
// Define the output file with the digitized hits;
17
fRun->
SetOutputFile
(
"digitization.root"
);
18
19
EicTrackingDigiHitProducer
*
ip
=
20
new
EicTrackingDigiHitProducer
(
"IP"
,
EicDigiHitProducer::Smear
);
21
ip->
DefineKfNodeTemplateXY
(2000 *
eic::um
, 2000 *
eic::um
);
22
fRun->
AddTask
(ip);
23
24
// Call standard digitizing routine for our FWDST detector; assume 20x20um^2
25
// discrete pixels; may add more EicTrackingDigiHitProducer routines here
26
// if want to use your own custom set of detectors described a la tracker.C and
27
// included in the simulation.C script;
28
EicTrackingDigiHitProducer
*fwdst =
29
new
EicTrackingDigiHitProducer
(
"FWDST"
,
EicDigiHitProducer::Quantize
);
30
fwdst->
DefineKfNodeTemplateXY
(20 *
eic::um
, 20 *
eic::um
);
31
// Commented out: gaussian smearing with sigma ~ 20um/sqrt(12) is expected
32
// to produce similar results;
33
//new EicTrackingDigiHitProducer("FWDST", EicDigiHitProducer::Smear);
34
//fwdst->DefineKfNodeTemplateXY(6 * eic::um, 6 * eic::um);
35
fRun->
AddTask
(fwdst);
36
37
// Initialize and run digitization; exit at the end;
38
fRun->
Run
();
39
}
// digitization()
EicRoot
blob
master
examples
tracking
config.1b
digitization.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration