]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
updates
authorssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Aug 2013 12:18:47 +0000 (12:18 +0000)
committerssakai <ssakai@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 26 Aug 2013 12:18:47 +0000 (12:18 +0000)
PWGHF/hfe/AliHFEcuts.h
PWGHF/hfe/AliHFEreducedEvent.h
PWGHF/hfe/AliHFEreducedEventCreatorESD.cxx
PWGHF/hfe/macros/AddTaskHFEnpepPb.C
PWGHF/hfe/macros/AddTaskHFEpPb.C
PWGHF/hfe/macros/AddTaskHFEreducedEventESD.C
PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C
PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPbTRD.C
PWGHF/hfe/macros/configs/pPb/ConfigHFEnpepPb.C
PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C
PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C

index eab77de0367dd3bedc5455fbe2b05feed1900870..c2e8e36b8326a77467e4280222cede1869289306 100644 (file)
@@ -371,7 +371,7 @@ void AliHFEcuts::CreateStandardCuts(){
   fMaxChi2clusterTPC = 4.;
   fMinClusterRatioTPC = 0.6;
   fPtRange[0] = 0.1;
-  fPtRange[1] = 20.;
+  fPtRange[1] = 100.;
   SetRequireKineMCCuts();
 }
 #endif
index a0cb581b40abbd5ef48ee62154d818bafd6f1d24..7aab9f83f9aa9e898e8fef7881bf70adef93fb74 100644 (file)
@@ -108,14 +108,16 @@ class AliHFEreducedEvent : public TObject{
   Bool_t IsEMCalTrigger() const { return TESTBIT(fTrigger, kEMCAL); }
   Bool_t IsTRDSETrigger() const { return TESTBIT(fTrigger, kTRDSE); }
   Bool_t IsTRDDQTrigger() const { return TESTBIT(fTrigger, kTRDDQ); }
-  
+  Bool_t IsINTTrigger() const { return TESTBIT(fTrigger, kINTTRG); }
+
   void SetMBTrigger() { SETBIT(fTrigger, kMB); }
   void SetSemiCentralTrigger() { SETBIT(fTrigger, kSemiCentral); }
   void SetCentralTrigger() { SETBIT(fTrigger, kCentral); }
   void SetEMCALTrigger() { SETBIT(fTrigger, kEMCAL); }
   void SetTRDSETrigger() { SETBIT(fTrigger, kTRDSE); }
   void SetTRDDQTrigger() { SETBIT(fTrigger, kTRDDQ); }
-  
+  void SetINTTrigger() { SETBIT(fTrigger, kINTTRG); }
+
   void SetV0Multiplicity(Float_t v0A, Float_t v0C) {
     fV0Multiplicity[0] = v0A;
     fV0Multiplicity[1] = v0C;
@@ -130,7 +132,8 @@ class AliHFEreducedEvent : public TObject{
     kCentral = 2,
     kEMCAL = 3,
     kTRDSE = 4,
-    kTRDDQ = 5
+    kTRDDQ = 5,
+    kINTTRG = 6 
   } Trigger_t;
   enum{
     kCentBuff = 15
@@ -151,7 +154,7 @@ class AliHFEreducedEvent : public TObject{
   Float_t  fZDCEnergy[4];       // ZDC Energy (n,p)
   Int_t    fSPDMultiplicity;    // SPD tracklet multiplicity
   
-  ClassDef(AliHFEreducedEvent, 3)
+  ClassDef(AliHFEreducedEvent, 4)
 };
 
 //____________________________________________________________
index b51ac9e02701cacccb71a95b4897dc977bf2cd95..7758e9995972bbe47d89f599ff56da3c6565c194 100644 (file)
@@ -232,6 +232,7 @@ void AliHFEreducedEventCreatorESD::UserExec(Option_t *){
   // Derive trigger 
   UInt_t trigger = fInputHandler->IsEventSelected();
   if(trigger & AliVEvent::kMB) fHFEevent->SetMBTrigger();
+  if((trigger & AliVEvent::kINT7)||(trigger & AliVEvent::kINT8)) fHFEevent->SetINTTrigger();
   if(trigger & AliVEvent::kCentral) fHFEevent->SetCentralTrigger();
   if(trigger & AliVEvent::kSemiCentral) fHFEevent->SetCentralTrigger();
   if(trigger & AliVEvent::kEMCEJE) fHFEevent->SetEMCALTrigger();
index c3efb9d1fab010486e86d8b34d54b6b99f929dd2..58d84a202aa4e52fed4fc0632da836307dbbab53 100644 (file)
@@ -1,8 +1,9 @@
-AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC
+AliAnalysisTask *AddTaskHFEnpepPb(Bool_t MCthere
                                   Bool_t isAOD, 
                                   Bool_t kNPERef = kTRUE, 
                                   Bool_t kNPEkAny = kFALSE, 
-                                  Bool_t kNPEsystematics
+                                  Bool_t kNPEsystematics = kFALSE,
+                                  Bool_t kNPEpidsys = kFALSE
   ){
 
   // Default settings (TOF-TPC pPb)
@@ -11,15 +12,28 @@ AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC,
   const int    kDefITScl       =   4;
   const double kDefDCAr        =   1.;
   const double kDefDCAz        =   2.;
-  const double kDefTPCs        =   0.06;
-  const double kDefTPCu        =   3.06;
   const double kDefTOFs        =   3.;
   const double  kDefEtaIncMin = -0.6;
   const double  kDefEtaIncMax = 0.6;
 
+  // TPC PID Cuts Inclusive leg:
+  // NEW SPLINES + CORRECTIONS: mean 0, width 1
+  // mean is actually 0.06 (abs(eta)<0.6)
+  Double_t dEdxhm[12] = {3.06,3.06,3.06,3.06,3.06,3.06,3.06,3.06,3.06,3.06,3.06,3.06};  // Above 3 sigma we neglect 0.13%
+
+  Double_t tpcl0[12]  = {-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94,-0.94};  // 84%
+  Double_t tpcl1[12]  = {-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44,-0.44};  // 69%
+  Double_t tpcl2[12]  = {0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06,0.06};  // 50%
+
+  Double_t tpcl3[12]  = {-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69,-0.69};  // 77.2%
+  Double_t tpcl4[12]  = {-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19,-0.19};  // 59.7%
+  Double_t tpcl5[12]  = {0.186,0.186,0.186,0.186,0.186,0.186,0.186,0.186,0.186,0.186,0.186,0.186};  // 45%
+  Double_t tpcl6[12]  = {0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31,0.31};  // 40%
+  Double_t tpcl7[12]  = {0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56,0.56};  // 30.7%
+
   // Default setting for the associated electron for the NonPhotonic Analysis
-  const double kassETAm                =   -0.8;
-  const double kassETAp                =   0.8;
+  const double kassETAm = -0.8;
+  const double kassETAp = 0.8;
   const int    kassITS         =   2;
   const int    kassTPCcl       = 60;
   const int    kassTPCPIDcl    =  60;
@@ -46,12 +60,14 @@ AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC,
 
   //@@ 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
 
-  Double_t dEdxlm[12], dEdxhm[12], dEdxaclm[12], dEdxachm[12];
+  Double_t dEdxaclm[12], dEdxachm[12],dEdxaclm1[12], dEdxachm1[12],dEdxaclm2[12], dEdxachm2[12];
   for(int icent = 0; icent < 12; icent++){
-    dEdxlm[icent] = kDefTPCs;
-    dEdxhm[icent] = kDefTOFs;
     dEdxaclm[icent] = kassTPCSminus;
     dEdxachm[icent] = kassTPCSplus;
+    dEdxaclm1[icent] = -2;
+    dEdxachm1[icent] = 2;
+    dEdxaclm2[icent] = -4;
+    dEdxachm2[icent] = 4;
   }
 
   if(kNPERef){
@@ -60,9 +76,9 @@ AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC,
     // Reference task
     //
     // **************************************************************
-    RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+    RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                     kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-    RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+    RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                     kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE);
   }
 
@@ -72,11 +88,11 @@ AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC,
     // task for kAny instead of kBoth
     //
     // **************************************************************
-    RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+    RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                     kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-    RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+    RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kAny, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                     kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kFALSE);
-}
+  }
 
   if(kNPEsystematics){
     // **************************************************************
@@ -84,58 +100,71 @@ AliAnalysisTask *AddTaskHFEnpepPb(Bool_t isMC,
     // Cut systematics on the associated track
     //
     // **************************************************************
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         0.0, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, 0.0, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, 3, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, 80, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, 100, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, 40, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, 40, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, 80, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, 100, kassDCAr, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, 0.5, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, 2, kassDCAz, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, 1, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, 4, dEdxaclm, dEdxachm, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm1, dEdxachm1, kTRUE, kTRUE);
-      RegisterTaskNPEpPb( isMC, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, dEdxlm, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
+      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpcl1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax,
                         kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxaclm2, dEdxachm2, kTRUE, kTRUE);
 
   }
 
+  // PID systematics
+  if(kNPEpidsys){
+    const int kPIDvars = 4;
+    const double pidvars[kPIDvars] = {2, 2.5, 3.5, 4};
+    double dEdxtestlow[12], dEdxtesthigh[12];
+    for(int itest = 0; itest < kPIDvars; itest++){
+      for(int icent = 0; icent < 12; icent++){
+        dEdxtestlow[icent] = -1. * pidvars[itest];
+        dEdxtesthigh[icent] = pidvars[itest];
+      }
+//      RegisterTaskNPEpPb( MCthere, isAOD, kDefTPCcl, kDefTPCclPID, kDefITScl, kDefDCAr, kDefDCAz, tpc1, dEdxhm, kDefTOFs, AliHFEextraCuts::kBoth, kHFEV0A, kDefEtaIncMin, kDefEtaIncMax, kassETAm, kassETAp, kassITS, kassTPCcl, kassTPCPIDcl, kassDCAr, kassDCAz, dEdxtestlow, dEdxtesthigh);
+    } 
+  }
+
   return NULL;
 }
 
 //===============================================================================
