submitted AddTasks for Dalitz
authorfbock <fbock@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Sep 2013 13:53:33 +0000 (13:53 +0000)
committerfbock <fbock@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 19 Sep 2013 13:53:33 +0000 (13:53 +0000)
PWGGA/GammaConv/AliConversionCuts.cxx
PWGGA/GammaConv/AliDalitzElectronCuts.cxx
PWGGA/GammaConv/macros/AddTask_GammaConvDalitzV1_PbPb.C [copied from PWGGA/GammaConv/macros/AddTask_gamconv_GammaConvDalitzV1_PbPb.C with 77% similarity]
PWGGA/GammaConv/macros/AddTask_GammaConvDalitzV1_pPb.C [moved from PWGGA/GammaConv/macros/AddTask_gamconv_GammaConvDalitzV1_PbPb.C with 70% similarity]
PWGGA/GammaConv/macros/AddTask_GammaConvDalitz_PbPb.C [deleted file]

index 78195c3..42a654d 100644 (file)
@@ -2836,6 +2836,11 @@ Bool_t AliConversionCuts::SetPhotonAsymmetryCut(Int_t doPhotonAsymmetryCut){
       fMinPPhotonAsymmetryCut=3.5;
       fMinPhotonAsymmetry=0.06;
       break;
+   case 3:
+      fDoPhotonAsymmetryCut=1;
+      fMinPPhotonAsymmetryCut=0.0;
+      fMinPhotonAsymmetry=0.05;
+      break; 
    default:
       AliError(Form("PhotonAsymmetryCut not defined %d",doPhotonAsymmetryCut));
       return kFALSE;
index cd3879a..b94406b 100644 (file)
@@ -430,29 +430,7 @@ Bool_t AliDalitzElectronCuts::TrackIsSelected(AliESDtrack* lTrack) {
        \r
    }\r
 \r
-    /*if( lTrack->GetNcls(1) < fMinClsTPC ) {\r
-\r
-        return kFALSE;\r
-    }*/\r
-\r
-        //Findable clusters\r
-\r
-       /*Double_t clsToF=0;\r
-\r
-\r
-           if (!fUseCorrectedTPCClsInfo ){\r
-               if(lTrack->GetTPCNclsF()!=0){\r
-\r
-               clsToF = (Double_t)lTrack->GetNcls(1)/(Double_t)lTrack->GetTPCNclsF();\r
-               }// Ncluster/Nfindablecluster\r
-           }\r
-         else {\r
-\r
-              //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));\r
-              clsToF = lTrack->GetTPCClusterInfo(2,1); //NOTE ask friederike\r
-              \r
-         }*/\r
-\r
+   \r
 \r
     if( clsToF < fMinClsTPCToF){\r
     return kFALSE;\r
@@ -691,7 +669,7 @@ Double_t AliDalitzElectronCuts::GetNFindableClustersTPC(AliESDtrack* lTrack){
     else {\r
 \r
               //clsToF = lTrack->GetTPCClusterInfo(2,0,GetFirstTPCRow(photon->GetConversionRadius()));\r
-              clsToF = lTrack->GetTPCClusterInfo(2,1); //NOTE ask friederike\r
+              clsToF = lTrack->GetTPCClusterInfo(2,0); //NOTE ask friederike\r
                 \r
     }\r
   \r
@@ -1075,16 +1053,16 @@ Bool_t AliDalitzElectronCuts::SetTPCdEdxCutPionLine(Int_t pidedxSigmaCut)
                fPIDnSigmaAbovePionLineTPCHighPt=-100;\r
                break;\r
        case 1:  // -10\r
-               fPIDnSigmaAbovePionLineTPC=3.0;              //Update Sep-05-2013 from -10 to 3\r
-               fPIDnSigmaAbovePionLineTPCHighPt=-10;        \r
+               fPIDnSigmaAbovePionLineTPC=3.0;            //Update Sep-05-2013 from -10 to 3\r
+               fPIDnSigmaAbovePionLineTPCHighPt=-10;\r
                break;\r
        case 2:  // 1\r
-               fPIDnSigmaAbovePionLineTPC=-1;\r
-               fPIDnSigmaAbovePionLineTPCHighPt=-10;\r
+               fPIDnSigmaAbovePionLineTPC=2;              //Update Sep-09-2013 from -1  to  2\r
+               fPIDnSigmaAbovePionLineTPCHighPt=-1;       //Update Sep-09-2013 from -10 to -1\r
                break;\r
        case 3:   // 0\r
-               fPIDnSigmaAbovePionLineTPC=0;\r
-               fPIDnSigmaAbovePionLineTPCHighPt=-10;\r
+               fPIDnSigmaAbovePionLineTPC=2;              //Update Sep-09-2013 from   0 to   2\r
+               fPIDnSigmaAbovePionLineTPCHighPt=0;        //Update Sep-09-2013 from -10 to   0\r
                break;\r
        case 4:  // 1\r
                fPIDnSigmaAbovePionLineTPC=1;\r
@@ -1245,6 +1223,12 @@ Bool_t AliDalitzElectronCuts::SetTPCClusterCut(Int_t clsTPCCut)
                fMinClsTPCToF= 0.35;\r
                fUseCorrectedTPCClsInfo=0;\r
                break;\r
+       case 9:  // 35% of findable clusters\r
+               fMinClsTPC = 70.;  \r
+               fesdTrackCuts->SetMinNClustersTPC(fMinClsTPC);\r
+               fMinClsTPCToF= 0.35;\r
+               fUseCorrectedTPCClsInfo=1;\r
+               break;\r
          \r
        default:\r
                cout<<"Warning: clsTPCCut not defined "<<clsTPCCut<<endl;\r
@@ -1,6 +1,8 @@
-void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC 
+void AddTask_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC 
                                        Bool_t enableQAMesonTask = kTRUE, //enable QA in AliAnalysisTaskGammaConvDalitzV1
                                        Bool_t enableDoMesonChic = kFALSE, // enable additional Chic analysis
+                                       TString fileNameInputForWeighting = "MCSpectraInput.root", // path to file for weigting input
+                                       Bool_t doWeighting = kFALSE,  //enable Weighting
                                        TString cutnumberAODBranch = "0000000060084001001500000"
                                   ) {
 
@@ -48,8 +50,9 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    
    //=========  Set Cutnumber for V0Reader ================================
    TString ConvCutnumber = "108000000008400100150000000";   //Online  V0 finder
-   TString ElecCuts      = "900054000000020000";            //Electron Cuts
-
+   TString ElecCuts      = "903162000550020210";            //Electron Cuts
+                            //903162000550020210
+                            //900054000000020000
 
 
    AliAnalysisDataContainer *cinput = mgr->GetCommonInputContainer();
@@ -124,6 +127,12 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
     fElectronSelector->Init();
     mgr->AddTask(fElectronSelector);
 
+    AliAnalysisDataContainer *cinput1  = mgr->GetCommonInputContainer();
+
+    //connect input V0Reader
+
+    mgr->ConnectInput (fElectronSelector,0,cinput1);
+
     }
 
 
@@ -154,26 +163,17 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
 
    TString *MesonCutarray   = new TString[numberOfCuts];
 
-   Bool_t doEtaShiftIndCuts = kFALSE;
-
-
 
+      
 
-   TString *cutarray = new TString[numberOfCuts];
-   TString *mesonCutArray = new TString[numberOfCuts];
-   Bool_t doEtaShiftIndCuts = kFALSE;
-   TString stringShift = "";
 
-   // Shifting in pPb direction
+   ConvCutarray[0]  = "312000104209297100322000000"; MesonCutarray[0] = "01522045009000"; ElecCutarray[0]  = "905162002552021217"; //PbPb  5-10% kAny
+   ConvCutarray[1]  = "112000104209297100322000000"; MesonCutarray[1] = "01522045009000"; ElecCutarray[1]  = "905162002552021217"; //PbPb 10-20% kAny
+   ConvCutarray[2]  = "124000104209297100322000000"; MesonCutarray[2] = "01522045009000"; ElecCutarray[2]  = "905162002552021217"; //PbPb 20-40% kAny
+   ConvCutarray[3]  = "146000104209297100322000000"; MesonCutarray[3] = "01522045009000"; ElecCutarray[3]  = "905162002552021217"; //PbPb 40-60% kAny
+   ConvCutarray[4]  = "168000104209297100322000000"; MesonCutarray[4] = "01522045009000"; ElecCutarray[4]  = "905162002552021217"; //PbPb 60-80% kAny
 
-   doEtaShiftIndCuts = kTRUE;
-   stringShift = "pPb";
 
-   ConvCutarray[0]  = "312000104209297100322000000"; MesonCutarray[0] = "01522045009000"; ElecCutarray[0]  = "905162001552021217"; //PbPb  5-10%
-   ConvCutarray[1]  = "112000104209297100322000000"; MesonCutarray[1] = "01522045009000"; ElecCutarray[1]  = "905162001552021217"; //PbPb 10-20%
-   ConvCutarray[2]  = "124000104209297100322000000"; MesonCutarray[2] = "01522045009000"; ElecCutarray[2]  = "905162001552021217"; //PbPb 20-40%
-   ConvCutarray[3]  = "146000104209297100322000000"; MesonCutarray[3] = "01522045009000"; ElecCutarray[3]  = "905162001552021217"; //PbPb 40-60%
-   ConvCutarray[4]  = "168000104209297100322000000"; MesonCutarray[4] = "01522045009000"; ElecCutarray[4]  = "905162001552021217"; //PbPb 60-80%
 
 
    TList *ConvCutList  = new TList();
@@ -183,13 +183,16 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    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];
+
    MesonCutList->SetOwner(kTRUE);
    AliConversionMesonCuts **analysisMesonCuts   = new AliConversionMesonCuts*[numberOfCuts];
+
    ElecCutList->SetOwner(kTRUE);
    AliDalitzElectronCuts **analysisElecCuts     = new AliDalitzElectronCuts*[numberOfCuts];
 
@@ -207,6 +210,14 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
       
       ConvCutList->Add(analysisCuts[i]);
       analysisCuts[i]->SetFillCutHistograms("",kFALSE);
+      if (i == 0 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0510V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0510V0M");
+      if (i == 1 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
+      if (i == 2 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4060V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
+      if (i == 3 && doWeighting) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, fileNameInputForWeighting, "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
+
+
+
       }
 
 
@@ -251,12 +262,12 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
 
 
    if(enableQAMesonTask) task->SetDoMesonQA(kTRUE);
-   if(enableDoMesonChic) task->SetDoMesonAnalysis(kTRUE);
+   if(enableDoMesonChic) task->SetDoChicAnalysis(kTRUE);
 
    //connect containers
    AliAnalysisDataContainer *coutput =
    mgr->CreateContainer("GammaConvDalitzV1", TList::Class(),
-                           AliAnalysisManager::kOutputContainer,"GammaConvDalitzV1.root");
+                           AliAnalysisManager::kOutputContainer,"GammaConvV1.root");
 
    mgr->AddTask(task);
    mgr->ConnectInput(task,0,cinput);
@@ -1,4 +1,4 @@
-void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC 
+void AddTask_GammaConvDalitzV1_pPb(   Bool_t isMC       = kFALSE, //run MC 
                                        Bool_t enableQAMesonTask = kTRUE, //enable QA in AliAnalysisTaskGammaConvDalitzV1
                                        Bool_t enableDoMesonChic = kFALSE, // enable additional Chic analysis
                                        TString cutnumberAODBranch = "0000000060084001001500000"
@@ -33,7 +33,7 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    // ================== GetAnalysisManager ===============================
    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
    if (!mgr) {
-      Error("AddTask_GammaConvDalitzV1_PbPb", "No analysis manager found.");
+      Error("AddTask_GammaConvDalitzV1_pPb", "No analysis manager found.");
       return ;
    }
 
@@ -47,8 +47,9 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    }
    
    //=========  Set Cutnumber for V0Reader ================================
-   TString ConvCutnumber = "108000000008400100150000000";   //Online  V0 finder
+   TString ConvCutnumber = "800000006008400100150000000";   //Online  V0 finder
    TString ElecCuts      = "900054000000020000";            //Electron Cuts
+   Bool_t doEtaShift = kFALSE;
 
 
 
@@ -73,7 +74,8 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
          fCuts= new AliConversionCuts(ConvCutnumber.Data(),ConvCutnumber.Data());
          fCuts->SetPreSelectionCutFlag(kTRUE);
          if(fCuts->InitializeCutsFromCutString(ConvCutnumber.Data())){
-            fV0ReaderV1->SetConversionCuts(fCuts);
+            fCuts->DoEtaShift(doEtaShift);
+           fV0ReaderV1->SetConversionCuts(fCuts);
             fCuts->SetFillCutHistograms("",kTRUE);
          }
       }
@@ -103,9 +105,7 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
 
    AliDalitzElectronCuts *fElecCuts=0;
 
-   TString ElecCuts = "900054000000020000";
-
-
+   //ElecCuts = "900054000000020000";
 
     if( ElecCuts!=""){
 
@@ -123,6 +123,12 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
 
     fElectronSelector->Init();
     mgr->AddTask(fElectronSelector);
+    
+    AliAnalysisDataContainer *cinput1  = mgr->GetCommonInputContainer();
+
+    //connect input V0Reader
+
+    mgr->ConnectInput (fElectronSelector,0,cinput1);
 
     }
 
@@ -155,13 +161,6 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    TString *MesonCutarray   = new TString[numberOfCuts];
 
    Bool_t doEtaShiftIndCuts = kFALSE;
-
-
-
-
-   TString *cutarray = new TString[numberOfCuts];
-   TString *mesonCutArray = new TString[numberOfCuts];
-   Bool_t doEtaShiftIndCuts = kFALSE;
    TString stringShift = "";
 
    // Shifting in pPb direction
@@ -169,12 +168,18 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    doEtaShiftIndCuts = kTRUE;
    stringShift = "pPb";
 
-   ConvCutarray[0]  = "312000104209297100322000000"; MesonCutarray[0] = "01522045009000"; ElecCutarray[0]  = "905162001552021217"; //PbPb  5-10%
-   ConvCutarray[1]  = "112000104209297100322000000"; MesonCutarray[1] = "01522045009000"; ElecCutarray[1]  = "905162001552021217"; //PbPb 10-20%
-   ConvCutarray[2]  = "124000104209297100322000000"; MesonCutarray[2] = "01522045009000"; ElecCutarray[2]  = "905162001552021217"; //PbPb 20-40%
-   ConvCutarray[3]  = "146000104209297100322000000"; MesonCutarray[3] = "01522045009000"; ElecCutarray[3]  = "905162001552021217"; //PbPb 40-60%
-   ConvCutarray[4]  = "168000104209297100322000000"; MesonCutarray[4] = "01522045009000"; ElecCutarray[4]  = "905162001552021217"; //PbPb 60-80%
-
+   ConvCutarray[0] = "800000008209360300220000000"; ElecCutarray[0] = "904754002582026217"; MesonCutarray[0] = "01039035009000"; //standard cut Pi0 PbPb 00-100
+   //ConvCutarray[1] = "800000008209360300220000000"; ElecCutarray[1] = "904754002582026217"; MesonCutarray[1] = "01039035000000"; //standard cut Pi0 PbPb 00-100 + No extra smearing
+   ConvCutarray[1] = "800000008209360300220000000"; ElecCutarray[1] = "904754002582026117"; MesonCutarray[1] = "01039035009000"; //standard cut Pi0 PbPb 00-100 + Single Pt primary > 0.100 GeV
+   //ConvCutarray[3] = "800000008209360300220000000"; ElecCutarray[3] = "904754002582026317"; MesonCutarray[3] = "01039035009000"; //standard cut Pi0 PbPb 00-100 + Single Pt primary > 0.150 GeV
+   ConvCutarray[2] = "800000008209460300220000000"; ElecCutarray[2] = "904754002582026217"; MesonCutarray[2] = "01039035009000"; //standard cut Pi0 PbPb 00-100 + dEdx electron gamma   -6 ,7 sigmas
+   ConvCutarray[3] = "800000008209360300220300000"; ElecCutarray[3] = "904754002582026217"; MesonCutarray[3] = "01039035009000"; //standard cut Pi0 PbPb 00-100  do Aysemtri cut
+   ConvCutarray[4] = "800000008209460300220000000"; ElecCutarray[4] = "902754002582026217"; MesonCutarray[4] = "01039035009000"; //standard cut Pi0 PbPb 00-100  dEdx electrons primary and secondary -6 7 sigmas
+   
+   //ConvCutarray[7] = "800000008249360300220000000"; ElecCutarray[7] = "904754002582026217"; MesonCutarray[7] = "01039035009000"; //standard cut Pi0 PbPb 00-100  Single Pt gamma > 0.075 GeV
+   //ConvCutarray[8] = "800000008219360300220000000"; ElecCutarray[8] = "904754002582026217"; MesonCutarray[8] = "01039035009000"; //standard cut Pi0 PbPb 00-100  Single Pt gamma > 0.100 GeV
+   //ConvCutarray[9] = "800000008209360300220000000"; ElecCutarray[9] = "904854002582026217"; MesonCutarray[9] = "01039035009000"; //standard cut Pi0 PbPb 00-100
 
    TList *ConvCutList  = new TList();
    TList *MesonCutList = new TList();
@@ -183,8 +188,8 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
    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];
