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_Ru(
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.17135278798859, a1=0.911627701794553, a2=-0.000359098306320787, a3=9.61800858474059e-07, a4=-1.25136113760776e-09;
51 double b0=13.5426221755897, b1=1.44261201539344, b2=-0.00288428931227279, b3=7.35384541646783e-06, b4=-7.53407759526067e-09;
52 double c0=-11.2591376113937, c1=0.419541462167548, c2=0.00185578651291454, c3=-4.68933832723005e-06, c4=4.4151761900593e-09;
54 anaMaker->setPileUpParameters(a0,a1,a2,a3,a4,b0,b1,b2,b3,b4,c0,c1,c2,c3,c4);
57 double lumcorr_a = -1.1624e-5;
58 double lumcorr_b = 98.113;
59 double lumcorr_bprime = 97.9927;
62 anaMaker->setLumCorrParameters(lumcorr_a,lumcorr_b,lumcorr_bprime);
65 double vzCorPar0 = 302.019;
66 double vzCorPar1 = 0.0270308;
67 double vzCorPar2 = -0.0017795;
68 double vzCorPar3 = 0.000243777;
69 double vzCorPar4 = 1.18462e-05;
70 double vzCorPar5 = -3.3121e-07;
71 double vzCorPar6 = -1.22651e-08;
73 anaMaker->setVzCorrParameters(vzCorPar0, vzCorPar1, vzCorPar2, vzCorPar3, vzCorPar4, vzCorPar5, vzCorPar6);
76 anaMaker->setShapeIndex(0);
79 std::cout <<
"Initializing chain" << std::endl;
81 if( chain->Init() ==
kStErr ){
82 std::cout <<
"Error during the chain initializtion. Exit. " << std::endl;
85 std::cout <<
"... done" << std::endl;
87 int nEvents2Process = reader->
chain()->GetEntries();
88 std::cout <<
" Number of events in files: " << nEvents2Process << std::endl;
91 for (Int_t iEvent=0; iEvent<nEvents2Process; iEvent++) {
93 if( iEvent % 1000 == 0 ) std::cout <<
"Macro: working on event: " << iEvent << std::endl;
97 int iret = chain->
Make();
99 if (iret) { std::cout <<
"Bad return code!" << iret << endl;
break; }
101 std::cout <<
"Data have been processed, Master" << std::endl;
103 std::cout <<
"Finalizing chain" << std::endl;
106 std::cout <<
"... done" << std::endl;
108 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)