-
-AliAnalysisTask *RegisterTaskNPEpPb(Bool_t isMC, Bool_t isAOD, 
+AliAnalysisTask *RegisterTaskNPEpPb(Bool_t useMC, Bool_t isAOD, 
                Int_t tpcCls=120, Int_t tpcClsPID=80, 
                Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
                Double_t *tpcdEdxcutlow=NULL, Double_t *tpcdEdxcuthigh=NULL, 
                Double_t tofs=3., Int_t itshitpixel =AliHFEextraCuts::kBoth, Int_t icent=1,
                Double_t etaIncMin = -0.8, Double_t etaIncMax = 0.8,
-               Double_t assETAm=-0.8, Double_t assETAp=0.8, Int_t assITS=2, Int_t assTPCcl=100, 
-               Int_t assTPCPIDcl=80, Double_t assDCAr=1.0, Double_t assDCAz=2.0, 
-               Double_t *assTPCSminus = NULL, Double_t *assTPCSplus=NULL ,
+               Double_t assETAm=-0.8, Double_t assETAp=0.8, Int_t assITS=2, Int_t assTPCcl=100,
+               Int_t assTPCPIDcl=80, Double_t assDCAr=1.0, Double_t assDCAz=2.0,
+               Double_t *assTPCSminus = NULL, Double_t *assTPCSplus=NULL,
                Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE)
 {
 
-  Int_t iassETAm  = (Int_t)(assETAm*10);
-  Int_t iassETAp  = (Int_t)(assETAp*10);
+  Int_t iassETAm = (Int_t)(assETAm*10);
+  Int_t iassETAp = (Int_t)(assETAp*10);
   Int_t iassDCAr = (Int_t)(assDCAr*10);
   Int_t iassDCAz = (Int_t)(assDCAz*10);
   Int_t iassTPCSminus = assTPCSminus ? (Int_t)(assTPCSminus[0]*10) : 0;
@@ -157,14 +186,14 @@ AliAnalysisTask *RegisterTaskNPEpPb(Bool_t isMC, Bool_t isAOD,
 
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
AliAnalysisTaskHFE *task = ConfigHFEnpepPb(isMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, tpcdEdxcutlow, tpcdEdxcuthigh, tofs, 0, itshitpixel, icent, etaIncMin, etaIncMax,
 AliAnalysisTaskHFE *task = ConfigHFEnpepPb(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, tpcdEdxcutlow, tpcdEdxcuthigh, tofs, 0, itshitpixel, icent, etaIncMin, etaIncMax,
                                             assETAm, assETAp, assITS, assTPCcl, assTPCPIDcl, assDCAr, assDCAz, assTPCSminus, assTPCSplus, useCat1Tracks, useCat2Tracks);
   if(isAOD)
     task->SetAODAnalysis();
   else
     task->SetESDAnalysis();
 
-  if (isMC)    task->SetHasMCData(kTRUE);
+  if (useMC)   task->SetHasMCData(kTRUE);
   else         task->SetHasMCData(kFALSE);
 
   task->SelectCollisionCandidates(AliVEvent::kINT7);
index b8c2571b6db0509ad8584cae2654dc423e33f55d..7a84a6d9f6ce6eb6007c2d469b2fa37194881ce9 100644 (file)
@@ -1,11 +1,13 @@
-AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
+AliAnalysisTask *AddTaskHFEpPb(Bool_t MCthere = kFALSE,
                                Bool_t isAOD = kFALSE,
                                Bool_t kTPCTOF_Ref = kTRUE,
-                               Bool_t kTPC_Only = kFALSE,
+                               Bool_t kTPC_Ref = kFALSE,
                                Bool_t kTPCTOF_Cent = kFALSE,
                                Bool_t kTPCTOF_Sys = kFALSE,
-                              Bool_t kTPCTOFTRD_Ref = kFALSE,
-                              Bool_t kTPCTOFTRD_mbPID = kFALSE,
+                               Bool_t kTPCTOF_TPCPID = kFALSE,
+                               Bool_t kITS_Sys = kFALSE,
+                               Bool_t kTPCTOFTRD_Ref = kFALSE,
+                               Bool_t kTPCTOFTRD_mbPID = kFALSE,
                                Bool_t kTPCTOFTRD_PID = kFALSE,
                                int TRDtrigger = 0
   ){
@@ -21,17 +23,17 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
   //@@ 0 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
   
   // Default settings 
+  // 15.04.2013 The ITS cut changes now officially from 3 to 4
   const int kDefITScl = 4;
   const int kDefTPCcl = 110;
   const int kDefTPCclPID = 80;
   const double kDefDCAr = 1.;
   const double kDefDCAz = 2.;
-  
+
   // 24.02.2013 After the latest fits, mean is 0 and sigma is 1
-  const double kDefTPCs = 0;
-  const double kDefTPCu = 3;   
-  const double kDefTOFs = 3.;
-  //const int TRDtrigger = 1; // trd trigger type
+  const double kDefTPCs = 0.0;
+  const double kDefTPCu = 3.0;   
+  const double kDefTOFs = 3.0;
   if(!kTPCTOFTRD_Ref) TRDtrigger = 0;
 
   // NEW SPLINES + CORRECTIONS: mean 0, width 1
@@ -54,11 +56,13 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
 
   // eta cut
   Int_t etacut=0; // eta cut off
-  
-  if(kTPC_Only){
-    // Reference, 50% TPC PID, with centrality V0A
-    printf("Adding TPC-only task\n");
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1);
+
+  // 24.02.2013 From now on, use task with centrality by default and keep one without for cross check
+  // 15.04.2013 We do not need the minimum bias task any more, take out by default
+
+  if(kTPC_Ref){
+    // Reference, 69% TPC PID, with centrality V0A
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1);
   }
 
   //------------------------------//
@@ -66,84 +70,97 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
   //------------------------------//
 
   if(kTPCTOF_Ref){
-    // Reference task
-    // with centrality V0A
-    printf("Adding TPC-TOF task\n");
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1);
+    // Reference task, 69% TPC PID, with centrality V0A
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1);
+  }
+
+  if (kTPCTOF_TPCPID){
+    // TPC PID
+    if (!MCthere){
+      //TPC only
+      //RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl2[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1);
+      //RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl0[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1);
+
+      //TPC-TOF
+      //RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      //RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl2[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      // new pT bins
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl0[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl2[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl3[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl4[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl5[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl6[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+      RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl7[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    }
+  }
+
+  if (kITS_Sys){
+    // ITS hits and SPD request
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,3,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,5,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,3,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,4,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,5,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst,1); 
   }
 
   if (kTPCTOF_Cent){
     // For the moment we set V0A as the reference centrality estimator, and test the other ones:
     // 1: V0A, 2: V0M, 3: CL1, 4: ZNA
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,2); // V0M
-    RegisterTask(isMC,isAOD, kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,3); // CL1
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,4); // ZNA
-
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,2); // V0M
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,3); // CL1
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,4); // ZNA
   }
 
   if(kTPCTOF_Sys){
-
-    // TPC PID
-    if (!isMC){
-      // 84%
-      //RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl0[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-      //RegisterTaskPID2(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,-0.835,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
-      // 70%
-      RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-      // 60%
-      RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl2[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-      //RegisterTaskPID2(isMC,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,-0.184,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
-      // 40%
-      RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl3[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-      //RegisterTaskPID2(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,0.265,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth);
-    }
-
     // TOF PID
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&dEdxlm[0],&dEdxhm[0],2.0,0,AliHFEextraCuts::kBoth);
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&dEdxlm[0],&dEdxhm[0],4.0,0,AliHFEextraCuts::kBoth);
-    // TOF latest mismatch - helps nothing
-    //RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&dEdxlm[0],&dEdxhm[0],kDefTOFs,1,AliHFEextraCuts::kBoth);
-
-    // ITS hits and SPD request
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,4,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,5,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,3,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst);
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,4,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst);
-    RegisterTask(isMC,isAOD,kDefTPCcl,kDefTPCclPID,5,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kFirst);
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],2.0,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],2.5,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],3.5,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],4.0,0,AliHFEextraCuts::kBoth,1); 
 
     // TPC clusters
