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;
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);
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");
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()));
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);
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;
681 AliESDtrack* pParticle = esd->GetTrack(itrkN);
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);
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;
842 Int_t esdIndexDaughterCandidate = daughterCandidate->
GetID();
846 if (esdIndexDaughter==esdIndexDaughterCandidate)
870 if (!rpCuts || !poiCuts)
return;
940 if (sourceRP==sourcePOI)
944 for (
Int_t i=0; i<numberOfInputObjects; i++)
952 if (!(rp||poi))
continue;
958 if (!pTrack)
continue;
966 if (!pTrack)
continue;
973 else if (sourceRP!=sourcePOI)
984 if (!pTrack)
continue;
992 for (
Int_t i=0; i<numberOfInputObjects; i++)
998 if (!pTrack)
continue;
1039 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1043 for(
Int_t i(0); i < 9; i++) {
1044 for(
Int_t j(0); j < 2; j++) {
1045 for(
Int_t k(0); k < 2; k++) {
1053 for(
Int_t i(0); i < 5; i++) {
1061 Fill(rpCuts,poiCuts);
1068 const AliESDPmdTrack *pmdtracks,
1069 const AliCFManager* poiCFManager ):
1070 AliFlowEventSimple(20), fApplyRecentering(kFALSE), fDivSigma(kTRUE), fCachedRun(-1), fVZEROcentralityBin(-1), fEvent(0x0), fChi2A(0x0), fChi2C(0x0), fChi3A(0x0), fChi3C(0x0)
1074 for(
Int_t i(0); i < 9; i++) {
1075 for(
Int_t j(0); j < 2; j++) {
1076 for(
Int_t k(0); k < 2; k++) {
1084 for(
Int_t i(0); i < 5; i++) {
1094 Int_t iNumberOfInputTracks = anInput->GetNumberOfTracks() ;
1097 for (
Int_t itrkN=0; itrkN<iNumberOfInputTracks; itrkN++)
1099 AliESDtrack* pParticle = anInput->GetTrack(itrkN);
1104 poiOK = ( poiCFManager->CheckParticleCuts(AliCFManager::kPartRecCuts,pParticle) &&
1105 poiCFManager->CheckParticleCuts(AliCFManager::kPartSelCuts,pParticle));
1107 if (!poiOK)
continue;
1113 if(poiOK && poiCFManager)
1124 Int_t npmdcl = anInput->GetNumberOfPmdTracks();
1125 printf(
"======There are %d PMD tracks in this event\n-------",npmdcl);
1127 for(
Int_t iclust=0; iclust < npmdcl; iclust++){
1129 pmdtracks = anInput->GetPmdTrack(iclust);
1130 Int_t det = pmdtracks->GetDetector();
1132 Float_t clsX = pmdtracks->GetClusterX();
1133 Float_t clsY = pmdtracks->GetClusterY();
1134 Float_t clsZ = pmdtracks->GetClusterZ();
1135 Float_t ncell = pmdtracks->GetClusterCells();
1136 Float_t adc = pmdtracks->GetClusterADC();
1143 if(det == 0 && adc > 270 && ncell > 1){
1161 rpxpy = TMath::Sqrt(xPos*xPos + yPos*yPos);
1162 theta = TMath::ATan2(rpxpy,zPos);
1163 eta = -TMath::Log(TMath::Tan(0.5*theta));
1169 Float_t pybypx, phi = 0., phi1;
1172 if(yPos>0) phi = 90.;
1173 if(yPos<0) phi = 270.;
1178 if(pybypx < 0) pybypx = - pybypx;
1179 phi1 = TMath::ATan(pybypx)*180./3.14159;
1181 if(xPos > 0 && yPos > 0) phi = phi1;
1182 if(xPos < 0 && yPos > 0) phi = 180 - phi1;
1183 if(xPos < 0 && yPos < 0) phi = 180 + phi1;
1184 if(xPos > 0 && yPos < 0) phi = 360 - phi1;
1187 phi = phi*3.14159/180.;
1204 Double_t chiA(1.), chiC(1.), dQX(0.), dQY(0.);
1214 dQX = chiA*chiA*vB.X()+chiC*chiC*vA.X();
1215 dQY = chiA*chiA*vB.Y()+chiC*chiC*vA.Y();
1223 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 10, n, dQX, dQY);
1274 }
else if (n == 3) {
1286 Double_t QxaCor = (Qxa - Qxamean)/Qxarms;
1287 Double_t QyaCor = (Qya - Qyamean)/Qyarms;
1288 Double_t QxcCor = (Qxc - Qxcmean)/Qxcrms;
1289 Double_t QycCor = (Qyc - Qycmean)/Qycrms;
1291 vA.Set(QxcCor, QycCor);
1292 vB.Set(QxaCor, QyaCor);
1301 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 8, n, QxaCor, QyaCor);
1302 fEvent->GetEventplane()->CalculateVZEROEventPlane(
fEvent, 9, n, QxcCor, QycCor);
1305 vA.Set(QxcCor, QycCor);
1306 vB.Set(QxaCor, QyaCor);
1320 if(
fEvent->GetRunNumber() < 209122){
1323 Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1325 AliMultSelection *MultSelection = 0x0;
1326 MultSelection = (AliMultSelection * )
fEvent->FindListObject(
"MultSelection");
1327 if( !MultSelection) {
1329 AliWarning(
"AliMultSelection not found, did you Run AliMultSelectionTask? \n");
1331 Cen = MultSelection->GetMultiplicityPercentile(
"V0M");
1358 AliFatal(
"no calibration available for n>4 for VZEROs \n");
1365 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1389 if(
fEvent->GetRunNumber() < 209122){
1392 Cen =
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M");
1394 AliMultSelection *MultSelection = 0x0;
1395 MultSelection = (AliMultSelection * )
fEvent->FindListObject(
"MultSelection");
1396 if( !MultSelection) {
1398 AliWarning(
"AliMultSelection not found, did you Run AliMultSelectionTask? \n");
1400 Cen = MultSelection->GetMultiplicityPercentile(
"V0M");
1415 Double_t QxaR = Qxa - Qxamean*MultA;
1416 Double_t QyaR = Qya - Qyamean*MultA;
1417 Double_t QxcR = Qxc - Qxcmean*MultC;
1418 Double_t QycR = Qyc - Qycmean*MultC;
1419 if(
fDivSigma && Qxarms>0. && Qyarms>0. && Qxcrms>0. && Qycrms>0.) {
1430 cout <<
" WARNING: recentering not possible for harmonic " << n <<
" (delta calibration) " << endl;
1443 Float_t v0Centr(
fEvent->GetCentrality()->GetCentralityPercentile(
"V0M"));
1475 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1476 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1477 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1478 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1492 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root");
1494 printf(
"OADB file $ALICE_PHYSICS/OADB/PWGCF/VZERO/VZEROcalibEP.root cannot be opened, CALIBRATION FAILED !");
1498 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr");
1500 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1503 if(!(cont->GetObject(run))){
1506 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};
1507 for(
Int_t r(0); r < 176; r++) {
1508 if(run == runs11h[r]) {
1509 printf(
" > run has been identified as 11h < \n");
1534 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 137366)\n",run);
1537 printf(
" > run has been identified as 10h < \n");
1539 TProfile* fMultVZERO = ((
TH2F *) cont->GetObject(run))->ProfileX();
1541 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1545 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1547 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1549 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1551 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1554 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1556 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1558 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1560 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1565 fMultVZERO->Fit(fpol0,
"N0",
"",0,31);
1567 fMultVZERO->Fit(fpol0,
"N0",
"",32,64);
1578 for(
Int_t iside=0;iside<2;iside++){
1579 for(
Int_t icoord=0;icoord<2;icoord++){
1580 for(
Int_t i=0;i < 9;i++){
1582 if(iside==0 && icoord==0)
1583 snprintf(namecont,100,
"hQxc2_%i",i);
1584 else if(iside==1 && icoord==0)
1585 snprintf(namecont,100,
"hQxa2_%i",i);
1586 else if(iside==0 && icoord==1)
1587 snprintf(namecont,100,
"hQyc2_%i",i);
1588 else if(iside==1 && icoord==1)
1589 snprintf(namecont,100,
"hQya2_%i",i);
1591 cont = (AliOADBContainer*) foadb->Get(namecont);
1593 printf(
"OADB object %s is not available in the file\n",namecont);
1597 if(!(cont->GetObject(run))){
1598 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1606 fMeanQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1607 fWidthQ[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1610 if(iside==0 && icoord==0)
1611 snprintf(namecont,100,
"hQxc3_%i",i);
1612 else if(iside==1 && icoord==0)
1613 snprintf(namecont,100,
"hQxa3_%i",i);
1614 else if(iside==0 && icoord==1)
1615 snprintf(namecont,100,
"hQyc3_%i",i);
1616 else if(iside==1 && icoord==1)
1617 snprintf(namecont,100,
"hQya3_%i",i);
1619 cont = (AliOADBContainer*) foadb->Get(namecont);
1621 printf(
"OADB object %s is not available in the file\n",namecont);
1625 if(!(cont->GetObject(run))){
1626 printf(
"OADB object %s is not available for run %i (used run 137366)\n",namecont,run);
1629 fMeanQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetMean();
1630 fWidthQv3[i][iside][icoord] = ((TH1F *) cont->GetObject(run))->GetRMS();
1667 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1668 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1669 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1670 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1685 TFile *foadb = TFile::Open(
"$ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root");
1687 printf(
"OADB file $ALICE_PHYSICS/PWGCF/FLOW/database/calibV0_filtered.root cannot be opened, CALIBRATION FAILED !");
1692 AliOADBContainer *cont = (AliOADBContainer*) foadb->Get(
"hMultV0BefCorr_filtered");
1694 printf(
"OADB object hMultV0BefCorr is not available in the file\n");
1697 if(!(cont->GetObject(run))) {
1700 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};
1701 for(
Int_t r(0); r < 176; r++) {
1702 if(run == runs11h[r]) {
1703 printf(
" > run has been identified as 11h < \n");
1728 printf(
"OADB object hMultVZEROBefCorr is not available for run %i (used default run 138275)\n",run);
1731 printf(
" > run has been identified as 10h < \n");
1733 TProfile* fMultVZERO =
static_cast<TProfile*
>(cont->GetObject(run));
1735 TF1 *fpol0 =
new TF1(
"fpol0",
"pol0");
1740 fMultVZERO->Fit(fpol0,
"N0",
"", 0, 8);
1742 fMultVZERO->Fit(fpol0,
"N0",
"", 8, 16);
1744 fMultVZERO->Fit(fpol0,
"N0",
"", 16, 24);
1746 fMultVZERO->Fit(fpol0,
"N0",
"", 24, 32);
1749 fMultVZERO->Fit(fpol0,
"N0",
"", 32, 40);
1751 fMultVZERO->Fit(fpol0,
"N0",
"", 40, 48);
1753 fMultVZERO->Fit(fpol0,
"N0",
"", 48, 56);
1755 fMultVZERO->Fit(fpol0,
"N0",
"", 56, 64);
1766 AliOADBContainer* h[5][4];
1767 for(
Int_t i(0); i < 5; i++) {
1768 h[i][0] = (AliOADBContainer*)foadb->Get(Form(
"hQxa%i_filtered", i+1));
1769 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1F*
>(h[i][0]->GetObject(run));
1770 h[i][1] = (AliOADBContainer*)foadb->Get(Form(
"hQya%i_filtered", i+1));
1771 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1F*
>(h[i][1]->GetObject(run));
1772 h[i][2] = (AliOADBContainer*)foadb->Get(Form(
"hQxc%i_filtered", i+1));
1773 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1F*
>(h[i][2]->GetObject(run));
1774 h[i][3] = (AliOADBContainer*)foadb->Get(Form(
"hQyc%i_filtered", i+1));
1775 if(h[i][3])
fQycvsV0[i] =
static_cast<TH1F*
>(h[i][3]->GetObject(run));
1814 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1815 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1816 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1817 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1832 TFile *foadb = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root");
1834 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/gainVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1837 TH3F* Weights =
dynamic_cast<TH3F*
>(foadb->FindObjectAny(
"LHC11h")->FindObject(
"gHistVZEROChannelGainEqualizationMap"));
1839 printf(
"gHistVZEROChannelGainEqualizationMap is not available in the file\n");
1862 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};
1864 for(
Int_t r(0); r < 68; r++) {
1865 if(run == runs11h[r]) {
1870 printf(
" > run has been identified as 11h Full TPC Flow < \n");
1872 printf(
" > run has NOT been identified as 11h Full TPC Flow, use default for 11h < \n");
1881 Weights->GetXaxis()->SetRange(RunBin,RunBin);
1882 TH2D* fMultVZEROCen =
dynamic_cast<TH2D*
>(Weights->Project3D(
"zy"));
1886 TFile *fqvec = TFile::Open(
"alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root");
1888 printf(
"file alien:///alice/cern.ch/user/j/jmargutt/recenteringVZERO.LHC11h.root cannot be opened, CALIBRATION FAILED !");
1894 for(
Int_t i(0); i < 3; i++) {
1895 h[i][0] = (
TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%ixRecenteringMap",i+1)));
1896 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1D*
>(h[i][0]->ProjectionY(Form(
"fQxavsV0[%i]",i),RunBin,RunBin));
1897 h[i][1] = (
TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROAQ%iyRecenteringMap",i+1)));
1898 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1D*
>(h[i][1]->ProjectionY(Form(
"fQyavsV0[%i]",i),RunBin,RunBin));
1899 h[i][2] = (
TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%ixRecenteringMap",i+1)));
1900 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1D*
>(h[i][2]->ProjectionY(Form(
"fQxcvsV0[%i]",i),RunBin,RunBin));
1901 h[i][3] = (
TH2D*)(fqvec->FindObjectAny(
"LHC11h")->FindObject(Form(
"gHistVZEROCQ%iyRecenteringMap",i+1)));
1902 if(h[i][3])
fQycvsV0[i] =
static_cast<TH1D*
>(h[i][3]->ProjectionY(Form(
"fQycvsV0[%i]",i),RunBin,RunBin));
1942 Double_t chiC2[] = {0.771423, 1.10236, 1.38116, 1.48077, 1.31964, 1.10236, 0.674622, 0.600403, 0.273865};
1943 Double_t chiA2[] = {0.582214, 0.674622, 0.832214, 0.873962, 0.832214, 0.771423, 0.637146, 0.424255, 0.257385};
1944 Double_t chiC3[] = {0.493347, 0.493347, 0.458557, 0.407166, 0.356628, 0.273865, 0.176208, 6.10352e-05, 6.10352e-05};
1945 Double_t chiA3[] = {0.356628, 0.373474, 0.356628, 0.306702, 0.24115, 0.192322, 0.127869, 6.10352e-05, 6.10352e-05};
1960 TFile *foadb = TFile::Open(
"alien:///alice/cern.ch/user/b/bhohlweg/gainVZERO.LHC15oLowIR.root");
1962 AliFatal(
"file alien:///alice/cern.ch/user/b/bhohlweg/gainVZERO.LHC15oLowIR.root cannot be opened, CALIBRATION FAILED !");
1965 TH3F* Weights =
dynamic_cast<TH3F*
>(foadb->FindObjectAny(
"LHC15oLowIR")->FindObject(
"gHistVZEROChannelGainEqualizationMapRun2"));
1967 AliFatal(
"gHistVZEROChannelGainEqualizationMapRun2 is not available in the file\n");
1992 Int_t runs15oLowIR[11] = {244917 ,244918,244975,244980,244982,244983,245064,245068,246390,246391,246392};
1994 for(
Int_t r(0); r < 11; r++) {
1995 if(run == runs15oLowIR[r]) {
2001 AliFatal(
"No calibration file existing for this run Number in SetKappaVZEROCalibrationForTrackCuts \n");
2006 Weights->GetXaxis()->SetRange(RunBin,RunBin);
2007 TH2D* fMultVZEROCen =
dynamic_cast<TH2D*
>(Weights->Project3D(
"zy"));
2011 TFile *fqvec = TFile::Open(
"alien:///alice/cern.ch/user/b/bhohlweg/recenteringVZERO.LHC15oLowIR.root");
2013 AliFatal(
"file alien:///alice/cern.ch/user/b/bhohlweg/recenteringVZERO.LHC15oLowIR.root cannot be opened, CALIBRATION FAILED !");
2018 for(
Int_t i(0); i < 3; i++) {
2019 h[i][0] = (
TH2D*)(fqvec->FindObjectAny(
"LHC15oLowIR")->FindObject(Form(
"gHistVZEROAQ%ixRecenteringMap",i+1)));
2020 if(h[i][0])
fQxavsV0[i] =
static_cast<TH1D*
>(h[i][0]->ProjectionY(Form(
"fQxavsV0[%i]",i),RunBin,RunBin));
2021 h[i][1] = (
TH2D*)(fqvec->FindObjectAny(
"LHC15oLowIR")->FindObject(Form(
"gHistVZEROAQ%iyRecenteringMap",i+1)));
2022 if(h[i][1])
fQyavsV0[i] =
static_cast<TH1D*
>(h[i][1]->ProjectionY(Form(
"fQyavsV0[%i]",i),RunBin,RunBin));
2023 h[i][2] = (
TH2D*)(fqvec->FindObjectAny(
"LHC15oLowIR")->FindObject(Form(
"gHistVZEROCQ%ixRecenteringMap",i+1)));
2024 if(h[i][2])
fQxcvsV0[i] =
static_cast<TH1D*
>(h[i][2]->ProjectionY(Form(
"fQxcvsV0[%i]",i),RunBin,RunBin));
2025 h[i][3] = (
TH2D*)(fqvec->FindObjectAny(
"LHC15oLowIR")->FindObject(Form(
"gHistVZEROCQ%iyRecenteringMap",i+1)));
2026 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 SetKappaVZEROCalibrationForTrackCuts(AliFlowTrackCuts *cuts)
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)