@@ -205,8 +210,13 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
       }
       else {
       
-      ConvCutList->Add(analysisCuts[i]);
-      analysisCuts[i]->SetFillCutHistograms("",kFALSE);
+       if (doEtaShiftIndCuts) {
+         analysisCuts[i]->DoEtaShift(doEtaShiftIndCuts);
+         analysisCuts[i]->SetEtaShift(stringShift);
+       }
+        ConvCutList->Add(analysisCuts[i]);
+        analysisCuts[i]->SetFillCutHistograms("",kFALSE);
+        analysisCuts[i]->SetAcceptedHeader(HeaderList);
       }
 
 
@@ -218,8 +228,8 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
             return 0;
       }
       else {
-        MesonCutList->Add(analysisMesonCuts[i]);
-        analysisMesonCuts[i]->SetFillCutHistograms("");
+            MesonCutList->Add(analysisMesonCuts[i]);
+            analysisMesonCuts[i]->SetFillCutHistograms("");
       }
 
 
@@ -238,7 +248,7 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
        }
 
 
-        analysisCuts[i]->SetAcceptedHeader(HeaderList);
+        
 
    }
 
@@ -251,12 +261,12 @@ void AddTask_gamconv_GammaConvDalitzV1_PbPb(   Bool_t isMC   = kFALSE, //run MC
 
 
    if(enableQAMesonTask) task->SetDoMesonQA(kTRUE);
-   if(enableDoMesonChic) task->SetDoMesonAnalysis(kTRUE);
+   if(enableDoMesonChic) task->SetDoChicAnalysis(kTRUE);
 
    //connect containers
    AliAnalysisDataContainer *coutput =
    mgr->CreateContainer("GammaConvDalitzV1", TList::Class(),
-                           AliAnalysisManager::kOutputContainer,"GammaConvDalitzV1.root");
+                           AliAnalysisManager::kOutputContainer,"GammaConvV1.root");
 
    mgr->AddTask(task);
    mgr->ConnectInput(task,0,cinput);
