23 #include "Riostream.h"
32 #include "AliMCEvent.h"
33 #include "AliMCParticle.h"
34 #include "AliCFManager.h"
35 #include "AliESDtrack.h"
36 #include "AliESDPmdTrack.h"
37 #include "AliESDEvent.h"
38 #include "AliAODEvent.h"
39 #include "AliOADBContainer.h"
40 #include "AliGenCocktailEventHeader.h"
41 #include "AliGenEposEventHeader.h"
42 #include "AliGenHijingEventHeader.h"
43 #include "AliGenGeVSimEventHeader.h"
44 #include "AliCollisionGeometry.h"
45 #include "AliMultiplicity.h"
46 #include "AliMultSelection.h"
60 AliFlowEventSimple(), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
63 for(Int_t i(0); i < 9; i++) {
64 for(Int_t j(0); j < 2; j++) {
65 for(Int_t k(0); k < 2; k++) {
67 fWidthQ[i][j][k] = 0.;
68 fMeanQv3[i][j][k] = 0.;
69 fWidthQv3[i][j][k] = 0.;
73 for(Int_t i(0); i < 5; i++) {
80 cout <<
"AliFlowEvent: Default constructor to be used only by root for io" << endl;
85 AliFlowEventSimple(n), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
88 for(Int_t i(0); i < 9; i++) {
89 for(Int_t j(0); j < 2; j++) {
90 for(Int_t k(0); k < 2; k++) {
98 for(Int_t i(0); i < 5; i++) {
108 AliFlowEventSimple(event), fApplyRecentering(event.fApplyRecentering), fDivSigma(event.fDivSigma), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
111 for(Int_t i(0); i < 9; i++) {
112 for(Int_t j(0); j < 2; j++) {
113 for(Int_t k(0); k < 2; k++) {
121 for(Int_t i(0); i < 5; i++) {
133 if (&event==
this)
return *
this;
144 for(Int_t i(0); i < 9; i++) {
145 for(Int_t j(0); j < 2; j++) {
146 for(Int_t k(0); k < 2; k++) {
147 fMeanQ[i][j][k] =
event.fMeanQ[i][j][k];
148 fWidthQ[i][j][k] =
event.fWidthQ[i][j][k];
149 fMeanQv3[i][j][k] =
event.fMeanQv3[i][j][k];
150 fWidthQv3[i][j][k] =
event.fWidthQv3[i][j][k];
154 for(Int_t i(0); i < 5; i++) {
179 if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Cocktail Header"))
181 AliGenCocktailEventHeader *headerC =
dynamic_cast<AliGenCocktailEventHeader *
> (mcEvent-> GenEventHeader());
184 TList *lhd = headerC->GetHeaders();
187 AliGenHijingEventHeader *hdh =
dynamic_cast<AliGenHijingEventHeader *
> (lhd->At(0));
193 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Therminator"))
195 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
199 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"GeVSim header"))
201 AliGenGeVSimEventHeader* headerG =
dynamic_cast<AliGenGeVSimEventHeader*
>(mcEvent->GenEventHeader());
205 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Hijing"))
207 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
211 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Ampt"))
213 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
217 else if (!strcmp(mcEvent->GenEventHeader()->GetName(),
"EPOS"))
219 AliGenEposEventHeader* headerE =
dynamic_cast<AliGenEposEventHeader*
>(mcEvent->GenEventHeader());
225 AliCollisionGeometry* header =
dynamic_cast<AliCollisionGeometry*
>(mcEvent->GenEventHeader());
232 const AliCFManager* rpCFManager,
233 const AliCFManager* poiCFManager):
234 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
237 for(Int_t i(0); i < 9; i++) {
238 for(Int_t j(0); j < 2; j++) {
239 for(Int_t k(0); k < 2; k++) {
247 for(Int_t i(0); i < 5; i++) {
255 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
258 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
261 AliMCParticle* pParticle =
dynamic_cast<AliMCParticle*
>(anInput->GetTrack(itrkN));
262 if (!pParticle)
continue;
266 Bool_t poiOK = kTRUE;
267 if (rpCFManager && poiCFManager)
269 rpOK = rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
270 poiOK = poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
272 if (!(rpOK||poiOK))
continue;
277 if (rpOK && rpCFManager)
282 if (poiOK && poiCFManager)
295 const AliCFManager* rpCFManager,
296 const AliCFManager* poiCFManager ):
297 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
300 for(Int_t i(0); i < 9; i++) {
301 for(Int_t j(0); j < 2; j++) {
302 for(Int_t k(0); k < 2; k++) {
310 for(Int_t i(0); i < 5; i++) {
317 if(anInput->GetRunNumber())
fRun = anInput->GetRunNumber();
321 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
324 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
326 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
330 Bool_t poiOK = kTRUE;
331 if (rpCFManager && poiCFManager)
333 rpOK = ( rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
334 rpCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
335 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
336 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
338 if (!(rpOK || poiOK))
continue;
345 if(rpOK && rpCFManager)
351 if(poiOK && poiCFManager)
363 const AliCFManager* rpCFManager,
364 const AliCFManager* poiCFManager):
365 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
368 for(Int_t i(0); i < 9; i++) {
369 for(Int_t j(0); j < 2; j++) {
370 for(Int_t k(0); k < 2; k++) {
378 for(Int_t i(0); i < 5; i++) {
386 if(anInput->GetRunNumber())
fRun = anInput->GetRunNumber();
389 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
392 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
394 AliAODTrack* pParticle =
dynamic_cast<AliAODTrack*
>(anInput->GetTrack(itrkN));
395 if(!pParticle) AliFatal(
"Not a standard AOD");
399 Bool_t poiOK = kTRUE;
400 if (rpCFManager && poiCFManager)
402 rpOK = ( rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
403 rpCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
404 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
405 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
407 if (!(rpOK || poiOK))
continue;
455 const AliMCEvent* anInputMc,
457 const AliCFManager* rpCFManager,
458 const AliCFManager* poiCFManager ):
459 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
462 for(Int_t i(0); i < 9; i++) {
463 for(Int_t j(0); j < 2; j++) {
464 for(Int_t k(0); k < 2; k++) {
472 for(Int_t i(0); i < 5; i++) {
481 AliFatal(
"WRONG OPTION IN AliFlowEventMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, KineSource anOption)");
485 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
487 Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
488 if (iNumberOfInputTracksMC==-1)
490 AliError(
"Skipping Event -- No MC information available for this event");
495 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
497 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
499 Int_t iLabel = pParticle->GetLabel();
501 AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
504 if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label())
505 AliWarning(Form(
"pParticle->GetLabel()!=pMcParticle->Label(), %i, %i", pParticle->GetLabel(), pMcParticle->Label()));
508 Bool_t rpOK = kFALSE;
509 Bool_t poiOK = kFALSE;
510 if (rpCFManager && poiCFManager)
514 if (rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,
"mcGenCuts1") &&
515 rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle))
517 if (poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,
"mcGenCuts2") &&
518 poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle))
523 if (rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
525 if (poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
530 if (!(rpOK || poiOK))
continue;
543 if (rpOK && rpCFManager)
548 if (poiOK && poiCFManager)
561 const AliMultiplicity* anInputTracklets,
562 const AliCFManager* poiCFManager ):
563 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
566 for(Int_t i(0); i < 9; i++) {
567 for(Int_t j(0); j < 2; j++) {
568 for(Int_t k(0); k < 2; k++) {
576 for(Int_t i(0); i < 5; i++) {
584 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
587 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
589 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
592 Bool_t poiOK = kTRUE;
595 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
596 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
598 if (!poiOK)
continue;
604 if(poiOK && poiCFManager)
615 anInputTracklets = anInput->GetMultiplicity();
616 Int_t multSPD = anInputTracklets->GetNumberOfTracklets();
619 for (Int_t itracklet=0; itracklet<multSPD; ++itracklet) {
620 Float_t thetaTr= anInputTracklets->GetTheta(itracklet);
621 Float_t phiTr= anInputTracklets->GetPhi(itracklet);
623 Float_t etaTr = -TMath::Log(TMath::Tan(thetaTr/2.));
643 const AliCFManager* poiCFManager,
645 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
648 for(Int_t i(0); i < 9; i++) {
649 for(Int_t j(0); j < 2; j++) {
650 for(Int_t k(0); k < 2; k++) {
658 for(Int_t i(0); i < 5; i++) {
665 Int_t iNumberOfInputTracks = esd->GetNumberOfTracks() ;
668 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0};
671 AliESDtrack trackTPC;
674 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
677 if (!esd->GetTrack(itrkN))
continue;
679 Bool_t useTPC = kFALSE;
681 AliESDtrack* pParticle = esd->GetTrack(itrkN);
684 Bool_t poiOK = kTRUE;
688 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
689 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
692 if (!(poiOK))
continue;
694 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)pParticle->GetTPCInnerParam();
704 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
705 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
707 AliExternalTrackParam copy(*tpcTrack);
709 copy.PropagateToDCA(vertexSPD,esd->GetMagneticField(),100.,dca,cov);
711 copy.PropagateToDCA(vertexTPC,esd->GetMagneticField(),100.,dca,cov);
723 if(poiOK && poiCFManager)
743 const TH2F* anInputFMDhist,
744 const AliCFManager* poiCFManager ):
745 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
748 for(Int_t i(0); i < 9; i++) {
749 for(Int_t j(0); j < 2; j++) {
750 for(Int_t k(0); k < 2; k++) {
758 for(Int_t i(0); i < 5; i++) {
766 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
769 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
771 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
774 Bool_t poiOK = kTRUE;
777 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
778 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
780 if (!poiOK)
continue;
786 if(poiOK && poiCFManager)
798 Int_t iBinsEta = anInputFMDhist->GetNbinsX();
799 Int_t iBinsPhi = anInputFMDhist->GetNbinsY();
801 for (Int_t iEta = 1; iEta <= iBinsEta; iEta++){
802 Double_t etaFMD = anInputFMDhist->GetXaxis()->GetBinCenter(iEta);
803 for (Int_t iPhi = 1; iPhi <= iBinsPhi; iPhi++){
804 Double_t phiFMD = anInputFMDhist->GetYaxis()->GetBinCenter(iPhi);
805 Double_t weightFMD = anInputFMDhist->GetBinContent(iEta,iPhi);
807 if (weightFMD > 0.0) {
837 if (!mother)
continue;
839 for (Int_t iDaughterCandidate=0; iDaughterCandidate<
fNumberOfTracks; iDaughterCandidate++)
842 Int_t esdIndexDaughterCandidate = daughterCandidate->
GetID();
843 for (Int_t iDaughter=0; iDaughter<mother->
GetNDaughters(); iDaughter++)
846 if (esdIndexDaughter==esdIndexDaughterCandidate)
870 if (!rpCuts || !poiCuts)
return;
926 if (sourceRP==sourcePOI)
930 for (Int_t i=0; i<numberOfInputObjects; i++)
938 if (!(rp||poi))
continue;
944 if (!pTrack)
continue;
952 if (!pTrack)
continue;
959 else if (sourceRP!=sourcePOI)
970 if (!pTrack)
continue;
978 for (Int_t i=0; i<numberOfInputObjects; i++)
984 if (!pTrack)
continue;
1025 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1029 for(Int_t i(0); i < 9; i++) {
1030 for(Int_t j(0); j < 2; j++) {
1031 for(Int_t k(0); k < 2; k++) {
1039 for(Int_t i(0); i < 5; i++) {
1047 Fill(rpCuts,poiCuts);
1054 const AliESDPmdTrack *pmdtracks,
1055 const AliCFManager* poiCFManager ):
1056 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1060 for(Int_t i(0); i < 9; i++) {
1061 for(Int_t j(0); j < 2; j++) {
1062 for(Int_t k(0); k < 2; k++) {
1070 for(Int_t i(0); i < 5; i++) {
1077 Float_t
GetPmdEta(Float_t xPos, Float_t yPos, Float_t zPos);
1078 Float_t
GetPmdPhi(Float_t xPos, Float_t yPos);
1080 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
1083 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
1085 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
1087 Bool_t poiOK = kTRUE;
1090 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
1091 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
1093 if (!poiOK)
continue;
1099 if(poiOK && poiCFManager)
1110 Int_t npmdcl = anInput->GetNumberOfPmdTracks();
1111 printf(
"======There are %d PMD tracks in this event\n-------",npmdcl);
1113 for(Int_t iclust=0; iclust < npmdcl; iclust++){
1115 pmdtracks = anInput->GetPmdTrack(iclust);
1116 Int_t det = pmdtracks->GetDetector();
1118 Float_t clsX = pmdtracks->GetClusterX();
1119 Float_t clsY = pmdtracks->GetClusterY();
1120 Float_t clsZ = pmdtracks->GetClusterZ();
1121 Float_t ncell = pmdtracks->GetClusterCells();
1122 Float_t adc = pmdtracks->GetClusterADC();
1124 Float_t etacls =
GetPmdEta(clsX,clsY,clsZ);
1129 if(det == 0 && adc > 270 && ncell > 1){
1146 Float_t rpxpy, theta, eta;
1147 rpxpy = TMath::Sqrt(xPos*xPos + yPos*yPos);
1148 theta = TMath::ATan2(rpxpy,zPos);
1149 eta = -TMath::Log(TMath::Tan(0.5*theta));
1155 Float_t pybypx, phi = 0., phi1;
1158 if(yPos>0) phi = 90.;
1159 if(yPos<0) phi = 270.;
1164 if(pybypx < 0) pybypx = - pybypx;
1165 phi1 = TMath::ATan(pybypx)*180./3.14159;
1167 if(xPos > 0 && yPos > 0) phi = phi1;
1168 if(xPos < 0 && yPos > 0) phi = 180 - phi1;
1169 if(xPos < 0 && yPos < 0) phi = 180 + phi1;
1170 if(xPos > 0 && yPos < 0) phi = 360 - phi1;
1173 phi = phi*3.14159/180.;
1190 Double_t chiA(1.), chiC(1.), dQX(0.), dQY(0.);
1200 dQX = chiA*chiA*vB.X()+chiC*chiC*vA.X();
1201 dQY = chiA*chiA*vB.Y()+chiC*chiC*vA.Y();
1209 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 10, n, dQX, dQY);
1232 Double_t Qxc(vA.X());
1233 Double_t Qyc(vA.Y());
1234 Double_t Qxa(vB.X());
1235 Double_t Qya(vB.Y());
1239 Double_t Qxamean(0);
1241 Double_t Qyamean(0);
1244 Double_t Qxcmean(0);
1246 Double_t Qycmean(0);
1260 }
else if (n == 3) {
1272 Double_t QxaCor = (Qxa - Qxamean)/Qxarms;
1273 Double_t QyaCor = (Qya - Qyamean)/Qyarms;
1274 Double_t QxcCor = (Qxc - Qxcmean)/Qxcrms;
1275 Double_t QycCor = (Qyc - Qycmean)/Qycrms;
1277 vA.Set(QxcCor, QycCor);
1278 vB.Set(QxaCor, QyaCor);
1281 Double_t QxaCor = 0.;
1282 Double_t QyaCor = 0.;
1283 Double_t QxcCor = 0.;
1284 Double_t QycCor = 0.;
1287 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 8, n, QxaCor, QyaCor);
1288 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 9, n, QxcCor, QycCor);
1291 vA.Set(QxcCor, QycCor);
1292 vB.Set(QxaCor, QyaCor);
1299 Double_t Qxc(vA.X());
1300 Double_t Qyc(vA.Y());
1301 Double_t Qxa(vB.X());
1302 Double_t Qya(vB.Y());
1305 Double_t Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1307 Double_t Qxamean(
fQxavsV0[n-1]->GetBinContent(
fQxavsV0[n-1]->FindBin(Cen)));
1309 Double_t Qyamean(
fQyavsV0[n-1]->GetBinContent(
fQyavsV0[n-1]->FindBin(Cen)));
1312 Double_t Qxcmean(
fQxcvsV0[n-1]->GetBinContent(
fQxcvsV0[n-1]->FindBin(Cen)));
1314 Double_t Qycmean(
fQycvsV0[n-1]->GetBinContent(
fQycvsV0[n-1]->FindBin(Cen)));
1329 Double_t QxaR = Qxa - Qxamean;
1330 Double_t QyaR = Qya - Qyamean;
1331 Double_t QxcR = Qxc - Qxcmean;
1332 Double_t QycR = Qyc - Qycmean;
1333 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1348 Double_t Qxc(vA.X());
1349 Double_t Qyc(vA.Y());
1350 Double_t Qxa(vB.X());
1351 Double_t Qya(vB.Y());
1352 Double_t MultC = vA.
GetMult();
1353 Double_t MultA = vB.
GetMult();
1355 Double_t Cen = - 999;
1357 if(
fEvent->GetRunNumber() < 209122){
1360 Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1362 AliMultSelection *MultSelection = 0x0;
1363 MultSelection = (AliMultSelection * )
fEvent->FindListObject(
"MultSelection");
1364 if( !MultSelection) {
1366 AliWarning(
"AliMultSelection not found, did you Run AliMultSelectionTask? \n");
1368 Cen = MultSelection->GetMultiplicityPercentile(
"V0M");
1373 Double_t Qxamean(
fQxavsV0[n-1]->GetBinContent(
fQxavsV0[n-1]->FindBin(Cen)));
1375 Double_t Qyamean(
fQyavsV0[n-1]->GetBinContent(
fQyavsV0[n-1]->FindBin(Cen)));
1378 Double_t Qxcmean(
fQxcvsV0[n-1]->GetBinContent(
fQxcvsV0[n-1]->FindBin(Cen)));
1380 Double_t Qycmean(
fQycvsV0[n-1]->GetBinContent(
fQycvsV0[n-1]->FindBin(Cen)));
1383 Double_t QxaR = Qxa - Qxamean*MultA;
1384 Double_t QyaR = Qya - Qyamean*MultA;
1385 Double_t QxcR = Qxc - Qxcmean*MultC;
1386 Double_t QycR = Qyc - Qycmean*MultC;
1387 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1398 cout <<
" WARNING: recentering not possible for harmonic " << n <<
" (delta calibration) " << endl;
1411 Float_t v0Centr(
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M"));
1425 Int_t run(
fEvent->GetRunNumber());
1443 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1444 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1445 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1446 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1460 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root");
1462 printf(
"OADB file $ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root cannot be opened, CALIBRATION FAILED !");
1466 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr");
1468 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1471 if(!(cont->GetObject(run))){
1474 Int_t runs11h[] = {170593, 170572, 170556, 170552, 170546, 170390, 170389, 170388, 170387, 170315, 170313, 170312, 170311, 170309, 170308, 170306, 170270, 170269, 170268, 170267, 170264, 170230, 170228, 170208, 170207, 170205, 170204, 170203, 170195, 170193, 170163, 170162, 170159, 170155, 170152, 170091, 170089, 170088, 170085, 170084, 170083, 170081, 170040, 170038, 170036, 170027, 169981, 169975, 169969, 169965, 169961, 169956, 169926, 169924, 169923, 169922, 169919, 169918, 169914, 169859, 169858, 169855, 169846, 169838, 169837, 169835, 169683, 169628, 169591, 169590, 169588, 169587, 169586, 169584, 169557, 169555, 169554, 169553, 169550, 169515, 169512, 169506, 169504, 169498, 169475, 169420, 169419, 169418, 169417, 169415, 169411, 169238, 169236, 169167, 169160, 169156, 169148, 169145, 169144, 169143, 169138, 169099, 169094, 169091, 169045, 169044, 169040, 169035, 168992, 168988, 168984, 168826, 168777, 168514, 168512, 168511, 168467, 168464, 168461, 168460, 168458, 168362, 168361, 168356, 168342, 168341, 168325, 168322, 168318, 168311, 168310, 168213, 168212, 168208, 168207, 168206, 168205, 168204, 168203, 168181, 168177, 168175, 168173, 168172, 168171, 168115, 168108, 168107, 168105, 168104, 168103, 168076, 168069, 168068, 168066, 167988, 167987, 167986, 167985, 167921, 167920, 167915, 167909, 167903, 167902, 167818, 167814, 167813, 167808, 167807, 167806, 167713, 167712, 167711, 167706, 167693};
1475 for(Int_t r(0); r < 176; r++) {
1476 if(run == runs11h[r]) {
1477 printf(
" > run has been identified as 11h < \n");
1502 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 137366)\n",run);
1505 printf(
" > run has been identified as 10h < \n");
1507 TProfile* fMultVZERO = ((TH2F *) cont->GetObject(run))->ProfileX();
1509 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1513 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1515 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1517 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1519 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1522 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1524 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1526 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1528 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1533 fMultVZERO->Fit(fpol0,
"N0",
"",0,31);
1534 for(Int_t i(0); i < 4; i++) cuts->
SetVZEROCpol(i, fpol0->GetParameter(0));
1535 fMultVZERO->Fit(fpol0,
"N0",
"",32,64);
1536 for(Int_t i(0); i < 4; i++) cuts->
SetVZEROApol(i, fpol0->GetParameter(0));
1546 for(Int_t iside=0;iside<2;iside++){
1547 for(Int_t icoord=0;icoord<2;icoord++){
1548 for(Int_t i=0;i < 9;i++){
1550 if(iside==0 && icoord==0)
1551 snprintf(namecont,100,
"hQxc2_%i",i);
1552 else if(iside==1 && icoord==0)
1553 snprintf(namecont,100,
"hQxa2_%i",i);
1554 else if(iside==0 && icoord==1)
1555 snprintf(namecont,100,
"hQyc2_%i",i);
1556 else if(iside==1 && icoord==1)
1557 snprintf(namecont,100,
"hQya2_%i",i);
1559 cont = (AliOADBContainer*) foadb->Get(namecont);
1561 printf(
"OADB object %s is not available in the file\n",namecont);
1565 if(!(cont->GetObject(run))){
1566 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1574 fMeanQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1575 fWidthQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1578 if(iside==0 && icoord==0)
1579 snprintf(namecont,100,
"hQxc3_%i",i);
1580 else if(iside==1 && icoord==0)
1581 snprintf(namecont,100,
"hQxa3_%i",i);
1582 else if(iside==0 && icoord==1)
1583 snprintf(namecont,100,
"hQyc3_%i",i);
1584 else if(iside==1 && icoord==1)
1585 snprintf(namecont,100,
"hQya3_%i",i);
1587 cont = (AliOADBContainer*) foadb->Get(namecont);
1589 printf(
"OADB object %s is not available in the file\n",namecont);
1593 if(!(cont->GetObject(run))){
1594 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1597 fMeanQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1598 fWidthQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1618 Int_t run(
fEvent->GetRunNumber());
1635 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1636 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1637 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1638 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1653 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root");
1655 printf(
"OADB file $ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root cannot be opened, CALIBRATION FAILED !");
1660 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr_filtered");
1662 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1665 if(!(cont->GetObject(run))) {
1668 Int_t runs11h[] = {170593, 170572, 170556, 170552, 170546, 170390, 170389, 170388, 170387, 170315, 170313, 170312, 170311, 170309, 170308, 170306, 170270, 170269, 170268, 170267, 170264, 170230, 170228, 170208, 170207, 170205, 170204, 170203, 170195, 170193, 170163, 170162, 170159, 170155, 170152, 170091, 170089, 170088, 170085, 170084, 170083, 170081, 170040, 170038, 170036, 170027, 169981, 169975, 169969, 169965, 169961, 169956, 169926, 169924, 169923, 169922, 169919, 169918, 169914, 169859, 169858, 169855, 169846, 169838, 169837, 169835, 169683, 169628, 169591, 169590, 169588, 169587, 169586, 169584, 169557, 169555, 169554, 169553, 169550, 169515, 169512, 169506, 169504, 169498, 169475, 169420, 169419, 169418, 169417, 169415, 169411, 169238, 169236, 169167, 169160, 169156, 169148, 169145, 169144, 169143, 169138, 169099, 169094, 169091, 169045, 169044, 169040, 169035, 168992, 168988, 168984, 168826, 168777, 168514, 168512, 168511, 168467, 168464, 168461, 168460, 168458, 168362, 168361, 168356, 168342, 168341, 168325, 168322, 168318, 168311, 168310, 168213, 168212, 168208, 168207, 168206, 168205, 168204, 168203, 168181, 168177, 168175, 168173, 168172, 168171, 168115, 168108, 168107, 168105, 168104, 168103, 168076, 168069, 168068, 168066, 167988, 167987, 167986, 167985, 167921, 167920, 167915, 167909, 167903, 167902, 167818, 167814, 167813, 167808, 167807, 167806, 167713, 167712, 167711, 167706, 167693};
1669 for(Int_t r(0); r < 176; r++) {
1670 if(run == runs11h[r]) {
1671 printf(
" > run has been identified as 11h < \n");
1696 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 138275)\n",run);
1699 printf(
" > run has been identified as 10h < \n");
1701 TProfile* fMultVZERO =
static_cast<TProfile*
>(cont->GetObject(run));
1703 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1708 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1710 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1712 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1714 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1717 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1719 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1721 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1723 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1734 AliOADBContainer* h[5][4];
1735 for(Int_t i(0); i < 5; i++) {
1736 h[i][0] = (AliOADBContainer*)foadb->Get(Form(
"hQxa%i_filtered", i+1));
1737 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1F*
>(h[i][0]->GetObject(run));
1738 h[i][1] = (AliOADBContainer*)foadb->Get(Form(
"hQya%i_filtered", i+1));
1739 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1F*
>(h[i][1]->GetObject(run));
1740 h[i][2] = (AliOADBContainer*)foadb->Get(Form(
"hQxc%i_filtered", i+1));
1741 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1F*
>(h[i][2]->GetObject(run));
1742 h[i][3] = (AliOADBContainer*)foadb->Get(Form(
"hQyc%i_filtered", i+1));
1743 if(h[i][3])
fQycvsV0[i] =
static_cast<TH1F*
>(h[i][3]->GetObject(run));
1765 Int_t run(
fEvent->GetRunNumber());
1782 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1783 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1784 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1785 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1800 TFile *foadb = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root");
1802 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1805 TH3F* Weights =
dynamic_cast<TH3F*
>(foadb->FindObjectAny(
"LHC11h")->FindObject(
"gHistVZEROChannelGainEqualizationMap"));
1807 printf(
"gHistVZEROChannelGainEqualizationMap is not available in the file\n");
1830 Int_t runs11h[] = {167915, 168115, 168460, 169035, 169238, 169859, 170228, 167920, 168310, 168464, 169091, 169411, 169923, 170230, 167985, 168311, 168467, 169094, 169415, 170027, 170268, 167987, 168322, 168511, 169138, 169417, 170081, 170269, 167988, 168325, 168512, 169144, 169835, 170155, 170270, 168069, 168341, 168514, 169145, 169837, 170159, 170306, 168076, 168342, 168777, 169148, 169838, 170163, 170308, 168105, 168361, 168826, 169156, 169846, 170193, 170309, 168107, 168362, 168988, 169160, 169855, 170203, 168108, 168458, 168992, 169167, 169858, 170204};
1832 for(Int_t r(0); r < 68; r++) {
1833 if(run == runs11h[r]) {
1838 printf(
" > run has been identified as 11h Full TPC Flow < \n");
1840 printf(
" > run has NOT been identified as 11h Full TPC Flow, use default for 11h < \n");
1849 Weights->GetXaxis()->SetRange(RunBin,RunBin);
1850 TH2D* fMultVZEROCen =
dynamic_cast<TH2D*
>(Weights->Project3D(
"zy"));
1854 TFile *fqvec = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root");
1856 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1862 for(Int_t i(0); i < 3; i++) {
1863 h[i][0] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%ixRecenteringMap",i+1)));
1864 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1D*
>(h[i][0]->ProjectionY(Form(
"fQxavsV0[%i]",i),RunBin,RunBin));
1865 h[i][1] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%iyRecenteringMap",i+1)));
1866 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1D*
>(h[i][1]->ProjectionY(Form(
"fQyavsV0[%i]",i),RunBin,RunBin));
1867 h[i][2] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%ixRecenteringMap",i+1)));
1868 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1D*
>(h[i][2]->ProjectionY(Form(
"fQxcvsV0[%i]",i),RunBin,RunBin));
1869 h[i][3] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%iyRecenteringMap",i+1)));
1870 if(h[i][3])
fQycvsV0[i] =
static_cast<TH1D*
>(h[i][3]->ProjectionY(Form(
"fQycvsV0[%i]",i),RunBin,RunBin));
virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
Float_t GetPmdEta(Float_t xPos, Float_t yPos, Float_t zPos)
TArrayD * fChi2A
current event
virtual void ClearCachedRun()
void FindDaughters(Bool_t keepDaughtersInRPselection=kFALSE)
void SetVZEROCalibrationForTrackCuts(AliFlowTrackCuts *cuts)
void SetChi3C(TArrayD *Chi3C)
virtual void SetDaughter(Int_t, AliFlowTrackSimple *)
virtual AliFlowVector GetQ(Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
void SetEta(Double_t eta)
virtual void Clear(Option_t *o="")
TObject * GetInputObject(Int_t i)
virtual Int_t GetNDaughters() const
void SetChi3A(TArrayD *Chi3A)
TArrayD * fChi3C
chi vs cent for vzero A ep_3
TArrayD * fChi2C
chi vs cent for vzero A ep_2
void SetMCReactionPlaneAngle(const AliMCEvent *mcEvent)
AliFlowEventSimple & operator=(const AliFlowEventSimple &anEvent)
AliFlowEvent & operator=(const AliFlowEvent &event)
void SetChi2A(TArrayD *Chi2A)
virtual Int_t GetIDDaughter(Int_t) const
void AddTrack(AliFlowTrackSimple *track)
virtual Bool_t IsSelected(TObject *obj, Int_t id=-666)
AliVEvent * fEvent
recentering
void SetVZEROgainEqualisationCen(TH2 *g)
ClassImp(AliFlowEvent) AliFlowEvent
trackParameterType GetParamType() const
void TagRP(Bool_t b=kTRUE)
void IncrementNumberOfPOIs(Int_t poiType=1)
AliFlowTrack * GetTrack(Int_t i)
Bool_t GetVZEROgainEqualizationPerRing() const
void SetForRPSelection(Bool_t b=kTRUE)
Bool_t GetApplyRecentering() const
Int_t GetNumberOfInputObjects() const
void SetDeltaVZEROCalibrationForTrackCuts(AliFlowTrackCuts *cuts)
void Fill(AliFlowTrackCuts *rpCuts, AliFlowTrackCuts *poiCuts)
Bool_t FillFlowTrack(AliFlowTrack *track) const
TH1 * fQxcvsV0[5]
recentering
void SetVZEROCpol(Int_t ring, Float_t f)
Bool_t GetDivSigma() const
Float_t fWidthQ[9][2][2]
recentering
void SetVZEROgainEqualisation(TH1 *g)
Float_t GetPmdPhi(Float_t xPos, Float_t yPos)
void Tag(Int_t n, Bool_t b=kTRUE)
AliVEvent * GetEvent() const
TObjArray * fTrackCollection
void SetSource(trackSource s)
Float_t fMeanQv3[9][2][2]
recentering
virtual void Get2Qsub(AliFlowVector *Qarray, Int_t n=2, TList *weightsList=NULL, Bool_t usePhiWeights=kFALSE, Bool_t usePtWeights=kFALSE, Bool_t useEtaWeights=kFALSE)
void SetPhi(Double_t phi)
Int_t fVZEROcentralityBin
cached calibration info for vzero
Bool_t GetUseVZERORing(Int_t i) const
void SetWeight(Double_t weight)
void SetBetaVZEROCalibrationForTrackCuts(AliFlowTrackCuts *cuts)
void SetForPOISelection(Bool_t b=kTRUE)
TObjArray * fMothersCollection
void SetMCReactionPlaneAngle(Double_t fPhiRP)
Float_t fMeanQ[9][2][2]
centrality bin for the current event
TH1 * fQycvsV0[5]
recentering
AliFlowTrack * ReuseTrack(Int_t i)
virtual void Get2Qsub(AliFlowVector *Qarray, Int_t n=2, TList *weightsList=0x0, Bool_t usePhiWeights=0x0, Bool_t usePtWeights=0x0, Bool_t useEtaWeights=0x0)
TH1 * fQyavsV0[5]
recentering
void InsertTrack(AliFlowTrack *)
void SetChi2C(TArrayD *Chi2C)
TH1 * fQxavsV0[5]
recentering
TArrayD * fChi3A
chi vs cent for vzero C ep_2
Float_t fWidthQv3[9][2][2]
recentering
void SetVZEROApol(Int_t ring, Float_t f)