StRoot
1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Groups
Pages
PWGTools
CentralityCalibration
Glauber
star_glauber
addNcollVsNpart.C
1
2
//____________________________________________________________________________________________________
3
void
addNcollVsNpart(
4
const
Char_t* inputFileList =
"./LIST/tree.default.list"
5
)
6
{
7
gSystem->Load(
"St_base"
);
8
gSystem->Load(
"StUtilities"
);
9
gSystem->Load(
"StGlauberUtilities"
);
10
gSystem->Load(
"StCentralityMaker"
);
11
gSystem->Load(
"StGlauberTree"
);
12
gSystem->Load(
"StGlauberAnalysisMaker"
);
13
14
ifstream fin(inputFileList);
15
if
(!fin)
16
{
17
Error
(
"addNcollVsNpart"
,
"can't open %s"
, inputFileList);
18
return
;
19
}
20
21
TChain t(
"tree"
);
22
TString file;
23
while
(fin>>file)
24
{
25
cout <<
"Add "
<< file <<
" into chain"
<< endl;
26
t.Add(file);
27
}
28
29
TH2* hNcoll_Npart =
new
TH2D
30
(
"hNcoll_Npart"
,
"hNcoll_Npart;Npart;Ncoll;"
,
31
// StGlauberConstUtilities::GetNpartBin(), 0, StGlauberConstUtilities::GetNpartMax(),
32
// StGlauberConstUtilities::GetNcollBin(), 0, StGlauberConstUtilities::GetNcollMax()
33
500, 0, 500, 1800, 0, 1800
34
);
35
t.Draw(
"ncoll:npart>>hNcoll_Npart"
,
"npart>=2&&ncoll>=1"
);
36
37
// Write output ROOT file
38
TFile* outputFile = TFile::Open(
"ncoll_npart.root"
,
"recreate"
);
39
hNcoll_Npart->Print();
40
hNcoll_Npart->Write();
41
outputFile->Close();
42
}
Error
Definition:
FJcore.h:367
Generated by
1.8.5