changed cutnumbers, submitted sveins changes
authorfbock <fbock@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Sep 2013 14:00:07 +0000 (14:00 +0000)
committerfbock <fbock@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 5 Sep 2013 14:00:07 +0000 (14:00 +0000)
PWGGA/GammaConv/AliAODConversionMother.cxx
PWGGA/GammaConv/AliAnaConvCorrBase.cxx
PWGGA/GammaConv/AliAnaConvCorrBase.h
PWGGA/GammaConv/AliAnaConvCorrPion.cxx
PWGGA/GammaConv/AliAnalysisTaskdPhi.cxx
PWGGA/GammaConv/AliAnalysisTaskdPhi.h
PWGGA/GammaConv/AliV0ReaderV1.h
PWGGA/GammaConv/macros/AddTask_GammaConvV1_PbPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvV1_pPb.C
PWGGA/GammaConv/macros/AddTask_GammaConvV1_pp.C

index 2d68bb5..755481c 100644 (file)
@@ -149,6 +149,7 @@ Float_t AliAODConversionMother::CalculateDistanceBetweenPhotons(AliAODConversion
       prodPoint[2] = Prod(2);
       
    }
+   if (dist > 1000) dist = 999.;
    return dist;
 }
 
index ff5c9ac..2bc34ec 100644 (file)
@@ -82,22 +82,22 @@ void AliAnaConvCorrBase::SetUpDefaultBins() {
   fAxisdPhi.Set(32, -TMath::PiOver2(), 3*TMath::PiOver2());
   fAxisdPhi.SetNameTitle("dPhi", "delta Phi");
 
-  Double_t tptbins[14] = {3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 10.0, 12.5, 15, 20, 25, 30, 50, 100};
+  Double_t tptbins[15] = {2.0, 3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 10.0, 12.5, 15, 20, 25, 30, 50, 100};
   fAxistPt.Set(13, tptbins);
   fAxistPt.SetNameTitle("tPt", "trigger Pt");
 
-  Double_t cptbins[18] = {1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 10.0, 12.5, 15, 20, 25, 30, 50, 100};
-  fAxiscPt.Set(17, cptbins);
+  Double_t cptbins[19] = {0.7, 1.0, 1.5, 2.0, 2.5, 3.0, 3.5, 4.0, 5.0, 6.0, 8.0, 10.0, 12.5, 15, 20, 25, 30, 50, 100};
+  fAxiscPt.Set(18, cptbins);
   fAxiscPt.SetNameTitle("cPt", "track Pt");
 
-  fAxisIso.Set(3, -0.5, 2.5);
+  fAxisIso.Set(1, -0.5, 2.5);
   fAxisIso.SetNameTitle("iso", "isolation");
 
   fAxesList.AddAt(&fAxisdEta, 0);
   fAxesList.AddAt(&fAxisdPhi, 1);
   fAxesList.AddAt(&fAxistPt, 2);
   fAxesList.AddAt(&fAxiscPt, 3);
-  fAxesList.AddAt(&fAxisIso, 4);
+  //fAxesList.AddAt(&fAxisIso, 4);
 
   fAxisMEEta.Set(320, -0.8, 0.8);
   fAxisMEEta.SetNameTitle("eta", "eta");
@@ -106,15 +106,15 @@ void AliAnaConvCorrBase::SetUpDefaultBins() {
   fAxisMEPhi.SetNameTitle("phi", "phi");
 
   fTrackAxisList.AddAt(&fAxisMEEta, 0);
-  fTrackAxisList.AddAt(&fAxisMEPhi, 1);
-  fTrackAxisList.AddAt(&fAxistPt, 2);
-  fTrackAxisList.AddAt(&fAxiscPt, 3);
-  fTrackAxisList.AddAt(&fAxisIso, 4);
+  //  fTrackAxisList.AddAt(&fAxisMEPhi, 1);
+  fTrackAxisList.AddAt(&fAxistPt, 1);
+  fTrackAxisList.AddAt(&fAxiscPt, 2);
+  //fTrackAxisList.AddAt(&fAxisIso, 4);
 
   fTrigAxisList.AddAt(&fAxisMEEta, 0);
-  fTrigAxisList.AddAt(&fAxisMEPhi, 1);
-  fTrigAxisList.AddAt(&fAxistPt, 2);
-  fTrigAxisList.AddAt(&fAxisIso, 3);
+  //fTrigAxisList.AddAt(&fAxisMEPhi, 1);
+  fTrigAxisList.AddAt(&fAxistPt, 1);
+  //fTrigAxisList.AddAt(&fAxisIso, 3);
 
 
 }
@@ -222,55 +222,76 @@ void AliAnaConvCorrBase::PrintStatistics()  {
 // }
 
 
+
+//_______________________________________________________________________________
+void AliAnaConvCorrBase::FillCounters(TObjArray * particles, TObjArray * tracks) {
+  //Fill ME Counters
+  const Int_t nbins = fAxistPt.GetNbins();
+  Bool_t tmap[nbins];
+  for(Int_t ptbin = 0; ptbin < nbins; ptbin++){
+    tmap[ptbin] = kFALSE;
+  }
+  for(Int_t ip = 0; ip < particles->GetEntriesFast(); ip++){
+    AliAODConversionParticle * particle = static_cast<AliAODConversionParticle*>(particles->At(ip));
+    Int_t tbin = fAxistPt.FindFixBin(particle->Pt());
+    if (tbin > 0 && tbin < nbins + 1) {
+      if(tmap[tbin - 1] == kTRUE) {
+       continue;
+      } else {
+       tmap[tbin -1 ] = kTRUE;
+       Double_t trackValues[fTrackAxisList.GetSize()];
+       if( fTrackAxisList.GetSize() > 3){
+         trackValues[3] = particle->M();
+       }
+       
+       for(int ij = 0; ij < tracks->GetEntriesFast(); ij++) {
+         AliVTrack * track = static_cast<AliVTrack*>(tracks->UncheckedAt(ij));
+         trackValues[0] = track->Eta();
+         trackValues[1] = particle->Pt();
+         trackValues[2] = track->Pt();
+         fTrackSparse->Fill(trackValues);      
+       }
+      }
+    }
+  }
+}
+
 //________________________________________________________________
 void AliAnaConvCorrBase::CorrelateWithTracks(AliAODConversionParticle * particle, TObjArray * tracks, Int_t const tIDs[4], Int_t isolated = 0) {
   //Correlate particle with tracks
 
+  if(isolated) {
+    ;//should be removed
+  }
 
-   //FillTriggerCounters(particle, isolated);
-
-  Int_t nDim = fAxesList.GetSize();
+  const Int_t nDim = fAxesList.GetSize();
   Double_t dphivalues[nDim];
-  Double_t trackValues[nDim];
-
-  Double_t trigValues[nDim - 1];
+  Double_t trigValues[fTrigAxisList.GetSize()];
   trigValues[0] = particle->Eta();
-  trigValues[1] = particle->Phi();
-  trigValues[2] = particle->Pt();
-  trigValues[3] = isolated;
+  trigValues[1] = particle->Pt();
   
-  fTrigSparse->Fill(trigValues);
-
   if(nDim > 4) {
-       dphivalues[5] = particle->M();
-       trackValues[5] = particle->M();
-       trigValues[4] = particle->M();
+    dphivalues[4] = particle->M();
+    trigValues[2] = particle->M();
   }
 
-  for(int ij = 0; ij < tracks->GetEntriesFast(); ij++) {
-       AliVTrack * track = static_cast<AliVTrack*>(tracks->UncheckedAt(ij));
-       Int_t tid = track->GetID();
-
-       if((tid > 0) && (tid == tIDs[0] || tid == tIDs[1] || tid == tIDs[2] || tid == tIDs[3]) ) {
-         continue;
-       }
-       
-       dphivalues[0] = particle->Eta() - track->Eta();
-       dphivalues[1] = GetDPhi(particle->Phi() - track->Phi());
-       dphivalues[2] = particle->Pt();
-       dphivalues[3] = track->Pt();
-       dphivalues[4] = isolated;
-
-       trackValues[0] = track->Eta();
-       trackValues[1] = track->Phi();
-       trackValues[2] = particle->Pt();
-       trackValues[3] = track->Pt();
-       trackValues[4] = isolated;
+  fTrigSparse->Fill(trigValues);
 
 
+  for(int ij = 0; ij < tracks->GetEntriesFast(); ij++) {
+    AliVTrack * track = static_cast<AliVTrack*>(tracks->UncheckedAt(ij));
+    
+    Int_t tid = track->GetID();
+    
+    if((tid > 0) && (tid == tIDs[0] || tid == tIDs[1] || tid == tIDs[2] || tid == tIDs[3]) ) {
+      continue;
+    }
        
-       fCorrSparse->Fill(dphivalues);
-       fTrackSparse->Fill(trackValues);
+    dphivalues[0] = particle->Eta() - track->Eta();
+    dphivalues[1] = GetDPhi(particle->Phi() - track->Phi());
+    dphivalues[2] = particle->Pt();
+    dphivalues[3] = track->Pt();
+    fCorrSparse->Fill(dphivalues);
   }
 }
 
index 0255544..f4a5936 100644 (file)
@@ -64,7 +64,7 @@ public:
   void PrintStatistics();\r
 \r
   void CorrelateWithTracks(AliAODConversionParticle * particle, TObjArray * tracks, const Int_t tIDs[4], Int_t isolated);\r
-  //virtual void FillTriggerCounters(const AliAODConversionParticle * particle, Int_t leading);\r
+  void FillCounters(TObjArray * particles, TObjArray * tracks);\r
 \r
   TAxis& GetAxistPt()       { return fAxistPt;   }\r
   TAxis& GetAxiscPt()       { return fAxiscPt;   }\r
@@ -82,10 +82,6 @@ public:
 \r
 protected:\r
 \r
-  //Fill histograms\r
-  //void FillHistograms(Float_t tPt, Float_t cPt, Float_t dPhi, Float_t dEta, Bool_t isolated);\r
-  //Fill trigger counter histograms\r
-  //virtual void FillTriggerCounters(Float_t tPt, Bool_t isolated) = NULL;\r
   THnSparseF * CreateSparse(TString name, TString title, TList * axes);\r
 \r
 private:\r
index c73cfb6..a9765fa 100644 (file)
@@ -24,6 +24,8 @@
 //#include "AliAODTrack.h"
 #include "TClonesArray.h"
 #include "AliAODConversionParticle.h"
+#include <AliLog.h>
+
 //#include "AliAODConversionMother.h"
 //#include "AliAODConversionPhoton.h"
 //#include "THnSparse.h"
@@ -65,9 +67,9 @@ void AliAnaConvCorrPion::InitMassAxis() {
   Double_t mbins[7] = {0.1, 0.11, 0.12, 0.15, 0.16, 0.18, 0.2};
   fAxisM.Set(6, mbins);
   fAxisM.SetNameTitle("InvMass", "invariant mass");
-  GetAxisList().AddAt(&fAxisM, 5);
-  GetTrackAxisList().AddAt(&fAxisM, 5);
-  GetTrigAxisList().AddAt(&fAxisM, 4);
+  GetAxisList().AddAt(&fAxisM, 4);
+  GetTrackAxisList().AddAt(&fAxisM, 3);
+  GetTrigAxisList().AddAt(&fAxisM, 2);
 }
 
 ///________________________________________________________________________________
@@ -75,12 +77,12 @@ void AliAnaConvCorrPion::CreateHistograms() {
   //Create histograms
   CreateBaseHistograms();
  
-  hTriggerPtvsMass[0] = new TH2D("hTriggerPtvsMass_all", "Pt vs Mass all pizero", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
-  hTriggerPtvsMass[1] = new TH2D("hTriggerPtvsMass_leadingcone", "Pt vs Mass leading cone", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
-  hTriggerPtvsMass[2] = new TH2D("hTriggerPtvsMass_leadingevent", "Pt vs Mass leading event", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
+  hTriggerPtvsMass[0] = new TH2D(Form("hTriggerPtvsMass_all_%s", GetName()), "Pt vs Mass all pizero", 400, 0, .400, GetAxistPt().GetNbins(), GetAxistPt().GetXbins()->GetArray());
+  hTriggerPtvsMass[1] = new TH2D("hTriggerPtvsMass_leadingcone", "Pt vs Mass leading cone", 1, 0, .400, 1, 0, 100);
+  hTriggerPtvsMass[2] = new TH2D("hTriggerPtvsMass_leadingevent", "Pt vs Mass leading event", 1, 0, .400, 1, 0, 100);
   GetHistograms()->Add(hTriggerPtvsMass[0]);
-  GetHistograms()->Add(hTriggerPtvsMass[1]);
-  GetHistograms()->Add(hTriggerPtvsMass[2]);
+  //GetHistograms()->Add(hTriggerPtvsMass[1]);
+  //GetHistograms()->Add(hTriggerPtvsMass[2]);
 }
 
 
@@ -88,6 +90,7 @@ void AliAnaConvCorrPion::CreateHistograms() {
 void AliAnaConvCorrPion::FillTriggerCounters(const AliAODConversionParticle * particle, Int_t leading) {
   //Fill histograms counting triggers
   //fHNTriggers[leading]->Fill(particle->Pt());
+  AliDebug(AliLog::kDebug + 5, Form("Fill trigger countder %f %f", particle->M(), particle->Pt()));
   hTriggerPtvsMass[leading]->Fill(particle->M(), particle->Pt());
 }
 
index 7946db2..3cfc6cb 100644 (file)
 #include <AliInputEventHandler.h>
 #include <AliESDInputHandler.h>
 #include <AliAODInputHandler.h>
-#include <AliAnalysisFilter.h>
 
 #include "AliConversionTrackCuts.h"
 #include "AliConversionCuts.h"
+#include "AliConversionMesonCuts.h"
 #include "AliAODConversionPhoton.h"
 #include "AliAODConversionMother.h"
 #include "AliAnaConvCorrPhoton.h"
 #include "AliAnaConvCorrPion.h"
 #include "AliAnaConvIsolation.h"
+#include "AliV0ReaderV1.h"
 // Author Svein Lindal <slindal@fys.uio.no>
 using namespace std;
 
@@ -51,7 +52,10 @@ AliAnalysisTaskdPhi::AliAnalysisTaskdPhi(const char *name) : AliAnalysisTaskSE(n
   fHistograms(NULL),
   fHistoGamma(NULL),
   fHistoPion(NULL),
+  fV0Reader(NULL),
   fV0Filter(NULL),
+  fPhotonFilter(NULL),
+  fMesonFilter(NULL),
   fTrackCuts(NULL),
   fGammas(NULL),
   fPions(NULL),
@@ -61,9 +65,7 @@ AliAnalysisTaskdPhi::AliAnalysisTaskdPhi(const char *name) : AliAnalysisTaskSE(n
   hMEvents(NULL),
   fPhotonCorr(NULL),
   fPionCorr(NULL), 
-  fIsoAna(NULL),
-  fL1(-1),
-  fL2(-1),
+//  fIsoAna(NULL),
   fDeltaAODBranchName("AliAODGammaConversion_gamma"), 
   fAxistPt(),
   fAxiscPt(),
@@ -91,7 +93,6 @@ AliAnalysisTaskdPhi::AliAnalysisTaskdPhi(const char *name) : AliAnalysisTaskSE(n
 
   fAxisCent.SetNameTitle("CentAxis", "Cent");
 
-
   Double_t centbins[5] = {0, 10, 30, 60, 100.1};
   fAxisCent.Set(4, centbins);
 
@@ -107,7 +108,7 @@ AliAnalysisTaskdPhi::AliAnalysisTaskdPhi(const char *name) : AliAnalysisTaskSE(n
 
   // Define input and output slots here
   DefineInput(0, TChain::Class());
-  DefineInput(1, TClonesArray::Class());
+  //DefineInput(1, TClonesArray::Class());
   DefineOutput(1, TList::Class());
   DefineOutput(2, TList::Class());
   DefineOutput(3, TList::Class());
@@ -126,14 +127,22 @@ AliAnalysisTaskdPhi::~AliAnalysisTaskdPhi(){
        delete fGammas;
   fGammas = NULL;
   
-  if(fIsoAna)
-       delete fIsoAna;
-  fIsoAna = NULL;
+  // if(fIsoAna)
+  //   delete fIsoAna;
+  // fIsoAna = NULL;
 
   if(fV0Filter)
        delete fV0Filter;
   fV0Filter = NULL;
 
+  if(fMesonFilter)
+       delete fMesonFilter;
+  fMesonFilter = NULL;
+
+  if(fPhotonFilter)
+       delete fPhotonFilter;
+  fPhotonFilter = NULL;
+
   if(fHistograms)
        delete fHistograms;
   fHistograms = NULL;
@@ -151,8 +160,9 @@ if(fHistoPion)
 ///________________________________________________________________________
 void AliAnalysisTaskdPhi::SetUpCorrObjects() {
   ///Creat corr obj
-  fIsoAna = new AliAnaConvIsolation();
-
+  //  fIsoAna = new AliAnaConvIsolation();
+  
+  AliDebug(AliLog::kDebug + 5, "Set Up corr objects");
 
   fPhotonCorr = new TObjArray();
   fPionCorr = new TObjArray();
@@ -168,49 +178,47 @@ void AliAnalysisTaskdPhi::SetUpCorrObjects() {
   fHistoPion->Add(hPion);
 
 
-  for(Int_t iz = 0; iz < fAxisZ.GetNbins(); iz++) {
-       TObjArray * photonArray = new TObjArray();
-       photonArray->SetOwner(kTRUE);
-       fPhotonCorr->AddAt(photonArray, iz);
-
-       TObjArray * pionArray = new TObjArray();
-       pionArray->SetOwner(kTRUE);
-       fPionCorr->AddAt(pionArray, iz);
-
-       TList * photonList = new TList();
-       photonList->SetName(Form("photon_%d", iz));
-       photonList->SetOwner(kTRUE);
-       hPhoton->AddAt(photonList, iz);
-
-       TList * pionList = new TList();
-       pionList->SetName(Form("pion_%d", iz));
-       pionList->SetOwner(kTRUE);
-       hPion->AddAt(pionList, iz);
+  for(Int_t binc = 0; binc < fAxisCent.GetNbins(); binc++) {
+    TObjArray * photonArray = new TObjArray();
+    photonArray->SetOwner(kTRUE);
+    fPhotonCorr->AddAt(photonArray, binc);
+    
+    TObjArray * pionArray = new TObjArray();
+    pionArray->SetOwner(kTRUE);
+    fPionCorr->AddAt(pionArray, binc);
+    
+    TList * photonList = new TList();
+    photonList->SetName(Form("photon_%d", binc));
+    photonList->SetOwner(kTRUE);
+    hPhoton->AddAt(photonList, binc);
        
-       for(Int_t ic = 0; ic < fAxisCent.GetNbins(); ic++) {
+    TList * pionList = new TList();
+    pionList->SetName(Form("pion_%d", binc));
+    pionList->SetOwner(kTRUE);
+    hPion->AddAt(pionList, binc);
+       
+    for(Int_t binz = 0; binz < fAxisZ.GetNbins(); binz++) {
          
-         TString nameString = Form("%d_%d", iz, ic);
-         TString titleString = Form("%f < Z < %f ... %f cent %f", 
-                                                                fAxisZ.GetBinLowEdge(iz+1), fAxisZ.GetBinUpEdge(iz+1), 
-                                                                fAxisCent.GetBinLowEdge(ic+1), fAxisCent.GetBinUpEdge(ic+1));
-
-
-
-         AliAnaConvCorrPhoton * photonCorr = new AliAnaConvCorrPhoton(Form("PhotonCorr_%s", nameString.Data()), Form("photon %s", titleString.Data()));
-         photonArray->AddAt(photonCorr, ic);
-         //photonCorr->GetAxistPt().Set(fAxistPt.GetNbins(), fAxistPt.GetXbins()->GetArray());
-         //photonCorr->GetAxiscPt().Set(fAxiscPt.GetNbins(), fAxiscPt.GetXbins()->GetArray());
-         photonCorr->CreateHistograms();
-         photonList->Add(photonCorr->GetHistograms());
-
-         AliAnaConvCorrPion * pionCorr = new AliAnaConvCorrPion(Form("PionCorr_%s", nameString.Data()), Form("pion %s", titleString.Data()));
-         pionArray->AddAt(pionCorr, ic);
-         //pionCorr->GetAxistPt().Set(fAxistPt.GetNbins(), fAxistPt.GetXbins()->GetArray());
-         //pionCorr->GetAxiscPt().Set(fAxiscPt.GetNbins(), fAxiscPt.GetXbins()->GetArray());
-         //pionCorr->GetAxisM().Set(fAxisPiM.GetNbins(), fAxisPiM.GetXbins()->GetArray());
-         pionCorr->CreateHistograms();
-         pionList->Add(pionCorr->GetHistograms());
-       }
+      TString nameString = Form("%d_%d", binc, binz);
+      TString titleString = Form("%f < Z < %f ... %f cent %f", 
+                                fAxisZ.GetBinLowEdge(binz+1), fAxisZ.GetBinUpEdge(binz+1), 
+                                fAxisCent.GetBinLowEdge(binc+1), fAxisCent.GetBinUpEdge(binc+1));
+
+      AliAnaConvCorrPhoton * photonCorr = new AliAnaConvCorrPhoton(Form("PhotonCorr_%s", nameString.Data()), Form("photon %s", titleString.Data()));
+      photonArray->AddAt(photonCorr, binz);
+      photonCorr->GetAxistPt().Set(fAxistPt.GetNbins(), fAxistPt.GetXbins()->GetArray());
+      photonCorr->GetAxiscPt().Set(fAxiscPt.GetNbins(), fAxiscPt.GetXbins()->GetArray());
+      photonCorr->CreateHistograms();
+      photonList->Add(photonCorr->GetHistograms());
+
+      AliAnaConvCorrPion * pionCorr = new AliAnaConvCorrPion(Form("PionCorr_%s", nameString.Data()), Form("pion %s", titleString.Data()));
+      pionArray->AddAt(pionCorr, binz);
+      pionCorr->GetAxistPt().Set(fAxistPt.GetNbins(), fAxistPt.GetXbins()->GetArray());
+      pionCorr->GetAxiscPt().Set(fAxiscPt.GetNbins(), fAxiscPt.GetXbins()->GetArray());
+      pionCorr->GetAxisM().Set(fAxisPiM.GetNbins(), fAxisPiM.GetXbins()->GetArray());
+      pionCorr->CreateHistograms();
+      pionList->Add(pionCorr->GetHistograms());
+    }
   }
 }
 
@@ -230,10 +238,29 @@ void AliAnalysisTaskdPhi::UserCreateOutputObjects() {
   fHistoPion->SetName("Pion_histo");
   fHistoPion->SetOwner(kTRUE);
 
-  
+
+   fV0Reader=(AliV0ReaderV1*)AliAnalysisManager::GetAnalysisManager()->GetTask("V0ReaderV1");
+   if(!fV0Reader){printf("Error: No V0 Reader");return;} // GetV0Reader
+
+   AliConversionCuts * v0cuts = fV0Reader->GetConversionCuts();
+   if(v0cuts) {
+     TList * histograms = v0cuts->GetCutHistograms();
+     if(histograms) {
+       fHistograms->Add(histograms);
+     }
+   }
+
   if(fV0Filter) {
-       fV0Filter->InitCutHistograms();
-       fHistograms->Add(fV0Filter->GetCutHistograms());
+    fV0Filter->InitCutHistograms();
+    fHistograms->Add(fV0Filter->GetCutHistograms());
+  }
+  if(fMesonFilter) {
+    fMesonFilter->InitCutHistograms();
+    fHistograms->Add(fMesonFilter->GetCutHistograms());
+  }
+  if(fPhotonFilter) {
+    fPhotonFilter->InitCutHistograms();
+    fHistograms->Add(fPhotonFilter->GetCutHistograms());
   }
   
 
@@ -283,11 +310,10 @@ void AliAnalysisTaskdPhi::UserCreateOutputObjects() {
   // piAxesList.AddAt(&GetAxisPiMass(), 3);
   // piAxesList.SetOwner(kFALSE);
 
-
-  TList * outAxesList = new TList();
-  outAxesList->Add(&fAxisCent);
-  outAxesList->Add(&fAxisZ);
-  fHistograms->Add(outAxesList);
+  // TList * outAxesList = new TList();
+  // outAxesList->Add(&fAxisCent);
+  // outAxesList->Add(&fAxisZ);
+  // fHistograms->Add(outAxesList);
 
   // for(Int_t iz = 0; iz < fAxisZ.GetNbins(); iz++) {
   //   TObjArray * trackArray = new TObjArray();
@@ -391,6 +417,7 @@ void AliAnalysisTaskdPhi::UserExec(Option_t *) {
 
   
   if ( fV0Filter && !fV0Filter->GetPIDResponse() ) {
+    cout << "aaaa"<<endl;
        if ( inputHandler->GetPIDResponse() ){
          fV0Filter->SetPIDResponse( inputHandler->GetPIDResponse() );
        } else {
@@ -412,7 +439,7 @@ void AliAnalysisTaskdPhi::UserExec(Option_t *) {
        centrality = header->GetCentrality();
        eventPlane = header->GetEventplane();
   } else {
-       centrality = static_cast<AliESDEvent*>(fInputEvent)->GetCentrality()->GetCentralityPercentile("kV0M");
+       centrality = static_cast<AliESDEvent*>(fInputEvent)->GetCentrality()->GetCentralityPercentile("V0M");
        eventPlane = fInputEvent->GetEventplane()->GetEventplane("Q");
   }
 
@@ -437,23 +464,24 @@ void AliAnalysisTaskdPhi::UserExec(Option_t *) {
   fGammas->Clear();
   fPions->Clear();
 
-  TClonesArray * aodGammas = GetConversionGammas(isAOD);
+  //TClonesArray * aodGammas = GetConversionGammas(isAOD);
+  TClonesArray * aodGammas = fV0Reader->GetReconstructedGammas();
   if(!aodGammas) {
        AliError("no aod gammas found!");
        return;
   }
 
-  if(aodGammas->GetEntriesFast() > 0) {
-       if( static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(0) == fL1 && 
-               static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(1) == fL2 
-               ) {
-         return;
-       }
-       fL1 = static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(0);
-       fL2 = static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(1);
-       //cout << aodGammas->GetEntriesFast() << " " << fInputEvent->GetNumberOfTracks() << "c" << endl;
-  }
-
+  // if(aodGammas->GetEntriesFast() > 0) {
+  //   if( static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(0) == fL1 && 
+  //   static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(1) == fL2 
+  //   ) {
+  //     return;
+  //   }
+  //   fL1 = static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(0);
+  //   fL2 = static_cast<AliAODConversionParticle*>(aodGammas->At(0))->GetLabel(1);
+  //   //cout << aodGammas->GetEntriesFast() << " " << fInputEvent->GetNumberOfTracks() << "c" << endl;
+  // }
+  
   if(DebugLevel() > 1) printf("Number of conversion gammas %d \n", aodGammas->GetEntriesFast());
   for(Int_t ig = 0; ig < aodGammas->GetEntriesFast(); ig++) {
     AliAODConversionPhoton * photon = dynamic_cast<AliAODConversionPhoton*>(aodGammas->At(ig));
@@ -492,7 +520,6 @@ void AliAnalysisTaskdPhi::UserExec(Option_t *) {
   
 }
 
-
 //________________________________________________________________________
 void AliAnalysisTaskdPhi::Process(TObjArray * gammas, TObjArray * tracks, Int_t vertexBin, Int_t centBin) {
   ///Process stuff
@@ -500,49 +527,61 @@ void AliAnalysisTaskdPhi::Process(TObjArray * gammas, TObjArray * tracks, Int_t
   if(DebugLevel() > 4) printf("Number of accepted gammas, tracks %d  %d \n", gammas->GetEntriesFast(), tracks->GetEntriesFast());
  
   AliAnaConvCorrBase * gCorr = GetCorrObject(vertexBin, centBin, fPhotonCorr);
-  AliAnaConvCorrBase * piCorr = GetCorrObject(vertexBin, centBin, fPionCorr);
+  AliAnaConvCorrPion * piCorr = static_cast<AliAnaConvCorrPion*>(GetCorrObject(vertexBin, centBin, fPionCorr));
   
   if(!gCorr || !piCorr) {
        AliError("corr object missing");
        return;
   }
+  
+  TObjArray photons;
+  TObjArray pions;
 
   for(Int_t i1 = 0; i1 < gammas->GetEntriesFast(); i1++) {
-       AliAODConversionPhoton * ph1 = static_cast<AliAODConversionPhoton*>(gammas->UncheckedAt(i1));
-       Int_t tIDs[4] = {ph1->GetLabel(0), ph1->GetLabel(1), -1, -1};
-
-       Int_t leading = fIsoAna->IsLeading(static_cast<AliAODConversionParticle*>(ph1), tracks, tIDs);
-       if(ph1->Pt() > fAxistPt.GetBinLowEdge(1)) {
-         gCorr->CorrelateWithTracks( static_cast<AliAODConversionParticle*>(ph1), tracks, tIDs, leading);
-       }
-       for(Int_t i2 = 0; i2 < i1; i2++) {
-         AliAODConversionPhoton * ph2 = static_cast<AliAODConversionPhoton*>(gammas->UncheckedAt(i2));
-         
-         if( ph2->GetTrackLabelPositive()==ph1->GetTrackLabelPositive() 
-                 || ph2->GetTrackLabelNegative()==ph1->GetTrackLabelNegative()
-                 || ph2->GetTrackLabelNegative()==ph1->GetTrackLabelPositive()
-                 || ph2->GetTrackLabelPositive()==ph1->GetTrackLabelNegative()) {
-               continue;
-         }
+    AliAODConversionPhoton * ph1 = static_cast<AliAODConversionPhoton*>(gammas->UncheckedAt(i1));
+    Int_t tIDs[4] = {ph1->GetLabel(0), ph1->GetLabel(1), -1, -1};
+       
+    Int_t leading = 0;//fIsoAna->IsLeading(static_cast<AliAODConversionParticle*>(ph1), tracks, tIDs);
+    if(!fPhotonFilter || fPhotonFilter->PhotonIsSelected(static_cast<AliConversionPhotonBase*>(ph1), fInputEvent)) {
+      if(ph1->Pt() > fAxistPt.GetBinLowEdge(1)) {
+       gCorr->CorrelateWithTracks( static_cast<AliAODConversionParticle*>(ph1), tracks, tIDs, leading);
+       photons.Add(ph1);
+      }
+    }
 
-         AliAODConversionMother * pion = new AliAODConversionMother(ph1, ph2);
-         pion->SetLabels(i1, i2);
+    for(Int_t i2 = 0; i2 < i1; i2++) {
+      AliAODConversionPhoton * ph2 = static_cast<AliAODConversionPhoton*>(gammas->UncheckedAt(i2));
          
-         if(!fV0Filter || fV0Filter->MesonIsSelected(pion, kTRUE) ) {
-               
-
-               Int_t leadingpi = fIsoAna->IsLeading(static_cast<AliAODConversionParticle*>(pion), tracks, tIDs);
-               //piCorr->FillTriggerCounters(pion, leadingpi);
-               tIDs[2] = ph2->GetLabel(0);
-               tIDs[3] = ph2->GetLabel(1);
-               if(pion->Pt() > fAxistPt.GetBinLowEdge(1) && 
-                  pion->M() > fAxisPiM.GetBinLowEdge(1) && 
-                  pion->M() < fAxisPiM.GetBinUpEdge(fAxisPiM.GetNbins())) {
-                 piCorr->CorrelateWithTracks(pion, tracks, tIDs, leadingpi);
-               }
-         }
+      if( ph2->GetTrackLabelPositive()==ph1->GetTrackLabelPositive() 
+         || ph2->GetTrackLabelNegative()==ph1->GetTrackLabelNegative()
+         || ph2->GetTrackLabelNegative()==ph1->GetTrackLabelPositive()
+         || ph2->GetTrackLabelPositive()==ph1->GetTrackLabelNegative()) {
+       continue;
+      }
+
+      AliAODConversionMother * pion = new AliAODConversionMother(ph1, ph2);
+      pion->SetLabels(i1, i2);
+      pion->CalculateDistanceOfClossetApproachToPrimVtx(fInputEvent->GetPrimaryVertex());
+      
+      if(!fMesonFilter || fMesonFilter->MesonIsSelected(pion, kTRUE) ) {
+       tIDs[2] = ph2->GetLabel(0);
+       tIDs[3] = ph2->GetLabel(1);
+       Int_t leadingpi = 0;//fIsoAna->IsLeading(static_cast<AliAODConversionParticle*>(pion), tracks, tIDs);
+       piCorr->FillTriggerCounters(pion, leadingpi);
+       AliDebug(AliLog::kDebug + 5, "We have a pion");
+       if(pion->Pt() > fAxistPt.GetBinLowEdge(1) && 
+          pion->M() > fAxisPiM.GetBinLowEdge(1) && 
+          pion->M() < fAxisPiM.GetBinUpEdge(fAxisPiM.GetNbins())) {
+         piCorr->CorrelateWithTracks(pion, tracks, tIDs, leadingpi);
+         pions.Add(static_cast<TObject*>(pion));
        }
+      }
+    }
   }
+
+  piCorr->FillCounters(&pions, tracks);
+  gCorr->FillCounters(&photons, tracks);
+
 }
 
 //________________________________________________________________________
@@ -568,8 +607,8 @@ TClonesArray * AliAnalysisTaskdPhi::GetConversionGammas(Bool_t isAOD) {
        return gammas;
 
   } else {
-       TClonesArray * gammas = dynamic_cast<TClonesArray*>(GetInputData(1));
-       return gammas;
+    TClonesArray * gammas = dynamic_cast<TClonesArray*>(GetInputData(1));
+    return gammas;
   }
 
 }
@@ -582,7 +621,7 @@ void AliAnalysisTaskdPhi::FindDeltaAODBranchName(AliVEvent * event){
        TString name((list->At(ii))->GetName());
        if(name.BeginsWith("GammaConv")&&name.EndsWith("gamma")){
          fDeltaAODBranchName=name;
-         AliInfo(Form("Set DeltaAOD BranchName to: %s",fDeltaAODBranchName.Data()));
+         AliDebug(AliLog::kDebug + 5, Form("Set DeltaAOD BranchName to: %s",fDeltaAODBranchName.Data()));
          return;
        }
   }
index 647067b..4cc4d21 100644 (file)
 #include <TAxis.h>
 #include <TH3I.h>
 #include <THnSparse.h>
-#include <AliAnalysisFilter.h>
+//#include <AliAnalysisFilter.h>
 #include <iostream>
 #include <AliAnaConvCorrBase.h>
 #include <AliLog.h>
 #include <AliAnalysisCuts.h>
 class AliAnaConvIsolation;
 class AliConversionCuts;
+class AliConversionMesonCuts;
+class AliV0ReaderV1;
 class TList;
 class TH2I;
 //class THnSparseF;
@@ -29,7 +31,7 @@ using namespace std;
 class AliAnalysisTaskdPhi : public AliAnalysisTaskSE {
 
 public:
-  AliAnalysisTaskdPhi(const char *name);
+  AliAnalysisTaskdPhi(const char *name="slindal_dPhi");
   virtual ~AliAnalysisTaskdPhi();
 
   virtual void   UserCreateOutputObjects();
@@ -46,6 +48,8 @@ public:
   TAxis& GetAxisPiMass() { return fAxisPiM; }
 
   void SetV0Filter(AliConversionCuts * filter) { fV0Filter = filter; }
+  void SetMesonFilter(AliConversionMesonCuts * filter) { fMesonFilter = filter; }
+  void SetPhotonFilter(AliConversionCuts * filter) { fPhotonFilter = filter; }
   AliAnalysisCuts * GetTrackCuts() const { return fTrackCuts; }
   void SetTrackCuts( AliAnalysisCuts * cuts) { if (fTrackCuts) delete fTrackCuts; fTrackCuts = cuts; }
   
@@ -67,8 +71,11 @@ private:
   TList * fHistoPion; //pion histo
 
 
-  AliConversionCuts * fV0Filter; //v0 filter
-  AliAnalysisCuts * fTrackCuts;
+  AliV0ReaderV1 * fV0Reader; // V0 reader
+  AliConversionCuts * fV0Filter; //additional v0 filter on top of v0 reader
+  AliConversionCuts * fPhotonFilter; //additional v0 filter for photons only
+  AliConversionMesonCuts * fMesonFilter; //additional meson filter behind fv0filter
+  AliAnalysisCuts * fTrackCuts; //Cuts for corr tracks
 
   TObjArray * fGammas; //gammas
   TObjArray * fPions; //poins
@@ -80,10 +87,7 @@ private:
 
   TObjArray * fPhotonCorr; //photon
   TObjArray * fPionCorr; //poin
-  AliAnaConvIsolation * fIsoAna; //comment
 
-  Int_t fL1; //comment
-  Int_t fL2; //comment
 
   TString fDeltaAODBranchName; //comment
 
@@ -98,7 +102,7 @@ private:
   AliAnalysisTaskdPhi(const AliAnalysisTaskdPhi&); // not implemented
   AliAnalysisTaskdPhi& operator=(const AliAnalysisTaskdPhi&); // not implemented
   
-  ClassDef(AliAnalysisTaskdPhi, 2); // example of analysis
+  ClassDef(AliAnalysisTaskdPhi, 3); 
 };
 
 inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc, TObjArray * array) {
@@ -112,8 +116,8 @@ inline THnSparseF * AliAnalysisTaskdPhi::GetMEHistogram(Int_t binz, Int_t binc,
        return NULL;
   }  
   
-  TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz));
-  THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binc));
+  TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc));
+  THnSparseF * histogram = static_cast<THnSparseF*>(arrayc->At(binz));
   return histogram;
 }
 
@@ -125,10 +129,9 @@ inline AliAnaConvCorrBase * AliAnalysisTaskdPhi::GetCorrObject(Int_t binz, Int_t
          return NULL;
        }
 
-  TObjArray * arrayc = static_cast<TObjArray*>(array->At(binz));
-  AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binc));
+  TObjArray * arrayc = static_cast<TObjArray*>(array->At(binc));
+  AliAnaConvCorrBase * corrmaker = static_cast<AliAnaConvCorrBase*>(arrayc->At(binz));
   return corrmaker;
-
 }
 
 inline Int_t AliAnalysisTaskdPhi::GetBin(TAxis & axis, Double_t value) {
index e920628..d5ea03f 100644 (file)
@@ -108,7 +108,7 @@ private:
     AliV0ReaderV1 &operator=(const AliV0ReaderV1 &ref);
 
 
-    ClassDef(AliV0ReaderV1,2)
+    ClassDef(AliV0ReaderV1, 3)
 };
 
 inline void AliV0ReaderV1::SetConversionCuts(const TString cut){
index 13d57ae..950186c 100644 (file)
@@ -105,102 +105,447 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
       cutarray[ 0] = "124000104209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
       cutarray[ 1] = "146000104209297002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
       cutarray[ 2] = "168000104209297002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
-      cutarray[ 3] = "108000104209297002322000000"; mesonCutArray[ 3] = "01522065009000"; // 0-80%
+      cutarray[ 3] = "124000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% direct photon cut
    } else if (trainConfig == 3) { // Standard direct photon cuts
       cutarray[ 0] = "102000104209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "104000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "148000104209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "108000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 4) { // Standard direct photon cuts
-      cutarray[ 0] = "101000104209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "112000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "124000104209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "109000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%
-   } else if (trainConfig == 5) { // Standard neutral pion cuts only added signals
+      cutarray[ 1] = "101000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10% 
+      cutarray[ 2] = "112000104209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "148000104209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 4) { // Standard neutral pion cuts only added signals
       cutarray[ 0] = "301000204209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
       cutarray[ 1] = "312000204209297002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
       cutarray[ 2] = "101000204209297002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
       cutarray[ 3] = "112000204209297002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
-   } else if (trainConfig == 6) { // Standard neutral pion cuts only added signals
+   } else if (trainConfig == 5) { // Standard neutral pion cuts only added signals
       cutarray[ 0] = "124000204209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
       cutarray[ 1] = "146000204209297002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
       cutarray[ 2] = "168000204209297002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
-      cutarray[ 3] = "108000204209297002322000000"; mesonCutArray[ 3] = "01522065009000"; // 0-80%
-   } else if (trainConfig == 7) { // Standard direct photon cuts
-      cutarray[ 0] = "102000304209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "104000304209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "148000304209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "108000304209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 8) { // Standard direct photon cuts
-      cutarray[ 0] = "101000304209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "112000304209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "124000304209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "109000304209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%
-   } else if(trainConfig == 9){ // Different trigger conditions
-      cutarray[ 0] = "301000104209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
-      cutarray[ 1] = "301400104209297002322000000"; mesonCutArray[ 1] = "01522045009000"; // 0-5% kMB
-      cutarray[ 2] = "301500104209297002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-5% kSemiCentral
-      cutarray[ 3] = "301600104209297002322000000"; mesonCutArray[ 3] = "01522045009000"; // 0-5% kCentral
-   } else if (trainConfig == 10) { // Standard direct photon cuts
+      cutarray[ 3] = "124000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon cut
+   } else if (trainConfig == 6) { // Standard direct photon cuts
       cutarray[ 0] = "102000204209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "104000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "148000204209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "108000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 11) { // Standard direct photon cuts
-      cutarray[ 0] = "101000204209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "112000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "124000204209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "109000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%   
-   } else if (trainConfig == 12){ // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 1] = "101000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "112000204209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20
+      cutarray[ 3] = "148000204209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 7){ // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
       cutarray[ 0] = "601000104209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
       cutarray[ 1] = "612000104209297002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
       cutarray[ 2] = "501000104209297002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
       cutarray[ 3] = "512000104209297002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
-   } else if (trainConfig == 13) { // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
+   } else if (trainConfig == 8) { // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
       cutarray[ 0] = "524000104209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
       cutarray[ 1] = "546000104209297002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
       cutarray[ 2] = "568000104209297002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
-      cutarray[ 3] = "508000104209297002322000000"; mesonCutArray[ 3] = "01522065009000"; // 0-80%
-   } else if (trainConfig == 14) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 3] = "524000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 9) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
       cutarray[ 0] = "502000104209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "504000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "548000104209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "508000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 15) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
-      cutarray[ 0] = "501000104209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "512000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "524000104209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "509000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%
-   } else if (trainConfig == 16) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 1] = "501000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 10) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
       cutarray[ 0] = "601000204209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
       cutarray[ 1] = "612000204209297002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
       cutarray[ 2] = "501000204209297002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
       cutarray[ 3] = "512000204209297002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
-   } else if (trainConfig == 17) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
+   } else if (trainConfig == 11) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
       cutarray[ 0] = "524000204209297002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
       cutarray[ 1] = "546000204209297002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
       cutarray[ 2] = "568000204209297002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
-      cutarray[ 3] = "508000204209297002322000000"; mesonCutArray[ 3] = "01522065009000"; // 0-80%
-   } else if (trainConfig == 18) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
-      cutarray[ 0] = "502000304209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "504000304209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "548000304209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "508000304209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 19) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
-      cutarray[ 0] = "501000304209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "512000304209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "524000304209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "509000304209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%
-   } else if (trainConfig == 20) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 3] = "524000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 12) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "502000204209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 13) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209295102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209295102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209295102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209295102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 14) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209295102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209295102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209295102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209295102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 15) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209295102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209295102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209295102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209295102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 16) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209295102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209295102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209295102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209295102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 17) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209295102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209295102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209295102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209295102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 18) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209295102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209295102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209295102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209295102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 19) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209255102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209255102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209255102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209255102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 20) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209255102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209255102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209255102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209255102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 21) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209255102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209255102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209255102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209255102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 22) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209255102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209255102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209255102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209255102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 23) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209255102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209255102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209255102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209255102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 24) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209255102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209255102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209255102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209255102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%   
+   } else if (trainConfig == 25) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000104209237002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209237002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209237002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209237002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 26) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000104209237002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209237002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209237002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 27) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000104209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 28) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000204209237002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209237002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209237002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209237002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 29) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000204209237002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209237002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209237002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 30) {// dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
       cutarray[ 0] = "502000204209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
-      cutarray[ 1] = "504000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-40%
-      cutarray[ 2] = "548000204209237002370000000"; mesonCutArray[ 2] = "01522065009000"; // 40-80%
-      cutarray[ 3] = "508000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-80%
-   } else if (trainConfig == 21) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
-      cutarray[ 0] = "501000204209237002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-10%
-      cutarray[ 1] = "512000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 10-20%
-      cutarray[ 2] = "524000204209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 20-40%
-      cutarray[ 3] = "509000204209237002370000000"; mesonCutArray[ 3] = "01522045009000"; // 0-90%      
+      cutarray[ 1] = "501000204209237002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209237002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209237002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%         
+   } else if (trainConfig == 31) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000104209277002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209277002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209277002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209277002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 32) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000104209277002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209277002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209277002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209277002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 33) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000104209277002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209277002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209277002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209277002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 34) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000204209277002322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209277002322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209277002322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209277002322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 35) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000204209277002322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209277002322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209277002322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209277002370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 36) {// dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000204209277002370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209277002370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209277002370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209277002370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%            
+   } else if (trainConfig == 37) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209267102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209267102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209267102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209267102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 38) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209267102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209267102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209267102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209267102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 39) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209267102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209267102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209267102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209267102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 40) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209267102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209267102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209267102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209267102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 41) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209267102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209267102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209267102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209267102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 42) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209267102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209267102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209267102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209267102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%            
+   } else if (trainConfig == 43) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209287102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000104209287102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000104209287102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000104209287102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 44) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209287102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000104209287102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000104209287102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000104209287102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 45) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209287102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000104209287102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000104209287102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000104209287102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%
+   } else if (trainConfig == 46) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209287102322000000"; mesonCutArray[ 0] = "01522045009000"; // 0-5%
+      cutarray[ 1] = "612000204209287102322000000"; mesonCutArray[ 1] = "01522045009000"; // 5-10%
+      cutarray[ 2] = "501000204209287102322000000"; mesonCutArray[ 2] = "01522045009000"; // 0-10%
+      cutarray[ 3] = "512000204209287102322000000"; mesonCutArray[ 3] = "01522045009000"; // 10-20%
+   } else if (trainConfig == 47) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209287102322000000"; mesonCutArray[ 0] = "01522045009000"; // 20-40%
+      cutarray[ 1] = "546000204209287102322000000"; mesonCutArray[ 1] = "01522065009000"; // 40-60%
+      cutarray[ 2] = "568000204209287102322000000"; mesonCutArray[ 2] = "01522065009000"; // 60-80%
+      cutarray[ 3] = "524000204209287102370000000"; mesonCutArray[ 3] = "01522045009000"; // 20-40% //direct photon
+   } else if (trainConfig == 48) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209287102370000000"; mesonCutArray[ 0] = "01522045009000"; // 0-20%
+      cutarray[ 1] = "501000204209287102370000000"; mesonCutArray[ 1] = "01522045009000"; // 0-10%
+      cutarray[ 2] = "512000204209287102370000000"; mesonCutArray[ 2] = "01522045009000"; // 10-20%
+      cutarray[ 3] = "548000204209287102370000000"; mesonCutArray[ 3] = "01522065009000"; // 40-80%            
+    } else if (trainConfig == 49){ // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "601000104209297002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209297002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209297002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209297002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 50) { // Standard neutral pion cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "524000104209297002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209297002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209297002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209237002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 51) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "502000104209237002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209237002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209237002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209237002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 52) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "601000204209297002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209297002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209297002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209297002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 53) { // Standard neutral pion cuts only added signals, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "524000204209297002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209297002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209297002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209237002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 54) { // Standard direct photon cuts, Centrality V0M for data and same TPC mult for MC
+      cutarray[ 0] = "502000204209237002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209237002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209237002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209237002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 55) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209295102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209295102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209295102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209295102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 56) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209295102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209295102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209295102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209295102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 57) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209295102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209295102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209295102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209295102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 58) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209295102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209295102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209295102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209295102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 59) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209295102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209295102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209295102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209295102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 60) { // dE/dx E varied to \sigma > 3, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209295102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209295102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209295102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209295102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 61) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209255102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209255102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209255102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209255102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 62) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209255102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209255102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209255102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209255102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 63) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209255102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209255102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209255102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209255102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 64) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209255102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209255102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209255102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209255102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 65) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209255102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209255102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209255102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209255102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 66) { // dE/dx E varied to \sigma > 2, \sigma > -10, min p\pi = 0.3 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209255102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209255102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209255102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209255102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%   
+   } else if (trainConfig == 67) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000104209237002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209237002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209237002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209237002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 68) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000104209237002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209237002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209237002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209237002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 69) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000104209237002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209237002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209237002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209237002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 70) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000204209237002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209237002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209237002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209237002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 71) { // dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000204209237002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209237002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209237002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209237002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 72) {// dE/dx E varied to \sigma > 2.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000204209237002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209237002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209237002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209237002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%         
+   } else if (trainConfig == 73) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000104209277002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209277002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209277002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209277002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 74) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000104209277002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209277002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209277002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209277002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 75) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000104209277002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209277002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209277002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209277002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 76) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "601000204209277002322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209277002322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209277002322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209277002322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 77) { // dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "524000204209277002322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209277002322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209277002322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209277002370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 78) {// dE/dx E varied to \sigma > 3.5, \sigma > -10, min p\pi = 0.4 GeV/c, max p\pi = 100 GeV/c
+      cutarray[ 0] = "502000204209277002370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209277002370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209277002370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209277002370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%            
+   } else if (trainConfig == 79) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209267102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209267102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209267102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209267102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 80) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209267102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209267102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209267102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209267102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 81) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209267102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209267102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209267102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209267102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 82) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209267102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209267102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209267102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209267102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 83) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209267102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209267102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209267102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209267102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 84) { // dE/dx E varied to \sigma > 2, \sigma > 0.5, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209267102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209267102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209267102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209267102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%            
+   } else if (trainConfig == 85) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000104209287102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000104209287102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000104209287102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000104209287102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 86) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000104209287102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000104209287102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000104209287102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000104209287102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 87) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000104209287102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000104209287102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000104209287102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000104209287102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%
+   } else if (trainConfig == 88) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "601000204209287102322000000"; mesonCutArray[ 0] = "01522045009300"; // 0-5%
+      cutarray[ 1] = "612000204209287102322000000"; mesonCutArray[ 1] = "01522045009300"; // 5-10%
+      cutarray[ 2] = "501000204209287102322000000"; mesonCutArray[ 2] = "01522045009300"; // 0-10%
+      cutarray[ 3] = "512000204209287102322000000"; mesonCutArray[ 3] = "01522045009300"; // 10-20%
+   } else if (trainConfig == 89) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "524000204209287102322000000"; mesonCutArray[ 0] = "01522045009300"; // 20-40%
+      cutarray[ 1] = "546000204209287102322000000"; mesonCutArray[ 1] = "01522065009300"; // 40-60%
+      cutarray[ 2] = "568000204209287102322000000"; mesonCutArray[ 2] = "01522065009300"; // 60-80%
+      cutarray[ 3] = "524000204209287102370000000"; mesonCutArray[ 3] = "01522045009300"; // 20-40% //direct photon
+   } else if (trainConfig == 90) { // dE/dx E varied to \sigma > 2, \sigma > 1, min p\pi = 0.4 GeV/c, max p\pi = 5 GeV/c
+      cutarray[ 0] = "502000204209287102370000000"; mesonCutArray[ 0] = "01522045009300"; // 0-20%
+      cutarray[ 1] = "501000204209287102370000000"; mesonCutArray[ 1] = "01522045009300"; // 0-10%
+      cutarray[ 2] = "512000204209287102370000000"; mesonCutArray[ 2] = "01522045009300"; // 10-20%
+      cutarray[ 3] = "548000204209287102370000000"; mesonCutArray[ 3] = "01522065009300"; // 40-80%              
    } else {
       Error(Form("GammaConvV1_%i",trainConfig), "wrong trainConfig variable no cuts have been specified for the configuration");
       return;
@@ -212,8 +557,8 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
    TList *HeaderList = new TList();
    TObjString *Header1 = new TObjString("pi0_1");
    HeaderList->Add(Header1);
-   TObjString *Header3 = new TObjString("eta_2");
-   HeaderList->Add(Header3);
+//    TObjString *Header3 = new TObjString("eta_2");
+//    HeaderList->Add(Header3);
    
    ConvCutList->SetOwner(kTRUE);
    AliConversionCuts **analysisCuts = new AliConversionCuts*[numberOfCuts];
@@ -230,79 +575,58 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
       } else if (trainConfig == 2){ 
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4060V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-        if (i==2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
+        if (i == 2 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
       } else if (trainConfig == 3){
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
-        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0040V0M");
+        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
+        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
-      } else if (trainConfig == 4){
-         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
-         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-      } else if (trainConfig == 5 ){
+      } else if (trainConfig == 4 ){
          if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0005V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
          if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0510V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M"); 
          if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
          if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-      } else if (trainConfig == 6){ 
+      } else if (trainConfig == 5){ 
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4060V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-        if (i==2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
-      } else if (trainConfig == 9){
-         if (doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0005V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
-         if (i == 1) analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kMB, "AliVEvent::kMB" );
-         if (i == 2) analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kSemiCentral,"AliVEvent::kSemiCentral" );
-         if (i == 3) analysisCuts[i]->SelectSpecialTrigger(AliVEvent::kCentral,"AliVEvent::kCentral" );
-         
-      } else if (trainConfig == 10){
+        if (i == 2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
+      } else if (trainConfig == 6){
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
-        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0040V0M");
-        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
-      } else if (trainConfig == 11){
-         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
-         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-      } else if (trainConfig == 12 ){
+        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
+        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
+      } else if (trainConfig == 7 || trainConfig == 13 || trainConfig == 19 || trainConfig == 25 || trainConfig == 31 || trainConfig == 37 || trainConfig == 43 || trainConfig == 49 || trainConfig == 55 || trainConfig == 61 || trainConfig == 67 || trainConfig == 73 || trainConfig == 79 || trainConfig == 85){
          if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0005TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
          if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0510TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M");
          if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
          if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-      } else if (trainConfig == 13){ 
+      } else if (trainConfig == 8 || trainConfig == 14 || trainConfig == 20 || trainConfig == 26 || trainConfig == 32 || trainConfig == 38 || trainConfig == 44 || trainConfig == 50 || trainConfig == 56 || trainConfig == 62 || trainConfig == 68 || trainConfig == 74 || trainConfig == 80 || trainConfig == 86){ 
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4060TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-        if (i==2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
-      } else if (trainConfig == 14){
+        if (i == 1 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4060TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
+        if (i == 2 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
+      } else if (trainConfig == 9 || trainConfig == 15 || trainConfig == 21 || trainConfig == 27 || trainConfig == 33 || trainConfig == 39 || trainConfig == 45 || trainConfig == 51 || trainConfig == 57 || trainConfig == 63 || trainConfig == 69 || trainConfig == 75 || trainConfig == 81 || trainConfig == 87){
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
-        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0040V0M");
-        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
-      } else if (trainConfig == 15){
-         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
-         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-      } else if (trainConfig == 16 ){
+        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
+        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
+      } else if (trainConfig == 10 || trainConfig == 16 || trainConfig == 22 || trainConfig == 28 || trainConfig == 34 || trainConfig == 40 || trainConfig == 46 || trainConfig == 52 || trainConfig == 58 || trainConfig == 64 || trainConfig == 70 || trainConfig == 76 || trainConfig == 82 || trainConfig == 88){
          if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0005TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
          if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0510TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M");
          if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
          if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-      } else if (trainConfig == 17){ 
+      } else if (trainConfig == 11 || trainConfig == 17 || trainConfig == 23 || trainConfig == 29 || trainConfig == 35 || trainConfig == 41 || trainConfig == 47 || trainConfig == 53 || trainConfig == 59 || trainConfig == 65 || trainConfig == 71 || trainConfig == 77 || trainConfig == 83 || trainConfig == 89){ 
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4060TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-        if (i==2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");   
-      } else if (trainConfig == 20){
+        if (i == 2  && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
+      } else if (trainConfig == 12 || trainConfig == 18 || trainConfig == 24 || trainConfig == 30 || trainConfig == 36 || trainConfig == 42 || trainConfig == 48 || trainConfig == 54 || trainConfig == 60 || trainConfig == 66 || trainConfig == 72 || trainConfig == 78 || trainConfig == 84 || trainConfig == 90){
         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0020V0M");
-        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0040V0M");
-        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
-        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0080V0M");
-      } else if (trainConfig == 21){
-         if (i == 0 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
-         if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
-         if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
+        if (i == 1 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0010TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_0010V0M");
+        if (i == 2 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE,fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_1020TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_1020V0M");
+        if (i == 3 && doWeighting)  analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4080TPC", "", "","Pi0_Fit_Data_PbPb_2760GeV_4080V0M");
       }
       
       analysisCuts[i]->InitializeCutsFromCutString(cutarray[i].Data());
@@ -321,7 +645,7 @@ void AddTask_GammaConvV1_PbPb(  Int_t trainConfig = 1,  //change different set o
    task->SetMoveParticleAccordingToVertex(kTRUE);
    task->SetDoMesonAnalysis(kTRUE);
    if (enableQAMesonTask) task->SetDoMesonQA(kTRUE); //Attention new switch for Pi0 QA
-   if (enableQAMesonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
+   if (enableQAPhotonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
 
    //connect containers
    AliAnalysisDataContainer *coutput =
index 9eb6c69..39bee85 100644 (file)
@@ -188,7 +188,7 @@ void AddTask_GammaConvV1_pPb(  Int_t trainConfig = 1,  //change different set of
    task->SetMoveParticleAccordingToVertex(kTRUE);
    task->SetDoMesonAnalysis(kTRUE);
    if (enableQAMesonTask) task->SetDoMesonQA(kTRUE); //Attention new switch for Pi0 QA
-   if (enableQAMesonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
+   if (enableQAPhotonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
 
    //connect containers
    AliAnalysisDataContainer *coutput =
index 6cfbc85..e832f52 100644 (file)
@@ -146,7 +146,7 @@ void AddTask_GammaConvV1_pp(  Int_t trainConfig = 1,  //change different set of
    task->SetMoveParticleAccordingToVertex(kTRUE);
    task->SetDoMesonAnalysis(kTRUE);
    if (enableQAMesonTask) task->SetDoMesonQA(kTRUE); //Attention new switch for Pi0 QA
-   if (enableQAMesonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
+   if (enableQAPhotonTask) task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
 
    //connect containers
    AliAnalysisDataContainer *coutput =