Update
authorrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Jul 2012 16:39:28 +0000 (16:39 +0000)
committerrbailhac <rbailhac@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 3 Jul 2012 16:39:28 +0000 (16:39 +0000)
PWGHF/hfe/AliHFEcuts.cxx
PWGHF/hfe/AliHFEcuts.h
PWGHF/hfe/AliHFEextraCuts.cxx
PWGHF/hfe/AliHFEextraCuts.h
PWGHF/hfe/macros/AddTaskHFEtpctofv2.C
PWGHF/hfe/macros/configs/PbPb/ConfigHFE_FLOW_TOFTPC.C

index e3917eb..4fb1f51 100644 (file)
@@ -115,6 +115,7 @@ AliHFEcuts::AliHFEcuts():
   fRequirements(0),
   fTPCclusterDef(AliHFEextraCuts::kFound),
   fTPCratioDef(AliHFEextraCuts::kFoundOverFindable),
+  fEtaRange(0.8),
   fMinClustersTPC(0),
   fMinClustersTPCPID(0),
   fMinClustersITS(0),
@@ -136,6 +137,8 @@ AliHFEcuts::AliHFEcuts():
   fFractionOfSharedTPCClusters(-1.0),
   fMaxImpactParameterRpar(kFALSE),
   fAdditionalStatusRequirement(0),
+  fTOFsignaldx(-1.0),
+  fTOFsignaldz(-1.0),
   fHistQA(0x0),
   fCutList(0x0),
   fDebugLevel(0)
@@ -157,6 +160,7 @@ AliHFEcuts::AliHFEcuts(const Char_t *name, const Char_t *title):
   fRequirements(0),
   fTPCclusterDef(AliHFEextraCuts::kFound),
   fTPCratioDef(AliHFEextraCuts::kFoundOverFindable),
+  fEtaRange(0.8),
   fMinClustersTPC(0),
   fMinClustersTPCPID(0),
   fMinClustersITS(0),
@@ -178,6 +182,8 @@ AliHFEcuts::AliHFEcuts(const Char_t *name, const Char_t *title):
   fFractionOfSharedTPCClusters(-1.0),
   fMaxImpactParameterRpar(kFALSE),
   fAdditionalStatusRequirement(0),
+  fTOFsignaldx(-1.0),
+  fTOFsignaldz(-1.0),
   fHistQA(0x0),
   fCutList(0x0),
   fDebugLevel(0)
@@ -198,6 +204,7 @@ AliHFEcuts::AliHFEcuts(const AliHFEcuts &c):
   fRequirements(c.fRequirements),
   fTPCclusterDef(c.fTPCclusterDef),
   fTPCratioDef(c.fTPCratioDef),
+  fEtaRange(c.fEtaRange),
   fMinClustersTPC(0),
   fMinClustersTPCPID(0),
   fMinClustersITS(0),
@@ -219,6 +226,8 @@ AliHFEcuts::AliHFEcuts(const AliHFEcuts &c):
   fFractionOfSharedTPCClusters(-1.0),
   fMaxImpactParameterRpar(kFALSE),
   fAdditionalStatusRequirement(0),
+  fTOFsignaldx(-1.0),
+  fTOFsignaldz(-1.0),
   fHistQA(0x0),
   fCutList(0x0),
   fDebugLevel(0)
