]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Small update
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Oct 2013 10:34:49 +0000 (10:34 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 28 Oct 2013 10:34:49 +0000 (10:34 +0000)
PWGHF/hfe/AliAnalysisTaskFlowTPCTOFEPSP.cxx
PWGHF/hfe/AliAnalysisTaskFlowTPCTOFEPSP.h
PWGHF/hfe/macros/AddTaskHFEFlowTPCTOFEPSP.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C

index 989a2348f36aeae294fc798e73aba61122cb4120..96cf3e5af1faec9782e76ade58beb852d43a0605 100644 (file)
@@ -88,8 +88,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP() :
   AliAnalysisTaskSE(),\r
   fListHist(0x0), \r
   fAODAnalysis(kFALSE),\r
-  fUseFilterAOD(kFALSE),\r
-  fApplyCut(kTRUE),\r
   fFilter(1<<4),\r
   fAODMCHeader(NULL),\r
   fAODArrayMCInfo(NULL),\r
@@ -123,7 +121,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP() :
   fMaxopening3D(0.1),\r
   fMaxInvmass(0.1),\r
   fSetMassConstraint(kFALSE),\r
-  fDebugLevel(0),\r
   fMonitorEventPlane(kFALSE),\r
   fMonitorContamination(kFALSE),\r
   fMonitorPhotonic(kFALSE),\r
@@ -133,7 +130,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP() :
   fcutsRP(0),\r
   fcutsPOI(0),\r
   fHFECuts(0),\r
-  fRejectKinkMother(kFALSE),\r
   fPID(0),\r
   fPIDTOFOnly(0),\r
   fPIDqa(0),\r
@@ -202,8 +198,6 @@ AliAnalysisTaskFlowTPCTOFEPSP:: AliAnalysisTaskFlowTPCTOFEPSP(const char *name)
   AliAnalysisTaskSE(name),\r
   fListHist(0x0),\r
   fAODAnalysis(kFALSE),\r
-  fUseFilterAOD(kFALSE),\r
-  fApplyCut(kTRUE),\r
   fFilter(1<<4), \r
   fAODMCHeader(NULL),\r
   fAODArrayMCInfo(NULL),\r
@@ -237,7 +231,6 @@ AliAnalysisTaskFlowTPCTOFEPSP:: AliAnalysisTaskFlowTPCTOFEPSP(const char *name)
   fMaxopening3D(0.1),\r
   fMaxInvmass(0.1),\r
   fSetMassConstraint(kFALSE),\r
-  fDebugLevel(0),\r
   fMonitorEventPlane(kFALSE),\r
   fMonitorContamination(kFALSE),\r
   fMonitorPhotonic(kFALSE),\r
@@ -247,7 +240,6 @@ AliAnalysisTaskFlowTPCTOFEPSP:: AliAnalysisTaskFlowTPCTOFEPSP(const char *name)
   fcutsRP(0),\r
   fcutsPOI(0),\r
   fHFECuts(0),\r
-  fRejectKinkMother(kFALSE),\r
   fPID(0),\r
   fPIDTOFOnly(0),\r
   fPIDqa(0),\r
@@ -338,8 +330,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP(const AliAnalysisTa
   AliAnalysisTaskSE(ref),\r
   fListHist(NULL),\r
   fAODAnalysis(ref.fAODAnalysis), \r
-  fUseFilterAOD(ref.fUseFilterAOD),\r
-  fApplyCut(ref.fApplyCut),\r
   fFilter(ref.fFilter),\r
   fAODMCHeader(ref.fAODMCHeader),\r
   fAODArrayMCInfo(ref.fAODArrayMCInfo),\r
@@ -373,7 +363,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP(const AliAnalysisTa
   fMaxopening3D(ref.fMaxopening3D),\r
   fMaxInvmass(ref.fMaxInvmass),\r
   fSetMassConstraint(ref.fSetMassConstraint),\r
-  fDebugLevel(ref.fDebugLevel),\r
   fMonitorEventPlane(ref.fMonitorEventPlane),\r
   fMonitorContamination(ref.fMonitorContamination),\r
   fMonitorPhotonic(ref.fMonitorPhotonic),\r
@@ -383,7 +372,6 @@ AliAnalysisTaskFlowTPCTOFEPSP::AliAnalysisTaskFlowTPCTOFEPSP(const AliAnalysisTa
   fcutsRP(NULL),\r
   fcutsPOI(NULL),\r
   fHFECuts(NULL),\r
-  fRejectKinkMother(ref.fRejectKinkMother),\r
   fPID(NULL),\r
   fPIDTOFOnly(NULL),\r
   fPIDqa(NULL),\r
@@ -470,8 +458,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::Copy(TObject &o) const {
   AliAnalysisTaskFlowTPCTOFEPSP &target = dynamic_cast<AliAnalysisTaskFlowTPCTOFEPSP &>(o);\r
   target.fListHist = fListHist;\r
   target.fAODAnalysis = fAODAnalysis;\r
-  target.fUseFilterAOD = fUseFilterAOD;\r
-  target.fApplyCut = fApplyCut;\r
   target.fFilter = fFilter;\r
   target.fAODMCHeader = fAODMCHeader;\r
   target.fAODArrayMCInfo = fAODArrayMCInfo;\r
@@ -505,7 +491,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::Copy(TObject &o) const {
   target.fMaxopening3D = fMaxopening3D;\r
   target.fMaxInvmass = fMaxInvmass;\r
   target.fSetMassConstraint =  fSetMassConstraint;\r
-  target.fDebugLevel = fDebugLevel;\r
   target.fMonitorEventPlane = fMonitorEventPlane;\r
   target.fMonitorContamination = fMonitorContamination;\r
   target.fMonitorPhotonic = fMonitorPhotonic;\r
@@ -515,7 +500,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::Copy(TObject &o) const {
   target.fcutsRP = fcutsRP;\r
   target.fcutsPOI = fcutsPOI;\r
   target.fHFECuts = fHFECuts;\r
-  target.fRejectKinkMother = fRejectKinkMother;\r
   target.fPID = fPID;\r
   target.fPIDTOFOnly = fPIDTOFOnly;\r
   target.fPIDqa = fPIDqa;\r
@@ -579,6 +563,8 @@ AliAnalysisTaskFlowTPCTOFEPSP::~AliAnalysisTaskFlowTPCTOFEPSP(){
   //\r
   // Destructor\r
   //\r
+  \r
+\r
   if(fArraytrack) delete fArraytrack;\r
   if(fListHist) delete fListHist;\r
   if(fcutsRP) delete fcutsRP;\r
@@ -590,10 +576,11 @@ AliAnalysisTaskFlowTPCTOFEPSP::~AliAnalysisTaskFlowTPCTOFEPSP(){
   if(fflowEvent) delete fflowEvent;\r
   if(fHFEBackgroundCuts) delete fHFEBackgroundCuts;\r
   if(fPIDBackground) delete fPIDBackground;\r
-  if(fBackgroundSubtraction) delete fBackgroundSubtraction;\r
+  //if(fBackgroundSubtraction) delete fBackgroundSubtraction;\r
   //if(fPIDBackgroundqa) delete fPIDBackgroundqa;\r
   //if(fHFEVZEROEventPlane) delete fHFEVZEROEventPlane;\r
   if ( fDebugStreamer ) delete fDebugStreamer;\r
+  \r
 \r
 }\r
 //________________________________________________________________________\r
@@ -618,10 +605,9 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   //AliFlowTrackCuts::trackParameterMix rpmix = AliFlowTrackCuts::kPure;\r
   //AliFlowTrackCuts::trackParameterMix poimix = AliFlowTrackCuts::kPure;\r
 \r
-  AliDebug(2,"test");\r
-\r
   AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: User create output objects");\r
\r
+\r
+\r
   // AOD or ESD\r
   AliVEventHandler *inputHandler = dynamic_cast<AliVEventHandler *>(AliAnalysisManager::GetAnalysisManager()->GetInputEventHandler());\r
   if(!TString(inputHandler->IsA()->GetName()).CompareTo("AliAODInputHandler")){\r
@@ -677,7 +663,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
 \r
   AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: common constants");\r
 \r
-  \r
   // HFE cuts\r
 \r
   if(!fHFECuts){\r
@@ -700,15 +685,15 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   if(!fPID->GetNumberOfPIDdetectors()) fPID->AddDetector("TPC", 0);\r
   AliDebug(2,Form("AliAnalysisTaskFlowTPCTOFEPSP: GetNumber of PID detectors %d",fPID->GetNumberOfPIDdetectors()));\r
   fPID->InitializePID();\r
-  AliDebug(2,"Init ");\r
   fPIDqa->Initialize(fPID);\r
-  AliDebug(2,"Init qa");\r
   fPID->SortDetectors();\r
-  AliDebug(2,"Sort detectors");\r
-\r
+  \r
   AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: pid and pidqa");\r
 \r
-  if(!fPIDTOFOnly->GetNumberOfPIDdetectors()) fPIDTOFOnly->AddDetector("TPC", 0);\r
+  if(!fPIDTOFOnly->GetNumberOfPIDdetectors()) {\r
+    fPIDTOFOnly->AddDetector("TOF", 0);\r
+    fPIDTOFOnly->ConfigureTOF(3.);\r
+  }\r
   fPIDTOFOnly->InitializePID();\r
   fPIDTOFOnly->SortDetectors();\r
 \r
@@ -741,6 +726,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
 \r
   if (fMonitorPhotonic) {\r
     if(!fBackgroundSubtraction) fBackgroundSubtraction = new AliHFENonPhotonicElectron();\r
+    if(fAODAnalysis) fBackgroundSubtraction->SetAOD(kTRUE);  \r
     fBackgroundSubtraction->Init();\r
   }\r
   \r
@@ -760,11 +746,9 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   for(Int_t i=0; i<=nBinsPt; i++) binLimPt[i]=(Double_t)TMath::Power(10,binLimLogPt[i]);\r
   */\r
 \r
-  Int_t nBinsPt = 24;\r
-  Double_t binLimPt[25] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2,\r
-                          1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 3., 3.5, 4., 5.,\r
-                          6.};\r
-\r
+  Int_t nBinsPt = 20;\r
+  Double_t binLimPt[21] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2,\r
+                          1.3, 1.4, 1.5, 2., 2.5, 3., 4., 6.};\r
 \r
   Int_t nBinsPtPlus = fNbBinsPtQCumulant;\r
   Double_t minPtPlus = fMinPtQCumulant;\r
@@ -778,9 +762,9 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   Double_t binLimEta[nBinsEta+1];\r
   for(Int_t i=0; i<=nBinsEta; i++) binLimEta[i]=(Double_t)minEta + (maxEta-minEta)/nBinsEta*(Double_t)i ;\r
 \r
-  Int_t nBinsStep = 7;\r
+  Int_t nBinsStep = 6;\r
   Double_t minStep = 0.;\r
-  Double_t maxStep = 7.;\r
+  Double_t maxStep = 6.;\r
   Double_t binLimStep[nBinsStep+1];\r
   for(Int_t i=0; i<=nBinsStep; i++) binLimStep[i]=(Double_t)minStep + (maxStep-minStep)/nBinsStep*(Double_t)i ;\r
 \r
@@ -1173,31 +1157,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
     fDeltaPhiMapsTaggedPhotonicLS->Sumw2();  \r
     AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: deltaphimapstaggedphotonicls");    \r
 \r
-    /*\r
-    const Int_t nDimhbp=3;\r
-    Int_t nBinhbp[nDimhbp] = {nBinsCos,nBinsC,nBinsPt};\r
-    \r
-    fCosPhiMapsTaggedPhotonic = new THnSparseF("CosPhiMapsTaggedPhotonic","CosPhiMapsTaggedPhotonic",nDimhbp,nBinhbp);\r
-    fCosPhiMapsTaggedPhotonic->SetBinEdges(0,binLimCos);\r
-    fCosPhiMapsTaggedPhotonic->SetBinEdges(1,binLimC);\r
-    fCosPhiMapsTaggedPhotonic->SetBinEdges(2,binLimPt);\r
-    fCosPhiMapsTaggedPhotonic->Sumw2();\r
-    AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: cosphimapstaggedphotonic");\r
-    \r
-    fCosPhiMapsTaggedNonPhotonic = new THnSparseF("CosPhiMapsTaggedNonPhotonic","CosPhiMapsTaggedNonPhotonic",nDimhbp,nBinhbp);\r
-    fCosPhiMapsTaggedNonPhotonic->SetBinEdges(0,binLimCos);\r
-    fCosPhiMapsTaggedNonPhotonic->SetBinEdges(1,binLimC);\r
-    fCosPhiMapsTaggedNonPhotonic->SetBinEdges(2,binLimPt);\r
-    fCosPhiMapsTaggedNonPhotonic->Sumw2();\r
-    AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: cosphimapstaggednonphotonic");\r
-    \r
-    fCosPhiMapsTaggedPhotonicLS = new THnSparseF("CosPhiMapsTaggedPhotonicLS","CosPhiMapsTaggedPhotonicLS",nDimhbp,nBinhbp);\r
-    fCosPhiMapsTaggedPhotonicLS->SetBinEdges(0,binLimCos);\r
-    fCosPhiMapsTaggedPhotonicLS->SetBinEdges(1,binLimC);\r
-    fCosPhiMapsTaggedPhotonicLS->SetBinEdges(2,binLimPt);\r
-    fCosPhiMapsTaggedPhotonicLS->Sumw2();\r
-    AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: cosphimapstaggedphotonicls");\r
-    */\r
     const Int_t nDimMCSource=3;\r
     Int_t nBinMCSource[nDimMCSource] = {nBinsC,nBinsPt,nBinsSource};\r
     fMCSourceDeltaPhiMaps = new THnSparseF("MCSourceDeltaPhiMaps","MCSourceDeltaPhiMaps",nDimMCSource,nBinMCSource);\r
@@ -1306,11 +1265,8 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   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(fMCSourceDeltaPhiMaps);\r
   fListHist->Add(fOppSignDeltaPhiMaps);\r
   fListHist->Add(fSameSignDeltaPhiMaps);\r
@@ -1325,6 +1281,8 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserCreateOutputObjects()
   \r
   AliDebug(2,"AliAnalysisTaskFlowTPCTOFEPSP: add event plane");\r
 \r
+  fListHist->Print();\r
+\r
   PostData(1, fListHist);\r
   //for(Int_t bincless = 0; bincless < fNbBinsCentralityQCumulant; bincless++) {\r
   // PostData(bincless+2,fflowEvent); \r
@@ -1342,6 +1300,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
   // Loop over event\r
   //\r
    \r
\r
   Double_t massElectron = 0.000511;\r
   Double_t mcReactionPlane = 0.0;\r
 \r
@@ -1400,7 +1359,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
     }\r
   }\r
 \r
-    \r
+   \r
   /////////////////\r
   // centrality\r
   /////////////////\r
@@ -1561,7 +1520,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
       AliDebug(2,"Does not pass the centrality correlation cut");\r
       return;\r
     }\r
-    if(multTPC < (-40.7+1.49*multGlob) || multTPC > (55.0+1.79*multGlob)){\r
+    if(multTPC < (-36.81+1.48*multGlob) && multTPC > (63.03+1.78*multGlob)){\r
       AliDebug(2,"Does not pass the multiplicity correlation cut");\r
       return;\r
     }\r
@@ -1641,7 +1600,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
     \r
   }\r
   else {\r
-    \r
+\r
     Double_t qVx, qVy;  //TR: info\r
     eventPlaneV0 = TVector2::Phi_0_2pi(vEPa->CalculateVZEROEventPlane(fInputEvent,10,2,qVx,qVy));\r
     if(eventPlaneV0 > TMath::Pi()) eventPlaneV0 = eventPlaneV0 - TMath::Pi();\r
@@ -1652,11 +1611,12 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
     eventPlaneV0C = TVector2::Phi_0_2pi(vEPa->CalculateVZEROEventPlane(fInputEvent,9,2,qVx,qVy));\r
     if(eventPlaneV0C > TMath::Pi()) eventPlaneV0C = eventPlaneV0C - TMath::Pi();\r
     qV0C.Set(qVx,qVy);\r
\r
+\r
     if(eventPlaneV0<-900) return;\r
     if(eventPlaneV0A<-900) return;\r
     if(eventPlaneV0C<-900) return;\r
 \r
+\r
     eventPlaneV0=TVector2::Phi_0_2pi(eventPlaneV0);\r
     eventPlaneV0A=TVector2::Phi_0_2pi(eventPlaneV0A);\r
     eventPlaneV0C=TVector2::Phi_0_2pi(eventPlaneV0C);\r
@@ -1846,7 +1806,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
     valuensparsea[1] = eventPlanesub1a;\r
     valuensparsea[2] = eventPlanesub2a;\r
   } \r
-  //printf("%f %f %f\n",valuensparsea[0],valuensparsea[1],valuensparsea[2]);\r
   fEventPlane->Fill(&valuensparsea[0]);\r
 \r
   // Fill\r
@@ -1949,40 +1908,10 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
     }\r
   }\r
 \r
-\r
-  ///////////////////////////////////\r
-  // Loop for kink mother AOD\r
-  //////////////////////////////////\r
-  // Look at kink mother in case of AOD\r
-  Int_t numberofvertices = 1;\r
-  AliAODEvent *aodevent = NULL;\r
-  Int_t numberofmotherkink = 0;  \r
-  if(fAODAnalysis) {\r
-    aodevent = dynamic_cast<AliAODEvent *>(fInputEvent);\r
-    if(aodevent) {\r
-      numberofvertices = aodevent->GetNumberOfVertices();\r
-    }\r
-  }\r
-  Double_t listofmotherkink[numberofvertices];\r
-  if(fAODAnalysis && aodevent) {\r
-    for(Int_t ivertex=0; ivertex < numberofvertices; ivertex++) {\r
-      AliAODVertex *aodvertex = aodevent->GetVertex(ivertex);\r
-      if(!aodvertex) continue;\r
-      if(aodvertex->GetType()==AliAODVertex::kKink) {\r
-       AliAODTrack *mother = (AliAODTrack *) aodvertex->GetParent();\r
-       if(!mother) continue;\r
-       Int_t idmother = mother->GetID();\r
-       listofmotherkink[numberofmotherkink] = idmother;\r
-       AliDebug(2,Form("ID %d",idmother));\r
-       numberofmotherkink++;\r
-      }\r
-    }\r
-  }\r
   \r
   //////////////////////////\r
   // Loop over track\r
   //////////////////////////\r
-  \r
   for(Int_t k = 0; k < nbtracks; k++){\r
       \r
     AliVTrack *track = (AliVTrack *) fInputEvent->GetTrack(k);\r
@@ -1995,68 +1924,42 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
        continue;\r
       }  \r
       AliDebug(2,"Find AOD track on");\r
-      if(fUseFilterAOD){\r
-       if(!(aodtrack->TestFilterBit(fFilter))) continue;  // Only process AOD tracks where the HFE is set\r
-      }\r
+      if(!(aodtrack->TestFilterBit(fFilter))) continue;  // Only process AOD tracks where the HFE is set\r
     }\r
 \r
-    if(fApplyCut) {\r
-\r
-      valuetrackingcuts[0] = track->Pt(); \r
-      valuetrackingcuts[1] = 0;\r
\r
-      // RecKine: ITSTPC cuts  \r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecKineITSTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);\r
-\r
-      // Reject kink mother\r
-      if(fRejectKinkMother) {\r
-       if(fAODAnalysis) {\r
-         Bool_t kinkmotherpass = kTRUE;\r
-         for(Int_t kinkmother = 0; kinkmother < numberofmotherkink; kinkmother++) {\r
-           if(track->GetID() == listofmotherkink[kinkmother]) {\r
-             kinkmotherpass = kFALSE;\r
-             continue;\r
-           }\r
-         }\r
-         if(!kinkmotherpass) continue;\r
-       }\r
-       else {\r
-         AliESDtrack *esdtrack = dynamic_cast<AliESDtrack *>(track);\r
-         if(esdtrack){  \r
-           if(esdtrack->GetKinkIndex(0) != 0) continue; \r
-         } // Quick and dirty fix to reject both kink mothers and daughters\r
-       }\r
-      }      \r
-\r
-      valuetrackingcuts[1] = 1; \r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
-      // RecPrim\r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecPrim + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-      valuetrackingcuts[1] = 2; \r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
-      \r
-      // HFEcuts: ITS layers cuts\r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsITS + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-       valuetrackingcuts[1] = 3; \r
-       if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);     \r
-\r
-      // HFE cuts: TOF PID and mismatch flag\r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTOF + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-      valuetrackingcuts[1] = 4; \r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
-      \r
-      // HFE cuts: TPC PID cleanup\r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-      valuetrackingcuts[1] = 5; \r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
-      \r
-      // HFEcuts: Nb of tracklets TRD0\r
-      if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTRD + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
-      valuetrackingcuts[1] = 6; \r
-      if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
+    \r
+    valuetrackingcuts[0] = track->Pt(); \r
+    valuetrackingcuts[1] = 0;\r
+    \r
+    // RecKine: ITSTPC cuts  \r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecKineITSTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);\r
+    \r
+    // RecPrim\r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepRecPrim + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    valuetrackingcuts[1] = 1; \r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
+    \r
+    // HFEcuts: ITS layers cuts\r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsITS + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    valuetrackingcuts[1] = 2; \r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);     \r
+    \r
+    // HFE cuts: TOF and mismatch flag\r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTOF + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    valuetrackingcuts[1] = 3; \r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
+    \r
+    // HFE cuts: TPC PID cleanup\r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTPC + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    valuetrackingcuts[1] = 4; \r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
+    \r
+    // HFEcuts: Nb of tracklets TRD0\r
+    if(!fHFECuts->CheckParticleCuts(AliHFEcuts::kStepHFEcutsTRD + AliHFEcuts::kNcutStepsMCTrack, (TObject *)track)) continue;\r
+    valuetrackingcuts[1] = 5; \r
+    if(fMonitorTrackCuts) fTrackingCuts->Fill(&valuetrackingcuts[0]);    \r
       \r
-    }\r
     AliDebug(2,"Survived");\r
 \r
     /////////////////////////////////////////////////////////\r
@@ -2212,7 +2115,6 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
       AliDebug(2,Form("A: Number of tracks %d",fflowEvent->NumberOfTracks()));\r
       for(Int_t iRPs=0; iRPs< fflowEvent->NumberOfTracks(); iRPs++) {\r
        AliFlowTrack *iRP = (AliFlowTrack*) (fflowEvent->GetTrack(iRPs));\r
-       if(!iRP) continue;\r
        //if(!iRP->InRPSelection()) continue;\r
        if( TMath::Abs(idtrack) == TMath::Abs(iRP->GetID()) ) {\r
          iRP->SetForPOISelection(kTRUE);\r
@@ -2287,7 +2189,7 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
        fProfileCosPhiMaps->Fill(valuensparsehprofile[1],valuensparsehprofile[2],valuensparseh[0]);  //TR: info\r
       }\r
     }\r
-    \r
+\r
     if(fMonitorPhotonic) {\r
       Int_t indexmother = -1;\r
       Int_t source = 1;\r
@@ -2346,8 +2248,11 @@ void AliAnalysisTaskFlowTPCTOFEPSP::UserExec(Option_t */*option*/)
       fArraytrack = NULL;\r
     }\r
   }\r
