19 #include "StFlowMaker.h"
20 #include "StFlowEvent.h"
21 #include "StFlowPicoEvent.h"
22 #include "StFlowCutEvent.h"
23 #include "StFlowCutTrack.h"
24 #include "StFlowSelection.h"
25 #include "StFlowConstants.h"
26 #include "PhysicalConstants.h"
27 #include "SystemOfUnits.h"
29 #include "StEventTypes.h"
30 #include "StThreeVector.hh"
31 #include "StIOMaker/StIOMaker.h"
40 #include "TProfile2D.h"
41 #include "StuRefMult.hh"
42 #include "StPionPlus.hh"
43 #include "StPionMinus.hh"
44 #include "StProton.hh"
45 #include "StKaonMinus.hh"
46 #include "StKaonPlus.hh"
47 #include "StAntiProton.hh"
48 #include "StDeuteron.hh"
49 #include "StElectron.hh"
50 #include "StPositron.hh"
51 #include "StTpcDedxPidAlgorithm.h"
52 #include "StuProbabilityPidAlgorithm.h"
53 #include "StMessMgr.h"
54 #include "StMuDSTMaker/COMMON/StMuEvent.h"
55 #include "StMuDSTMaker/COMMON/StMuTrack.h"
58 #include "StHbtMaker/StHbtMaker.h"
59 #include "StHbtMaker/Infrastructure/StHbtTrack.hh"
60 #define PR(x) cout << "##### FlowMaker: " << (#x) << " = " << (x) << endl;
68 mPicoEventWrite(kFALSE), mPicoEventRead(kFALSE), mMuEventRead(kFALSE),
71 SetPicoEventDir(
"./");
72 StMuTrack::Class()->IgnoreTObjectStreamer();
73 StMuHelix::Class()->IgnoreTObjectStreamer();
77 StFlowMaker::StFlowMaker(
const Char_t* name,
80 mPicoEventWrite(kFALSE), mPicoEventRead(kFALSE), mMuEventRead(kFALSE),
83 SetPicoEventDir(
"./");
84 StMuTrack::Class()->IgnoreTObjectStreamer();
85 StMuHelix::Class()->IgnoreTObjectStreamer();
91 StFlowMaker::~StFlowMaker() {
97 if (Debug()) gMessMgr->Info() <<
"FlowMaker: Make() " << endm;
100 if (pFlowEvent)
delete pFlowEvent;
104 if (!mPicoEventRead && pIOMaker) {
105 mEventFileName = strrchr(pIOMaker->GetFile(),
'/')+1;
107 gMessMgr->Info() <<
"FlowMaker: filename: " << mEventFileName << endm;
108 gMessMgr->Info() <<
"FlowMaker: Old filename: " << mEventFileNameOld << endm;
112 if (mEventFileName != mEventFileNameOld) {
114 if (Debug()) gMessMgr->Info() <<
"##### FlowMaker: " << mEventFileName << endm;
115 if (mPicoEventWrite) {
116 if (pPicoDST->IsOpen()) {
117 pPicoDST->Write(0, TObject::kOverwrite);
120 if (pPicoEvent)
delete pPicoEvent;
121 if (pPicoDST)
delete pPicoDST;
124 InitPicoEventWrite();
126 mEventFileNameOld = mEventFileName;
132 if (!pFlowEvent)
return kStOK;
135 if (mPicoEventRead) {
136 if (!FillFromPicoDST(pPicoEvent))
return kStEOF;
137 if (!pFlowEvent)
return kStOK;
139 }
else if (mMuEventRead) {
140 pMu = (
StMuDst*)GetInputDS(
"MuDst");
142 pMuEvent = pMu->
event();
145 if (!FillFromMuDST())
return kStEOF;
146 if (!pFlowEvent)
return kStOK;
147 if (mPicoEventWrite) FillPicoEvent();
151 pEvent =
dynamic_cast<StEvent*
>(GetInputDS(
"StEvent"));
153 if (Debug()) { gMessMgr->Info() <<
"FlowMaker: no StEvent " << endm; }
157 if (StFlowCutEvent::CheckEvent(pEvent)) {
159 if (!pFlowEvent)
return kStOK;
160 if (mPicoEventWrite) FillPicoEvent();
162 Long_t eventID = pEvent->id();
163 gMessMgr->Info() <<
"##### FlowMaker: event " << eventID
170 UInt_t flowEventMult;
171 if (!pFlowEvent) { flowEventMult = 0; }
172 else { flowEventMult = pFlowEvent->FlowEventMult(); }
176 int runID = pFlowEvent->RunID();
177 if (runID != mRunID) {
178 double beamEnergy = pFlowEvent->CenterOfMassEnergy();
179 double magneticField = pFlowEvent->MagneticField();
180 short beamMassE = pFlowEvent->BeamMassNumberEast();
181 short beamMassW = pFlowEvent->BeamMassNumberWest();
182 if (Debug()) gMessMgr->Info() <<
"##### FlowMaker: " << runID <<
", " <<
183 beamEnergy <<
" GeV/A " << beamMassE <<
"+" << beamMassW <<
184 ", B= " << magneticField << endm;
186 if (pFlowEvent->UseZDCSMD()) {
187 Float_t RawZDCSMD[2][2][8];
189 for (
int strip=1; strip<9; strip++) {
190 RawZDCSMD[0][1][strip-1] = (pFlowEvent->ZDCSMD(0,1,strip))*
191 Flow::zdcsmdGainFac[0][1][strip-1] +
mZDCSMDPed[0][1][strip-1];
192 RawZDCSMD[0][0][strip-1] = (pFlowEvent->ZDCSMD(0,0,strip))*
193 Flow::zdcsmdGainFac[0][0][strip-1] +
mZDCSMDPed[0][0][strip-1];
194 RawZDCSMD[1][1][strip-1] = (pFlowEvent->ZDCSMD(1,1,strip))*
195 Flow::zdcsmdGainFac[1][1][strip-1] +
mZDCSMDPed[1][1][strip-1];
196 RawZDCSMD[1][0][strip-1] = (pFlowEvent->ZDCSMD(1,0,strip))*
197 Flow::zdcsmdGainFac[1][0][strip-1] +
mZDCSMDPed[1][0][strip-1];
200 for (
int strip=1; strip<9; strip++) {
201 ey = (RawZDCSMD[0][1][strip-1] -
mZDCSMDPed[0][1][strip-1])/
202 Flow::zdcsmdGainFac[0][1][strip-1];
203 ex = (RawZDCSMD[0][0][strip-1] -
mZDCSMDPed[0][0][strip-1])/
204 Flow::zdcsmdGainFac[0][0][strip-1];
205 wy = (RawZDCSMD[1][1][strip-1] -
mZDCSMDPed[1][1][strip-1])/
206 Flow::zdcsmdGainFac[1][1][strip-1];
207 wx = (RawZDCSMD[1][0][strip-1] -
mZDCSMDPed[1][0][strip-1])/
208 Flow::zdcsmdGainFac[1][0][strip-1];
209 if (!mPicoEventRead) {
210 pFlowEvent->SetZDCSMD(0,1,strip,ey);
211 pFlowEvent->SetZDCSMD(0,0,strip,ex);
212 pFlowEvent->SetZDCSMD(1,0,strip,wx);
213 pFlowEvent->SetZDCSMD(1,1,strip,wy);
219 for (
int i=0; i<2; i++)
for (
int j=0; j<2; j++)
for (
int k=1; k<9; k++)
220 pPicoEvent->SetZDCSMD(i,j,k,pFlowEvent->ZDCSMD(i,j,k));
225 if (Debug()) StMaker::PrintInfo();
232 Int_t StFlowMaker::Init() {
235 gMessMgr->MemoryOn();
236 gMessMgr->SetLimit(
"##### FlowMaker", 5);
237 gMessMgr->Info(
"##### FlowMaker: $Id: StFlowMaker.cxx,v 1.119 2010/09/30 19:30:28 posk Exp $");
239 if (Debug()) gMessMgr->Info() <<
"FlowMaker: Init()" << endm;
245 if (!mPicoEventRead || !mMuEventRead) {
249 mEventFileNameOld = mEventFileName;
252 StuProbabilityPidAlgorithm::readParametersFromFile(
"PIDTable.root");
254 Int_t kRETURN =
kStOK;
255 if (mPicoEventWrite) kRETURN += InitPicoEventWrite();
256 if (mPicoEventRead) kRETURN += InitPicoEventRead();
257 if (mMuEventRead) kRETURN += InitMuEventRead();;
259 if (kRETURN) gMessMgr->Info() <<
"##### FlowMaker: Init return = " << kRETURN << endm;
265 Int_t StFlowMaker::InitRun(
int runID) {
266 if (Debug()) gMessMgr->Info() <<
"FlowMaker: InitRun()" << endm;
275 if (Debug()) gMessMgr->Info() <<
"FlowMaker: Finish()" << endm;
279 gMessMgr->Summary(3);
284 cout <<
"#######################################################" << endl;
285 cout <<
"##### Finish time: " << now.AsString() << endl;
288 pFlowSelect->PrintList();
291 cout <<
"#######################################################" << endl;
292 cout <<
"##### FlowMaker: Cut Lists" << endl;
293 StFlowCutEvent::PrintCutList();
294 StFlowCutTrack::PrintCutList();
295 pFlowEvent->PrintSelectionList();
297 if (mPicoEventWrite && pPicoDST->IsOpen()) {
298 pPicoDST->Write(0, TObject::kOverwrite);
307 Int_t StFlowMaker::ReadPhiWgtFile() {
310 if (Debug()) gMessMgr->Info() <<
"FlowMaker: ReadPhiWgtFile()" << endm;
312 TDirectory* dirSave = gDirectory;
313 TFile* pPhiWgtFile =
new TFile(
"flowPhiWgt.hist.root",
"READ");
314 if (!pPhiWgtFile->IsOpen() || !mPhiWgtCalc) {
315 gMessMgr->Info(
"##### FlowMaker: No PhiWgt, will set weights = 1.");
317 if (!pPhiWgtFile->IsOpen() && mPhiWgtCalc) {
318 gMessMgr->Info(
"##### FlowMaker: Calculating PhiWgts");
320 gDirectory = dirSave;
323 if (pPhiWgtFile->IsOpen() && mPhiWgtCalc) {
324 gMessMgr->Info(
"##### FlowMaker: PhiWgt flattening being done");
325 TText* textInfo =
dynamic_cast<TText*
>(pPhiWgtFile->Get(
"info"));
327 mFirstLastPhiWgt = kTRUE;
328 gMessMgr->Info(
"##### FlowMaker: File uses z of first-last points");
329 cout <<
"##### FlowMaker: PhiWgt file written with " ;
332 gMessMgr->Info(
"##### FlowMaker: File uses vertex z and eta");
337 for (
int k = 0; k < Flow::nSels; k++) {
338 for (
int j = 0; j < 2; j++) {
340 TString* histTitleFarEast =
new TString(
"Flow_Phi_Weight_FarEast_Sel");
341 *histTitleFarEast += k+1;
342 histTitleFarEast->Append(
"_Har");
343 *histTitleFarEast += j+1;
345 TString* histTitleEast =
new TString(
"Flow_Phi_Weight_East_Sel");
346 *histTitleEast += k+1;
347 histTitleEast->Append(
"_Har");
348 *histTitleEast += j+1;
350 TString* histTitleWest =
new TString(
"Flow_Phi_Weight_West_Sel");
351 *histTitleWest += k+1;
352 histTitleWest->Append(
"_Har");
353 *histTitleWest += j+1;
355 TString* histTitleFarWest =
new TString(
"Flow_Phi_Weight_FarWest_Sel");
356 *histTitleFarWest += k+1;
357 histTitleFarWest->Append(
"_Har");
358 *histTitleFarWest += j+1;
360 TString* histTitleFtpcFarEast =
new TString(
"Flow_Phi_Weight_FtpcFarEast_Sel");
361 *histTitleFtpcFarEast += k+1;
362 histTitleFtpcFarEast->Append(
"_Har");
363 *histTitleFtpcFarEast += j+1;
365 TString* histTitleFtpcEast =
new TString(
"Flow_Phi_Weight_FtpcEast_Sel");
366 *histTitleFtpcEast += k+1;
367 histTitleFtpcEast->Append(
"_Har");
368 *histTitleFtpcEast += j+1;
370 TString* histTitleFtpcWest =
new TString(
"Flow_Phi_Weight_FtpcWest_Sel");
371 *histTitleFtpcWest += k+1;
372 histTitleFtpcWest->Append(
"_Har");
373 *histTitleFtpcWest += j+1;
375 TString* histTitleFtpcFarWest =
new TString(
"Flow_Phi_Weight_FtpcFarWest_Sel");
376 *histTitleFtpcFarWest += k+1;
377 histTitleFtpcFarWest->Append(
"_Har");
378 *histTitleFtpcFarWest += j+1;
379 if (pPhiWgtFile->IsOpen() && mPhiWgtCalc) {
380 TH1* phiWgtHistFarEast =
dynamic_cast<TH1*
>(pPhiWgtFile->
381 Get(histTitleFarEast->Data()));
382 TH1* phiWgtHistEast =
dynamic_cast<TH1*
>(pPhiWgtFile->
383 Get(histTitleEast->Data()));
384 TH1* phiWgtHistWest =
dynamic_cast<TH1*
>(pPhiWgtFile->
385 Get(histTitleWest->Data()));
386 TH1* phiWgtHistFarWest =
dynamic_cast<TH1*
>(pPhiWgtFile->
387 Get(histTitleFarWest->Data()));
388 for (
int n = 0; n < Flow::nPhiBins; n++) {
390 phiWgtHistFarEast->GetBinContent(n+1) : 1.;
392 phiWgtHistEast->GetBinContent(n+1) : 1.;
394 phiWgtHistWest->GetBinContent(n+1) : 1.;
396 phiWgtHistFarWest->GetBinContent(n+1) : 1.;
398 TH1* phiWgtHistFtpcFarEast =
dynamic_cast<TH1*
>(pPhiWgtFile->
399 Get(histTitleFtpcFarEast->Data()));
400 TH1* phiWgtHistFtpcEast =
dynamic_cast<TH1*
>(pPhiWgtFile->
401 Get(histTitleFtpcEast->Data()));
402 TH1* phiWgtHistFtpcWest =
dynamic_cast<TH1*
>(pPhiWgtFile->
403 Get(histTitleFtpcWest->Data()));
404 TH1* phiWgtHistFtpcFarWest =
dynamic_cast<TH1*
>(pPhiWgtFile->
405 Get(histTitleFtpcFarWest->Data()));
406 for (
int n = 0; n < Flow::nPhiBinsFtpc; n++) {
408 phiWgtHistFtpcFarEast->GetBinContent(n+1) : 1.;
410 phiWgtHistFtpcEast->GetBinContent(n+1) : 1.;
412 phiWgtHistFtpcWest->GetBinContent(n+1) : 1.;
414 phiWgtHistFtpcFarWest->GetBinContent(n+1) : 1.;
418 for (
int n = 0; n < Flow::nPhiBins; n++) {
419 mPhiWgt[k][j][n] = 1.;
426 for (
int n = 0; n < Flow::nPhiBinsFtpc; n++) {
435 delete histTitleFarEast;
436 delete histTitleEast;
437 delete histTitleWest;
438 delete histTitleFarWest;
439 delete histTitleFtpcFarEast;
440 delete histTitleFtpcEast;
441 delete histTitleFtpcWest;
442 delete histTitleFtpcFarWest;
447 if (pPhiWgtFile->IsOpen()) {
448 TH1* mZDCSMDPsiWest = (TH1*)pPhiWgtFile->Get(
"Flow_ZDCSMDPsiWgtWest");
449 TH1* mZDCSMDPsiEast = (TH1*)pPhiWgtFile->Get(
"Flow_ZDCSMDPsiWgtEast");
450 TH1* mZDCSMDPsiFull = (TH1*)pPhiWgtFile->Get(
"Flow_ZDCSMDPsiWgtFull");
451 if (mZDCSMDPsiWest && mZDCSMDPsiEast) {
452 Float_t mZDCSMDPsiWest_mean = (mZDCSMDPsiWest->Integral())/(mZDCSMDPsiWest->GetNbinsX());
453 Float_t mZDCSMDPsiEast_mean = (mZDCSMDPsiEast->Integral())/(mZDCSMDPsiEast->GetNbinsX());
454 for (
int n = 0; n < Flow::zdcsmd_nPsiBins; n++) {
456 mZDCSMDPsiWest_mean/(mZDCSMDPsiWest->GetBinContent(n+1)):1.;
458 mZDCSMDPsiEast_mean/(mZDCSMDPsiEast->GetBinContent(n+1)):1.;
460 if (mZDCSMDPsiFull) {
461 Float_t mZDCSMDPsiFull_mean = (mZDCSMDPsiFull->Integral())/(mZDCSMDPsiFull->GetNbinsX());
462 for (
int n = 0; n < Flow::zdcsmd_nPsiBins; n++) {
464 mZDCSMDPsiFull_mean/(mZDCSMDPsiFull->GetBinContent(n+1)):1.;
467 for (
int n=0;n < Flow::zdcsmd_nPsiBins;n++) {
472 for (
int n=0;n < Flow::zdcsmd_nPsiBins;n++) {
479 for (
int n=0;n < Flow::zdcsmd_nPsiBins;n++) {
487 if (pPhiWgtFile->IsOpen()) pPhiWgtFile->Close();
494 Int_t StFlowMaker::ReadReCentFile() {
497 if (Debug()) gMessMgr->Info() <<
"FlowMaker: ReadReCentFile()" << endm;
499 TDirectory* dirSave = gDirectory;
500 TFile* pReCentFile =
new TFile(
"flow.reCentAna.root",
"READ");
501 if (pReCentFile->IsOpen() && mReCentCalc) {
502 gMessMgr->Info(
"##### FlowMaker: ReCentering being done.");
505 gMessMgr->Info(
"##### FlowMaker: Calculating ReCentering parameters.");
507 gMessMgr->Info(
"##### FlowMaker: Will set ReCentering parameters = 0.");
509 gDirectory = dirSave;
512 if (pReCentFile->IsOpen() && mReCentCalc) {
513 for (
int k = 0; k < Flow::nSels; k++) {
514 for (
int j = 0; j < Flow::nHars; j++) {
515 TString* histTitleTPC_x =
new TString(
"FlowReCentX_Sel");
516 *histTitleTPC_x += k+1;
517 *histTitleTPC_x +=
"_Har";
518 *histTitleTPC_x += j+1;
519 TString* histTitleTPC_y =
new TString(
"FlowReCentY_Sel");
520 *histTitleTPC_y += k+1;
521 *histTitleTPC_y +=
"_Har";
522 *histTitleTPC_y += j+1;
523 TProfile* histCentX =
dynamic_cast<TProfile*
>(pReCentFile->Get(histTitleTPC_x->Data()));
524 TProfile* histCentY =
dynamic_cast<TProfile*
>(pReCentFile->Get(histTitleTPC_y->Data()));
525 if (!histCentX || !histCentY) {
526 gMessMgr->Info(
"##### FlowMaker: No ReCent hists.");
528 for (
int n = 0; n < 4; n++) {
529 mReCentX[k][j][n] = (histCentX) ? histCentX->GetBinContent(n+1) : 0.;
530 mReCentY[k][j][n] = (histCentY) ? histCentY->GetBinContent(n+1) : 0.;
533 delete histTitleTPC_x;
534 delete histTitleTPC_y;
538 for (
int k = 0; k < Flow::nSels; k++) {
539 for (
int j = 0; j < Flow::nHars; j++) {
540 for (
int n = 0; n < 4; n++) {
549 if (pReCentFile->IsOpen()) pReCentFile->Close();
556 Int_t StFlowMaker::ReadZDCSMDFile() {
559 if (Debug()) gMessMgr->Info() <<
"FlowMaker: ReadZDCSMDFile()" << endm;
561 TDirectory* dirSave = gDirectory;
562 TFile* pZDCSMDConstFile =
new TFile(
"zdcsmdConstants.root",
"READ");
563 if (!pZDCSMDConstFile->IsOpen()) {
564 gMessMgr->Info(
"##### FlowMaker: No ZDCSMD constant file. Will use default.");
565 }
else { gMessMgr->Info(
"##### FlowMaker: ZDCSMD constant file read."); }
566 gDirectory = dirSave;
567 int mRealRunID = mRunID;
568 Double_t HistTest = 0.;
569 if (pZDCSMDConstFile->IsOpen()) {
570 TH2* mZDCSMDBeamCenter2D = (TH2D *)pZDCSMDConstFile->Get(
"ZDCSMDBeamCenter");
571 while (HistTest < 1.) {
572 HistTest = mZDCSMDBeamCenter2D->GetBinContent(1,mRealRunID-5050000);
573 if (HistTest > 1.)
break;
575 if (mRealRunID < 5050000)
break;
577 if (mRealRunID < 5050000) {
579 mZDCSMDCenterEy = Flow::zdcsmd_ey0;
581 mZDCSMDCenterWy = Flow::zdcsmd_wy0;
584 mZDCSMDCenterEy = mZDCSMDBeamCenter2D->GetBinContent(2,mRealRunID-5050000);
585 mZDCSMDCenterWx = mZDCSMDBeamCenter2D->GetBinContent(3,mRealRunID-5050000);
586 mZDCSMDCenterWy = mZDCSMDBeamCenter2D->GetBinContent(4,mRealRunID-5050000);
590 mZDCSMDCenterEy = Flow::zdcsmd_ey0;
592 mZDCSMDCenterWy = Flow::zdcsmd_wy0;
594 if (pZDCSMDConstFile->IsOpen()) {
597 TH2* mZDCSMDPed2D = (TH2D*)pZDCSMDConstFile->Get(
"ZDCSMDPedestal");
598 while(HistTest < .1) {
599 HistTest = mZDCSMDPed2D->GetBinContent(1,mRealRunID-5050000);
600 if (HistTest > .1)
break;
602 if (mRealRunID < 5050000)
break;
604 if (mRealRunID < 5050000) {
605 for (
int i=0;i<2;i++) {
for (
int j=0;j<2;j++){
for (
int k=0;k<8;k++) {
606 mZDCSMDPed[i][j][k] = Flow::zdcsmdPedstal[i][j][k];
609 int zdcsmd_map[2][2][8] = {
610 { { 7, 6, 5, 4, 3, 2, 1, 11} ,
611 { 0,15,14,13,12,8,10, 9} } ,
612 { {23,22,21,20,19,18,17,(mRealRunID < 8083000)?24:26} ,
613 {16,31,30,29,28,27,(mRealRunID < 8083000)?26:24,25} }
615 for (
int i=0;i<2;i++) {
for (
int j=0;j<2;j++){
for (
int k=0;k<8;k++) {
616 mZDCSMDPed[i][j][k] = mZDCSMDPed2D->GetBinContent(zdcsmd_map[i][j][k]+1,
621 for (
int i=0;i<2;i++) {
for (
int j=0;j<2;j++){
for (
int k=0;k<8;k++) {
622 mZDCSMDPed[i][j][k] = Flow::zdcsmdPedstal[i][j][k];
627 if (pZDCSMDConstFile->IsOpen()) pZDCSMDConstFile->Close();
634 void StFlowMaker::FillFlowEvent() {
637 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillFlowEvent()" << endm;
640 if (mFirstLastPhiWgt) pFlowEvent->SetFirstLastPhiWgt();
649 pFlowEvent->SetFirstLastPoints();
661 pFlowEvent->SetEventID((Int_t)(pEvent->id()));
662 pFlowEvent->SetRunID((Int_t)(pEvent->runId()));
664 if (pEvent->runInfo()) {
665 pFlowEvent->SetCenterOfMassEnergy(pEvent->runInfo()->centerOfMassEnergy());
666 pFlowEvent->SetMagneticField(pEvent->runInfo()->magneticField());
667 pFlowEvent->SetBeamMassNumberEast(pEvent->runInfo()->beamMassNumber(east));
668 pFlowEvent->SetBeamMassNumberWest(pEvent->runInfo()->beamMassNumber(west));
670 gMessMgr->Info() <<
"FlowMaker: no Run Info, reverting to year 1 settings "
672 pFlowEvent->SetCenterOfMassEnergy(130);
673 pFlowEvent->SetMagneticField(4.98);
674 pFlowEvent->SetBeamMassNumberEast(197);
675 pFlowEvent->SetBeamMassNumberWest(197);
679 if (pEvent->runId() > 4000000) {
680 pFlowEvent->SetL0TriggerWord(StFlowCutEvent::TriggersFound());
683 if (pTrigger) { pFlowEvent->SetL0TriggerWord(pTrigger->triggerWord()); }
688 pFlowEvent->SetVertexPos(vertex);
694 Float_t zdcsmdEastHorizontal = -1.;
695 Float_t zdcsmdEastVertical = -1.;
696 Float_t zdcsmdWestHorizontal = -1.;
697 Float_t zdcsmdWestVertical = -1.;
703 for (UInt_t slat = 0; slat < CTB.numberOfSlats(); slat++) {
704 for (UInt_t tray = 0; tray < CTB.numberOfTrays(); tray++) {
705 ctb += CTB.mips(tray,slat,0);
709 zdce = ZDC.adcSum(east);
710 zdcw = ZDC.adcSum(west);
712 for (
int strip=1;strip<9;strip++) {
713 if (ZDC.zdcSmd(east,1,strip)) {
714 zdcsmdEastHorizontal = (ZDC.zdcSmd(east,1,strip)
715 -
mZDCSMDPed[0][1][strip-1])/Flow::zdcsmdGainFac[0][1][strip-1];
716 pFlowEvent->SetZDCSMD(0,1,strip,zdcsmdEastHorizontal);
718 if (ZDC.zdcSmd(east,0,strip)) {
719 zdcsmdEastVertical = (ZDC.zdcSmd(east,0,strip)
720 -
mZDCSMDPed[0][0][strip-1])/Flow::zdcsmdGainFac[0][0][strip-1];
721 pFlowEvent->SetZDCSMD(0,0,strip,zdcsmdEastVertical);
723 if (ZDC.zdcSmd(west,1,strip)) {
724 zdcsmdWestHorizontal = (ZDC.zdcSmd(west,1,strip)
725 -
mZDCSMDPed[1][1][strip-1])/Flow::zdcsmdGainFac[1][1][strip-1];
726 pFlowEvent->SetZDCSMD(1,1,strip,zdcsmdWestHorizontal);
728 if (ZDC.zdcSmd(west,0,strip)) {
729 zdcsmdWestVertical = (ZDC.zdcSmd(west,0,strip)
730 -
mZDCSMDPed[1][0][strip-1])/Flow::zdcsmdGainFac[1][0][strip-1];
731 pFlowEvent->SetZDCSMD(1,0,strip,zdcsmdWestVertical);
735 pFlowEvent->SetCTB(ctb);
736 pFlowEvent->SetZDCe(zdce);
737 pFlowEvent->SetZDCw(zdcw);
740 UInt_t origMult = pEvent->primaryVertex(0)->numberOfDaughters();
741 pFlowEvent->SetOrigMult(origMult);
743 pFlowEvent->SetUncorrNegMult(uncorrectedNumberOfNegativePrimaries(*pEvent));
744 pFlowEvent->SetUncorrPosMult(uncorrectedNumberOfPositivePrimaries(*pEvent));
751 int goodTracksEta = 0;
756 StSPtrVecTrackNode& trackNode = pEvent->trackNodes();
758 for (
unsigned int j=0; j < trackNode.size(); j++) {
767 if (pTrack && pTrack->flag() > 0) {
771 if (fabs(p.pseudoRapidity()) < 0.75) goodTracksEta++;
772 if (StFlowCutTrack::CheckTrack(pTrack)) {
775 if (!pFlowTrack)
return;
776 pFlowTrack->SetPhi(p.phi());
777 pFlowTrack->SetPhiGlobal(g.phi());
778 pFlowTrack->SetEta(p.pseudoRapidity());
779 pFlowTrack->SetEtaGlobal(g.pseudoRapidity());
780 pFlowTrack->SetPt(p.perp());
781 pFlowTrack->SetPtGlobal(g.perp());
782 pFlowTrack->SetCharge(pTrack->geometry()->charge());
784 dcaSigned = CalcDcaSigned(vertex,gTrack);
785 pFlowTrack->SetDcaSigned(dcaSigned);
786 pFlowTrack->SetDca(pTrack->impactParameter());
787 pFlowTrack->SetDcaGlobal(gTrack->impactParameter());
788 pFlowTrack->SetChi2((Float_t)(pTrack->fitTraits().chi2()));
789 pFlowTrack->SetTopologyMap(pTrack->topologyMap());
791 pFlowTrack->SetNhits(pTrack->detectorInfo()->numberOfPoints());
792 pFlowTrack->SetFitPts(pTrack->fitTraits().numberOfFitPoints() -
793 pTrack->fitTraits().numberOfFitPoints(kSvtId) -
794 pTrack->fitTraits().numberOfFitPoints(kSsdId) - 1);
795 pFlowTrack->SetMaxPts(pTrack->numberOfPossiblePoints() -
796 pTrack->numberOfPossiblePoints(kSvtId) -
797 pTrack->numberOfPossiblePoints(kSsdId) - 1);
799 Double_t pathLength = gTrack->geometry()->helix().
pathLength(vertex);
800 StThreeVectorD distance = gTrack->geometry()->helix().at(pathLength);
801 pFlowTrack->SetDcaGlobal3(distance - vertex);
803 pFlowTrack->SetTrackLength(pTrack->length());
805 if (pTrack->topologyMap().hasHitInDetector(kFtpcEastId) ||
806 pTrack->topologyMap().hasHitInDetector(kFtpcWestId)) {
807 pFlowTrack->SetZFirstPoint(pTrack->detectorInfo()->firstPoint().z());
808 pFlowTrack->SetZLastPoint(pTrack->detectorInfo()->lastPoint().z());
811 else if (pTrack->topologyMap().hasHitInDetector(kTpcId)) {
812 Double_t innerFieldCageRadius = 46.107;
813 Double_t innerPadrowRadius = 60.0;
816 pFlowTrack->SetZLastPoint(pTrack->detectorInfo()->lastPoint().z());
818 x = pTrack->detectorInfo()->firstPoint().x();
819 y = pTrack->detectorInfo()->firstPoint().y();
820 if (TMath::Sqrt(x*x+y*y) >= innerFieldCageRadius) {
821 pFlowTrack->SetZFirstPoint(pTrack->detectorInfo()->firstPoint().z());
823 pairD pathL = pTrack->geometry()->helix().
pathLength(innerPadrowRadius);
826 Double_t s1 = pathL.first;
827 Double_t s2 = pathL.second;
832 if (finite(s1) != 0 || finite(s2) != 0) {
833 if (s1 >= 0 && s2 >= 0) s = s1;
834 else if (s1 >= 0 && s2 < 0) s = s1;
835 else if (s1 < 0 && s2 >= 0) s = s2;
836 pFlowTrack->SetZFirstPoint(pTrack->geometry()->helix().z(s));
838 pFlowTrack->SetZFirstPoint(0.);
843 pTrack->pidTraits(tpcDedxAlgo);
844 nSigma = (float)tpcDedxAlgo.numberOfSigma(StPionPlus::instance());
845 pFlowTrack->SetPidPiPlus(nSigma);
846 nSigma = (float)tpcDedxAlgo.numberOfSigma(StPionMinus::instance());
847 pFlowTrack->SetPidPiMinus(nSigma);
848 nSigma = (float)tpcDedxAlgo.numberOfSigma(StProton::instance());
849 pFlowTrack->SetPidProton(nSigma);
850 nSigma = (float)tpcDedxAlgo.numberOfSigma(StAntiProton::instance());
851 pFlowTrack->SetPidAntiProton(nSigma);
852 nSigma = (float)tpcDedxAlgo.numberOfSigma(StKaonMinus::instance());
853 pFlowTrack->SetPidKaonMinus(nSigma);
854 nSigma = (float)tpcDedxAlgo.numberOfSigma(StKaonPlus::instance());
855 pFlowTrack->SetPidKaonPlus(nSigma);
856 nSigma = (float)tpcDedxAlgo.numberOfSigma(StDeuteron::instance());
857 pFlowTrack->SetPidDeuteron(nSigma);
858 if (pTrack->geometry()->charge() < 0) {
859 pFlowTrack->SetPidAntiDeuteron(nSigma);
861 nSigma = (float)tpcDedxAlgo.numberOfSigma(StElectron::instance());
862 pFlowTrack->SetPidElectron(nSigma);
863 nSigma = (float)tpcDedxAlgo.numberOfSigma(StPositron::instance());
864 pFlowTrack->SetPidPositron(nSigma);
867 StPtrVecTrackPidTraits traits = pTrack->pidTraits(kTpcId);
868 unsigned int size = traits.size();
871 for (
unsigned int i = 0; i < traits.size(); i++) {
873 if (pid && pid->method() == kTruncatedMeanId)
break;
876 pFlowTrack->SetDedx(pid->mean());
877 pFlowTrack->SetNdedxPts(pid->numberOfPoints());
882 (
void*)pTrack->pidTraits(uPid);
883 pFlowTrack->SetMostLikelihoodPID(uPid.mostLikelihoodParticleGeantID());
884 pFlowTrack->SetMostLikelihoodProb(uPid.mostLikelihoodProbability());
885 if (uPid.isExtrap()) pFlowTrack->SetExtrapTag(1);
886 else pFlowTrack->SetExtrapTag(0);
887 if (pTrack->geometry()->charge() < 0) {
888 pFlowTrack->SetElectronPositronProb(uPid.beingElectronProb());
889 pFlowTrack->SetPionPlusMinusProb(uPid.beingPionMinusProb());
890 pFlowTrack->SetKaonPlusMinusProb(uPid.beingKaonMinusProb());
891 pFlowTrack->SetProtonPbarProb(uPid.beingAntiProtonProb());
892 }
else if (pTrack->geometry()->charge() > 0) {
893 pFlowTrack->SetElectronPositronProb(uPid.beingPositronProb());
894 pFlowTrack->SetPionPlusMinusProb(uPid.beingPionPlusProb());
895 pFlowTrack->SetKaonPlusMinusProb(uPid.beingKaonPlusProb());
896 pFlowTrack->SetProtonPbarProb(uPid.beingProtonProb());
899 pFlowEvent->TrackCollection()->push_back(pFlowTrack);
906 if (!StFlowCutEvent::CheckEtaSymmetry(pEvent)) {
913 UInt_t rawMult = pFlowEvent->UncorrNegMult() + pFlowEvent->UncorrPosMult();
914 pFlowEvent->SetMultEta(rawMult);
917 pFlowEvent->SetCentrality();
920 (pFlowEvent->ProbPid()) ? pFlowEvent->SetPidsProb() :
921 pFlowEvent->SetPidsDeviant();
924 pFlowEvent->TrackCollection()->random_shuffle();
927 pFlowEvent->SetSelections();
930 (pFlowEvent->EtaSubs()) ? pFlowEvent->MakeEtaSubEvents() :
931 pFlowEvent->MakeSubEvents();
937 void StFlowMaker::FillPicoEvent() {
940 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillPicoEvent()" << endm;
943 gMessMgr->Warning(
"##### FlowMaker: No FlowPicoEvent");
948 pPicoEvent->SetVersion(7);
949 pPicoEvent->SetEventID(pFlowEvent->EventID());
950 pPicoEvent->SetRunID(pFlowEvent->RunID());
951 pPicoEvent->SetL0TriggerWord(pFlowEvent->L0TriggerWord());
953 pPicoEvent->SetCenterOfMassEnergy(pFlowEvent->CenterOfMassEnergy());
954 pPicoEvent->SetMagneticField(pFlowEvent->MagneticField());
955 pPicoEvent->SetBeamMassNumberEast(pFlowEvent->BeamMassNumberEast());
956 pPicoEvent->SetBeamMassNumberWest(pFlowEvent->BeamMassNumberWest());
958 pPicoEvent->SetOrigMult(pFlowEvent->OrigMult());
959 pPicoEvent->SetUncorrNegMult(pFlowEvent->UncorrNegMult());
960 pPicoEvent->SetUncorrPosMult(pFlowEvent->UncorrPosMult());
961 pPicoEvent->SetMultEta(pFlowEvent->MultEta());
962 pPicoEvent->SetCentrality(pFlowEvent->Centrality());
963 pPicoEvent->SetVertexPos(pFlowEvent->VertexPos().x(),
964 pFlowEvent->VertexPos().y(),
965 pFlowEvent->VertexPos().z());
966 pPicoEvent->SetCTB(pFlowEvent->CTB());
967 pPicoEvent->SetZDCe(pFlowEvent->ZDCe());
968 pPicoEvent->SetZDCw(pFlowEvent->ZDCw());
970 for (
int i=0; i<2; i++)
971 for (
int j=0; j<2; j++)
972 for (
int k=1; k<9; k++)
973 pPicoEvent->SetZDCSMD(i,j,k,pFlowEvent->ZDCSMD(i,j,k));
975 StFlowTrackIterator itr;
976 StFlowTrackCollection* pFlowTracks = pFlowEvent->TrackCollection();
978 for (itr = pFlowTracks->begin(); itr != pFlowTracks->end(); itr++) {
980 pFlowPicoTrack->SetPt(pFlowTrack->Pt());
981 pFlowPicoTrack->SetPtGlobal(pFlowTrack->PtGlobal());
982 pFlowPicoTrack->SetEta(pFlowTrack->Eta());
983 pFlowPicoTrack->SetEtaGlobal(pFlowTrack->EtaGlobal());
984 pFlowPicoTrack->SetDedx(pFlowTrack->Dedx());
985 pFlowPicoTrack->SetPhi(pFlowTrack->Phi());
986 pFlowPicoTrack->SetPhiGlobal(pFlowTrack->PhiGlobal());
987 pFlowPicoTrack->SetCharge(pFlowTrack->Charge());
988 pFlowPicoTrack->SetDcaSigned(pFlowTrack->DcaSigned());
989 pFlowPicoTrack->SetDca(pFlowTrack->Dca());
990 pFlowPicoTrack->SetDcaGlobal(pFlowTrack->DcaGlobal());
991 pFlowPicoTrack->SetZFirstPoint(pFlowTrack->ZFirstPoint());
992 pFlowPicoTrack->SetZLastPoint(pFlowTrack->ZLastPoint());
993 pFlowPicoTrack->SetChi2(pFlowTrack->Chi2());
994 pFlowPicoTrack->SetFitPts(pFlowTrack->FitPts() + 1);
995 pFlowPicoTrack->SetMaxPts(pFlowTrack->MaxPts());
996 pFlowPicoTrack->SetNhits(pFlowTrack->Nhits());
997 pFlowPicoTrack->SetNdedxPts(pFlowTrack->NdedxPts());
998 pFlowPicoTrack->SetDcaGlobal3(pFlowTrack->DcaGlobal3().x(),
999 pFlowTrack->DcaGlobal3().y(),
1000 pFlowTrack->DcaGlobal3().z());
1001 pFlowPicoTrack->SetTrackLength(pFlowTrack->TrackLength());
1002 pFlowPicoTrack->SetMostLikelihoodPID(pFlowTrack->MostLikelihoodPID());
1003 pFlowPicoTrack->SetMostLikelihoodProb(pFlowTrack->MostLikelihoodProb());
1004 pFlowPicoTrack->SetExtrapTag(pFlowTrack->ExtrapTag());
1005 pFlowPicoTrack->SetElectronPositronProb(pFlowTrack->ElectronPositronProb());
1006 pFlowPicoTrack->SetPionPlusMinusProb(pFlowTrack->PionPlusMinusProb());
1007 pFlowPicoTrack->SetKaonPlusMinusProb(pFlowTrack->KaonPlusMinusProb());
1008 pFlowPicoTrack->SetProtonPbarProb(pFlowTrack->ProtonPbarProb());
1009 if (pFlowPicoTrack->Charge() > 0) {
1010 pFlowPicoTrack->SetPidPion(pFlowTrack->PidPiPlus());
1011 pFlowPicoTrack->SetPidProton(pFlowTrack->PidProton());
1012 pFlowPicoTrack->SetPidKaon(pFlowTrack->PidKaonPlus());
1013 pFlowPicoTrack->SetPidDeuteron(pFlowTrack->PidDeuteron());
1014 pFlowPicoTrack->SetPidElectron(pFlowTrack->PidPositron());
1016 pFlowPicoTrack->SetPidPion(pFlowTrack->PidPiMinus());
1017 pFlowPicoTrack->SetPidProton(pFlowTrack->PidAntiProton());
1018 pFlowPicoTrack->SetPidKaon(pFlowTrack->PidKaonMinus());
1019 pFlowPicoTrack->SetPidDeuteron(pFlowTrack->PidAntiDeuteron());
1020 pFlowPicoTrack->SetPidElectron(pFlowTrack->PidElectron());
1022 pFlowPicoTrack->SetTopologyMap(pFlowTrack->TopologyMap().data(0),
1023 pFlowTrack->TopologyMap().data(1));
1024 pPicoEvent->AddTrack(pFlowPicoTrack);
1028 pPicoEvent->Clear();
1030 delete pFlowPicoTrack;
1038 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillFromPicoDST()" << endm;
1039 if (Debug()) gMessMgr->Info() <<
"FlowMaker: Pico Version: " <<
1040 pPicoEvent->Version() << endm;
1042 if (!pPicoEvent || !pPicoChain->GetEntry(mEventCounter++)) {
1043 cout <<
"##### FlowMaker: no more events" << endl;
1048 if (mFirstLastPhiWgt) pFlowEvent->SetFirstLastPhiWgt();
1063 if (!StFlowCutEvent::CheckEvent(pPicoEvent)) {
1064 Int_t eventID = pPicoEvent->EventID();
1065 gMessMgr->Info() <<
"##### FlowMaker: picoevent " << eventID
1073 switch (pPicoEvent->Version()) {
1074 case 7: FillFromPicoVersion7DST(pPicoEvent);
break;
1076 cout <<
"##### FlowMaker: Illegal pico file version" << endl;
1081 if (!StFlowCutEvent::CheckEtaSymmetry(pPicoEvent)) {
1082 Int_t eventID = pPicoEvent->EventID();
1083 gMessMgr->Info() <<
"##### FlowMaker: picoevent " << eventID
1090 (pFlowEvent->ProbPid()) ? pFlowEvent->SetPidsProb() :
1091 pFlowEvent->SetPidsDeviant();
1093 pFlowEvent->TrackCollection()->random_shuffle();
1095 pFlowEvent->SetSelections();
1096 (pFlowEvent->EtaSubs()) ? pFlowEvent->MakeEtaSubEvents() :
1097 pFlowEvent->MakeSubEvents();
1104 Bool_t StFlowMaker::FillFromPicoVersion7DST(
StFlowPicoEvent* pPicoEvent) {
1107 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillFromPicoVersion7DST()" << endm;
1111 pFlowEvent->SetFirstLastPoints();
1112 pFlowEvent->SetEventID(pPicoEvent->EventID());
1113 UInt_t origMult = pPicoEvent->OrigMult();
1114 pFlowEvent->SetOrigMult(origMult);
1116 pFlowEvent->SetUncorrNegMult(pPicoEvent->UncorrNegMult());
1117 pFlowEvent->SetUncorrPosMult(pPicoEvent->UncorrPosMult());
1119 pPicoEvent->VertexY(),
1120 pPicoEvent->VertexZ()) );
1122 pFlowEvent->SetRunID(pPicoEvent->RunID());
1123 pFlowEvent->SetL0TriggerWord(pPicoEvent->L0TriggerWord());
1125 pFlowEvent->SetCenterOfMassEnergy(pPicoEvent->CenterOfMassEnergy());
1126 pFlowEvent->SetMagneticField(pPicoEvent->MagneticField());
1127 pFlowEvent->SetBeamMassNumberEast(pPicoEvent->BeamMassNumberEast());
1128 pFlowEvent->SetBeamMassNumberWest(pPicoEvent->BeamMassNumberWest());
1129 pFlowEvent->SetMultEta(pPicoEvent->MultEta());
1130 pFlowEvent->SetCentrality();
1132 pFlowEvent->SetCTB(pPicoEvent->CTB());
1133 pFlowEvent->SetZDCe(pPicoEvent->ZDCe());
1134 pFlowEvent->SetZDCw(pPicoEvent->ZDCw());
1136 for (
int i=0; i<2; i++)
1137 for (
int j=0; j<2; j++)
1138 for (
int k=1; k<9; k++)
1139 pFlowEvent->SetZDCSMD(i,j,k,pPicoEvent->ZDCSMD(i,j,k));
1148 for (Int_t nt=0; nt < pPicoEvent->GetNtrack(); nt++) {
1151 if (pPicoTrack && (pPicoTrack->Dca())!=(pPicoTrack->DcaGlobal())
1152 && StFlowCutTrack::CheckTrack(pPicoTrack)) {
1155 if (!pFlowTrack)
return kFALSE;
1156 pFlowTrack->SetPt(pPicoTrack->Pt());
1157 pFlowTrack->SetPtGlobal(pPicoTrack->PtGlobal());
1158 pFlowTrack->SetPhi(pPicoTrack->Phi());
1159 pFlowTrack->SetPhiGlobal(pPicoTrack->PhiGlobal());
1160 pFlowTrack->SetEta(pPicoTrack->Eta());
1161 pFlowTrack->SetEtaGlobal(pPicoTrack->EtaGlobal());
1162 pFlowTrack->SetZFirstPoint(pPicoTrack->ZFirstPoint());
1163 pFlowTrack->SetZLastPoint(pPicoTrack->ZLastPoint());
1164 pFlowTrack->SetDedx(pPicoTrack->Dedx());
1165 pFlowTrack->SetCharge(pPicoTrack->Charge());
1166 pFlowTrack->SetDcaSigned(pPicoTrack->DcaSigned());
1167 pFlowTrack->SetDca(pPicoTrack->Dca());
1168 pFlowTrack->SetDcaGlobal(pPicoTrack->DcaGlobal());
1169 pFlowTrack->SetChi2(pPicoTrack->Chi2());
1170 pFlowTrack->SetFitPts(pPicoTrack->FitPts() - 1);
1171 pFlowTrack->SetMaxPts(pPicoTrack->MaxPts());
1172 pFlowTrack->SetNhits(pPicoTrack->Nhits());
1173 pFlowTrack->SetNdedxPts(pPicoTrack->NdedxPts());
1174 pFlowTrack->SetDcaGlobal3(
StThreeVectorD(pPicoTrack->DcaGlobalX(),
1175 pPicoTrack->DcaGlobalY(),
1176 pPicoTrack->DcaGlobalZ()) );
1177 pFlowTrack->SetTrackLength(pPicoTrack->TrackLength());
1179 if (StFlowEvent::ProbPid() && StuProbabilityPidAlgorithm::isPIDTableRead()) {
1180 uPid.processPIDAsFunction(uPid.getCentrality(pPicoEvent->UncorrNegMult()),
1181 pPicoTrack->DcaGlobal(),
1182 pPicoTrack->Charge(),
1183 fabs((pPicoTrack->Pt()/sqrt(1-(tanh(pPicoTrack->Eta())
1184 *tanh(pPicoTrack->Eta()))))/float(pPicoTrack->Charge())),
1186 pPicoTrack->NdedxPts(),
1187 pPicoTrack->Dedx() );
1189 pFlowTrack->SetMostLikelihoodPID(uPid.mostLikelihoodParticleGeantID());
1190 pFlowTrack->SetMostLikelihoodProb(uPid.mostLikelihoodProbability());
1191 pFlowTrack->SetExtrapTag(
int(uPid.isExtrap()));
1193 pFlowTrack->SetElectronPositronProb( (pPicoTrack->Charge()>0) ?
1194 float(uPid.beingPositronProb()) :
1195 float(uPid.beingElectronProb()) );
1197 pFlowTrack->SetPionPlusMinusProb( (pPicoTrack->Charge()>0) ?
1198 float(uPid.beingPionPlusProb()) :
1199 float(uPid.beingPionMinusProb()) );
1201 pFlowTrack->SetKaonPlusMinusProb( (pPicoTrack->Charge()>0) ?
1202 float(uPid.beingKaonPlusProb()) :
1203 float(uPid.beingKaonMinusProb()) );
1205 pFlowTrack->SetProtonPbarProb( (pPicoTrack->Charge()>0) ?
1206 float(uPid.beingProtonProb()) :
1207 float(uPid.beingAntiProtonProb()) );
1210 pFlowTrack->SetMostLikelihoodPID(pPicoTrack->MostLikelihoodPID());
1211 pFlowTrack->SetMostLikelihoodProb(pPicoTrack->MostLikelihoodProb());
1212 pFlowTrack->SetExtrapTag(pPicoTrack->ExtrapTag());
1213 pFlowTrack->SetElectronPositronProb(pPicoTrack->ElectronPositronProb());
1214 pFlowTrack->SetPionPlusMinusProb(pPicoTrack->PionPlusMinusProb());
1215 pFlowTrack->SetKaonPlusMinusProb(pPicoTrack->KaonPlusMinusProb());
1216 pFlowTrack->SetProtonPbarProb(pPicoTrack->ProtonPbarProb());
1219 if (pPicoTrack->Charge() < 0) {
1220 pFlowTrack->SetPidPiMinus(pPicoTrack->PidPion());
1221 pFlowTrack->SetPidAntiProton(pPicoTrack->PidProton());
1222 pFlowTrack->SetPidKaonMinus(pPicoTrack->PidKaon());
1223 pFlowTrack->SetPidAntiDeuteron(pPicoTrack->PidDeuteron());
1224 pFlowTrack->SetPidElectron(pPicoTrack->PidElectron());
1226 pFlowTrack->SetPidPiPlus(pPicoTrack->PidPion());
1227 pFlowTrack->SetPidProton(pPicoTrack->PidProton());
1228 pFlowTrack->SetPidKaonPlus(pPicoTrack->PidKaon());
1229 pFlowTrack->SetPidDeuteron(pPicoTrack->PidDeuteron());
1230 pFlowTrack->SetPidPositron(pPicoTrack->PidElectron());
1233 if (pPicoTrack->TopologyMap0() || pPicoTrack->TopologyMap1()) {
1236 pPicoTrack->TopologyMap1()) );
1239 pFlowEvent->TrackCollection()->push_back(pFlowTrack);
1249 Bool_t StFlowMaker::FillFromMuDST() {
1252 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillFromMuDST()" << endm;
1255 if (!StFlowCutEvent::CheckEvent(pMu)) {
1256 Int_t eventID = pMuEvent->eventId();
1257 gMessMgr->Info() <<
"##### FlowMaker: MuEvent " << eventID
1265 if (mFirstLastPhiWgt) pFlowEvent->SetFirstLastPhiWgt();
1274 pFlowEvent->SetFirstLastPoints();
1286 pFlowEvent->SetRunID(pMuEvent->runId());
1288 pFlowEvent->SetCenterOfMassEnergy(pMuEvent->runInfo().centerOfMassEnergy());
1289 pFlowEvent->SetMagneticField(pMuEvent->runInfo().magneticField());
1290 pFlowEvent->SetUncorrNegMult(pMuEvent->
refMultNeg());
1291 pFlowEvent->SetUncorrPosMult(pMuEvent->
refMultPos());
1292 if (pMuEvent->runId() > 8000000) {
1293 pFlowEvent->SetMultEta(pMuEvent->grefmult());
1295 pFlowEvent->SetMultEta(pMuEvent->
refMult());
1297 pFlowEvent->SetCentrality();
1298 pFlowEvent->SetEventID(pMuEvent->eventId());
1300 pFlowEvent->SetL0TriggerWord(StFlowCutEvent::TriggersFound());
1301 pFlowEvent->SetBeamMassNumberEast(pMuEvent->runInfo().beamMassNumber(east));
1302 pFlowEvent->SetBeamMassNumberWest(pMuEvent->runInfo().beamMassNumber(west));
1306 pFlowEvent->SetCTB(pMuEvent->ctbMultiplicity());
1307 pFlowEvent->SetZDCe(pMuEvent->zdcAdcAttentuatedSumEast());
1308 pFlowEvent->SetZDCw(pMuEvent->zdcAdcAttentuatedSumWest());
1311 Float_t zdcsmdEastHorizontal = -1.;
1312 Float_t zdcsmdEastVertical = -1.;
1313 Float_t zdcsmdWestHorizontal = -1.;
1314 Float_t zdcsmdWestVertical = -1.;
1316 for (
int strip=1; strip<9; strip++) {
1317 if (ZDC.zdcSmd(east,1,strip)) {
1318 zdcsmdEastHorizontal = (ZDC.zdcSmd(east,1,strip)
1319 -
mZDCSMDPed[0][1][strip-1])/Flow::zdcsmdGainFac[0][1][strip-1];
1320 pFlowEvent->SetZDCSMD(0,1,strip,zdcsmdEastHorizontal);
1322 if (ZDC.zdcSmd(east,0,strip)) {
1323 zdcsmdEastVertical = (ZDC.zdcSmd(east,0,strip)
1324 -
mZDCSMDPed[0][0][strip-1])/Flow::zdcsmdGainFac[0][0][strip-1];
1325 pFlowEvent->SetZDCSMD(0,0,strip,zdcsmdEastVertical);
1327 if (ZDC.zdcSmd(west,1,strip)) {
1328 zdcsmdWestHorizontal = (ZDC.zdcSmd(west,1,strip)
1329 -
mZDCSMDPed[1][1][strip-1])/Flow::zdcsmdGainFac[1][1][strip-1];
1330 pFlowEvent->SetZDCSMD(1,1,strip,zdcsmdWestHorizontal);
1332 if (ZDC.zdcSmd(west,0,strip)) {
1333 zdcsmdWestVertical = (ZDC.zdcSmd(west,0,strip)
1334 -
mZDCSMDPed[1][0][strip-1])/Flow::zdcsmdGainFac[1][0][strip-1];
1335 pFlowEvent->SetZDCSMD(1,0,strip,zdcsmdWestVertical);
1340 UInt_t origMult = pMuTracks->GetEntries();
1341 pFlowEvent->SetOrigMult(origMult);
1345 for (Int_t nt=0; nt < (Int_t)origMult; nt++) {
1347 if (pMuTrack && pMuTrack->
flag()>0 && StFlowCutTrack::CheckTrack(pMuTrack)) {
1350 if (!pFlowTrack)
return kFALSE;
1351 pFlowTrack->SetPt(pMuTrack->
pt());
1353 gMessMgr->Info() <<
"FlowMaker: FillFromMuVersion0DST(): WARNING! primary track has no reference to global track (index2Global < 0)" << endl;
1358 if (!pMuGlobalTrack) {
1359 gMessMgr->Info() <<
"FlowMaker: FillFromMuVersion0DST(): WARNING! primary track has no reference to global track (pMuGlobalTrack = 0)" << endl;
1362 pFlowTrack->Setid(pMuTrack->
id());
1363 pFlowTrack->SetPtGlobal(pMuGlobalTrack->
pt());
1364 pFlowTrack->SetPhi(pMuTrack->
phi());
1365 pFlowTrack->SetPhiGlobal(pMuGlobalTrack->
phi());
1366 pFlowTrack->SetEta(pMuTrack->
eta());
1367 pFlowTrack->SetEtaGlobal(pMuGlobalTrack->
eta());
1368 pFlowTrack->SetDedx(pMuTrack->
dEdx());
1369 pFlowTrack->SetCharge(pMuTrack->
charge());
1371 pMuTrack->
helix()));
1372 pFlowTrack->SetDca(pMuTrack->
dca().mag());
1373 pFlowTrack->SetDcaGlobal(pMuTrack->
dcaGlobal().mag());
1374 pFlowTrack->SetChi2(pMuTrack->
chi2xy());
1375 pFlowTrack->SetTopologyMap(pMuTrack->
topologyMap());
1377 pFlowTrack->SetNhits(pMuTrack->
nHits());
1378 pFlowTrack->SetFitPts(pMuTrack->
nHitsFit() -
1381 pFlowTrack->SetMaxPts(pMuTrack->
nHitsPoss() -
1385 pFlowTrack->SetNdedxPts(pMuTrack->
nHitsDedx());
1386 pFlowTrack->SetDcaGlobal3(pMuTrack->
dcaGlobal());
1388 primaryVertexPosition()));
1390 if (pFlowTrack->TopologyMap().hasHitInDetector(kFtpcEastId)
1391 || pFlowTrack->TopologyMap().hasHitInDetector(kFtpcWestId)) {
1392 pFlowTrack->SetZFirstPoint(pMuTrack->
firstPoint().z());
1393 pFlowTrack->SetZLastPoint(pMuTrack->
lastPoint().z());
1395 else if (pFlowTrack->TopologyMap().hasHitInDetector(kTpcId)) {
1396 Double_t innerFieldCageRadius = 46.107;
1397 Double_t innerPadrowRadius = 60.0;
1399 pFlowTrack->SetZLastPoint(pMuTrack->
lastPoint().z());
1403 if (TMath::Sqrt(x*x+y*y) >= innerFieldCageRadius) {
1404 pFlowTrack->SetZFirstPoint(pMuTrack->
firstPoint().z());
1409 Double_t s1 = pathL.first;
1410 Double_t s2 = pathL.second;
1414 if (finite(s1) != 0 || finite(s2) != 0) {
1415 if (s1 >= 0 && s2 >= 0) s = s1;
1416 else if (s1 >= 0 && s2 < 0) s = s1;
1417 else if (s1 < 0 && s2 >= 0) s = s2;
1418 pFlowTrack->SetZFirstPoint(pMuTrack->
helix().z(s));
1420 pFlowTrack->SetZFirstPoint(0.);
1425 if (StFlowEvent::ProbPid() && StuProbabilityPidAlgorithm::isPIDTableRead()) {
1426 PR(StuProbabilityPidAlgorithm::isPIDTableRead());
1427 uPid.processPIDAsFunction(uPid.getCentrality(pMuEvent->
refMultNeg()),
1430 fabs((pMuTrack->
p().mag())/
float(pMuTrack->
charge())),
1435 pFlowTrack->SetMostLikelihoodPID(uPid.mostLikelihoodParticleGeantID());
1436 pFlowTrack->SetMostLikelihoodProb(uPid.mostLikelihoodProbability());
1437 pFlowTrack->SetExtrapTag(
int(uPid.isExtrap()));
1439 pFlowTrack->SetElectronPositronProb( (pMuTrack->
charge()>0) ?
1440 float(uPid.beingPositronProb()) :
1441 float(uPid.beingElectronProb()) );
1443 pFlowTrack->SetPionPlusMinusProb( (pMuTrack->
charge()>0) ?
1444 float(uPid.beingPionPlusProb()) :
1445 float(uPid.beingPionMinusProb()) );
1447 pFlowTrack->SetKaonPlusMinusProb( (pMuTrack->
charge()>0) ?
1448 float(uPid.beingKaonPlusProb()) :
1449 float(uPid.beingKaonMinusProb()) );
1451 pFlowTrack->SetProtonPbarProb( (pMuTrack->
charge()>0) ?
1452 float(uPid.beingProtonProb()) :
1453 float(uPid.beingAntiProtonProb()) );
1456 pFlowTrack->SetPionPlusMinusProb(pMuTrack->
pidProbPion());
1457 pFlowTrack->SetKaonPlusMinusProb(pMuTrack->
pidProbKaon());
1460 int mostLikelihoodPid=0;
1461 double mostLikelihoodPidProbability=0;
1462 if (pFlowTrack->ElectronPositronProb()>mostLikelihoodPidProbability) {
1463 mostLikelihoodPidProbability=pFlowTrack->ElectronPositronProb();
1464 if (pMuTrack->
charge() < 0)
1465 mostLikelihoodPid=3;
1467 mostLikelihoodPid=2;
1469 if (pFlowTrack->PionPlusMinusProb()>mostLikelihoodPidProbability) {
1470 mostLikelihoodPidProbability=pFlowTrack->PionPlusMinusProb();
1471 if (pMuTrack->
charge() < 0)
1472 mostLikelihoodPid=9;
1474 mostLikelihoodPid=8;
1476 if (pFlowTrack->KaonPlusMinusProb()>mostLikelihoodPidProbability) {
1477 mostLikelihoodPidProbability=pFlowTrack->KaonPlusMinusProb();
1478 if (pMuTrack->
charge() < 0)
1479 mostLikelihoodPid=12;
1481 mostLikelihoodPid=11;
1483 if (pFlowTrack->ProtonPbarProb()>mostLikelihoodPidProbability) {
1484 mostLikelihoodPidProbability=pFlowTrack->ProtonPbarProb();
1485 if (pMuTrack->
charge() < 0)
1486 mostLikelihoodPid=15;
1488 mostLikelihoodPid=14;
1491 pFlowTrack->SetMostLikelihoodPID(mostLikelihoodPid);
1492 pFlowTrack->SetMostLikelihoodProb(mostLikelihoodPidProbability);
1496 if (pMuTrack->
charge() < 0) {
1497 pFlowTrack->SetPidPiMinus(pMuTrack->
nSigmaPion());
1498 pFlowTrack->SetPidAntiProton(pMuTrack->
nSigmaProton());
1499 pFlowTrack->SetPidKaonMinus(pMuTrack->
nSigmaKaon());
1500 pFlowTrack->SetPidAntiDeuteron( 999.0 );
1503 pFlowTrack->SetPidPiPlus(pMuTrack->
nSigmaPion());
1505 pFlowTrack->SetPidKaonPlus(pMuTrack->
nSigmaKaon());
1506 pFlowTrack->SetPidDeuteron( 999.0 );
1510 pFlowEvent->TrackCollection()->push_back(pFlowTrack);
1517 if (!StFlowCutEvent::CheckEtaSymmetry(pMuEvent)) {
1518 Int_t eventID = pMuEvent->eventId();
1519 gMessMgr->Info() <<
"##### FlowMaker: MuEvent " << eventID
1527 (pFlowEvent->ProbPid()) ? pFlowEvent->SetPidsProb() :
1528 pFlowEvent->SetPidsDeviant();
1531 pFlowEvent->TrackCollection()->random_shuffle();
1534 pFlowEvent->SetSelections();
1537 (pFlowEvent->RanSubs()) ? pFlowEvent->MakeSubEvents() :
1538 pFlowEvent->MakeEtaSubEvents();
1545 void StFlowMaker::PrintSubeventMults() {
1548 if (Debug()) gMessMgr->Info() <<
"FlowMaker: PrintSubeventMults()" << endm;
1552 pFlowSelect->SetSubevent(-1);
1553 for (j = 0; j < Flow::nHars; j++) {
1554 pFlowSelect->SetHarmonic(j);
1555 for (k = 0; k < Flow::nSels; k++) {
1556 pFlowSelect->SetSelection(k);
1557 cout <<
"j,k= " << j << k <<
" : " << pFlowEvent->Mult(pFlowSelect) << endl;
1561 for (j = 0; j < Flow::nHars; j++) {
1562 pFlowSelect->SetHarmonic(j);
1563 for (k = 0; k <Flow:: nSels; k++) {
1564 pFlowSelect->SetSelection(k);
1565 for (n = 0; n < Flow::nSubs+1; n++) {
1566 pFlowSelect->SetSubevent(n);
1567 cout <<
"j,k,n= " << j << k << n <<
" : " <<
1568 pFlowEvent->Mult(pFlowSelect) << endl;
1577 Int_t StFlowMaker::InitPicoEventWrite() {
1578 if (Debug()) gMessMgr->Info() <<
"FlowMaker: InitPicoEventWrite()" << endm;
1582 Int_t bufsize = 256000;
1583 if (split) bufsize /= 16;
1588 TString* filestring =
new TString(mPicoEventDir);
1589 filestring->Append(mEventFileName);
1590 if (filestring->EndsWith(
".event.root")) {
1591 int nameLength = filestring->Length();
1592 filestring->Remove(nameLength - 11);
1594 if (filestring->EndsWith(
".MuDst.root")) {
1595 int nameLength = filestring->Length();
1596 filestring->Remove(nameLength - 11);
1599 filestring->Append(
".flowpicoevent.root");
1600 pPicoDST =
new TFile(filestring->Data(),
"RECREATE",
"Flow Pico DST file");
1602 cout <<
"##### FlowMaker: Warning: no PicoEvents file = "
1603 << filestring->Data() << endl;
1606 pPicoDST->SetCompressionLevel(comp);
1607 if (Debug()) gMessMgr->Info() <<
"##### FlowMaker: PicoEvents file = "
1608 << filestring->Data() << endm;
1611 pFlowTree =
new TTree(
"FlowTree",
"Flow Pico Tree");
1613 cout <<
"##### FlowMaker: Warning: No FlowPicoTree" << endl;
1617 pFlowTree->SetAutoSave(1000000);
1618 pFlowTree->Branch(
"pPicoEvent",
"StFlowPicoEvent", &pPicoEvent,
1628 Int_t StFlowMaker::InitPicoEventRead() {
1629 if (Debug()) gMessMgr->Info() <<
"FlowMaker: InitPicoEventRead()" << endm;
1632 pPicoChain =
new TChain(
"FlowTree");
1634 for (Int_t ilist = 0; ilist < pPicoFileList->GetNBundles(); ilist++) {
1635 pPicoFileList->GetNextBundle();
1637 TFile dummyFile(pPicoFileList->GetFileName(0),
"READ");
1639 if (!(dummyFile.IsOpen())) {
1640 gMessMgr->Info() <<pPicoFileList->GetFileName(0)<<
" open failed ! not chained"<<endm;
1644 if (dummyFile.IsZombie()) {
1645 gMessMgr->Info() <<
" sth. very wrong (overwritten, invalid) with "<<pPicoFileList->GetFileName(0)<<
", not chained "<<endm;
1649 if (dummyFile.TestBit(1024)) {
1650 gMessMgr->Info() <<
" revocer procedure applied to "<<pPicoFileList->GetFileName(0)<<
", maybe useful but still not chained for flow analyses"<<endm;
1654 if (Debug()) gMessMgr->Info() <<
" doFlowEvents - input fileList = "
1655 << pPicoFileList->GetFileName(0) << endm;
1656 pPicoChain->Add(pPicoFileList->GetFileName(0));
1659 pPicoChain->SetBranchAddress(
"pPicoEvent", &pPicoEvent);
1661 Int_t nEntries = (Int_t)pPicoChain->GetEntries();
1662 if (Debug()) gMessMgr->Info() <<
"##### FlowMaker: events in Pico-DST file = "
1663 << nEntries << endm;
1748 Int_t StFlowMaker::InitMuEventRead() {
1750 if (Debug()) gMessMgr->Info() <<
"FlowMaker: InitMuEventRead()" << endm;
1765 double xCenter = gTrack->geometry()->helix().
xcenter();
1766 double yCenter = gTrack->geometry()->helix().
ycenter();
1767 double radius = 1.0/gTrack->geometry()->helix().curvature();
1769 double dPosCenter = ::sqrt( (vertex.x() - xCenter) * (vertex.x() - xCenter) +
1770 (vertex.y() - yCenter) * (vertex.y() - yCenter));
1772 return (Float_t)(radius - dPosCenter);
1783 double xCenter = helix.
xcenter();
1784 double yCenter = helix.
ycenter();
1785 double radius = 1.0/helix.curvature();
1787 double dPosCenter = ::sqrt( (vertex.x() - xCenter) * (vertex.x() - xCenter) +
1788 (vertex.y() - yCenter) * (vertex.y() - yCenter));
1790 return (Float_t)(radius - dPosCenter);
1795 void StFlowMaker::FillFlowEvent(
StHbtEvent* hbtEvent) {
1798 if (Debug()) gMessMgr->Info() <<
"FlowMaker: FillFlowEvent(HbtEvent)" << endm;
1801 if (pFlowEvent)
delete pFlowEvent;
1806 cout <<
"Inside FlowMaker::FillFlowEvent(HbtEvent)..." << endl;
1809 if (mFirstLastPhiWgt) pFlowEvent->SetFirstLastPhiWgt();
1822 pFlowEvent->SetVertexPos( hbtEvent->PrimVertPos() );
1824 pFlowEvent->SetCTB( hbtEvent->CtbMult() );
1825 pFlowEvent->SetZDCe( hbtEvent->ZdcAdcEast() );
1826 pFlowEvent->SetZDCw( hbtEvent->ZdcAdcWest() );
1828 UInt_t origMult = hbtEvent->NumberOfTracks();
1829 pFlowEvent->SetOrigMult(origMult);
1833 int goodTracksEta = 0;
1835 StHbtTrackIterator pIter;
1836 StHbtTrackIterator startLoop = hbtEvent->TrackCollection()->begin();
1837 StHbtTrackIterator endLoop = hbtEvent->TrackCollection()->end();
1838 for (pIter=startLoop; pIter!=endLoop; pIter++){
1842 if (!pFlowTrack)
return;
1843 double px = pParticle->P().x();
1844 double py = pParticle->P().y();
1845 double phi = atan2(py,px);
1846 if (phi<0.0) phi+=twopi;
1847 pFlowTrack->SetPhi( phi );
1848 pFlowTrack->SetPhiGlobal( phi );
1849 double pz = pParticle->P().z();
1850 double pTotal = pParticle->P().mag();
1851 double eta = 0.5*::log( (1.0+pz/pTotal)/(1.0-pz/pTotal) );
1852 pFlowTrack->SetEta( eta );
1853 pFlowTrack->SetEtaGlobal( eta );
1854 pFlowTrack->SetPt( pParticle->Pt() );
1855 pFlowTrack->SetPtGlobal( pParticle->Pt() );
1856 pFlowTrack->SetCharge(
int(pParticle->Charge()) );
1857 double dcaXY = pParticle->DCAxy();
1858 double dcaZ = pParticle->DCAz();
1859 double dca = ::sqrt( dcaXY*dcaXY + dcaZ*dcaZ );
1861 pFlowTrack->SetDcaGlobal( dca );
1862 pFlowTrack->SetChi2( pParticle->ChiSquaredXY() );
1863 pFlowTrack->SetFitPts( pParticle->NHits() );
1864 pFlowTrack->SetMaxPts( pParticle->NHitsPossible() );
1865 cout <<
"pParticle->NHits(), pParticle->NHitsPossible() in StFlowMaker::FillFlowEvent(StHbtEvent* hbtEvent) might be wrong!" << endl;
1866 cout <<
"(MuDst, StEvent were changed and nFitPts might be different from nHits.)" << endl;
1867 cout <<
"Whoever uses them, check it, please!" << endl;
1869 pFlowTrack->SetPidPiPlus( pParticle->NSigmaPion() );
1870 pFlowTrack->SetPidPiMinus( pParticle->NSigmaPion() );
1871 pFlowTrack->SetPidProton( pParticle->NSigmaProton() );
1872 pFlowTrack->SetPidAntiProton( pParticle->NSigmaProton() );
1873 pFlowTrack->SetPidKaonMinus( pParticle->NSigmaKaon() );
1874 pFlowTrack->SetPidKaonPlus( pParticle->NSigmaKaon() );
1875 pFlowTrack->SetPidDeuteron( 0.0 );
1876 pFlowTrack->SetPidAntiDeuteron( 0.0 );
1877 pFlowTrack->SetPidElectron( pParticle->NSigmaElectron() );
1878 pFlowTrack->SetPidPositron( pParticle->NSigmaElectron() );
1880 if ( pParticle->NSigmaKaon() > 2.0 ) {
1881 if (pParticle->Charge() > 0 ) {
1882 pFlowTrack->SetMostLikelihoodPID(14);
1883 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1886 pFlowTrack->SetMostLikelihoodPID(15);
1887 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1890 if ( pParticle->NSigmaPion() > 2.0 ) {
1891 if (pParticle->Charge() > 0 ) {
1892 pFlowTrack->SetMostLikelihoodPID(11);
1893 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1896 pFlowTrack->SetMostLikelihoodPID(12);
1897 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1900 if ( pParticle->NSigmaPion() < -2.0 ) {
1901 if (pParticle->Charge() < 0 ) {
1902 pFlowTrack->SetMostLikelihoodPID(3);
1903 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1906 pFlowTrack->SetMostLikelihoodPID(2);
1907 pFlowTrack->SetMostLikelihoodProb( 0.99 );
1910 pFlowTrack->SetExtrapTag(0);
1911 pFlowEvent->TrackCollection()->push_back(pFlowTrack);
1915 pFlowEvent->SetMultEta(goodTracksEta);
1916 pFlowEvent->SetCentrality();
1917 pFlowEvent->TrackCollection()->random_shuffle();
1918 pFlowEvent->SetSelections();
1919 pFlowEvent->MakeSubEvents();
Double_t pidProbKaon() const
Returns Aihong's probability of being a kaon.
static TObjArray * globalTracks()
returns pointer to the global tracks list
StThreeVectorF primaryVertexPosition(int vtx_id=-1) const
The StMuDst is supposed to be structured in 'physical events'. Therefore there is only 1 primary vert...
unsigned short refMultNeg(int vtx_id=-1)
Reference multiplicity of negative particles as defined in StEventUtilities/StuRefMult.hh for vertex vtx_id (-1 is default index from StMuDst)
Double_t pidProbElectron() const
Returns Aihong's probability of being an electron.
Flow::ReCent_t mReCentY
Recentering parameters.
Int_t index2Global() const
Returns index of associated global track. If not in order can be set with StMuDst::fixTrackIndeces() ...
Double_t pt() const
Returns pT at point of dca to primary vertex.
short id() const
Returns the track id(or key), is unique for a track node, i.e. global and primary tracks have the sam...
UShort_t nHitsDedx() const
Return number of hits used for dEdx.
Flow::PhiWgtFtpc_t mPhiWgtFtpcFarWest
To make event plane isotropic.
Flow::ReCent_t mReCentX
ZDCSMD pedestal.
Flow::PhiWgt_t mPhiWgtWest
To make event plane isotropic.
Flow::PhiWgt_t mPhiWgtEast
To make event plane isotropic.
Double_t mZDCSMDPed[2][2][8]
ZDCSMD Beam Center.
Flow::PhiWgtFtpc_t mPhiWgtFtpcFarEast
To make event plane isotropic.
Flow::ZDCSMD_PsiWgt_t mZDCSMD_PsiWgtWest
To make event plane isotropic.
pair< double, double > pathLength(double r) const
path length at given r (cylindrical r)
StPhysicalHelixD helix() const
Returns inner helix (first measured point)
UShort_t nHitsFit() const
Return total number of hits used in fit.
Double_t mZDCSMDCenterEx
ZDCSMD full Psi.
double ycenter() const
x-center of circle in xy-plane
short flag() const
Returns flag, (see StEvent manual for type information)
Short_t charge() const
Returns charge.
const StThreeVectorF & p() const
Returns 3-momentum at dca to primary vertex.
Double_t nSigmaPion() const
Returns Craig's distance to the calculated dE/dx band for pions in units of sigma.
Double_t eta() const
Returns pseudo rapidity at point of dca to primary vertex.
Double_t pidProbProton() const
Returns Aihong's probability of being a proton.
const StThreeVectorF & firstPoint() const
Returns positions of first measured point.
static TObjArray * primaryTracks()
returns pointer to a list of tracks belonging to the selected primary vertex
unsigned short refMult(int vtx_id=-1)
Reference multiplicity of charged particles as defined in StEventUtilities/StuRefMult.hh for vertex vtx_id (-1 is default index from StMuDst)
Double_t nSigmaElectron() const
Returns Craig's distance to the calculated dE/dx band for electrons in units of sigma.
UShort_t nHitsPoss() const
Return number of possible hits on track.
Flow::PhiWgtFtpc_t mPhiWgtFtpcEast
To make event plane isotropic.
Flow::ZDCSMD_PsiWgt_t mZDCSMD_PsiWgtEast
ZDCSMD west Psi.
static StMuEvent * event()
returns pointer to current StMuEvent (class holding the event wise information, e.g. event number, run number)
Double_t mZDCSMDCenterWx
ZDCSMD Beam Center.
UShort_t nHits() const
Bingchu.
Double_t chi2xy() const
Returns chi2 of fit. ATTENTIONS: does not return xy chi2 (historic)
StThreeVectorF dca(Int_t vtx_id=-1) const
Returns 3D distance of closest approach to primary vertex.
const StThreeVectorF & lastPoint() const
Returns positions of last measured point.
Double_t dEdx() const
Returns measured dE/dx value.
Flow::PhiWgt_t mPhiWgtFarEast
To make event plane isotropic.
Flow::PhiWgt_t mPhiWgtFarWest
To make event plane isotropic.
Double_t phi() const
Returns phi at point of dca to primary vertex.
Double_t nSigmaProton() const
Returns Craig's distance to the calculated dE/dx band for protons in units of sigma.
StThreeVectorF dcaGlobal(Int_t vtx_id=-1) const
Returns 3D distance of closest approach to primary vertex of associated global track.
Double_t nSigmaKaon() const
Returns Craig's distance to the calculated dE/dx band for kaons in units of sigma.
Flow::PhiWgtFtpc_t mPhiWgtFtpcWest
To make event plane isotropic.
Flow::ZDCSMD_PsiWgt_t mZDCSMD_PsiWgtFull
ZDCSMD east Psi.
Double_t pidProbPion() const
Returns Aihong's probability of being a pion.
double xcenter() const
aziumth in xy-plane measured from ring center
StTrackTopologyMap topologyMap() const
Returns topology map.
unsigned short refMultPos(int vtx_id=-1)
Reference multiplicity of positive particles as defined in StEventUtilities/StuRefMult.hh for vertex vtx_id (-1 is default index from StMuDst)