-    RegisterTask(isMC,isAOD,100,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
-    RegisterTask(isMC,isAOD,120,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
+    RegisterTask(MCthere,isAOD,80,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,90,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,100,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,120,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,130,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,140,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+
     // TPC clusters PID
-    RegisterTask(isMC,isAOD,kDefTPCcl,100,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth);
+    RegisterTask(MCthere,isAOD,kDefTPCcl,60,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,90,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,100,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
+    RegisterTask(MCthere,isAOD,kDefTPCcl,110,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],kDefTOFs,0,AliHFEextraCuts::kBoth,1); 
   }
+  
+  //------------------------------//
+  //   TPC-TOF-TRD analysis
+  //------------------------------//
 
-   if(kTPCTOFTRD_Ref){
-
-      RegisterTaskPID2(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth,kFALSE,TRDtrigger);
-      RegisterTaskPID2(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,TRDtrigger);
-   }
+  if(kTPCTOFTRD_Ref){
+    RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,kDefTOFs,0,AliHFEextraCuts::kBoth,kFALSE,TRDtrigger);
+    RegisterTaskPID2(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,TRDtrigger);
+  }
 
   if(kTPCTOFTRD_mbPID){
-      // without TOF
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,4,"TRD,TPC",etacut);
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,4,"TPC,TRD",etacut);
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,2,"TRD,TPC",etacut);
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,4,"TRD,TPC",etacut);
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,4,"TPC,TRD",etacut);
-      RegisterTaskPID2mbTRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,2,"TRD,TPC",etacut);
+    // without TOF
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,4,"TRD,TPC",etacut);
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,4,"TPC,TRD",etacut);
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,6,2,"TRD,TPC",etacut);
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,4,"TRD,TPC",etacut);
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,4,"TPC,TRD",etacut);
+    RegisterTaskPID2mbTRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,kDefTPCs,kDefTPCu,0,0,AliHFEextraCuts::kBoth,kFALSE,0,5,2,"TRD,TPC",etacut);
   }
 
   if(kTPCTOFTRD_PID){
-      // without TOF
-      RegisterTaskPID2TRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,5,4,"TRD,TPC");
-      RegisterTaskPID2TRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,5,4,"TPC,TRD");
-      RegisterTaskPID2TRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,6,4,"TRD,TPC");
-      RegisterTaskPID2TRD(isMC,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,6,4,"TPC,TRD");
+    // without TOF
+    RegisterTaskPID2TRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,5,4,"TRD,TPC");
+    RegisterTaskPID2TRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,5,4,"TPC,TRD");
+    RegisterTaskPID2TRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,6,4,"TRD,TPC");
+    RegisterTaskPID2TRD(MCthere,isAOD,kDefTPCcl,kDefTPCclPID,kDefITScl,kDefDCAr,kDefDCAz,&tpcl1[0],&dEdxhm[0],0,0,AliHFEextraCuts::kBoth,1,0,6,4,"TPC,TRD");
+  }
 
