3 #include "StCentralityAnalyzer.h"
19 const Char_t* oFileName):
20 mOutFileName(oFileName), mOutFile(
nullptr), mReader(reader), mDst(
nullptr),
21 mTriggerIdCollection(), mEventsPassed(0), mDebug(kFALSE),
22 hRefMult(
nullptr), hGRefMult(
nullptr), hPrimVertNum(
nullptr), hPrimVertZ(
nullptr),
23 hZdcAdcEast(
nullptr), hZdcAdcWest(
nullptr), hZdcAdcSum(
nullptr), hZdcCoincidenceRate(
nullptr),
24 hEpdAdcEast(
nullptr), hEpdAdcWest(
nullptr), hEpdAdcSum(
nullptr),
25 hPrimVertXvsY(
nullptr), hPrimVertVpdVzDiff(
nullptr), hRefMultVsTofTrayMult(
nullptr),
26 hGRefMultVsTofTrayMult(
nullptr), hRefMultVsTofMatched(
nullptr), hRefMultVsBemcMatch(
nullptr),
27 hRefMultVsRunNumber(
nullptr), hGRefMultVsRunNumber(
nullptr), hTofTrayMultVsRunNumber(
nullptr),
28 hRefMultVsZdcCoincidenceRate(
nullptr),hZdcAdcSumVsRunNumber(
nullptr), hPrimTrackPtVsRunNumber(
nullptr),
29 hPrimTrackNHitsVsRunNumber(
nullptr), hPrimTrackDedxVsRunNumber(
nullptr),
30 hGlobTrackPtVsRunNumber(
nullptr), hGlobTrackNHitsVsRunNumber(
nullptr),
31 hGlobTrackDedxVsRunNumber(
nullptr), hAvgRefMultVsZdcCoincidenceRate(
nullptr) {
33 mVtxZ[0] = -70.; mVtxZ[1] = 70.;
34 mVtxR[0] = 0.; mVtxR[1] = 2.;
35 mVtxXShift = 0.; mVtxYShift = 0.;
36 mVpdVzDiff[0] = -5.; mVpdVzDiff[1] = 5.;
37 mRefMult[0] = 0.; mRefMult[1] = 1000.;
40 mRunIdRange[0] = 19071030; mRunIdRange[1] = 19129020;
41 mMom[0] = 0.1; mMom[1] = 1e9;
42 mEta[0] = -1.; mEta[1] = 1.;
43 mNHits[0] = 15; mNHits[1] = 100;
44 mNHitsRatio[0] = 0.; mNHitsRatio[1] = 1.1;
48 StCentralityAnalyzer::~StCentralityAnalyzer() {
53 Int_t StCentralityAnalyzer::Init() {
55 std::cout <<
"No StPicoDstReader has been provided" << std::endl;
61 std::cout <<
"No StPicoDst has been retrieved from reader" << std::endl;
65 mOutFile =
new TFile(mOutFileName,
"recreate");
68 return StMaker::Init();
74 std::cout <<
"StCentralityAnalyzer::Finish - Writing histograms to the output file...";
77 std::cout <<
"\t [DONE]" << std::endl;
91 TRandom3* rndm3 =
new TRandom3(0);
94 std::cout <<
"No StPicoEvent has been retrieved from DST" << std::endl;
99 if ( isInBadRunList( event->runId() ) )
return kStOk;
102 if ( !isGoodEvent(event) )
return kStOk;
105 double VtxX =
event->primaryVertex().X();
106 double VtxY =
event->primaryVertex().Y();
107 double VtxZ =
event->primaryVertex().Z();
108 double VzVpd =
event->vzVpd();
111 Double_t refMult =
event->refMult();
115 Double_t thislumcorr = calculateLumCorr(event->ZDCx());
116 double zeroToOne = rndm3->Rndm();
117 double nonIntegerRefMult = (Double_t)(refMult)-0.5+zeroToOne;
118 refMult = TMath::Nint(nonIntegerRefMult*thislumcorr);
123 mTree_ZDCx =
event->ZDCx();
124 mTree_refMult = refMult;
128 refMult = getRefMultCorrVz(refMult, VtxZ);
129 mTree_refMultCor = refMult;
131 mTree_nBTOFMatched =
event->nBTOFMatch();
138 Int_t grefMult =
event->grefMult();
140 double VtxZBinDouble = VtxZ/2. + 36.;
141 if(VtxZ==73.0) hRefMultVtxZ[72]->Fill(refMult);
142 else if(VtxZ==-73.0) hRefMultVtxZ[0]->Fill(refMult);
143 else if(VtxZBinDouble - (
int)VtxZBinDouble == 0.5){
144 hRefMultVtxZ[(int)VtxZBinDouble]->Fill(refMult);
145 hRefMultVtxZ[(int)VtxZBinDouble+1]->Fill(refMult);
147 else hRefMultVtxZ[TMath::Nint(VtxZBinDouble)]->Fill(refMult);
149 hPrimVertXvsY->Fill(VtxX, VtxY);
150 hPrimVertZ->Fill(VtxZ);
151 hPrimVertVpdVzDiff->Fill(VtxZ-VzVpd);
154 UInt_t runId =
event->runId();
156 hRefMult->Fill( refMult );
157 hGRefMult->Fill( grefMult );
158 hRefMultVsRunNumber->Fill( runId, refMult );
159 hRefMultVsTofTrayMult->Fill( refMult, event->btofTrayMultiplicity() );
160 hRefMultVsTofMatched->Fill( event->nBTOFMatch() , refMult );
161 hGRefMultVsTofTrayMult->Fill( grefMult, event->btofTrayMultiplicity() );
162 hGRefMultVsTofMatched->Fill( grefMult, event->nBTOFMatch() );
163 hRefMultVsRunNumber->Fill( runId, refMult );
164 hGRefMultVsRunNumber->Fill( runId, grefMult );
165 hRefMultVsZdcCoincidenceRate->Fill(event->ZDCx(),refMult);
166 hAvgRefMultVsZdcCoincidenceRate->Fill(event->ZDCx(), refMult);
167 hZdcCoincidenceRateVsRunNumber->Fill( runId, event->ZDCx() );
168 hTofTrayMultVsRunNumber->Fill( runId, event->btofTrayMultiplicity() );
169 hTofMatchedVsRunNumber->Fill( runId, event->nBTOFMatch() );
171 std::vector<unsigned int> TheseTrigs =
event->triggerIds();
172 for(
int jTrigs=0; jTrigs<TheseTrigs.size(); jTrigs++){
173 int thisTrig = TheseTrigs[jTrigs];
174 if(thisTrig==600001) hAvgRefMultVsZdcCoincidenceRateForTrig[0]->Fill(event->ZDCx(), refMult);
175 if(thisTrig==600011) hAvgRefMultVsZdcCoincidenceRateForTrig[1]->Fill(event->ZDCx(), refMult);
176 if(thisTrig==600021) hAvgRefMultVsZdcCoincidenceRateForTrig[2]->Fill(event->ZDCx(), refMult);
177 if(thisTrig==600031) hAvgRefMultVsZdcCoincidenceRateForTrig[3]->Fill(event->ZDCx(), refMult);
182 if ( !track )
continue;
184 if ( !isGoodTrack( track ) )
continue;
187 hGlobTrackNHitsVsRunNumber->Fill( runId, track->
nHits() );
188 hGlobTrackPtVsRunNumber->Fill( runId, track->
gPt() );
201 Double_t StCentralityAnalyzer::calculateLumCorr(Double_t ZDCx) {
202 double f_ZDCx = m_LumCorr_a*ZDCx + m_LumCorr_b;
203 double LumCorr = m_LumCorr_bprime/(f_ZDCx);
208 Bool_t StCentralityAnalyzer::isGoodEvent(
StPicoEvent* ev) {
214 Bool_t pileUpRejected =
true;
218 return ( goodEvent && pileUpRejected );
222 void StCentralityAnalyzer::addTriggerId(
const unsigned int&
id) {
223 Bool_t isInList = ( std::find(mTriggerIdCollection.begin(), mTriggerIdCollection.end(), id) != mTriggerIdCollection.end() );
225 mTriggerIdCollection.push_back(
id );
230 Bool_t StCentralityAnalyzer::isNotPileUp(UShort_t refMult, UShort_t btofMatched) {
233 double refmultcutmax = ( m_b0 + m_b1*(btofMatched) + m_b2*pow(btofMatched,2) +
234 m_b3*pow(btofMatched,3) + m_b4*pow(btofMatched,4) );
235 double refmultcutmin = ( m_c0 + m_c1*(btofMatched) + m_c2*pow(btofMatched,2) +
236 m_c3*pow(btofMatched,3) + m_c4*pow(btofMatched,4) );
238 return ( refMult<refmultcutmax && refMult>refmultcutmin );
242 Bool_t StCentralityAnalyzer::isInBadRunList(
unsigned int runId) {
243 Bool_t isInRuRu_200GeV = ( std::find( bad_run_list_ruru_200gev.begin(), bad_run_list_ruru_200gev.end(), runId) != bad_run_list_ruru_200gev.end() );
244 Bool_t isInZrZr_200GeV = ( std::find( bad_run_list_zrzr_200gev.begin(), bad_run_list_zrzr_200gev.end(), runId) != bad_run_list_zrzr_200gev.end() );
246 return ( isInRuRu_200GeV || isInZrZr_200GeV );
250 Bool_t StCentralityAnalyzer::isGoodTrigger(std::vector<unsigned int> triggers) {
251 Bool_t isInList =
false;
252 for (
unsigned int i=0; i<triggers.size(); i++ ) {
253 if ( std::find(mTriggerIdCollection.begin(), mTriggerIdCollection.end(), triggers.at(i)) != mTriggerIdCollection.end() ) {
262 Bool_t StCentralityAnalyzer::isGoodVertex(Float_t x, Float_t y, Float_t z, Float_t vpdVz) {
263 Bool_t mIsGoodPositionZ =
false;
264 Bool_t mIsGoodPositionR =
false;
265 Bool_t mIsGoodVpdVzDiff =
false;
267 Float_t vpdVzDiff = z - vpdVz;
268 Float_t vtxPositionR = TMath::Sqrt( (x-mVtxXShift)*(x-mVtxXShift) +
269 (y-mVtxYShift)*(y-mVtxYShift) );
271 mIsGoodPositionZ = ( (z > mVtxZ[0]) && (z < mVtxZ[1]) );
272 mIsGoodPositionR = ( vtxPositionR >= mVtxR[0] && vtxPositionR < mVtxR[1] );
273 mIsGoodVpdVzDiff = ( vpdVzDiff > mVpdVzDiff[0] && vpdVzDiff < mVpdVzDiff[1] );
276 Bool_t isGoodVertex = ( mIsGoodPositionZ && mIsGoodPositionR && mIsGoodVpdVzDiff );
277 std::cout <<
"IsGoodVertex: " << isGoodVertex <<
" : " << std::endl;
278 std::cout <<
"position z: " << z <<
" IsGood: " << mIsGoodPositionZ << std::endl
279 <<
"position r: " << vtxPositionR <<
" IsGood: " << mIsGoodPositionR << std::endl
280 <<
"vpdvz diff: " << vpdVzDiff <<
" IsGood: " << mIsGoodVpdVzDiff << std::endl;
283 return ( mIsGoodPositionZ && mIsGoodPositionR && mIsGoodVpdVzDiff );
287 Bool_t StCentralityAnalyzer::isGoodTrack(
StPicoTrack *trk) {
288 Bool_t mGoodTrk =
false;
290 mGoodTrk = ( (trk->
gPtot() >= mMom[0]) && (trk->
gPtot() <= mMom[1]) &&
291 (trk->
gPt() >= 0.1) &&
292 (trk->
gMom().Eta() >= mEta[0]) &&
293 (trk->
gMom().Eta() <= mEta[1]) &&
294 (trk->
nHits() >= mNHits[0]) &&
295 (trk->
nHits() <= mNHits[1]) &&
296 (hitRatio >= mNHitsRatio[0]) &&
297 (hitRatio <= mNHitsRatio[1]) );
300 std::cout <<
"IsGoodTrack: " << mGoodTrk <<
" : " << std::endl
301 <<
"primary : " << trk->
isPrimary() << std::endl
302 <<
"gPtot : " << trk->
gPtot() << std::endl
303 <<
"gPt : " << trk->
gPt() << std::endl
304 <<
"gEta : " << trk->
gMom().Eta() << std::endl;
306 std::cout <<
"Ptot : " << trk->
pMom().Mag() << std::endl
307 <<
"Pt : " << trk->
pMom().Perp() << std::endl
308 <<
"Eta : " << trk->
pMom().Eta() << std::endl;
311 std::cout <<
"nhits : " << trk->
nHits() << std::endl
312 <<
"hitRatio: " << hitRatio << std::endl;
318 void StCentralityAnalyzer::createHistograms() {
319 createEventHistograms();
320 createGlobalTrackHistograms();
321 createPrimaryTrackHistograms();
325 void StCentralityAnalyzer::createEventHistograms() {
326 std::cout <<
"Creating event histograms...";
328 mTree =
new TTree(
"mTree",
"backup tree for refMult correction");
329 mTree->Branch(
"ZDCx", &mTree_ZDCx,
"ZDCx/D");
330 mTree->Branch(
"Vz", &mTree_Vz,
"Vz/D");
331 mTree->Branch(
"refMult", &mTree_refMult,
"refMult/D");
332 mTree->Branch(
"refMultCor", &mTree_refMultCor,
"refMultCor/D");
333 mTree->Branch(
"nBTOFMatched", &mTree_nBTOFMatched,
"nBTOFMatched/D");
335 Int_t refMultBins = 500;
336 Float_t refMult[2] = { 0.0, 500.0 };
337 hRefMult =
new TH1F( Form(
"hRefMult"),
338 Form(
"refMult;refMult;events"),
339 refMultBins, refMult[0], refMult[1]);
340 for ( Int_t iBin=0; iBin<73; iBin++ ) {
343 Float_t zrange[2] = { zmin + iBin*zstep, zmin + (iBin+1)*zstep};
344 hRefMultVtxZ[iBin] =
new TH1F( Form(
"hRefMultVtxZ_%d",iBin),
345 Form(
"Reference multiplicity for %3.1f #leq z #leq %3.1f",zrange[0],zrange[1]),
346 refMultBins, refMult[0], refMult[1] );
348 hGRefMult =
new TH1F( Form(
"hGRefMult"),
349 Form(
"gRefMult;gRefMult;events"),
351 hPrimVertNum =
new TH1F( Form(
"hPrimVertNum"),
352 Form(
"hPrimVertNum;Number of pVtx; events"),
354 hPrimVertZ =
new TH1F( Form(
"hPrimVertZ"), Form(
"hPrimVertZ;z (cm);events/4 cm"), 110, -220., 220.);
355 hPrimVertXvsY =
new TH2F( Form(
"hPrimVertXvsY"),
356 Form(
"hPrimVertXvsY;x (cm);y (cm);events"),
357 40, -10., 10., 40, -10., 10.);
358 hPrimVertVpdVzDiff =
new TH1F( Form(
"hPrimVertVpdVzDiff"),
359 Form(
"hPrimVertVpdVzDiff;Vz_{TPC}-Vz_{VPD} (cm);events"),
361 hRefMultVsTofTrayMult =
new TH2F( Form(
"hRefMultVsTofTrayMult"),
362 Form(
"hRefMultVsTofTrayMult;refMult;btofTrayMultiplicity;events"),
363 650, -0.5, 649.5, 650, -0.5, 649.5 );
364 hRefMultVsTofMatched =
new TH2F( Form(
"hRefMultVsTofMatched"),
365 Form(
"hRefMultVsTofTrayMult;btofMatched;refMult;events"),
366 650, -0.5, 649.5, 650, -0.5, 649.5 );
367 hGRefMultVsTofTrayMult =
new TH2F( Form(
"hGRefMultVsTofTrayMult"),
368 Form(
"hGRefMultVsTofTrayMult;gRefMult;btofTrayMultiplicity;events"),
371 hGRefMultVsTofMatched =
new TH2F( Form(
"hGRefMultVsTofMatched"),
372 Form(
"hGRefMultVsTofTrayMult;gRefMult;BTofMatched;events"),
375 hRefMultVsZdcCoincidenceRate =
new TH2F( Form(
"hRefMultVsZdcCoincidenceRate"),
376 Form(
"hRefMultVsZdcCoincidenceRate;ZdcCoincidenceRate (Hz);refMult"),
377 700, 6000., 15000.,650,-0.5,649.5);
378 hRefMultVsRunNumber =
new TProfile( Form(
"hRefMultVsRunNumber"),
379 Form(
"hRefMultVsRunNumber;runId;<refMult>"),
380 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
381 hAvgRefMultVsZdcCoincidenceRate =
new TProfile( Form(
"hAvgRefMultVsZdcCoincidenceRate"),
382 Form(
"hAvgRefMultVsZdcCoincidenceRate;ZdcCoincidenceRate (Hz);<refMult>"),
384 int Trigs[4]={600001,600011,600021,600031};
385 for(
int iTrig=0; iTrig<4; iTrig++){
386 hAvgRefMultVsZdcCoincidenceRateForTrig[iTrig] =
new TProfile( Form(
"hAvgRefMultVsZdcCoincidenceRateForTrig_%d",Trigs[iTrig]),
387 Form(
"hAvgRefMultVsZdcCoincidenceRate_%d;ZdcCoincidenceRate (Hz);<refMult>",Trigs[iTrig]),
391 hGRefMultVsRunNumber =
new TProfile( Form(
"hGRefMultVsRunNumber"),
392 Form(
"hGRefMultVsRunNumber;runId;<gRefMult>"),
393 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
394 hZdcCoincidenceRateVsRunNumber =
new TProfile( Form(
"hZdcCoincidenceRateVsRunNumber"),
395 Form(
"hZdcCoincidenceRateVsRunNumber;runId;<ZDC coincidence rate> (kHz)"),
396 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
397 hTofTrayMultVsRunNumber =
new TProfile( Form(
"hTofTrayMultVsRunNumber"),
398 Form(
"hTofTrayMultVsRunNumber;runId;btofTrayMult"),
399 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
400 hTofMatchedVsRunNumber =
new TProfile( Form(
"hTofMatchedVsRunNumber"),
401 Form(
"hTofTrayMultVsRunNumber;runId;BTofMatched"),
402 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
404 std::cout <<
"\t[DONE]" << std::endl;
408 void StCentralityAnalyzer::createGlobalTrackHistograms() {
409 std::cout <<
"Creating global track histograms...";
410 hGlobTrackNHitsVsRunNumber =
new TProfile( Form(
"hGlobTrackNHitsVsRunNumber"),
411 Form(
"hGlobTrackNHitsVsRunNumber;runId;primary track <nHits>"),
412 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
413 hGlobTrackDedxVsRunNumber =
new TProfile( Form(
"hGlobTrackDedxVsRunNumber"),
414 Form(
"hGlobTrackDedxVsRunNumber;runId;primary track <dE/dx> (keV/cm)"),
415 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
416 hGlobTrackPtVsRunNumber =
new TProfile( Form(
"hGlobTrackPtVsRunNumber"),
417 Form(
"hGlobTrackPtVsRunNumber;runId;global track <p_T> (GeV/c)"),
418 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
419 std::cout <<
"\t[DONE]" << std::endl;
423 void StCentralityAnalyzer::createPrimaryTrackHistograms() {
424 std::cout <<
"Creating primary track histograms...";
425 hPrimTrackPtVsRunNumber =
new TProfile( Form(
"hPrimTrackPtVsRunNumber"),
426 Form(
"hPrimTrackPtVsRunNumber;runId;primary track <p_T> (GeV/c)"),
427 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
428 hPrimTrackNHitsVsRunNumber =
new TProfile( Form(
"hPrimTrackNHitsVsRunNumber"),
429 Form(
"hPrimTrackNHitsVsRunNumber;runId;primary track <nHits>"),
430 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
431 hPrimTrackDedxVsRunNumber =
new TProfile( Form(
"hPrimTrackDedxVsRunNumber"),
432 Form(
"hPrimTrackDedxVsRunNumber;runId;primary track <dE/dx> (keV/cm)"),
433 mRunIdBins, mRunIdRange[0], mRunIdRange[1] );
434 std::cout <<
"\t[DONE]" << std::endl;
438 const std::vector<unsigned int> StCentralityAnalyzer::bad_run_list_ruru_200gev = {
439 19120009,19102023,19102054,19103022,
440 19083049, 19083050, 19083051, 19083052, 19083053,
441 19083054, 19083055, 19083056, 19083057, 19083058,
442 19083059, 19083060, 19083061, 19083062, 19083063,
443 19083064, 19083065, 19083066, 19083067, 19084001,
444 19084002, 19084003, 19084004, 19084005, 19084006,
445 19084007, 19084008, 19084010, 19084011, 19084013,
446 19084022, 19084024, 19084025, 19084026, 19084027,
447 19084028, 19084029, 19084030, 19084031, 19084032,
448 19084033, 19084034, 19084035, 19084036, 19084037,
449 19084038, 19084039, 19084053, 19084055, 19084057,
450 19084059, 19084060, 19084061, 19084062, 19084063,
451 19084064, 19084065, 19084066, 19084067, 19084068,
452 19084070, 19084071, 19084072, 19085001, 19085002,
453 19085003, 19085004, 19085005, 19085006, 19085007,
454 19085008, 19085009, 19085010, 19085011, 19085012,
455 19085013, 19085014, 19085015, 19085016, 19085017,
456 19085018, 19085019, 19085020, 19085021, 19085023,
457 19085024, 19085025, 19085026, 19085058, 19086026,
458 19086060, 19086061, 19086062, 19086063, 19086064,
459 19086066, 19086067, 19086069, 19086070, 19086072,
460 19086073, 19086074, 19086076, 19086077, 19086080,
461 19087001, 19087012, 19087014, 19087015, 19087016,
462 19087017, 19087021, 19087022, 19087038, 19087042,
463 19088051, 19088052, 19088053, 19088055, 19090009,
464 19090010, 19090011, 19090012, 19090015, 19090016,
465 19090018, 19090019, 19090021, 19090022, 19090023,
466 19090024, 19090025, 19090032, 19092051, 19093042,
467 19093043, 19095061, 19096002, 19096005, 19096006,
468 19096057, 19097057, 19098017, 19098018, 19098020,
469 19100045, 19103007, 19103041, 19105024, 19105026,
470 19106023, 19106034, 19107045, 19110015, 19110039,
471 19112012, 19112029, 19115020, 19116035, 19120047,
472 19120048, 19122004, 19122005
477 const std::vector<unsigned int> StCentralityAnalyzer::bad_run_list_zrzr_200gev = {
478 19120009,19102023,19102054,19103022,
479 19083049, 19083050, 19083051, 19083052, 19083053,
480 19083054, 19083055, 19083056, 19083057, 19083058,
481 19083059, 19083060, 19083061, 19083062, 19083063,
482 19083064, 19083065, 19083066, 19083067, 19084001,
483 19084002, 19084003, 19084004, 19084005, 19084006,
484 19084007, 19084008, 19084010, 19084011, 19084013,
485 19084022, 19084024, 19084025, 19084026, 19084027,
486 19084028, 19084029, 19084030, 19084031, 19084032,
487 19084033, 19084034, 19084035, 19084036, 19084037,
488 19084038, 19084039, 19084053, 19084055, 19084057,
489 19084059, 19084060, 19084061, 19084062, 19084063,
490 19084064, 19084065, 19084066, 19084067, 19084068,
491 19084070, 19084071, 19084072, 19085001, 19085002,
492 19085003, 19085004, 19085005, 19085006, 19085007,
493 19085008, 19085009, 19085010, 19085011, 19085012,
494 19085013, 19085014, 19085015, 19085016, 19085017,
495 19085018, 19085019, 19085020, 19085021, 19085023,
496 19085024, 19085025, 19085026, 19085058, 19086026,
497 19086060, 19086061, 19086062, 19086063, 19086064,
498 19086066, 19086067, 19086069, 19086070, 19086072,
499 19086073, 19086074, 19086076, 19086077, 19086080,
500 19087001, 19087012, 19087014, 19087015, 19087016,
501 19087017, 19087021, 19087022, 19087038, 19087042,
502 19088051, 19088052, 19088053, 19088055, 19090009,
503 19090010, 19090011, 19090012, 19090015, 19090016,
504 19090018, 19090019, 19090021, 19090022, 19090023,
505 19090024, 19090025, 19090032, 19092051, 19093042,
506 19093043, 19095061, 19096002, 19096005, 19096006,
507 19096057, 19097057, 19098017, 19098018, 19098020,
508 19100045, 19103007, 19103041, 19105024, 19105026,
509 19106023, 19106034, 19107045, 19110015, 19110039,
510 19112012, 19112029, 19115020, 19116035, 19120047,
511 19120048, 19122004, 19122005
516 Double_t StCentralityAnalyzer::getRefMultCorrVz(Double_t RefMult, Double_t Vz){
518 const Double_t RefMult_ref = m_vzCorr0;
519 const Double_t RefMult_z = m_vzCorr0
520 + m_vzCorr1*Vz + m_vzCorr2*pow(Vz, 2)
521 + m_vzCorr3*pow(Vz, 3) + m_vzCorr4*pow(Vz, 4)
522 + m_vzCorr5*pow(Vz, 5) + m_vzCorr6*pow(Vz, 6);
524 Double_t ScaleFactor = 1.0;
527 ScaleFactor = RefMult_ref / RefMult_z;
530 return RefMult * ScaleFactor;
535 Double_t StCentralityAnalyzer::getShapeWeight(Double_t Vz, Double_t RefMult){
538 if(Vz>=-9 && Vz<=9)
return 1.;
540 Double_t VtxZBinDouble = Vz/2. + 17.;
542 if(Vz == 25.) VzIndex = 29;
543 else if(Vz == -35.) VzIndex = 0;
544 else VzIndex = TMath::Nint(VtxZBinDouble);
546 if(VzIndex >= 22) VzIndex = VzIndex - 9;
548 Double_t weight = ShapeWeightArray[mShapeIndex][VzIndex][TMath::Nint(RefMult)];
550 if(weight == 0 || TMath::IsNaN(weight)) weight = 1.;
Float_t gPtot() const
Return global total momentum (GeV/c)
Bool_t isPrimary() const
Return if track is primary.
Bool_t readPicoEvent(Long64_t iEvent)
Read next event in the chain.
Allows to read picoDst file(s)
UShort_t nBTOFMatch() const
Return number of tracks that matched TOF.
void Clear(Option_t *option="")
User defined functions.
StPicoDst * picoDst()
Return a pointer to picoDst (return NULL if no dst is found)
virtual void Clear(Option_t *option="")
User defined functions.
TVector3 gMom() const
Return momentum (GeV/c) of the global tracks at the point of DCA to the primary vertex.
static StPicoEvent * event()
Return pointer to current StPicoEvent (class holding the event wise information)
Holds information about track parameters.
Process and build distributions for centrality determination.
static UInt_t numberOfTracks()
Return number of tracks.
Float_t vzVpd() const
Return z position of the primary vertex estimated by VPD.
Float_t gPt() const
Return global tranverse momentum (GeV/c)
TVector3 pMom() const
Return momentum (GeV/c) of the primary track. Return (0,0,0) if not primary track.
Int_t refMult() const
Return RefMult (-0.5<eta<0.5)
static StPicoTrack * track(Int_t i)
Return pointer to i-th track.
Int_t nHitsFit() const
Return number of hits fit.
Stores global information about the event.
std::vector< unsigned int > triggerIds() const
Return trigger list of the current event.
Int_t nHitsMax() const
Return number of hits possible.
Int_t nHits() const
Return number of hits.
TVector3 primaryVertex() const
Return primary vertex position.