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(
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(
false);
33 anaMaker->setVtxZCut(-35., 25.);
34 anaMaker->addTriggerId(600001);
35 anaMaker->addTriggerId(600011);
36 anaMaker->addTriggerId(600021);
37 anaMaker->addTriggerId(600031);
38 anaMaker->setRunIdParameters(57990, 19071030, 19129020);
42 double a0=-1.27785869748694, a1=0.918278154432662, a2=-0.000421651379949012, a3=1.20429516308073e-06, a4=-1.54521733920117e-09;
43 double b0=13.2397261316822, b1=1.46248491801055, b2=-0.00310419986439369, b3=8.21875717651988e-06, b4=-8.61348326634967e-09;
44 double c0=-11.2055760170529, c1=0.415626210975414, c2=0.00191757674104115, c3=-4.93833806589717e-06, c4=4.74283345256434e-09;
45 anaMaker->setPileUpParameters(a0,a1,a2,a3,a4,b0,b1,b2,b3,b4,c0,c1,c2,c3,c4);
47 std::cout <<
"Initializing chain" << std::endl;
49 if( chain->Init() ==
kStErr ){
50 std::cout <<
"Error during the chain initializtion. Exit. " << std::endl;
53 std::cout <<
"... done" << std::endl;
55 int nEvents2Process = reader->
chain()->GetEntries();
56 std::cout <<
" Number of events in files: " << nEvents2Process << std::endl;
59 for (Int_t iEvent=0; iEvent<nEvents2Process; iEvent++) {
61 if( iEvent % 1000 == 0 ) std::cout <<
"Macro: working on event: " << iEvent << std::endl;
65 int iret = chain->
Make();
67 if (iret) { std::cout <<
"Bad return code!" << iret << endl;
break; }
69 std::cout <<
"Data have been processed, Master" << std::endl;
71 std::cout <<
"Finalizing chain" << std::endl;
74 std::cout <<
"... done" << std::endl;
76 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)