#include "TProfile2D.h"\r
#include "TLorentzVector.h"\r
#include "TParticle.h"\r
+#include "TF1.h"\r
\r
#include "AliVEventHandler.h"\r
#include "AliAnalysisTaskSE.h"\r
fHistEV(0),\r
fEventPlane(0x0),\r
fEventPlaneaftersubtraction(0x0),\r
+ fFractionContamination(0x0),\r
fCosSin2phiep(0x0),\r
fCos2phie(0x0),\r
fSin2phie(0x0),\r
fDeltaPhiMapsContamination(0x0),\r
fCosPhiMaps(0x0),\r
fProfileCosPhiMaps(0x0),\r
- fDeltaPhiMapsTaggedPhotonic(0x0),\r
- fCosPhiMapsTaggedPhotonic(0x0),\r
- fDeltaPhiMapsTaggedNonPhotonic(0x0),\r
- fCosPhiMapsTaggedNonPhotonic(0x0),\r
- fDeltaPhiMapsTaggedPhotonicLS(0x0),\r
- fCosPhiMapsTaggedPhotonicLS(0x0),\r
+ //fDeltaPhiMapsTaggedPhotonic(0x0),\r
+ //fCosPhiMapsTaggedPhotonic(0x0),\r
+ //fDeltaPhiMapsTaggedNonPhotonic(0x0),\r
+ //fCosPhiMapsTaggedNonPhotonic(0x0),\r
+ //fDeltaPhiMapsTaggedPhotonicLS(0x0),\r
+ //fCosPhiMapsTaggedPhotonicLS(0x0),\r
fMCSourceDeltaPhiMaps(0x0),\r
fOppSignDeltaPhiMaps(0x0),\r
fSameSignDeltaPhiMaps(0x0),\r
for(Int_t k = 0; k < 10; k++) {\r
fBinCentralityLess[k] = 0.0;\r
}\r
- \r
+ for(Int_t k = 0; k < 11; k++) {\r
+ fContamination[k] = NULL;\r
+ }\r
+ \r
}\r
//______________________________________________________________________________\r
AliAnalysisTaskHFEFlow:: AliAnalysisTaskHFEFlow(const char *name) :\r
fHistEV(0),\r
fEventPlane(0x0),\r
fEventPlaneaftersubtraction(0x0),\r
+ fFractionContamination(0x0),\r
fCosSin2phiep(0x0),\r
fCos2phie(0x0),\r
fSin2phie(0x0),\r
fDeltaPhiMapsContamination(0x0),\r
fCosPhiMaps(0x0),\r
fProfileCosPhiMaps(0x0),\r
- fDeltaPhiMapsTaggedPhotonic(0x0),\r
- fCosPhiMapsTaggedPhotonic(0x0),\r
- fDeltaPhiMapsTaggedNonPhotonic(0x0),\r
- fCosPhiMapsTaggedNonPhotonic(0x0),\r
- fDeltaPhiMapsTaggedPhotonicLS(0x0),\r
- fCosPhiMapsTaggedPhotonicLS(0x0),\r
+ //fDeltaPhiMapsTaggedPhotonic(0x0),\r
+ //fCosPhiMapsTaggedPhotonic(0x0),\r
+ //fDeltaPhiMapsTaggedNonPhotonic(0x0),\r
+ //fCosPhiMapsTaggedNonPhotonic(0x0),\r
+ //fDeltaPhiMapsTaggedPhotonicLS(0x0),\r
+ //fCosPhiMapsTaggedPhotonicLS(0x0),\r
fMCSourceDeltaPhiMaps(0x0),\r
fOppSignDeltaPhiMaps(0x0),\r
fSameSignDeltaPhiMaps(0x0),\r
fBinCentralityLess[2] = 40.0;\r
fBinCentralityLess[3] = 60.0;\r
fBinCentralityLess[4] = 80.0;\r
+\r
+ for(Int_t k = 0; k < 11; k++) {\r
+ fContamination[k] = NULL;\r
+ }\r
\r
fPID = new AliHFEpid("hfePid");\r
fPIDqa = new AliHFEpidQAmanager;\r
fHistEV(NULL),\r
fEventPlane(NULL),\r
fEventPlaneaftersubtraction(NULL),\r
+ fFractionContamination(NULL),\r
fCosSin2phiep(NULL),\r
fCos2phie(NULL),\r
fSin2phie(NULL),\r
fDeltaPhiMapsContamination(NULL),\r
fCosPhiMaps(NULL),\r
fProfileCosPhiMaps(NULL),\r
- fDeltaPhiMapsTaggedPhotonic(NULL),\r
- fCosPhiMapsTaggedPhotonic(NULL),\r
- fDeltaPhiMapsTaggedNonPhotonic(NULL),\r
- fCosPhiMapsTaggedNonPhotonic(NULL),\r
- fDeltaPhiMapsTaggedPhotonicLS(NULL),\r
- fCosPhiMapsTaggedPhotonicLS(NULL),\r
+ //fDeltaPhiMapsTaggedPhotonic(NULL),\r
+ //fCosPhiMapsTaggedPhotonic(NULL),\r
+ //fDeltaPhiMapsTaggedNonPhotonic(NULL),\r
+ //fCosPhiMapsTaggedNonPhotonic(NULL),\r
+ //fDeltaPhiMapsTaggedPhotonicLS(NULL),\r
+ //fCosPhiMapsTaggedPhotonicLS(NULL),\r
fMCSourceDeltaPhiMaps(NULL),\r
fOppSignDeltaPhiMaps(NULL),\r
fSameSignDeltaPhiMaps(NULL),\r
target.fPID = fPID;\r
target.fPIDqa = fPIDqa;\r
target.fHFEVZEROEventPlane = fHFEVZEROEventPlane;\r
+ for(Int_t k = 0; k < 11; k++) {\r
+ target.fContamination[k] = fContamination[k];\r
+ }\r
\r
}\r
//____________________________________________________________\r
AliDebug(2,"AliAnalysisTaskHFEFlow: histev");\r
\r
// Event plane as function of phiep, centrality\r
- const Int_t nDima=5;\r
- Int_t nBina[nDima] = {nBinsPhi,nBinsPhi,nBinsPhi,nBinsPhi,nBinsC};\r
+ const Int_t nDima=4;\r
+ Int_t nBina[nDima] = {nBinsPhi,nBinsPhi,nBinsPhi,nBinsC};\r
fEventPlane = new THnSparseF("EventPlane","EventPlane",nDima,nBina);\r
fEventPlane->SetBinEdges(0,binLimPhi);\r
fEventPlane->SetBinEdges(1,binLimPhi);\r
fEventPlane->SetBinEdges(2,binLimPhi);\r
- fEventPlane->SetBinEdges(3,binLimPhi);\r
- fEventPlane->SetBinEdges(4,binLimC);\r
+ fEventPlane->SetBinEdges(3,binLimC);\r
fEventPlane->Sumw2();\r
\r
AliDebug(2,"AliAnalysisTaskHFEFlow: eventplane");\r
\r
+ // Fraction of contamination, centrality\r
+ const Int_t nDimcont=2;\r
+ Int_t nBincont[nDimcont] = {nBinsPt,nBinsC};\r
+ fFractionContamination = new THnSparseF("Contamination","Contamination",nDimcont,nBincont);\r
+ fFractionContamination->SetBinEdges(0,binLimPt);\r
+ fFractionContamination->SetBinEdges(1,binLimC);\r
+ fFractionContamination->Sumw2();\r
+\r
+ AliDebug(2,"AliAnalysisTaskHFEFlow: fraction of contamination");\r
+\r
// Resolution cosres_abc centrality\r
const Int_t nDimfbis=4;\r
Int_t nBinfbis[nDimfbis] = {nBinsCos,nBinsCos,nBinsCos,nBinsCMore};\r
//\r
\r
if(fMonitorPhotonic) {\r
+ /*\r
const Int_t nDimgbp=3;\r
Int_t nBingbp[nDimgbp] = {nBinsPhi,nBinsC,nBinsPt};\r
\r
fCosPhiMapsTaggedPhotonicLS->SetBinEdges(2,binLimPt);\r
fCosPhiMapsTaggedPhotonicLS->Sumw2();\r
AliDebug(2,"AliAnalysisTaskHFEFlow: cosphimapstaggedphotonicls");\r
- \r
+ */\r
const Int_t nDimMCSource=3;\r
Int_t nBinMCSource[nDimMCSource] = {nBinsC,nBinsPt,nBinsSource};\r
fMCSourceDeltaPhiMaps = new THnSparseF("MCSourceDeltaPhiMaps","MCSourceDeltaPhiMaps",nDimMCSource,nBinMCSource);\r
\r
fListHist->Add(fHistEV);\r
fListHist->Add(fEventPlane);\r
+ fListHist->Add(fFractionContamination);\r
fListHist->Add(fCosRes);\r
fListHist->Add(fCosResabc);\r
fListHist->Add(fCosPhiMaps);\r
\r
if(fMonitorPhotonic) {\r
fListHist->Add(fPIDBackgroundqa->MakeList("HFEpidBackgroundQA"));\r
- fListHist->Add(fDeltaPhiMapsTaggedPhotonic);\r
- fListHist->Add(fCosPhiMapsTaggedPhotonic);\r
- fListHist->Add(fDeltaPhiMapsTaggedNonPhotonic);\r
- fListHist->Add(fCosPhiMapsTaggedNonPhotonic);\r
- fListHist->Add(fDeltaPhiMapsTaggedPhotonicLS);\r
- fListHist->Add(fCosPhiMapsTaggedPhotonicLS);\r
+ //fListHist->Add(fDeltaPhiMapsTaggedPhotonic);\r
+ //fListHist->Add(fCosPhiMapsTaggedPhotonic);\r
+ //fListHist->Add(fDeltaPhiMapsTaggedNonPhotonic);\r
+ //fListHist->Add(fCosPhiMapsTaggedNonPhotonic);\r
+ //fListHist->Add(fDeltaPhiMapsTaggedPhotonicLS);\r
+ //fListHist->Add(fCosPhiMapsTaggedPhotonicLS);\r
fListHist->Add(fMCSourceDeltaPhiMaps);\r
fListHist->Add(fOppSignDeltaPhiMaps);\r
fListHist->Add(fSameSignDeltaPhiMaps);\r
Float_t binctt = -1.0;\r
\r
Double_t valuecossinephiep[3];\r
- Double_t valuensparsea[5];\r
+ Double_t valuensparsea[4];\r
Double_t valuensparseabis[5];\r
Double_t valuensparsee[4];\r
Double_t valuensparsef[2];\r
Double_t valuensparseMCSourceDeltaPhiMaps[3];\r
Double_t valuetrackingcuts[2];\r
Double_t valuedeltaphicontamination[4];\r
+ Double_t valuefractioncont[2];\r
\r
AliMCEvent *mcEvent = MCEvent();\r
AliMCParticle *mctrack = NULL;\r
if(binct > 11.0) return;\r
\r
// centrality\r
- valuensparsea[4] = binct; \r
+ valuensparsea[3] = binct; \r
valuensparseabis[1] = binct; \r
valuensparsee[1] = binct; \r
valuensparsef[1] = binctMore; \r
valuensparsefbissin[3] = binct; \r
valuensparseg[1] = binct;\r
valuensparseh[1] = binct; \r
+ valuefractioncont[1] = binct;\r
valuensparsehprofile[1] = binct; \r
valuecossinephiep[2] = binctMore;\r
valuensparseMCSourceDeltaPhiMaps[0] = binct;\r
Double_t diffsubasubcsin = -100.0;\r
Double_t diffsubbsubcsin = -100.0;\r
\r
- //if(fVZEROEventPlane) {\r
- diffsubasubb = TMath::Cos(2.*(eventPlaneV0A - eventPlaneV0C));\r
- diffsubasubc = TMath::Cos(2.*(eventPlaneV0A - eventPlaneTPC));\r
- diffsubbsubc = TMath::Cos(2.*(eventPlaneV0C - eventPlaneTPC));\r
-\r
- diffsubasubbsin = TMath::Sin(2.*(eventPlaneV0A - eventPlaneV0C));\r
- diffsubasubcsin = TMath::Sin(2.*(eventPlaneV0A - eventPlaneTPC));\r
- diffsubbsubcsin = TMath::Sin(2.*(eventPlaneV0C - eventPlaneTPC));\r
- //}\r
- //else {\r
+ // two sub event TPC\r
qsub1a = vEPa->GetQsub1();\r
qsub2a = vEPa->GetQsub2();\r
if(qsub1a) eventPlanesub1a = TVector2::Phi_0_2pi(qsub1a->Phi())/2.;\r
diffsub1sub2a = TMath::Cos(2.*TVector2::Phi_0_2pi(qsub1a->Phi()/2.- qsub2a->Phi()/2.));\r
diffsub1sub2asin = TMath::Sin(2.*TVector2::Phi_0_2pi(qsub1a->Phi()/2.- qsub2a->Phi()/2.));\r
}\r
- //}\r
+\r
+ // three sub events in case of VZEROA and VZEROC\r
+ diffsubasubb = TMath::Cos(2.*(eventPlaneV0A - eventPlaneV0C));\r
+ diffsubasubc = TMath::Cos(2.*(eventPlaneV0A - eventPlaneTPC));\r
+ diffsubbsubc = TMath::Cos(2.*(eventPlaneV0C - eventPlaneTPC));\r
+\r
+ diffsubasubbsin = TMath::Sin(2.*(eventPlaneV0A - eventPlaneV0C));\r
+ diffsubasubcsin = TMath::Sin(2.*(eventPlaneV0A - eventPlaneTPC));\r
+ diffsubbsubcsin = TMath::Sin(2.*(eventPlaneV0C - eventPlaneTPC));\r
+ // three sub events in case of VZERO all\r
+ if(fVZEROEventPlane && (!fVZEROEventPlaneA) && (!fVZEROEventPlaneC)) {\r
+ diffsubasubb = TMath::Cos(2.*(eventPlaneV0 - eventPlanesub1a));\r
+ diffsubasubc = TMath::Cos(2.*(eventPlaneV0 - eventPlanesub2a));\r
+ diffsubbsubc = TMath::Cos(2.*(eventPlanesub1a - eventPlanesub2a));\r
+ \r
+ diffsubasubbsin = TMath::Sin(2.*(eventPlaneV0 - eventPlanesub1a));\r
+ diffsubasubcsin = TMath::Sin(2.*(eventPlaneV0 - eventPlanesub2a));\r
+ diffsubbsubcsin = TMath::Sin(2.*(eventPlanesub1a - eventPlanesub2a));\r
+ }\r
\r
\r
/////////////////////////////////////////////////////////\r
valuensparsea[0] = eventPlaneV0A;\r
valuensparsea[1] = eventPlaneV0C;\r
valuensparsea[2] = eventPlaneTPC;\r
- valuensparsea[3] = eventPlaneV0; \r
+ if(fVZEROEventPlane && (!fVZEROEventPlaneA) && (!fVZEROEventPlaneC)) {\r
+ // case VZERO all\r
+ valuensparsea[0] = eventPlaneV0;\r
+ valuensparsea[1] = eventPlanesub1a;\r
+ valuensparsea[2] = eventPlanesub2a;\r
+ } \r
fEventPlane->Fill(&valuensparsea[0]);\r
\r
// Fill\r
valuensparsee[3] = track->Eta(); \r
valuensparseg[2] = track->Pt();\r
valuensparseh[2] = track->Pt();\r
+ valuefractioncont[0] = track->Pt();\r
valuensparsehprofile[2] = track->Pt();\r
valuensparseMCSourceDeltaPhiMaps[1] = track->Pt();\r
if(track->Charge() > 0.0) {\r
valuensparseh[0] = TMath::Cos(2*TVector2::Phi_mpi_pi(phitrack-eventplanesubtracted));\r
if(fillEventPlane) {\r
fCosPhiMaps->Fill(&valuensparseh[0]);\r
+ if((valuefractioncont[1] >=0) && (valuefractioncont[1] < 11)){\r
+ if(fContamination[((Int_t)valuefractioncont[1])]){\r
+ Double_t weight = fContamination[((Int_t)valuefractioncont[1])]->Eval(track->P());\r
+ if(weight<0.0) weight=0.0;\r
+ if(weight>1.0) weight=1.0;\r
+ fFractionContamination->Fill(&valuefractioncont[0],weight);\r
+ } \r
+ }\r
if(fMonitorEventPlane) {\r
fProfileCosPhiMaps->Fill(valuensparsehprofile[1],valuensparsehprofile[2],valuensparseh[0]);\r
}\r
source = FindMother(TMath::Abs(track->GetLabel()),mcEvent, indexmother);\r
valuensparseMCSourceDeltaPhiMaps[2] = source;\r
if(mcEvent) fMCSourceDeltaPhiMaps->Fill(&valuensparseMCSourceDeltaPhiMaps[0]);\r
- Int_t taggedvalue = LookAtNonHFE(k,track,fInputEvent,mcEvent,binct,deltaphi,source,indexmother);\r
+ LookAtNonHFE(k,track,fInputEvent,mcEvent,binct,deltaphi,source,indexmother);\r
+ //Int_t taggedvalue = LookAtNonHFE(k,track,fInputEvent,mcEvent,binct,deltaphi,source,indexmother);\r
+ /*\r
if(fillEventPlane) {\r
// No opposite charge partner found in the invariant mass choosen\r
if((taggedvalue!=2) && (taggedvalue!=6)) {\r
fCosPhiMapsTaggedPhotonicLS->Fill(&valuensparseh[0]);\r
}\r
}\r
+ */\r
}\r
\r
}\r