-  }  
-  
   return NULL;
 }
 
@@ -151,14 +168,12 @@ AliAnalysisTask *AddTaskHFEpPb(Bool_t isMC = kFALSE,
 //===============================================================================
 
 AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80, 
-                             Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
-                             Double_t *tpcdEdxcutlow=NULL, 
-                             Double_t *tpcdEdxcuthigh=NULL, 
-                             //Double_t tpcs=-0.0113, Double_t tpcu=3.09, 
-                             Double_t tofs=3., Int_t tofm=0,
-                             Int_t itshitpixel = AliHFEextraCuts::kBoth, Int_t icent=1, 
-            Double_t EtaMin=-0.8, Double_t EtaMax=0.8,
-                             Bool_t withetacorrection = kFALSE){
+                  Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
+                  Double_t *tpcdEdxcutlow=NULL, 
+                  Double_t *tpcdEdxcuthigh=NULL, 
+                  //Double_t tpcs=-0.0113, Double_t tpcu=3.09, 
+                  Double_t tofs=3., Int_t tofm=0,
+                  Int_t itshitpixel = AliHFEextraCuts::kBoth, Int_t icent=1){
 
   Int_t idcaxy = (Int_t)(dcaxy*10.);
   Int_t idcaz = (Int_t)(dcaz*10.);
@@ -166,10 +181,6 @@ AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_
   if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);
   Int_t itofs = (Int_t)(tofs*10.);
   Int_t ipixelany = itshitpixel;
-  Int_t ietacorr = 0;
-  if(withetacorrection) ietacorr = 1;
-  Int_t iEtaMin = (Int_t)(EtaMin*10.);
-  Int_t iEtaMax = (Int_t)(EtaMax*10.);
 
   printf("Argument passed to function to determine the centrality estimator %i\n", icent);
 
@@ -181,7 +192,7 @@ AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_
   TString appendix(TString::Format("centTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%dce%s",tpcCls,
                                   tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,tofm,ipixelany,cesti.Data()));
   printf("Add macro appendix %s\n", appendix.Data());