-  \r
+\r
+  fBackgroundSubtraction->CountPoolAssociated(fInputEvent,binct);\r
+\r
   PostData(1, fListHist);\r
\r
 \r
  \r
 }\r
index 274991e4c13beaeb1e5edda1dd8e8a69357a4088..1050f06e39c31ee65b08dc4210690be9aa0c049d 100644 (file)
@@ -85,8 +85,6 @@ public:
   virtual void  UserCreateOutputObjects();\r
 \r
   void SetAODAnalysis(Bool_t aodAnalysis)   { fAODAnalysis = aodAnalysis; };\r
-  void SetUseFilterAOD(Bool_t useFilterAOD) { fUseFilterAOD = useFilterAOD; }\r
-  void SetApplyCut(Bool_t applyCut)         { fApplyCut = applyCut; }\r
   void SetFilter(ULong_t filter)            { fFilter = filter; }\r
   \r
   AliHFEpid *GetPID() const { return fPID; }\r
@@ -100,7 +98,6 @@ public:
   void SetContamination(TF1 * const function,Int_t k) { fContamination[k] = function; };\r
   void SetV2Contamination(TF1 * const function,Int_t k) { fv2contamination[k] = function; };\r
   void SetHFECuts(AliHFEcuts * const cuts) { fHFECuts = cuts; };\r
