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
analysis.C
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file analysis.C
1
2
//
3
// A trivial analysis ROOT script sufficient to build calorimeter energy
4
// resolution plot; all relationships between Monte-Carlo tracks and reconstructed
5
// ones are ignored, so that this script can work for single track events only;
6
// is pretty much sufficient to see sensitivity to obvious actions though:
7
//
8
// - change crystal count and/or length in calorimeter.C;
9
// - change alveole thickness in calorimeter.C;
10
// - decrease distance from IP in calorimeter.C and/or change air to vacuum in cave.geo;
11
// - change particle energy in simulation.C;
12
// - play with light output, noise, threshold, att.length, etc in digitization.C;
13
// - play with thresholds in reconstruction.C;
14
//
15
16
void
analysis
()
17
{
18
// Input simulated & reconstructed files;
19
auto
ff
=
new
TFile(
"simulation.root"
);
20
auto
cbmsim
=
dynamic_cast<
TTree *
>
(
ff
->Get(
"cbmsim"
));
21
cbmsim
->AddFriend(
"cbmsim"
,
"reconstruction.root"
);
22
23
// Build 1D dE/E histogram;
24
auto
de =
new
TH1D(
"de"
,
"de"
, 100, -20., 20.);
25
cbmsim
->Project(
"de"
,
"100.*(CalorimeterClusterGroup.mEnergy-MCTrack.fE)/MCTrack.fE"
,
26
"MCTrack.fMotherID==-1"
);
27
de->Fit(
"gaus"
);
28
}
// analysis()
EicRoot
blob
master
examples
calorimetry
config.1
analysis.C
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:35
using
1.8.2 with
EIC GitHub integration