-
+  printf("Centrality estimator %s\n", cesti.Data());
 
   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPb.C");
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
@@ -222,21 +233,24 @@ AliAnalysisTask *RegisterTask(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_
 //===============================================================================
 
 AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80, 
-                                 Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
-                                 Double_t tpcs=-0.0113, Double_t tpcu=3.09, Double_t tofs=3., 
-                                 Int_t tofm=0,
-                                 Int_t itshitpixel = AliHFEextraCuts::kBoth, 
-                                 Bool_t withetacorrection = kTRUE,
-          Int_t TRDtrigger=0){
+                  Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
+                  Double_t tpcs=-0.0113, Double_t tpcu=3.09, 
+                  Double_t tofs=3., Int_t tofm=0,
+                  Int_t itshitpixel = AliHFEextraCuts::kBoth, 
+                  Bool_t withetacorrection = kTRUE,
+                  Int_t TRDtrigger=0){
+
   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPb.C");
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-  AliAnalysisTaskHFE *task = ConfigHFEmbpPb(useMC,isAOD, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz, 
+  AliAnalysisTaskHFE *task = ConfigHFEmbpPb(useMC, isAOD, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
                                             tpcs,tpcu,tofs,tofm,3.,kFALSE,kTRUE,kFALSE,itshitpixel,withetacorrection,0,TRDtrigger);
+
   if(isAOD)
     task->SetAODAnalysis();
   else
     task->SetESDAnalysis();
+
   if (useMC)
     task->SetHasMCData(kTRUE);
   else{
@@ -245,7 +259,7 @@ AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120,
 
   if(TRDtrigger==0) task->SelectCollisionCandidates(AliVEvent::kINT7);
   else task->SelectCollisionCandidates(AliVEvent::kTRD);
+
   Int_t idcaxy = (Int_t)(dcaxy*10.);
   Int_t idcaz = (Int_t)(dcaz*10.);
   Int_t itpcs = (Int_t)(tpcs*1000.);
@@ -276,40 +290,39 @@ AliAnalysisTask *RegisterTaskPID2(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120,
   return NULL;
 }
 
-
-//=========================================================================
+//===============================================================================
+// TRD PID
+//===============================================================================
 
 AliAnalysisTask *RegisterTaskPID2mbTRD(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=120, Int_t tpcClsPID = 80,
-                                 Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0, 
-                                 Double_t tpcs=-0.0113, Double_t tpcu=3.09, Double_t tofs=3., 
-                                 Int_t tofm=0,
-                                 Int_t itshitpixel = AliHFEextraCuts::kBoth, 
-                                 Bool_t withetacorrection = kTRUE,
-                                    Int_t TRDtrigger=0,Int_t trdl=6, Int_t trde=4,TString detector="TRD,TPC",Int_t etacut=0){
-
-    TString detused=detector.Copy();
-    TPRegexp(",").Substitute(detused,"","g");
-    printf("detectors in use %s %s \n",detector.Data(),detused.Data());
-
-    Int_t idcaxy = (Int_t)(dcaxy*10.);
+                  Int_t itsCls=4, Double_t dcaxy=1.0, Double_t dcaz=2.0,
+                  Double_t tpcs=-0.0113, Double_t tpcu=3.09,
+                  Double_t tofs=3., Int_t tofm=0,
+                  Int_t itshitpixel = AliHFEextraCuts::kBoth,
+                  Bool_t withetacorrection = kTRUE,
+                  Int_t TRDtrigger=0,Int_t trdl=6, Int_t trde=4,TString detector="TRD,TPC",Int_t etacut=0){
+
+  TString detused=detector.Copy();
+  TPRegexp(",").Substitute(detused,"","g");
+  printf("detectors in use %s %s \n",detector.Data(),detused.Data());
+
+  Int_t idcaxy = (Int_t)(dcaxy*10.);
   Int_t idcaz = (Int_t)(dcaz*10.);
   Int_t itpcs = (Int_t)(tpcs*1000.);
   Int_t itofs = (Int_t)(tofs*10.);
   Int_t ipixelany = itshitpixel;
   Int_t ietacorr = 0;
   if(withetacorrection) ietacorr = 1;
-  
+
   TString appendix(TString::Format("mbTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%dtrdtrg%dtrdl%itrde%iPID%setacut%i",tpcCls,
                                   tpcClsPID,itsCls,idcaxy,idcaz,itpcs,itofs,tofm,ipixelany,TRDtrigger,trdl,trde,detused.Data(),etacut));
   printf("Add macro appendix %s\n", appendix.Data());
 
-
-
   gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEmbpPbTRD.C");
   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
   AliAnalysisTaskHFE *task = ConfigHFEmbpPbTRD(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
-                                            tpcs,tpcu,tofs,tofm,3.,kFALSE,kTRUE,kFALSE,itshitpixel,withetacorrection,0,TRDtrigger,trdl,trde,detector,etacut);
+                             tpcs,tpcu,tofs,tofm,3.,kFALSE,kTRUE,kFALSE,itshitpixel,withetacorrection,0,TRDtrigger,trdl,trde,detector,etacut);
 
   if(isAOD)
     task->SetAODAnalysis();
@@ -325,7 +338,6 @@ AliAnalysisTask *RegisterTaskPID2mbTRD(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=
   if(TRDtrigger==0) task->SelectCollisionCandidates(AliVEvent::kINT7);
   else task->SelectCollisionCandidates(AliVEvent::kTRD);
 
-
   TString containerName = mgr->GetCommonFileName();
   containerName += ":HFEtask";
   containerName += appendix.Data();
@@ -354,33 +366,33 @@ AliAnalysisTask *RegisterTaskPID2TRD(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=12
                                     Int_t itshitpixel = AliHFEextraCuts::kBoth, Int_t icent=1,
                                     Int_t TRDtrigger=0,Int_t trdl=6, Int_t trde=4,TString detector){
 
-    gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C");
-    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-    AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-
-    TString detused=detector.Copy();
-    TPRegexp(",").Substitute(detused,"","g");
-    printf("detectors in use %s %s \n",detector.Data(),detused.Data());
-
-    if (icent == 2) TString cesti("V0M");
-    else if (icent == 3) TString cesti("CL1");
-    else if (icent == 4) TString cesti("ZNA");
-    else TString cesti("V0A");
-
-    Int_t idcaxy = (Int_t)(dcaxy*10.);
-    Int_t idcaz = (Int_t)(dcaz*10.);
-    Int_t tpclow = 0;
-    if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);
-    Int_t itofs = (Int_t)(tofs*10.);
-    Int_t ipixelany = itshitpixel;
-
-    TString appendix(TString::Format("mbTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%dtrdtrg%dtrdl%itrde%iPID%scent%s",tpcCls,
-                                    tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,tofm,ipixelany,TRDtrigger,trdl,trde,detused.Data(),cesti.Data()));
-    printf("Add macro appendix %s\n", appendix.Data());
-
-   AliAnalysisTaskHFE *task = ConfigHFEpPbTRD(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
-                                             tpcdEdxcutlow,tpcdEdxcuthigh, tofs, tofm, itshitpixel, icent, -0.8, 0.8,
-                                             TRDtrigger,trdl,trde,detector);
+  gROOT->LoadMacro("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/ConfigHFEpPbTRD.C");
+  AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
+  AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
+
+  TString detused=detector.Copy();
+  TPRegexp(",").Substitute(detused,"","g");
+  printf("detectors in use %s %s \n",detector.Data(),detused.Data());
+
+  if (icent == 2) TString cesti("V0M");
+  else if (icent == 3) TString cesti("CL1");
+  else if (icent == 4) TString cesti("ZNA");
+  else TString cesti("V0A");
+
+  Int_t idcaxy = (Int_t)(dcaxy*10.);
+  Int_t idcaz = (Int_t)(dcaz*10.);
+  Int_t tpclow = 0;
+  if(tpcdEdxcutlow) tpclow = (Int_t) (tpcdEdxcutlow[0]*1000.);
+  Int_t itofs = (Int_t)(tofs*10.);
+  Int_t ipixelany = itshitpixel;
+
+  TString appendix(TString::Format("mbTPCc%dTPCp%dITS%dDCAr%dz%dTPCs%dTOFs%dm%ipa%dtrdtrg%dtrdl%itrde%iPID%scent%s",tpcCls,
+                   tpcClsPID,itsCls,idcaxy,idcaz,tpclow,itofs,tofm,ipixelany,TRDtrigger,trdl,trde,detused.Data(),cesti.Data()));
+  printf("Add macro appendix %s\n", appendix.Data());
+
+  AliAnalysisTaskHFE *task = ConfigHFEpPbTRD(useMC, isAOD, appendix, tpcCls, tpcClsPID, itsCls, dcaxy, dcaz,
+                             tpcdEdxcutlow,tpcdEdxcuthigh, tofs, tofm, itshitpixel, icent, -0.8, 0.8, TRDtrigger,trdl,trde,detector);
+
   if(isAOD)
     task->SetAODAnalysis();
   else
@@ -395,6 +407,11 @@ AliAnalysisTask *RegisterTaskPID2TRD(Bool_t useMC, Bool_t isAOD, Int_t tpcCls=12
   if(TRDtrigger<2) task->SelectCollisionCandidates(AliVEvent::kINT7);
   else task->SelectCollisionCandidates(AliVEvent::kTRD);
 
+  TString containerName = mgr->GetCommonFileName();
+  containerName += ":HFEtask";
+  containerName += appendix.Data();
+  printf("container name: %s\n", containerName.Data());
+
   //create data containers
   task->ConnectOutput(1, mgr->CreateContainer(Form("HFE_Results_%s", appendix.Data()),
                                              TList::Class(), AliAnalysisManager::kOutputContainer, 
index 90766473abd9e53cbce187abfffb0889fede7c86..94d896cf6b5afc14d17c14b849151f7f55ddcae1 100644 (file)
@@ -21,7 +21,7 @@ AliAnalysisTask *AddTaskHFEreducedEvent(Bool_t MCthere=kFALSE, Int_t TRDtrigger=
   if(isRemoveFirstEvent) reducedEventCreator->SetRemoveFirstEventFromChunk();
 
   if(TRDtrigger==0) reducedEventCreator->SelectCollisionCandidates(AliVEvent::kINT7);
-  else reducedEventCreator->SelectCollisionCandidates(AliVEvent::kTRD);
+  else reducedEventCreator->SelectCollisionCandidates(AliVEvent::kINT7 | AliVEvent::kTRD);
 
   mgr->AddTask(reducedEventCreator);
   
index 507588d88c8db72d59a50a0e2f33d80b2bd267c1..fba31732171fddb474f1eafe2499645b12a0a9f2 100644 (file)
@@ -136,7 +136,8 @@ AliAnalysisTaskHFE* ConfigHFEmbpPb(Bool_t useMC, Bool_t isAOD, UChar_t TPCcl=70,
     Double_t ptbinning[19] = {0., 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 2., 2.5, 3., 4., 5., 6., 8., 12., 16., 20.};\r
   }\r
   else{\r
-    Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};\r
+//      Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};\r
+      Double_t ptbinning[41] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30.};
   }\r
   //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8};\r
   //Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};\r
index 140f5bcdbe6cd820e0d185bda4766835852aee2b..51b7a1b43cac96df6b91042c1a0276fa5550ff5d 100644 (file)
@@ -143,7 +143,8 @@ AliAnalysisTaskHFE* ConfigHFEmbpPbTRD(Bool_t useMC, Bool_t isAOD, TString append
     Double_t ptbinning[19] = {0., 0.1, 0.3, 0.5, 0.7, 0.9, 1.1, 1.3, 1.5, 2., 2.5, 3., 4., 5., 6., 8., 12., 16., 20.};
   }
   else{
-    Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
+      //Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
+      Double_t ptbinning[41] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30.};
   }
   //Double_t etabinning[33] = {-0.8, -0.75, -0.7, -0.65, -0.6, -0.55, -0.5, -0.45, -0.4, -0.35, -0.3, -0.25, -0.2, -0.15, -0.1, 0.05, 0., 0.05, 0.1, 0.15, 0.2, 0.25, 0.3, 0.35, 0.4, 0.45, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8};
   //Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
index d745373a505c4105f02f1af5148594bff6de90b9..d1d76692ea6b80f39f30ea2ff08328081b49792b 100644 (file)
@@ -1,5 +1,5 @@
 Bool_t ReadContaminationFunctions(TString filename, TF1 **functions, double sigma){
-  TFile *in = TFile::Open(Form("$ALICE_ROOT/PWGHF/hfe/configs/pPb/%s", filename.Data()));
+  TFile *in = TFile::Open(Form("$ALICE_ROOT/PWGHF/hfe/macros/configs/pPb/%s", filename.Data()));
   gROOT->cd();
   int isig = static_cast<int>(sigma * 100.);
   printf("Getting hadron background for the sigma cut: %d\n", isig);
@@ -31,12 +31,12 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
                 Bool_t useCat1Tracks = kTRUE, Bool_t useCat2Tracks = kTRUE)
 {
   Bool_t kAnalyseTaggedTracks = kFALSE;
+
   //***************************************//
   //        Setting up the HFE cuts        //
   //***************************************//
-  
-  AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts pPb");
+
+  AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts for pPb");
   //hfecuts->SetQAOn();
   hfecuts->CreateStandardCuts();
   hfecuts->SetMinNClustersTPC(TPCcl);
@@ -81,20 +81,20 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
   AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEtask%s",appendix.Data()));
   printf("task %p\n", task);
   task->SetpPbAnalysis();
-  task->SetHFECuts(hfecuts);
-  task->SetRemovePileUp(kFALSE);
   if(!isAOD) task->SetRemoveFirstEventInChunk();
+  task->SetRemovePileUp(kFALSE);
+  task->SetHFECuts(hfecuts);
   task->GetPIDQAManager()->SetHighResolutionHistos();
 
-  // Setttings for pPb
-  task    -> SetRemoveFirstEventInChunk();
-  hfecuts -> SetUseCorrelationVertex();
-  hfecuts -> SetSPDVtxResolutionCut();
+  // Determine the centrality estimator
+  task->SetCentralityEstimator("V0A");
+  if (icent == 2) task->SetCentralityEstimator("V0M");
+  else if (icent == 3) task->SetCentralityEstimator("CL1");
+  else if (icent == 4) task->SetCentralityEstimator("ZNA");
 
   //***************************************//
   //          Variable manager             //
   //***************************************//
-
   // Define Variables
   Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
   Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
@@ -110,15 +110,8 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
   vm->AddVariable("source");
   vm->AddVariable("centrality");
 
-  // Determine the centrality estimator
-  task->SetCentralityEstimator("V0A");
-  if (icent == 2) task->SetCentralityEstimator("V0M");
-  else if (icent == 3) task->SetCentralityEstimator("CL1");
-  else if (icent == 4) task->SetCentralityEstimator("ZNA");
-
   // For the moment, remove the part dedicated to the background subtraction.
   // It will be implemented in a different way, reading it from a root file.
 
   //***************************************//
   //          Configure the PID            //
@@ -136,23 +129,22 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
   }
   
   // Configure TPC PID
-  if(!useMC){
-    Double_t paramsTPCdEdxcutlow[12] ={0.0, 0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
-    if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));
+  // do the identical thing in data and MC
+  Double_t paramsTPCdEdxcutlow[12] ={0.0, 0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
+  if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));
 
-    Double_t paramsTPCdEdxcuthigh[12] ={3.0, 3.0, 3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
-    if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));
-    
-    char *cutmodel;
-    cutmodel="pol0";
-    
-    for(Int_t a=0;a<11;a++)
-    {
-      //   cout << a << " " << paramsTPCdEdxcut[a] << endl;
-      Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};
-      Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];
-      pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);
-    }
+  Double_t paramsTPCdEdxcuthigh[12] ={3.0, 3.0, 3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
+  if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));
+
+  char *cutmodel;
+  cutmodel="pol0";
+
+  for(Int_t a=0;a<11;a++){
+    // Not necessary anymore, since the pPb case is handled similarly to the pp case
+    //   cout << a << " " << paramsTPCdEdxcut[a] << endl;
+    Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};
+    Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];
+    pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);
   }
   pid->ConfigureTPCdefaultCut(cutmodel,paramsTPCdEdxcutlow,paramsTPCdEdxcuthigh[0]); // After introducing the pPb flag, pPb is merged with pp and this line defines the cut
 