-  void SetRejectKinkMother(Bool_t rejectKinkMother = kFALSE) { fRejectKinkMother = rejectKinkMother; };\r
   void SetHFEBackgroundSubtraction(AliHFENonPhotonicElectron * const backgroundSubtraction) { fBackgroundSubtraction = backgroundSubtraction; };\r
   void SetHFEBackgroundCuts(AliESDtrackCuts * const cuts) { fHFEBackgroundCuts = cuts; };\r
   void SetSubEtaGapTPC(Bool_t  subEtaGapTPC) { fSubEtaGapTPC = subEtaGapTPC; };\r
@@ -126,7 +123,6 @@ public:
   void SetMCPID(Bool_t mcPID) { fMCPID = mcPID;};\r
   void SetNoPID(Bool_t noPID) { fNoPID = noPID;};\r
 \r
-  void SetDebugLevel(Int_t debugLevel) { fDebugLevel = debugLevel;};\r
   void SetMonitorEventPlane(Bool_t monitorEventPlane) { fMonitorEventPlane = monitorEventPlane;};\r
   void SetMonitorContamination(Bool_t monitorContamination) { fMonitorContamination = monitorContamination;};\r
   void SetMonitorPhotonic(Bool_t monitorPhotonic) { fMonitorPhotonic = monitorPhotonic;};\r
