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"
59 AliFlowEventSimple(), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
62 for(Int_t i(0); i < 9; i++) {
63 for(Int_t j(0); j < 2; j++) {
64 for(Int_t k(0); k < 2; k++) {
66 fWidthQ[i][j][k] = 0.;
67 fMeanQv3[i][j][k] = 0.;
68 fWidthQv3[i][j][k] = 0.;
72 for(Int_t i(0); i < 5; i++) {
79 cout <<
"AliFlowEvent: Default constructor to be used only by root for io" << endl;
84 AliFlowEventSimple(n), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
87 for(Int_t i(0); i < 9; i++) {
88 for(Int_t j(0); j < 2; j++) {
89 for(Int_t k(0); k < 2; k++) {
97 for(Int_t i(0); i < 5; i++) {
107 AliFlowEventSimple(event), fApplyRecentering(event.fApplyRecentering), fDivSigma(event.fDivSigma), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
110 for(Int_t i(0); i < 9; i++) {
111 for(Int_t j(0); j < 2; j++) {
112 for(Int_t k(0); k < 2; k++) {
120 for(Int_t i(0); i < 5; i++) {
132 if (&event==
this)
return *
this;
143 for(Int_t i(0); i < 9; i++) {
144 for(Int_t j(0); j < 2; j++) {
145 for(Int_t k(0); k < 2; k++) {
146 fMeanQ[i][j][k] =
event.fMeanQ[i][j][k];
147 fWidthQ[i][j][k] =
event.fWidthQ[i][j][k];
148 fMeanQv3[i][j][k] =
event.fMeanQv3[i][j][k];
149 fWidthQv3[i][j][k] =
event.fWidthQv3[i][j][k];
153 for(Int_t i(0); i < 5; i++) {
178 if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Cocktail Header"))
180 AliGenCocktailEventHeader *headerC =
dynamic_cast<AliGenCocktailEventHeader *
> (mcEvent-> GenEventHeader());
183 TList *lhd = headerC->GetHeaders();
186 AliGenHijingEventHeader *hdh =
dynamic_cast<AliGenHijingEventHeader *
> (lhd->At(0));
192 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Therminator"))
194 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
198 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"GeVSim header"))
200 AliGenGeVSimEventHeader* headerG =
dynamic_cast<AliGenGeVSimEventHeader*
>(mcEvent->GenEventHeader());
204 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Hijing"))
206 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
210 else if (!strcmp(mcEvent-> GenEventHeader()->GetName(),
"Ampt"))
212 AliGenHijingEventHeader* headerH =
dynamic_cast<AliGenHijingEventHeader*
>(mcEvent->GenEventHeader());
216 else if (!strcmp(mcEvent->GenEventHeader()->GetName(),
"EPOS"))
218 AliGenEposEventHeader* headerE =
dynamic_cast<AliGenEposEventHeader*
>(mcEvent->GenEventHeader());
224 AliCollisionGeometry* header =
dynamic_cast<AliCollisionGeometry*
>(mcEvent->GenEventHeader());
231 const AliCFManager* rpCFManager,
232 const AliCFManager* poiCFManager):
233 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
236 for(Int_t i(0); i < 9; i++) {
237 for(Int_t j(0); j < 2; j++) {
238 for(Int_t k(0); k < 2; k++) {
246 for(Int_t i(0); i < 5; i++) {
254 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
257 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
260 AliMCParticle* pParticle =
dynamic_cast<AliMCParticle*
>(anInput->GetTrack(itrkN));
261 if (!pParticle)
continue;
265 Bool_t poiOK = kTRUE;
266 if (rpCFManager && poiCFManager)
268 rpOK = rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
269 poiOK = poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pParticle);
271 if (!(rpOK||poiOK))
continue;
276 if (rpOK && rpCFManager)
281 if (poiOK && poiCFManager)
294 const AliCFManager* rpCFManager,
295 const AliCFManager* poiCFManager ):
296 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
299 for(Int_t i(0); i < 9; i++) {
300 for(Int_t j(0); j < 2; j++) {
301 for(Int_t k(0); k < 2; k++) {
309 for(Int_t i(0); i < 5; i++) {
316 if(anInput->GetRunNumber())
fRun = anInput->GetRunNumber();
320 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
323 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
325 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
329 Bool_t poiOK = kTRUE;
330 if (rpCFManager && poiCFManager)
332 rpOK = ( rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
333 rpCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
334 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
335 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
337 if (!(rpOK || poiOK))
continue;
344 if(rpOK && rpCFManager)
350 if(poiOK && poiCFManager)
362 const AliCFManager* rpCFManager,
363 const AliCFManager* poiCFManager):
364 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
367 for(Int_t i(0); i < 9; i++) {
368 for(Int_t j(0); j < 2; j++) {
369 for(Int_t k(0); k < 2; k++) {
377 for(Int_t i(0); i < 5; i++) {
385 if(anInput->GetRunNumber())
fRun = anInput->GetRunNumber();
388 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
391 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
393 AliAODTrack* pParticle =
dynamic_cast<AliAODTrack*
>(anInput->GetTrack(itrkN));
394 if(!pParticle) AliFatal(
"Not a standard AOD");
398 Bool_t poiOK = kTRUE;
399 if (rpCFManager && poiCFManager)
401 rpOK = ( rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
402 rpCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
403 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
404 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
406 if (!(rpOK || poiOK))
continue;
454 const AliMCEvent* anInputMc,
456 const AliCFManager* rpCFManager,
457 const AliCFManager* poiCFManager ):
458 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
461 for(Int_t i(0); i < 9; i++) {
462 for(Int_t j(0); j < 2; j++) {
463 for(Int_t k(0); k < 2; k++) {
471 for(Int_t i(0); i < 5; i++) {
480 AliFatal(
"WRONG OPTION IN AliFlowEventMaker::FillTracks(AliESDEvent* anInput, AliMCEvent* anInputMc, KineSource anOption)");
484 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
486 Int_t iNumberOfInputTracksMC = anInputMc->GetNumberOfTracks() ;
487 if (iNumberOfInputTracksMC==-1)
489 AliError(
"Skipping Event -- No MC information available for this event");
494 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
496 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
498 Int_t iLabel = pParticle->GetLabel();
500 AliMCParticle* pMcParticle = (AliMCParticle*) anInputMc->GetTrack(TMath::Abs(iLabel));
503 if (TMath::Abs(pParticle->GetLabel())!=pMcParticle->Label())
504 AliWarning(Form(
"pParticle->GetLabel()!=pMcParticle->Label(), %i, %i", pParticle->GetLabel(), pMcParticle->Label()));
507 Bool_t rpOK = kFALSE;
508 Bool_t poiOK = kFALSE;
509 if (rpCFManager && poiCFManager)
513 if (rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,
"mcGenCuts1") &&
514 rpCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle))
516 if (poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle,
"mcGenCuts2") &&
517 poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle))
522 if (rpCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
524 if (poiCFManager->CheckParticleCuts(AliCFManager::kPartGenCuts,pMcParticle))
529 if (!(rpOK || poiOK))
continue;
542 if (rpOK && rpCFManager)
547 if (poiOK && poiCFManager)
560 const AliMultiplicity* anInputTracklets,
561 const AliCFManager* poiCFManager ):
562 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
565 for(Int_t i(0); i < 9; i++) {
566 for(Int_t j(0); j < 2; j++) {
567 for(Int_t k(0); k < 2; k++) {
575 for(Int_t i(0); i < 5; i++) {
583 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
586 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
588 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
591 Bool_t poiOK = kTRUE;
594 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
595 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
597 if (!poiOK)
continue;
603 if(poiOK && poiCFManager)
614 anInputTracklets = anInput->GetMultiplicity();
615 Int_t multSPD = anInputTracklets->GetNumberOfTracklets();
618 for (Int_t itracklet=0; itracklet<multSPD; ++itracklet) {
619 Float_t thetaTr= anInputTracklets->GetTheta(itracklet);
620 Float_t phiTr= anInputTracklets->GetPhi(itracklet);
622 Float_t etaTr = -TMath::Log(TMath::Tan(thetaTr/2.));
642 const AliCFManager* poiCFManager,
644 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
647 for(Int_t i(0); i < 9; i++) {
648 for(Int_t j(0); j < 2; j++) {
649 for(Int_t k(0); k < 2; k++) {
657 for(Int_t i(0); i < 5; i++) {
664 Int_t iNumberOfInputTracks = esd->GetNumberOfTracks() ;
667 Double_t dca[2] = {0.0,0.0}, cov[3] = {0.0,0.0,0.0};
670 AliESDtrack trackTPC;
673 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
676 if (!esd->GetTrack(itrkN))
continue;
678 Bool_t useTPC = kFALSE;
680 AliESDtrack* pParticle = esd->GetTrack(itrkN);
683 Bool_t poiOK = kTRUE;
687 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
688 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
691 if (!(poiOK))
continue;
693 AliExternalTrackParam *tpcTrack = (AliExternalTrackParam *)pParticle->GetTPCInnerParam();
703 const AliESDVertex *vertexSPD = esd->GetPrimaryVertexSPD();
704 const AliESDVertex *vertexTPC = esd->GetPrimaryVertexTPC();
706 AliExternalTrackParam copy(*tpcTrack);
708 copy.PropagateToDCA(vertexSPD,esd->GetMagneticField(),100.,dca,cov);
710 copy.PropagateToDCA(vertexTPC,esd->GetMagneticField(),100.,dca,cov);
722 if(poiOK && poiCFManager)
742 const TH2F* anInputFMDhist,
743 const AliCFManager* poiCFManager ):
744 AliFlowEventSimple(20), fApplyRecentering(-1), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
747 for(Int_t i(0); i < 9; i++) {
748 for(Int_t j(0); j < 2; j++) {
749 for(Int_t k(0); k < 2; k++) {
757 for(Int_t i(0); i < 5; i++) {
765 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
768 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
770 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
773 Bool_t poiOK = kTRUE;
776 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
777 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
779 if (!poiOK)
continue;
785 if(poiOK && poiCFManager)
797 Int_t iBinsEta = anInputFMDhist->GetNbinsX();
798 Int_t iBinsPhi = anInputFMDhist->GetNbinsY();
800 for (Int_t iEta = 1; iEta <= iBinsEta; iEta++){
801 Double_t etaFMD = anInputFMDhist->GetXaxis()->GetBinCenter(iEta);
802 for (Int_t iPhi = 1; iPhi <= iBinsPhi; iPhi++){
803 Double_t phiFMD = anInputFMDhist->GetYaxis()->GetBinCenter(iPhi);
804 Double_t weightFMD = anInputFMDhist->GetBinContent(iEta,iPhi);
806 if (weightFMD > 0.0) {
836 if (!mother)
continue;
838 for (Int_t iDaughterCandidate=0; iDaughterCandidate<
fNumberOfTracks; iDaughterCandidate++)
841 Int_t esdIndexDaughterCandidate = daughterCandidate->
GetID();
842 for (Int_t iDaughter=0; iDaughter<mother->
GetNDaughters(); iDaughter++)
845 if (esdIndexDaughter==esdIndexDaughterCandidate)
869 if (!rpCuts || !poiCuts)
return;
925 if (sourceRP==sourcePOI)
929 for (Int_t i=0; i<numberOfInputObjects; i++)
937 if (!(rp||poi))
continue;
943 if (!pTrack)
continue;
951 if (!pTrack)
continue;
958 else if (sourceRP!=sourcePOI)
969 if (!pTrack)
continue;
977 for (Int_t i=0; i<numberOfInputObjects; i++)
983 if (!pTrack)
continue;
1024 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1028 for(Int_t i(0); i < 9; i++) {
1029 for(Int_t j(0); j < 2; j++) {
1030 for(Int_t k(0); k < 2; k++) {
1038 for(Int_t i(0); i < 5; i++) {
1046 Fill(rpCuts,poiCuts);
1053 const AliESDPmdTrack *pmdtracks,
1054 const AliCFManager* poiCFManager ):
1055 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1059 for(Int_t i(0); i < 9; i++) {
1060 for(Int_t j(0); j < 2; j++) {
1061 for(Int_t k(0); k < 2; k++) {
1069 for(Int_t i(0); i < 5; i++) {
1076 Float_t
GetPmdEta(Float_t xPos, Float_t yPos, Float_t zPos);
1077 Float_t
GetPmdPhi(Float_t xPos, Float_t yPos);
1079 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
1082 for (Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
1084 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
1086 Bool_t poiOK = kTRUE;
1089 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
1090 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
1092 if (!poiOK)
continue;
1098 if(poiOK && poiCFManager)
1109 Int_t npmdcl = anInput->GetNumberOfPmdTracks();
1110 printf(
"======There are %d PMD tracks in this event\n-------",npmdcl);
1112 for(Int_t iclust=0; iclust < npmdcl; iclust++){
1114 pmdtracks = anInput->GetPmdTrack(iclust);
1115 Int_t det = pmdtracks->GetDetector();
1117 Float_t clsX = pmdtracks->GetClusterX();
1118 Float_t clsY = pmdtracks->GetClusterY();
1119 Float_t clsZ = pmdtracks->GetClusterZ();
1120 Float_t ncell = pmdtracks->GetClusterCells();
1121 Float_t adc = pmdtracks->GetClusterADC();
1123 Float_t etacls =
GetPmdEta(clsX,clsY,clsZ);
1128 if(det == 0 && adc > 270 && ncell > 1){
1145 Float_t rpxpy, theta, eta;
1146 rpxpy = TMath::Sqrt(xPos*xPos + yPos*yPos);
1147 theta = TMath::ATan2(rpxpy,zPos);
1148 eta = -TMath::Log(TMath::Tan(0.5*theta));
1154 Float_t pybypx, phi = 0., phi1;
1157 if(yPos>0) phi = 90.;
1158 if(yPos<0) phi = 270.;
1163 if(pybypx < 0) pybypx = - pybypx;
1164 phi1 = TMath::ATan(pybypx)*180./3.14159;
1166 if(xPos > 0 && yPos > 0) phi = phi1;
1167 if(xPos < 0 && yPos > 0) phi = 180 - phi1;
1168 if(xPos < 0 && yPos < 0) phi = 180 + phi1;
1169 if(xPos > 0 && yPos < 0) phi = 360 - phi1;
1172 phi = phi*3.14159/180.;
1189 Double_t chiA(1.), chiC(1.), dQX(0.), dQY(0.);
1199 dQX = chiA*chiA*vB.X()+chiC*chiC*vA.X();
1200 dQY = chiA*chiA*vB.Y()+chiC*chiC*vA.Y();
1208 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 10, n, dQX, dQY);
1231 Double_t Qxc(vA.X());
1232 Double_t Qyc(vA.Y());
1233 Double_t Qxa(vB.X());
1234 Double_t Qya(vB.Y());
1238 Double_t Qxamean(0);
1240 Double_t Qyamean(0);
1243 Double_t Qxcmean(0);
1245 Double_t Qycmean(0);
1259 }
else if (n == 3) {
1271 Double_t QxaCor = (Qxa - Qxamean)/Qxarms;
1272 Double_t QyaCor = (Qya - Qyamean)/Qyarms;
1273 Double_t QxcCor = (Qxc - Qxcmean)/Qxcrms;
1274 Double_t QycCor = (Qyc - Qycmean)/Qycrms;
1276 vA.Set(QxcCor, QycCor);
1277 vB.Set(QxaCor, QyaCor);
1280 Double_t QxaCor = 0.;
1281 Double_t QyaCor = 0.;
1282 Double_t QxcCor = 0.;
1283 Double_t QycCor = 0.;
1286 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 8, n, QxaCor, QyaCor);
1287 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 9, n, QxcCor, QycCor);
1290 vA.Set(QxcCor, QycCor);
1291 vB.Set(QxaCor, QyaCor);
1298 Double_t Qxc(vA.X());
1299 Double_t Qyc(vA.Y());
1300 Double_t Qxa(vB.X());
1301 Double_t Qya(vB.Y());
1304 Double_t Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1306 Double_t Qxamean(
fQxavsV0[n-1]->GetBinContent(
fQxavsV0[n-1]->FindBin(Cen)));
1308 Double_t Qyamean(
fQyavsV0[n-1]->GetBinContent(
fQyavsV0[n-1]->FindBin(Cen)));
1311 Double_t Qxcmean(
fQxcvsV0[n-1]->GetBinContent(
fQxcvsV0[n-1]->FindBin(Cen)));
1313 Double_t Qycmean(
fQycvsV0[n-1]->GetBinContent(
fQycvsV0[n-1]->FindBin(Cen)));
1328 Double_t QxaR = Qxa - Qxamean;
1329 Double_t QyaR = Qya - Qyamean;
1330 Double_t QxcR = Qxc - Qxcmean;
1331 Double_t QycR = Qyc - Qycmean;
1332 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1347 Double_t Qxc(vA.X());
1348 Double_t Qyc(vA.Y());
1349 Double_t Qxa(vB.X());
1350 Double_t Qya(vB.Y());
1351 Double_t MultC = vA.
GetMult();
1352 Double_t MultA = vB.
GetMult();
1355 Double_t Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1357 Double_t Qxamean(
fQxavsV0[n-1]->GetBinContent(
fQxavsV0[n-1]->FindBin(Cen)));
1359 Double_t Qyamean(
fQyavsV0[n-1]->GetBinContent(
fQyavsV0[n-1]->FindBin(Cen)));
1362 Double_t Qxcmean(
fQxcvsV0[n-1]->GetBinContent(
fQxcvsV0[n-1]->FindBin(Cen)));
1364 Double_t Qycmean(
fQycvsV0[n-1]->GetBinContent(
fQycvsV0[n-1]->FindBin(Cen)));
1367 Double_t QxaR = Qxa - Qxamean*MultA;
1368 Double_t QyaR = Qya - Qyamean*MultA;
1369 Double_t QxcR = Qxc - Qxcmean*MultC;
1370 Double_t QycR = Qyc - Qycmean*MultC;
1371 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1382 cout <<
" WARNING: recentering not possible for harmonic " << n <<
" (delta calibration) " << endl;
1395 Float_t v0Centr(
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M"));
1409 Int_t run(
fEvent->GetRunNumber());
1427 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1428 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1429 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1430 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1444 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root");
1446 printf(
"OADB file $ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root cannot be opened, CALIBRATION FAILED !");
1450 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr");
1452 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1455 if(!(cont->GetObject(run))){
1458 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};
1459 for(Int_t r(0); r < 176; r++) {
1460 if(run == runs11h[r]) {
1461 printf(
" > run has been identified as 11h < \n");
1486 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 137366)\n",run);
1489 printf(
" > run has been identified as 10h < \n");
1491 TProfile* fMultVZERO = ((TH2F *) cont->GetObject(run))->ProfileX();
1493 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1497 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1499 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1501 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1503 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1506 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1508 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1510 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1512 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1517 fMultVZERO->Fit(fpol0,
"N0",
"",0,31);
1518 for(Int_t i(0); i < 4; i++) cuts->
SetVZEROCpol(i, fpol0->GetParameter(0));
1519 fMultVZERO->Fit(fpol0,
"N0",
"",32,64);
1520 for(Int_t i(0); i < 4; i++) cuts->
SetVZEROApol(i, fpol0->GetParameter(0));
1530 for(Int_t iside=0;iside<2;iside++){
1531 for(Int_t icoord=0;icoord<2;icoord++){
1532 for(Int_t i=0;i < 9;i++){
1534 if(iside==0 && icoord==0)
1535 snprintf(namecont,100,
"hQxc2_%i",i);
1536 else if(iside==1 && icoord==0)
1537 snprintf(namecont,100,
"hQxa2_%i",i);
1538 else if(iside==0 && icoord==1)
1539 snprintf(namecont,100,
"hQyc2_%i",i);
1540 else if(iside==1 && icoord==1)
1541 snprintf(namecont,100,
"hQya2_%i",i);
1543 cont = (AliOADBContainer*) foadb->Get(namecont);
1545 printf(
"OADB object %s is not available in the file\n",namecont);
1549 if(!(cont->GetObject(run))){
1550 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1558 fMeanQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1559 fWidthQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1562 if(iside==0 && icoord==0)
1563 snprintf(namecont,100,
"hQxc3_%i",i);
1564 else if(iside==1 && icoord==0)
1565 snprintf(namecont,100,
"hQxa3_%i",i);
1566 else if(iside==0 && icoord==1)
1567 snprintf(namecont,100,
"hQyc3_%i",i);
1568 else if(iside==1 && icoord==1)
1569 snprintf(namecont,100,
"hQya3_%i",i);
1571 cont = (AliOADBContainer*) foadb->Get(namecont);
1573 printf(
"OADB object %s is not available in the file\n",namecont);
1577 if(!(cont->GetObject(run))){
1578 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1581 fMeanQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1582 fWidthQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1602 Int_t run(
fEvent->GetRunNumber());
1619 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1620 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1621 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1622 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1637 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root");
1639 printf(
"OADB file $ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root cannot be opened, CALIBRATION FAILED !");
1644 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr_filtered");
1646 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1649 if(!(cont->GetObject(run))) {
1652 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};
1653 for(Int_t r(0); r < 176; r++) {
1654 if(run == runs11h[r]) {
1655 printf(
" > run has been identified as 11h < \n");
1680 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 138275)\n",run);
1683 printf(
" > run has been identified as 10h < \n");
1685 TProfile* fMultVZERO =
static_cast<TProfile*
>(cont->GetObject(run));
1687 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1692 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1694 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1696 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1698 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1701 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1703 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1705 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1707 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1718 AliOADBContainer* h[5][4];
1719 for(Int_t i(0); i < 5; i++) {
1720 h[i][0] = (AliOADBContainer*)foadb->Get(Form(
"hQxa%i_filtered", i+1));
1721 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1F*
>(h[i][0]->GetObject(run));
1722 h[i][1] = (AliOADBContainer*)foadb->Get(Form(
"hQya%i_filtered", i+1));
1723 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1F*
>(h[i][1]->GetObject(run));
1724 h[i][2] = (AliOADBContainer*)foadb->Get(Form(
"hQxc%i_filtered", i+1));
1725 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1F*
>(h[i][2]->GetObject(run));
1726 h[i][3] = (AliOADBContainer*)foadb->Get(Form(
"hQyc%i_filtered", i+1));
1727 if(h[i][3])
fQycvsV0[i] =
static_cast<TH1F*
>(h[i][3]->GetObject(run));
1749 Int_t run(
fEvent->GetRunNumber());
1766 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1767 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1768 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1769 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1784 TFile *foadb = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root");
1786 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1789 TH3F* Weights =
dynamic_cast<TH3F*
>(foadb->FindObjectAny(
"LHC11h")->FindObject(
"gHistVZEROChannelGainEqualizationMap"));
1791 printf(
"gHistVZEROChannelGainEqualizationMap is not available in the file\n");
1814 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};
1816 for(Int_t r(0); r < 68; r++) {
1817 if(run == runs11h[r]) {
1822 printf(
" > run has been identified as 11h Full TPC Flow < \n");
1824 printf(
" > run has NOT been identified as 11h Full TPC Flow, use default for 11h < \n");
1833 Weights->GetXaxis()->SetRange(RunBin,RunBin);
1834 TH2D* fMultVZEROCen =
dynamic_cast<TH2D*
>(Weights->Project3D(
"zy"));
1838 TFile *fqvec = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root");
1840 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1846 for(Int_t i(0); i < 3; i++) {
1847 h[i][0] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%ixRecenteringMap",i+1)));
1848 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1D*
>(h[i][0]->ProjectionY(Form(
"fQxavsV0[%i]",i),RunBin,RunBin));
1849 h[i][1] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%iyRecenteringMap",i+1)));
1850 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1D*
>(h[i][1]->ProjectionY(Form(
"fQyavsV0[%i]",i),RunBin,RunBin));
1851 h[i][2] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%ixRecenteringMap",i+1)));
1852 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1D*
>(h[i][2]->ProjectionY(Form(
"fQxcvsV0[%i]",i),RunBin,RunBin));
1853 h[i][3] = (TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%iyRecenteringMap",i+1)));
1854 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)