@@ -169,14 +161,14 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
   // The below two lines should be removed after this check
   //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);
   //if(TOFs<3.) tofpid->SetTOFnSigmaBand(-3,TOFs); //only to check the assymmetric tof cut
-  
+
   // Load hadron background
   if(!useMC){
     Bool_t status = kTRUE;
     TF1 *hBackground[12];
     status = ReadContaminationFunctions("hadroncontamination_TOFTPC_pPb_eta06_newsplines_try3.root", hBackground, tpcdEdxcutlow[0]);
     for(Int_t a=0;a<12;a++) {
-      //  printf("back %f \n",p0[a]);
+      //printf("back %f \n",hBackground[a]);
       if(status) task->SetBackGroundFactorsFunction(hBackground[a],a);
       else printf("not all background functions found\n");
     }
@@ -185,6 +177,7 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
   //***************************************//
   //       Configure NPE plugin            //
   //***************************************//
+
   AliHFENonPhotonicElectron *backe = new AliHFENonPhotonicElectron(Form("HFEBackGroundSubtractionPID2%s",appendix.Data()),"Background subtraction");  //appendix
     //Setting the Cuts for the Associated electron-pool
   AliHFEcuts *hfeBackgroundCuts = new AliHFEcuts(Form("HFEBackSub%s",appendix.Data()),"Background sub Cuts");
@@ -211,8 +204,7 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
     
   char *cutmodelAssoc;
   cutmodelAssoc="pol0";
-  for(Int_t a=0;a<11;a++)
-  {
+  for(Int_t a=0;a<11;a++){
     // Not necessary anymore, since the pPb case is handled similarly to the pp case
     //   cout << a << " " << paramsTPCdEdxcut[a] << endl;
     Double_t tpcparamlow[1]={paramsTPCdEdxcutlowAssoc[a]};
@@ -240,6 +232,7 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
     AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");
     v0trackCuts->CreateStandardCuts();
     v0trackCuts->SetMinNClustersTPC(TPCcl);
+    v0trackCuts->SetMinNClustersTPCPID(TPCclPID);
     v0trackCuts->SetMinRatioTPCclusters(0.6);
     v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
     v0trackCuts->SetMinNClustersITS(1);
@@ -247,7 +240,7 @@ AliAnalysisTaskHFE* ConfigHFEnpepPb(Bool_t useMC, Bool_t isAOD, TString appendix
     v0trackCuts->SetCheckITSLayerStatus(kFALSE);
     v0trackCuts->UnsetVertexRequirement();
     //hfecuts->SetSigmaToVertex(10);
-    v0trackCuts->SetTOFPIDStep(kTRUE);
+    if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE);
     v0trackCuts->SetQAOn();
 
     task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);
index c345947eb63b65d71b90150fcc0022c86e905ac2..814c076a4ec52ce02a993a7195dbc08724597113 100644 (file)
@@ -21,17 +21,16 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
                                 UChar_t ITScl=3, Double_t DCAxy=1000., Double_t DCAz=1000.,
                                 Double_t* tpcdEdxcutlow=NULL,Double_t* tpcdEdxcuthigh=NULL,
                                 Double_t TOFs=3., Int_t TOFmis=0,
-                                Int_t itshitpixel = 0, Int_t icent = 1,
-         Double_t etami=-0.8, Double_t etama=0.8){
+                                Int_t itshitpixel = 0, Int_t icent=1,
+                                Double_t etami=-0.8, Double_t etama=0.8){
   
   Bool_t kAnalyseTaggedTracks = kFALSE;
-  
+
   //***************************************//
   //        Setting up the HFE cuts        //
   //***************************************//
-  
-  AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts for pPb");
 
+  AliHFEcuts *hfecuts = new AliHFEcuts(appendix,"HFE cuts for pPb");
   //hfecuts->SetQAOn();
   hfecuts->CreateStandardCuts();
   hfecuts->SetMinNClustersTPC(TPCcl);
@@ -73,7 +72,7 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
   //        Setting up the task            //
   //***************************************//
 
-  AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(appendix);
+  AliAnalysisTaskHFE *task = new AliAnalysisTaskHFE(Form("HFEtask%s",appendix.Data()));
   printf("task %p\n", task);
   task->SetpPbAnalysis();
   if(!isAOD) task->SetRemoveFirstEventInChunk();
@@ -90,11 +89,8 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
   //***************************************//
   //          Variable manager             //
   //***************************************//
-
   // Define Variables
   Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
-
-  //Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8};
   Double_t etabinning[17] = {-0.8, -0.7, -0.6, -0.5, -0.4, -0.3, -0.2, -0.1, 0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8};
 
   Int_t sizept=(sizeof(ptbinning)/sizeof(double))-1;
@@ -127,23 +123,22 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
   }
   
   // Configure TPC PID
-  if(!useMC){
-    Double_t paramsTPCdEdxcutlow[12] ={0.0, 0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
-    if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));
-
-    Double_t paramsTPCdEdxcuthigh[12] ={3.0, 3.0, 3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
-    if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));
-    
-    char *cutmodel;
-    cutmodel="pol0";
-    
-    for(Int_t a=0;a<11;a++)
-    {
-      //   cout << a << " " << paramsTPCdEdxcut[a] << endl;
-      Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};
-      Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];
-      pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);
-    }
+  // do the identical thing in data and MC
+  Double_t paramsTPCdEdxcutlow[12] ={0.0, 0.0, 0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0,0.0};
+  if(tpcdEdxcutlow) memcpy(paramsTPCdEdxcutlow,tpcdEdxcutlow,sizeof(paramsTPCdEdxcutlow));
+
+  Double_t paramsTPCdEdxcuthigh[12] ={3.0, 3.0, 3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0,3.0};
+  if(tpcdEdxcuthigh) memcpy(paramsTPCdEdxcuthigh,tpcdEdxcuthigh,sizeof(paramsTPCdEdxcuthigh));
+
+  char *cutmodel;
+  cutmodel="pol0";
+
+  for(Int_t a=0;a<11;a++){
+    // Not necessary anymore, since the pPb case is handled similarly to the pp case
+    //   cout << a << " " << paramsTPCdEdxcut[a] << endl;
+    Double_t tpcparamlow[1]={paramsTPCdEdxcutlow[a]};
+    Float_t tpcparamhigh=paramsTPCdEdxcuthigh[a];
+    pid->ConfigureTPCcentralityCut(a,cutmodel,tpcparamlow,tpcparamhigh);
   }
   pid->ConfigureTPCdefaultCut(cutmodel,paramsTPCdEdxcutlow,paramsTPCdEdxcuthigh[0]); // After introducing the pPb flag, pPb is merged with pp and this line defines the cut
 