@@ -153,8 +149,6 @@ public:
 private:\r
   TList     *fListHist;         //! TH list\r
   Bool_t    fAODAnalysis;       // AOD analysis\r
-  Bool_t    fUseFilterAOD;     // Use the preselected AOD track\r
-  Bool_t    fApplyCut;       // Apply the analysis cut for AOD tracks\r
   ULong_t   fFilter;             // reconstruction AOD status flags \r
   AliAODMCHeader *fAODMCHeader;         // ! MC info AOD\r
   TClonesArray *fAODArrayMCInfo;        // ! MC info particle AOD\r
@@ -196,7 +190,6 @@ private:
   Bool_t    fSetMassConstraint; // Set mass constraint\r
   \r
 \r
-  Int_t     fDebugLevel; // Debug Level  \r
   Bool_t    fMonitorEventPlane; // Monitor event plane\r
   Bool_t    fMonitorContamination; // Monitor contamination\r
   Bool_t    fMonitorPhotonic;// Monitor photonic\r
@@ -210,7 +203,6 @@ private:
   \r
   // Cuts for HFE\r
   AliHFEcuts *fHFECuts;           // HFE cuts\r
-  Bool_t fRejectKinkMother;       // Reject Kink Mother \r
   AliHFEpid  *fPID;               // PID cuts \r
   AliHFEpid  *fPIDTOFOnly;        // PID cuts TOF only\r
   AliHFEpidQAmanager *fPIDqa;     // QA Manager\r