@@ -248,6 +257,7 @@ void AliHFEcuts::Copy(TObject &c) const {
   target.fRequirements = fRequirements;
   target.fTPCclusterDef = fTPCclusterDef;
   target.fTPCratioDef = fTPCratioDef;
+  target.fEtaRange = fEtaRange;
   target.fMinClustersTPC = fMinClustersTPC;
   target.fMinClustersTPCPID = fMinClustersTPCPID;
   target.fMinClustersITS = fMinClustersITS;
@@ -269,6 +279,8 @@ void AliHFEcuts::Copy(TObject &c) const {
   target.fFractionOfSharedTPCClusters = fFractionOfSharedTPCClusters;
   target.fMaxImpactParameterRpar = fMaxImpactParameterRpar;
   target.fAdditionalStatusRequirement = fAdditionalStatusRequirement;
+  target.fTOFsignaldx = fTOFsignaldx;
+  target.fTOFsignaldz = fTOFsignaldz;
   target.fDebugLevel = 0;
 
   memcpy(target.fProdVtx, fProdVtx, sizeof(Double_t) * 4);
@@ -478,7 +490,7 @@ void AliHFEcuts::SetParticleGenCutList(){
   // Initialize Particle Cuts for Monte Carlo Tracks
   // Production Vertex Radius: < 3cm
   // Particle Species: Electrons
-  // Eta: < 0.8
+  // Eta: < 0.8 (fEtaRange)
   //
   
   TObjArray *mcCuts = new TObjArray;
@@ -507,7 +519,8 @@ void AliHFEcuts::SetParticleGenCutList(){
   if(IsRequireKineMCCuts()) {  
     AliCFTrackKineCuts *kineMCcuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineMC", (Char_t *)"MC Kine Cuts");
     kineMCcuts->SetPtRange(fPtRange[0], fPtRange[1]);
-    kineMCcuts->SetEtaRange(-0.8, 0.8);
+    //kineMCcuts->SetEtaRange(-0.8, 0.8);
+    kineMCcuts->SetEtaRange(-TMath::Abs(fEtaRange),TMath::Abs(fEtaRange));
     if(IsQAOn()) kineMCcuts->SetQAOn(fHistQA);
     mcCuts->AddLast(kineMCcuts);
   }
@@ -585,7 +598,8 @@ void AliHFEcuts::SetRecKineITSTPCCutList(){
   
   AliCFTrackKineCuts *kineCuts = new AliCFTrackKineCuts((Char_t *)"fCutsKineRec", (Char_t *)"REC Kine Cuts");
   kineCuts->SetPtRange(fPtRange[0], fPtRange[1]);
-  kineCuts->SetEtaRange(-0.8, 0.8);
+  //kineCuts->SetEtaRange(-0.8, 0.8);
+  kineCuts->SetEtaRange(-TMath::Abs(fEtaRange),TMath::Abs(fEtaRange));
   
   if(IsQAOn()){
     trackQuality->SetQAOn(fHistQA);
@@ -678,6 +692,7 @@ void AliHFEcuts::SetHFElectronTOFCuts(){
   AliHFEextraCuts *hfecuts = new AliHFEextraCuts("fCutsHFElectronGroupTOF","Extra cuts from the HFE group on TOF PID");
   if(fTOFPIDStep) hfecuts->SetTOFPID(kTRUE);
   if(fTOFMISMATCHStep) hfecuts->SetTOFMISMATCH(kTRUE);
+  if((fTOFsignaldx > 0.0) && (fTOFsignaldz > 0.0)) hfecuts->SetTOFsignalDxz(fTOFsignaldx,fTOFsignaldz);
   if(IsQAOn()) hfecuts->SetQAOn(fHistQA);
   hfecuts->SetDebugLevel(fDebugLevel);
   
index c72ab56..e7668a7 100644 (file)
@@ -148,6 +148,7 @@ class AliHFEcuts : public TNamed{
     inline void SetIPcutParam(Float_t p0, Float_t p1, Float_t p2, Float_t p3, Bool_t isipsigma, Bool_t isabs);
     void SetMinRatioTPCclusters(Double_t minRatioTPC) { fMinClusterRatioTPC = minRatioTPC; };
     void SetPtRange(Double_t ptmin, Double_t ptmax){fPtRange[0] = ptmin; fPtRange[1] = ptmax;};
+    void SetTOFsignaldxz(Double_t tofsignaldx, Double_t tofsignaldz){fTOFsignaldx = tofsignaldx; fTOFsignaldz = tofsignaldz;};
     inline void SetProductionVertex(Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax);
     inline void SetSigmaToVertex(Double_t sig);
     inline void SetSigmaToVertexXY(Double_t sig);
@@ -156,6 +157,7 @@ class AliHFEcuts : public TNamed{
       fTPCclusterDef= clusterDef;
       fTPCratioDef = ratioDef;
     }
+    void SetEtaRange(Double_t etaRange){fEtaRange = etaRange;};
     void SetVertexRange(Double_t zrange){fVertexRangeZ = zrange;};
     void SetTOFPIDStep(Bool_t tofPidStep) {fTOFPIDStep = tofPidStep;};
     void SetTOFMISMATCHStep(Bool_t tofMismatchStep) {fTOFMISMATCHStep = tofMismatchStep;};
@@ -217,6 +219,7 @@ class AliHFEcuts : public TNamed{
     ULong64_t fRequirements;     // Bitmap for requirements
     AliHFEextraCuts::ETPCclusterDef_t fTPCclusterDef;       // TPC cluster definition
     AliHFEextraCuts::ETPCclrDef_t fTPCratioDef;             // TPC cluster ratio Definition
+    Double_t fEtaRange;               // Eta range
     Double_t fDCAtoVtx[2];           // DCA to Vertex
     Double_t fProdVtx[4];              // Production Vertex
     Double_t fPtRange[2];              // pt range
@@ -243,6 +246,8 @@ class AliHFEcuts : public TNamed{
     Double_t fFractionOfSharedTPCClusters; // Fraction of shared TPC clusters
     Bool_t   fMaxImpactParameterRpar;      // Max impact parameter
     Long_t   fAdditionalStatusRequirement; // Additional status bit requirement 
+    Double_t fTOFsignaldx;                 // TOF signal Dx
+    Double_t fTOFsignaldz;                 // TOF signal Dz
 
     
     TList *fHistQA;                        //! QA Histograms
@@ -250,7 +255,7 @@ class AliHFEcuts : public TNamed{
 
     Int_t fDebugLevel;            // Debug Level
     
-  ClassDef(AliHFEcuts, 2)         // Container for HFE cuts
+  ClassDef(AliHFEcuts, 4)         // Container for HFE cuts
 };
 
 //__________________________________________________________________
index d9d6cb1..664a5ee 100644 (file)
@@ -69,6 +69,8 @@ AliHFEextraCuts::AliHFEextraCuts(const Char_t *name, const Char_t *title):
   fTPCclusterRatioDef(0),
   fFractionTPCShared(-1.0),
   fAbsHFEImpactParamNsigmaR(kTRUE),
+  fTOFsignalDx(1.0),
+  fTOFsignalDz(1.0),
   fCheck(kFALSE),
   fQAlist(0x0) ,
   fDebugLevel(0)
@@ -99,6 +101,8 @@ AliHFEextraCuts::AliHFEextraCuts(const AliHFEextraCuts &c):
   fTPCclusterRatioDef(c.fTPCclusterRatioDef),
   fFractionTPCShared(c.fFractionTPCShared),
   fAbsHFEImpactParamNsigmaR(c.fAbsHFEImpactParamNsigmaR),
+  fTOFsignalDx(c.fTOFsignalDx),
+  fTOFsignalDz(c.fTOFsignalDz),
   fCheck(c.fCheck),
   fQAlist(0x0),
   fDebugLevel(0)
@@ -138,6 +142,8 @@ AliHFEextraCuts &AliHFEextraCuts::operator=(const AliHFEextraCuts &c){
     fTPCclusterRatioDef = c.fTPCclusterRatioDef;
     fFractionTPCShared = c.fFractionTPCShared;
     fAbsHFEImpactParamNsigmaR = c.fAbsHFEImpactParamNsigmaR;
+    fTOFsignalDx = c.fTOFsignalDx;
+    fTOFsignalDz = c.fTOFsignalDz;
     fCheck = c.fCheck;
     fDebugLevel = c.fDebugLevel;
     memcpy(fImpactParamCut, c.fImpactParamCut, sizeof(Float_t) * 4);
@@ -226,6 +232,10 @@ Bool_t AliHFEextraCuts::CheckRecCuts(AliVTrack *track){
   Int_t status2 = GetITSstatus(track, 1);
   Bool_t statusL0 = CheckITSstatus(status1);
   Bool_t statusL1 = CheckITSstatus(status2);
+  Double_t tofsignalDx = 0.0;
+  Double_t tofsignalDz = 0.0;
+  GetTOFsignalDxDz(track,tofsignalDx,tofsignalDz);
+
   if(TESTBIT(fRequirements, kTPCfractionShared)) {
     // cut on max fraction of shared TPC clusters
     if(TMath::Abs(fractionSharedClustersTPC) < fFractionTPCShared) SETBIT(survivedCut, kTPCfractionShared);    
@@ -423,6 +433,10 @@ Bool_t AliHFEextraCuts::CheckRecCuts(AliVTrack *track){
     if(!IsKinkMother(track)) SETBIT(survivedCut, kRejectKinkMother);
     //else printf("Found kink mother\n");
   }
+  if(TESTBIT(fRequirements, kTOFsignalDxy)){
+    // cut on TOF matching cluster
+    if((TMath::Abs(tofsignalDx) <= fTOFsignalDx) && (TMath::Abs(tofsignalDz) <= fTOFsignalDz)) SETBIT(survivedCut, kTOFsignalDxy);
+  }
   
   if(fRequirements == survivedCut){
     //
@@ -1023,3 +1037,18 @@ void AliHFEextraCuts::GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maxi
     else maximpactRcut = 9999999999.0;
   }
 }
+//______________________________________________________
+void AliHFEextraCuts::GetTOFsignalDxDz(AliVTrack *track, Double_t &tofsignalDx, Double_t &tofsignalDz){
+  //
+  // TOF matching 
+  //
+  
+  TString type = track->IsA()->GetName();
+  if(!type.CompareTo("AliESDtrack")){
+    AliESDtrack *esdtrack = dynamic_cast<AliESDtrack *>(track);
+    if(!esdtrack) return;
+    tofsignalDx = esdtrack->GetTOFsignalDx();
+    tofsignalDz = esdtrack->GetTOFsignalDz();
+  }
+
+}
index 1d55560..418d2cb 100644 (file)
@@ -80,6 +80,7 @@ class AliHFEextraCuts: public AliCFCutBase{
     void SetMaxImpactParameterRpar(Bool_t maxImpactParameterRpar) { maxImpactParameterRpar ? SETBIT(fRequirements, kMaxImpactParameterRpar) : CLRBIT(fRequirements, kMaxImpactParameterRpar); }
     void SetFractionOfTPCSharedClusters(Double_t fractionShared) { fFractionTPCShared= fractionShared; SETBIT(fRequirements, kTPCfractionShared); }
     void SetMinNbITScls(UChar_t minNbITScls) { fMinNbITScls = minNbITScls; SETBIT(fRequirements, kMinNbITScls); }
+    void SetTOFsignalDxz(Double_t tofsignalDx,Double_t tofsignalDz) { fTOFsignalDx=tofsignalDx; fTOFsignalDz=tofsignalDz; SETBIT(fRequirements, kTOFsignalDxy); }
     void SetRejectKinkDaughter() { SETBIT(fRequirements, kRejectKinkDaughter);}; 
     void SetRejectKinkMother() { SETBIT(fRequirements, kRejectKinkMother);}; 
     void SetCheckITSstatus(Bool_t check) { fCheck = check; };
@@ -113,6 +114,7 @@ class AliHFEextraCuts: public AliCFCutBase{
     //void GetHFEImpactParameters(AliVTrack *track, Double_t &dcaxy, Double_t &dcansigmaxy);
     void GetHFEImpactParameterCuts(AliVTrack *track, Double_t &hfeimpactRcut, Double_t &hfeimpactnsigmaRcut);
     void GetMaxImpactParameterCutR(AliVTrack *track, Double_t &maximpactRcut);
+    void GetTOFsignalDxDz(AliVTrack *track, Double_t &tofsignalDx, Double_t &tofsignalDz);
     Float_t GetTPCsharedClustersRatio(AliVTrack *track);
     Int_t GetITSNbOfcls(AliVTrack *track);
     Bool_t IsKinkDaughter(AliVTrack *track);
@@ -141,7 +143,8 @@ class AliHFEextraCuts: public AliCFCutBase{
       kRejectKinkDaughter = 18,
       kRejectKinkMother = 19,
       kDriftITS = 20,
-      kNcuts = 21
+      kTOFsignalDxy = 21,
+      kNcuts = 22
     } Cut_t;
     enum{
       //
@@ -168,12 +171,14 @@ class AliHFEextraCuts: public AliCFCutBase{
     UChar_t fTPCclusterRatioDef;      // TPC cluster ratio definition Bitmap
     Double_t  fFractionTPCShared;     // Cut on fraction of shared clusters
     Bool_t fAbsHFEImpactParamNsigmaR; // flag to use abs ip cut
+    Double_t fTOFsignalDx;            // TOF signal dx
+    Double_t fTOFsignalDz;            // TOF signal dz
 
     Bool_t  fCheck;                     // check
     TList *fQAlist;                    //! Directory for QA histograms
     Int_t   fDebugLevel;                // Debug Level
   
-    ClassDef(AliHFEextraCuts, 4)      // Additional cuts implemented by the ALICE HFE group
+    ClassDef(AliHFEextraCuts, 5)      // Additional cuts implemented by the ALICE HFE group
 };
 
 //__________________________________________________________
index e8a3953..dfd250e 100644 (file)
@@ -1,4 +1,4 @@
-AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t tpcClspid=60, Double_t tpcsharedfraction=10, Int_t itsCls=4, Double_t chi2peritscl=36, 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, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE){
+AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t tpcClspid=60, Double_t tpcsharedfraction=10, Int_t itsCls=4, Double_t chi2peritscl=36, Int_t pixellayer=2, Double_t dcaxy=100,Double_t dcaz=200, Double_t tofsig=30., Double_t tpceff=50., Int_t vzero=1, Double_t etarange=80,Int_t debuglevel=0, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE){
 
   //
   // Define TPC cut for 2011 data
@@ -7,9 +7,9 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
   // -0.2 0-5%
   // -0.15 5-10%
   // -0.1 10-20%
-  // -0.0 20-30%
-  // 0.156 30-40%
-  // 0.2 40-50%
+  // -0.0 20-30%, sigma=1.17
+  // 0.156 30-40%, sigma=1.2
+  // 0.19 40-50%, sigma=1.2
   // 0.2 50-60%
   // 0.2 60-80% 
   tpcdedx[0]=-0.2;
@@ -17,24 +17,24 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
   tpcdedx[2]=-0.1;
   tpcdedx[3]=0.0;
   tpcdedx[4]=0.156;
-  tpcdedx[5]=0.2;
+  tpcdedx[5]=0.19;
   tpcdedx[6]=0.2;
   tpcdedx[7]=0.2;
   if(TMath::Abs(tpceff-55)<0.01) {
     tpcdedx[0]=-0.365;
     tpcdedx[1]=-0.314;
     tpcdedx[2]=-0.267;
-    tpcdedx[3]=-0.17;
+    tpcdedx[3]=-0.165;
     tpcdedx[4]=-0.022;
-    tpcdedx[5]=-0.018;
-    tpcdedx[6]=-0.018;
-    tpcdedx[7]=-0.018;
+    tpcdedx[5]= 0.01;
+    tpcdedx[6]= 0.018;
+    tpcdedx[7]= 0.018;
   }
   if(TMath::Abs(tpceff-45)<0.01) {
     tpcdedx[0]=-0.062;
     tpcdedx[1]=-0.015;
     tpcdedx[2]=0.035;
-    tpcdedx[3]=0.13;
+    tpcdedx[3]=0.131;
     tpcdedx[4]=0.278;
     tpcdedx[5]=0.32;
     tpcdedx[6]=0.32;
@@ -44,9 +44,9 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
     tpcdedx[0]=-0.518;
     tpcdedx[1]=-0.47;
     tpcdedx[2]=-0.42;
-    tpcdedx[3]=-0.325;
+    tpcdedx[3]=-0.315;
     tpcdedx[4]=-0.178;
-    tpcdedx[5]=-0.135;
+    tpcdedx[5]=-0.145;
     tpcdedx[6]=-0.135;
     tpcdedx[7]=-0.135;
   }
@@ -54,15 +54,15 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
     tpcdedx[0]=0.09;
     tpcdedx[1]=0.14;
     tpcdedx[2]=0.188;
-    tpcdedx[3]=0.282;
+    tpcdedx[3]=0.28;
     tpcdedx[4]=0.43;
-    tpcdedx[5]=0.473;
+    tpcdedx[5]=0.462;
     tpcdedx[6]=0.473;
     tpcdedx[7]=0.473;
   }
 
   // Name
-  TString appendixx(TString::Format("TPC%dr%dp%ds%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%d",tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel));
+  TString appendixx(TString::Format("TPC%dr%dp%ds%dITS%dC%dPi%dDCAr%dz%dTOF%dTPCe%dV%dD%de%d",tpcCls,(Int_t)tpcClsr,tpcClspid,(Int_t) tpcsharedfraction,itsCls,(Int_t) chi2peritscl,(Int_t) pixellayer,(Int_t) dcaxy,(Int_t)dcaz,(Int_t) tofsig,(Int_t)tpceff,vzero,debuglevel,(Int_t)(etarange*0.1)));
   //printf("appendixx %s\n", appendixx.Data());
 
   //TString appendixx("tpctofv2");
@@ -77,7 +77,7 @@ AliAnalysisTask *AddTaskHFEtpctofv2(Int_t tpcCls=110, Double_t tpcClsr=50, Int_t
   
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-  AliAnalysisTaskHFEFlow *task =  ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,tpcCls, tpcClsr, tpcClspid, tpcsharedfraction, itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,algorithmMA,massconstraint);
+  AliAnalysisTaskHFEFlow *task =  ConfigHFE_FLOW_TOFTPC(kFALSE,appendixx,tpcCls, tpcClsr, tpcClspid, tpcsharedfraction, itsCls, chi2peritscl, pixellayer, dcaxy, dcaz,tofsig,&tpcdedx[0],vzero,debuglevel,etarange,algorithmMA,massconstraint);
   
   task->SetNbBinsCentralityQCumulant(4);
   //task->SetBinCentralityLess(0,0.0);
index bf3da78..422003c 100644 (file)
@@ -64,7 +64,7 @@ Double_t Contamination_40_50(const Double_t *x, const Double_t *par)
 }
 
 
-AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, Int_t tpcCls, Double_t tpcClsr,Int_t tpcClspid, Double_t tpcsharedfraction, Int_t itsCls, Double_t chi2peritscl, Int_t pixellayer, Double_t dcaxy, Double_t dcaz,  Double_t tofsig, Double_t *tpcdedx, Int_t vzero, Int_t debuglevel, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE)
+AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, Int_t tpcCls, Double_t tpcClsr,Int_t tpcClspid, Double_t tpcsharedfraction, Int_t itsCls, Double_t chi2peritscl, Int_t pixellayer, Double_t dcaxy, Double_t dcaz,  Double_t tofsig, Double_t *tpcdedx, Int_t vzero, Double_t etarange,Int_t debuglevel, Bool_t algorithmMA=kFALSE, Bool_t massconstraint=kFALSE)
 {
   //
   // HFE flow task 
@@ -90,6 +90,7 @@ AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, In
   printf("TPC min sigma cut 7: %f\n",tpcdedx[7]);
   printf("VZERO event plane %d\n",vzero);
   printf("Debug level %d\n",debuglevel);
+  printf("Etarange %f\n",etarange*0.1);
   printf("AlgorithmMA %d\n",(Int_t)algorithmMA);
   printf("Mass constraint %d\n",(Int_t)massconstraint);
 
@@ -99,6 +100,7 @@ AliAnalysisTaskHFEFlow* ConfigHFE_FLOW_TOFTPC(Bool_t useMC, TString appendix, In
   // Cut HFE
   AliHFEcuts *hfecuts = new AliHFEcuts("hfeCuts","HFE Standard Cuts");
   hfecuts->CreateStandardCuts();
+  hfecuts->SetEtaRange(etarange*0.1);
   hfecuts->SetMinNClustersTPC(tpcCls);
   hfecuts->SetMinNClustersTPCPID(tpcClspid);
   hfecuts->SetMinRatioTPCclusters(tpcClsr*0.01);