@@ -155,6 +150,7 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
       tofpid->SetRejectTOFmismatch();
     }
   }
+
   // To make different upper TOF cut to see contamination effect
   // The below two lines should be removed after this check
   //AliHFEpidTOF *tofpid = pid->GetDetPID(AliHFEpid::kTOFpid);
@@ -166,7 +162,7 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
     TF1 *hBackground[12];
     status = ReadContaminationFunctions("hadroncontamination_TOFTPC_pPb_eta06_newsplines_try3.root", hBackground, tpcdEdxcutlow[0]);
     for(Int_t a=0;a<12;a++) {
-      //  printf("back %f \n",p0[a]);
+      //printf("back %f \n",hBackground[a]);
       if(status) task->SetBackGroundFactorsFunction(hBackground[a],a);
       else printf("not all background functions found\n");
     }
@@ -175,10 +171,11 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
   //***************************************//
   //          V0 tagged tracks             //
   //***************************************//
+
   if(kAnalyseTaggedTracks){
     AliHFEcuts *v0trackCuts = new AliHFEcuts("V0trackCuts", "Track Cuts for tagged track Analysis");
     v0trackCuts->CreateStandardCuts();
-    v0trackCuts->SetMinNClustersTPC(TPCcl);  
+    v0trackCuts->SetMinNClustersTPC(TPCcl);
     v0trackCuts->SetMinNClustersTPCPID(TPCclPID);
     v0trackCuts->SetMinRatioTPCclusters(0.6);
     v0trackCuts->SetTPCmodes(AliHFEextraCuts::kFound, AliHFEextraCuts::kFoundOverFindable);
@@ -187,7 +184,7 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
     v0trackCuts->SetCheckITSLayerStatus(kFALSE);
     v0trackCuts->UnsetVertexRequirement();
     //hfecuts->SetSigmaToVertex(10);
-    v0trackCuts->SetTOFPIDStep(kTRUE);
+    if(usetof) v0trackCuts->SetTOFPIDStep(kTRUE);
     v0trackCuts->SetQAOn();
 
     task->SwitchOnPlugin(AliAnalysisTaskHFE::kTaggedTrackAnalysis);
@@ -198,13 +195,13 @@ AliAnalysisTaskHFE* ConfigHFEpPb(Bool_t useMC, Bool_t isAOD, TString appendix,
   // QA
   printf("task %p\n", task);
   task->SetQAOn(AliAnalysisTaskHFE::kPIDqa);
-  task->SetQAOn(AliAnalysisTaskHFE::kMCqa);    
+  task->SetQAOn(AliAnalysisTaskHFE::kMCqa);
   task->SwitchOnPlugin(AliAnalysisTaskHFE::kDEstep);
 
   printf("*************************************\n");
   printf("Configuring standard Task:\n");
   task->PrintStatus();
   pid->PrintStatus();
-  printf("*************************************\n"); 
+  printf("*************************************\n");
   return task;
 }
index eff8a257413d6bfb1f5438a510e40542f4b553e5..551a50ef60e4bb3189c124c1981a558d52b92101 100644 (file)
@@ -110,7 +110,8 @@ AliAnalysisTaskHFE* ConfigHFEpPbTRD(Bool_t useMC, Bool_t isAOD, TString appendix
   //          Variable manager             //
   //***************************************//
   // Define Variables
-  Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
+  Double_t ptbinning[41] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20., 22., 24., 26., 28., 30.};
+  //Double_t ptbinning[36] = {0., 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
   //Double_t ptbinning[53] = {0., 0.1, 0.2, 0.22, 0.24, 0.26, 0.28, 0.3, 0.32, 0.34, 0.36, 0.38, 0.4, 0.42, 0.44, 0.46, 0.48, 0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95, 1., 1.1, 1.2, 1.3, 1.4, 1.5, 1.75, 2., 2.25, 2.5, 2.75, 3., 3.5, 4., 4.5, 5., 5.5, 6., 7., 8., 10., 12., 14., 16., 18., 20.};
 
   //Double_t etabinning[9] = {-0.8, -0.6, -0.4, -0.2, 0., 0.2, 0.4, 0.6, 0.8};