@@ -307,7 +299,7 @@ private:
 \r
   TTreeSRedirector  *fDebugStreamer;               //!Debug streamer\r
 \r
- Int_t FindMother(Int_t tr, AliMCEvent *mcEvent, Int_t &indexmother);\r
 Int_t FindMother(Int_t tr, AliMCEvent *mcEvent, Int_t &indexmother);\r
   Int_t CheckPdg(Int_t tr, AliMCEvent* mcEvent);\r
   Int_t IsMotherGamma(Int_t tr, AliMCEvent* mcEvent);\r
   Int_t IsMotherPi0(Int_t tr, AliMCEvent* mcEvent);\r
index 98d5dd3be3a077ac23d9f9ff12700771e8a2c06f..e65432eb9b2c990919c2bf5993bd0c349e82b9c1 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=16,Bool_t scalarProduct=kFALSE,Bool_t cutPileup=kFALSE,Int_t tpcCls=110, Double_t tpcClsr=60, Int_t tpcClspid=80, Int_t itsCls=4, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1,Int_t debuglevel=0,Double_t etarange=80,Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0){
+AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=16,Bool_t scalarProduct=kFALSE,Bool_t cutPileup=kFALSE,Int_t tpcCls=110, Double_t tpcClsr=60, Int_t tpcClspid=80, Int_t itsCls=4, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1,Int_t debuglevel=2,Double_t etarange=80,Double_t ITSclustersback=0,Double_t minTPCback=-2.0,Double_t maxTPCback=5.0){
 
   //
   // Define TPC cut for 2011 data
@@ -67,8 +67,8 @@ AliAnalysisTask *AddTaskHFEFlowTPCTOFEPSP(UInt_t trigger=131073,Int_t aodfilter=
   
 
   //set config file name
-  TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
-  //TString configFile("/d/alice12/bailhache/AliRootInstallations/29_11_2012/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
+  //TString configFile("$ALICE_ROOT/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
+  TString configFile("/hera/alice/bailhach/AliRootInstallations/30_09_2013/AliRoot/PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C");
   TString checkconfig="ConfigHFE_FLOW_TOFTPC";
   if (!gROOT->GetListOfGlobalFunctions()->FindObject(checkconfig.Data()))
     gROOT->LoadMacro(configFile.Data());
index df3ad4d2d01a7977c24057cc67ef049581b49b30..6520231c7d024b3e5cef54dd41f439caf2488351 100644 (file)
@@ -95,7 +95,6 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
   //
   // HFE flow task 
   //
-  Bool_t rejectkinkmother = kFALSE;
   Double_t tpcsharedfraction=11;
   Double_t chi2peritscl=36.;
 
@@ -105,7 +104,6 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
   printf("TPC ratio clusters %f\n",tpcClsr*0.01);
   printf("TPC number of pid clusters %d\n",tpcClspid);
   printf("Maximal fraction of TPC shared cluster %f\n",tpcsharedfraction*0.01);
-  printf("Reject kink mother %d\n",(Int_t)rejectkinkmother);
   printf("ITS number of clusters %d\n",itsCls);
   printf("Maximal chi2 per ITS cluster %f\n",chi2peritscl);
   printf("Requirement on the pixel layer %d\n",pixellayer);
@@ -143,6 +141,8 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
   hfecuts->SetCutITSpixel(pixellayer);
   hfecuts->SetCheckITSLayerStatus(kFALSE);
   hfecuts->SetMaxImpactParam(dcaxy*0.01,dcaz*0.01);
+  hfecuts->SetPtRange(0.1,10.);
+  hfecuts->SetAcceptKinkMothers();
       
   hfecuts->SetVertexRange(10.);
   hfecuts->SetUseSPDVertex(kTRUE);
@@ -172,15 +172,13 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
   task->SetDebugLevel(1);
   task->GetPIDQAManager()->SetHighResolutionHistos();
   task->SetHFECuts(hfecuts);
-  task->SetRejectKinkMother(rejectkinkmother);
   task->SetHFEBackgroundCuts(hfeBackgroundCuts);
   if(aodfilter > 0) {
     printf("ON AOD filter %d\n",aodfilter);
-    task->SetUseFilterAOD(kTRUE);
     task->SetFilter(aodfilter);
   }
   else {
-    task->SetUseFilterAOD(kFALSE);
+    printf("Default AOD filter 1<<4\n");
   }
   if(useMC) {
     task->SetMCPID(kTRUE);
@@ -323,7 +321,7 @@ AliAnalysisTaskFlowTPCTOFEPSP* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appen
   AliHFEpid *pidbackground = task->GetPIDBackground();
   if(useMC) pidbackground->SetHasMCData(kTRUE);
   //pidbackground->AddDetector("TOF", 0);
-  pidbackground->AddDetector("TPC", 1);
+  pidbackground->AddDetector("TPC", 0);
   //pidbackground->ConfigureTOF(3.0);
   pidbackground->ConfigureTPCasymmetric(0.0,9999.,minTPCback,maxTPCback);
   task->SetMaxopeningtheta(9999.0);