diff --git a/PWGGA/GammaConv/macros/AddTask_GammaConvDalitz_PbPb.C b/PWGGA/GammaConv/macros/AddTask_GammaConvDalitz_PbPb.C
deleted file mode 100644 (file)
index 8fc0355..0000000
+++ /dev/null
@@ -1,194 +0,0 @@
-AliAnalysisTask *AddTask_gamconv_GammaConvV1_PbPb(){
-   
-   gSystem->Load("libANALYSISalice.so");
-
-   //get the current analysis manager
-   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-   if (!mgr) {
-      Error("AddTask_GammaConvV1", "No analysis manager found.");
-      return 0;
-   }
-
-   TString trainConfig=gSystem->Getenv("CONFIG_FILE");
-   Int_t IsHeavyIon=1;
-   
-   Bool_t IsMC = kFALSE;
-   if (trainConfig.Contains("MC")) IsMC=kTRUE;
-
-
-   TString cutnumber = "108000000008400100150000000";
-   Bool_t doEtaShift = kFALSE;
-   
-   //========= Add PID Reponse to ANALYSIS manager ====
-   if(!(AliPIDResponse*)mgr->GetTask("PIDResponseTask")){
-      gROOT->LoadMacro("$ALICE_ROOT/ANALYSIS/macros/AddTaskPIDResponse.C");
-      AddTaskPIDResponse(IsMC);
-   }
-   
-   //========= Add V0 Reader to  ANALYSIS manager =====
-   AliV0ReaderV1 *fV0ReaderV1=new AliV0ReaderV1("V0ReaderV1");
-   ConfigV0ReaderV1(fV0ReaderV1,cutnumber,IsHeavyIon,doEtaShift);
-   mgr->AddTask(fV0ReaderV1);
-
-   AliLog::SetGlobalLogLevel(AliLog::kInfo);
-
-   AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-   //connect input V0Reader
-   mgr->ConnectInput (fV0ReaderV1,0,cinput);
-
-   AliAnalysisTaskGammaConvV1 *task=NULL;
-   task= new AliAnalysisTaskGammaConvV1("GammaConvV1");
-   task->SetIsHeavyIon(IsHeavyIon);
-   task->SetIsMC(IsMC);
-   // Cut Numbers to use in Analysis
-
-   Int_t numberOfCuts = 4;
-   
-   TString *cutarray = new TString[numberOfCuts];
-   TString *mesonCutArray = new TString[numberOfCuts];
-
-   cutarray[ 0] = "301000204209297002322000000"; mesonCutArray[ 0] = "01522045009000";
-   cutarray[ 1] = "124000204209297002322000000"; mesonCutArray[ 1] = "01522045009000";
-   cutarray[ 2] = "146000204209297002322000000"; mesonCutArray[ 2] = "01522065009000";
-   cutarray[ 3] = "168000204209297002322000000"; mesonCutArray[ 3] = "01522065009000";
-
-   TList *ConvCutList = new TList();
-   TList *MesonCutList = new TList();
-
-   TList *HeaderList = new TList();
-   TObjString *Header1 = new TObjString("pi0_1");
-   HeaderList->Add(Header1);
-   TObjString *Header3 = new TObjString("eta_2");
-   HeaderList->Add(Header3);
-   
-
-
-   ConvCutList->SetOwner(kTRUE);
-   AliConversionCuts **analysisCuts = new AliConversionCuts*[numberOfCuts];
-   MesonCutList->SetOwner(kTRUE);
-   AliConversionMesonCuts **analysisMesonCuts = new AliConversionMesonCuts*[numberOfCuts];
-
-   for(Int_t i = 0; i<numberOfCuts; i++){
-      analysisCuts[i] = new AliConversionCuts();
-//       if (i==0) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0005V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
-//       if (i==1) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-//       if (i==2) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4060V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-//       if (i==3) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");     
-      if (i==0) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_0005V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_0005V0M");
-      if (i==1) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_2040V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_2040V0M");
-      if (i==2) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_4060V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_4060V0M");
-      if (i==3) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kFALSE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_addSig_PbPb_2760GeV_6080V0M", "", "","Pi0_Fit_Data_PbPb_2760GeV_6080V0M");
-      
-//       if (i==1) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0010", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_0010");
-//        if (i==2) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0510", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_0510"); 
-//       if (i==3) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE,"MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_1020", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_1020");      
-//       if (i==7) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0020", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_0020");
-//       if (i==8) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0040", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_0040");
-//       if (i==9) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_0080", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_0080");
-//       if (i==10) analysisCuts[i]->SetUseReweightingWithHistogramFromFile(kTRUE, kFALSE, kTRUE, "MCSpectraInput.root", "Pi0_Hijing_LHC13d2_PbPb_2760GeV_4080", "", "K0s_RatioDataToMC_Hijing_PbPb_2760GeV_4080");
-
-      analysisCuts[i]->InitializeCutsFromCutString(cutarray[i].Data());
-      ConvCutList->Add(analysisCuts[i]);
-      
-      analysisCuts[i]->SetFillCutHistograms("",kFALSE);
-      analysisCuts[i]->SetAcceptedHeader(HeaderList);
-      analysisMesonCuts[i] = new AliConversionMesonCuts();
-      analysisMesonCuts[i]->InitializeCutsFromCutString(mesonCutArray[i].Data());
-      MesonCutList->Add(analysisMesonCuts[i]);
-      analysisMesonCuts[i]->SetFillCutHistograms("");
-
-//      if ( i < 5){
-//         AliConversionCuts *QACuts = new AliConversionCuts();
-//         QACuts->InitializeCutsFromCutString(cutarray[i].Data());
-//         QACuts->SetFillCutHistograms("",kTRUE);
-//         QACuts->SetAcceptedHeader(HeaderList);
-//         AddQATaskV1(QACuts,IsHeavyIon,kTRUE,kFALSE,IsMC);
-//       }
-
-   }
-   
-   task->SetConversionCutList(numberOfCuts,ConvCutList);
-   task->SetMesonCutList(numberOfCuts,MesonCutList);
-   task->SetMoveParticleAccordingToVertex(kTRUE);
-   task->SetDoMesonAnalysis(kTRUE);
-   task->SetDoMesonQA(kTRUE); //Attention new switch for Pi0 QA
-   task->SetDoPhotonQA(kTRUE);  //Attention new switch small for Photon QA
-   mgr->AddTask(task);
-
-   //connect containers
-   AliAnalysisDataContainer *coutput1 =
-      mgr->CreateContainer("GammaConvV1", TList::Class(),
-                           AliAnalysisManager::kOutputContainer,"GammaConvV1.root");
-   mgr->ConnectInput  (task,  0, cinput );
-   mgr->ConnectOutput (task,  1, coutput1);
-
-   return task;
-}
-
-void ConfigV0ReaderV1(AliV0ReaderV1 *fV0ReaderV1,TString analysiscut="",Int_t IsHeavyIon=0,Bool_t doEtaShift = kFALSE){
-
-   fV0ReaderV1->SetUseOwnXYZCalculation(kTRUE);
-   fV0ReaderV1->SetCreateAODs(kFALSE);// AOD Output
-   fV0ReaderV1->SetUseAODConversionPhoton(kTRUE);
-
-   AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-   if (!mgr) {
-      Error("AddTask_V0ReaderV1", "No analysis manager found.");
-      return;
-   }
-   AliVEventHandler *inputHandler=mgr->GetInputEventHandler();
-
-   if(inputHandler->IsA()==AliESDInputHandler::Class()){
-      // ESD mode
-   }
-
-   // Set AnalysisCut Number
-   AliConversionCuts *fCuts=NULL;
-   if(analysiscut!=""){
-      fCuts= new AliConversionCuts(analysiscut.Data(),analysiscut.Data());
-      if(fCuts->InitializeCutsFromCutString(analysiscut.Data())){
-         if (IsHeavyIon==2){
-            fCuts->DoEtaShift(doEtaShift);
-         }
-         fCuts->SetPreSelectionCutFlag(kTRUE);
-         fV0ReaderV1->SetConversionCuts(fCuts);
-         fCuts->SetFillCutHistograms("",kTRUE);
-      }
-   }
-
-   fV0ReaderV1->Init();
-}
-
-void AddQATaskV1(AliConversionCuts *ConversionCuts, Int_t IsHeavyIon, Bool_t tree, Bool_t histograms, Bool_t IsMCQA){
-
-   //get the current analysis manager
-    AliAnalysisManager *mgr = AliAnalysisManager::GetAnalysisManager();
-    if (!mgr) {
-   Error("AddTask_V0ReaderV1QA", "No analysis manager found.");
-   return 0;
-    }
-    AliAnalysisTaskConversionQA *fQA =
-       new AliAnalysisTaskConversionQA(Form("%s_QA",(ConversionCuts->GetCutNumber()).Data()));
-    fQA->SetConversionCuts(ConversionCuts,IsHeavyIon);
-    fQA->FillType(tree,histograms);
-    fQA->SetIsMC(IsMCQA);
-    mgr->AddTask(fQA);
-
-    AliAnalysisDataContainer *cinput  = mgr->GetCommonInputContainer();
-    AliAnalysisDataContainer *coutput =
-       mgr->CreateContainer(Form("GammaConv_V1QA_%s",(ConversionCuts->GetCutNumber()).Data()), TList::Class(),
-                            AliAnalysisManager::kOutputContainer,Form("GammaConvV1_QAHist_%s.root",(ConversionCuts->GetCutNumber()).Data()));
-
-
-    mgr->ConnectInput(fQA,0,cinput);
-    if(histograms) mgr->ConnectOutput(fQA,  1, coutput);
-
-    if(tree){
-       TString addoutput=gSystem->Getenv("ADD_OUTPUT_FILES");
-       if (addoutput.Length()) addoutput+=",";
-       addoutput+=Form("GammaConvV1_QATree_%s.root",(ConversionCuts->GetCutNumber()).Data());
-       gSystem->Setenv("ADD_OUTPUT_FILES",addoutput.Data());
-       cout<<"Adding addoutput.Data(): "<<Form("GammaConvV1_QATree_%s.root",(ConversionCuts->GetCutNumber()).Data())<<endl;
-    }
-
-}