7 const Char_t* testInFName =
"/star/u/gnigmat/soft/u/centrality_definition/Centrality/input/st_physics_adc_19084053_raw_0000006.picoDst.root";
10 void runCentralityAnalyzer_Zr(
const Char_t* inFileName = testInFName,
11 const Char_t* oFileName =
"oTestAna.root") {
13 std::cout <<
"Start running centrality analyzer" << std::endl;
14 gROOT->LoadMacro(
"$STAR/StRoot/StMuDSTMaker/COMMON/macros/loadSharedLibraries.C");
15 loadSharedLibraries();
17 gSystem->Load(
"StPicoEvent");
18 gSystem->Load(
"StPicoDstMaker");
19 gSystem->Load(
"StCentralityAnalyzer");
32 anaMaker->setUsePileUp(
true);
33 anaMaker->setUseLumCorr(
false);
34 anaMaker->setUseVzCorr(
false);
35 anaMaker->setVtxZCut(-35., 25.);
36 anaMaker->addTriggerId(600001);
37 anaMaker->addTriggerId(600011);
38 anaMaker->addTriggerId(600021);
39 anaMaker->addTriggerId(600031);
40 anaMaker->setRunIdParameters(57990, 19071030, 19129020);
50 double a0=-1.19267140255075, a1=0.912703837475103, a2=-0.000366760799818202, a3=9.94532126858323e-07, a4=-1.31386727140715e-09;
51 double b0=13.5244327901538, b1=1.4429201808933, b2=-0.002873496957537, b3=7.29172798142226e-06, b4=-7.45759942317285e-09;
52 double c0=-11.2781454979572, c1=0.420728494449501, c2=0.00184005031913895, c3=-4.61008765754698e-06, c4=4.28291905929182e-09;
54 anaMaker->setPileUpParameters(a0,a1,a2,a3,a4,b0,b1,b2,b3,b4,c0,c1,c2,c3,c4);
58 double lumcorr_a = -1.3917e-4;
59 double lumcorr_b = 98.412;
60 double lumcorr_bprime = 96.9914;
62 anaMaker->setLumCorrParameters(lumcorr_a,lumcorr_b,lumcorr_bprime);
66 double vzCorPar0 = 300.296;
67 double vzCorPar1 = 0.0358743;
68 double vzCorPar2 = -0.000549242;
69 double vzCorPar3 = 0.000232057;
70 double vzCorPar4 = 5.86792e-06;
71 double vzCorPar5 = -2.91945e-07;
72 double vzCorPar6 = -6.33743e-09;
74 anaMaker->setVzCorrParameters(vzCorPar0, vzCorPar1, vzCorPar2, vzCorPar3, vzCorPar4, vzCorPar5, vzCorPar6);
77 anaMaker->setShapeIndex(1);
82 std::cout <<
"Initializing chain" << std::endl;
84 if( chain->Init() ==
kStErr ){
85 std::cout <<
"Error during the chain initializtion. Exit. " << std::endl;
88 std::cout <<
"... done" << std::endl;
90 int nEvents2Process = reader->
chain()->GetEntries();
91 std::cout <<
" Number of events in files: " << nEvents2Process << std::endl;
94 for (Int_t iEvent=0; iEvent<nEvents2Process; iEvent++) {
96 if( iEvent % 1000 == 0 ) std::cout <<
"Macro: working on event: " << iEvent << std::endl;
100 int iret = chain->
Make();
102 if (iret) { std::cout <<
"Bad return code!" << iret << endl;
break; }
104 std::cout <<
"Data have been processed, Master" << std::endl;
106 std::cout <<
"Finalizing chain" << std::endl;
109 std::cout <<
"... done" << std::endl;
111 std::cout <<
"Centrality analyzer finished the work" << std::endl;
Allows to read picoDst file(s)
TChain * chain()
Return pointer to the chain of .picoDst.root files.
virtual void Clear(Option_t *option="")
User defined functions.
void SetStatus(const Char_t *branchNameRegex, Int_t enable)
Set enable/disable branch matching when reading picoDst.
Process and build distributions for centrality determination.
void Init()
Calls openRead()
StPicoDstReader(const Char_t *inFileName)