Added resolution functionality and plots (Friederike)
authorkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jun 2010 14:00:11 +0000 (14:00 +0000)
committerkaamodt <kaamodt@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 3 Jun 2010 14:00:11 +0000 (14:00 +0000)
PWG4/GammaConv/AliAnalysisTaskGammaConversion.cxx
PWG4/macros/ConfigGammaConversion.C

index 3837b17..271fcb2 100644 (file)
@@ -1330,9 +1330,10 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
          cout<<"Pt of MC particle is negative, this will cause wrong calculation of resPt"<<endl; 
        }
                                
-       fHistograms->FillHistogram("Resolution_dPt", mcpt, resdPt);
+       fHistograms->FillHistogram("Resolution_Gamma_dPt_Pt", mcpt, resdPt);
        fHistograms->FillHistogram("Resolution_MC_Pt", mcpt);
        fHistograms->FillHistogram("Resolution_ESD_Pt", esdpt);
+       fHistograms->FillHistogram("Resolution_Gamma_dPt_Phi", fV0Reader->GetMotherCandidatePhi(), resdPt);
                                
        Double_t resdZ = 0;
        if(fV0Reader->GetNegativeMCParticle()->Vz() != 0){
@@ -1345,7 +1346,100 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
        fHistograms->FillHistogram("Resolution_dZ", fV0Reader->GetNegativeMCParticle()->Vz(), resdZ);
        fHistograms->FillHistogram("Resolution_MC_Z", fV0Reader->GetNegativeMCParticle()->Vz());
        fHistograms->FillHistogram("Resolution_ESD_Z", fV0Reader->GetZ());
-                               
+               
+       // new for dPt_Pt-histograms for Electron and Positron
+       Double_t mcEpt = fV0Reader->GetNegativeMCParticle()->Pt();
+       Double_t resEdPt = 0;
+       if (mcEpt > 0){ 
+               resEdPt = ((fV0Reader->GetNegativeTrackPt()-mcEpt)/mcEpt)*100;
+       }
+       UInt_t statusN = fV0Reader->GetNegativeESDTrack()->GetStatus(); 
+ //    AliESDtrack * negTrk = fV0Reader->GetNegativeESDTrack();
+       UInt_t kTRDoutN =  (statusN & AliESDtrack::kTRDout);
+
+       Int_t ITSclsE= fV0Reader->GetNegativeTracknITSClusters();
+       // filling Resolution_Pt_dPt with respect to the Number of ITS clusters for Positrons
+        switch(ITSclsE){
+         case 0: // 0 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS0", mcEpt, resEdPt);
+           break;
+         case 1:  // 1 ITS cluster
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS1", mcEpt, resEdPt);
+           break;
+         case 2:  // 2 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS2", mcEpt, resEdPt);
+           break;
+         case 3: // 3 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS3", mcEpt, resEdPt);
+           break;
+         case 4: // 4 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS4", mcEpt, resEdPt);
+           break;
+         case 5: // 5 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS5", mcEpt, resEdPt);
+           break;
+         case 6: // 6 ITS clusters
+               fHistograms->FillHistogram("Resolution_E_dPt_Pt_ITS6", mcEpt, resEdPt);
+           break;
+         }
+       //Filling histograms with respect to Electron resolution
+       fHistograms->FillHistogram("Resolution_E_dPt_Pt", mcEpt, resEdPt);
+       fHistograms->FillHistogram("Resolution_E_dPt_Phi", fV0Reader->GetNegativeTrackPhi(), resEdPt);
+       if(kTRDoutN){
+       fHistograms->FillHistogram("Resolution_E_nTRDtracklets_ESDPt", fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDntracklets());
+       fHistograms->FillHistogram("Resolution_E_nTRDtracklets_MCPt", mcEpt, fV0Reader->GetNegativeESDTrack()->GetTRDntracklets());     
+       fHistograms->FillHistogram("Resolution_E_nTRDclusters_ESDPt",fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDncls());
+       fHistograms->FillHistogram("Resolution_E_nTRDclusters_MCPt",mcEpt, fV0Reader->GetNegativeESDTrack()->GetTRDncls());
+       fHistograms->FillHistogram("Resolution_E_TRDsignal_ESDPt", fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDsignal());
+       }
+
+       Double_t mcPpt = fV0Reader->GetPositiveMCParticle()->Pt();
+       Double_t resPdPt = 0;
+       if (mcPpt > 0){ 
+               resPdPt = ((fV0Reader->GetPositiveTrackPt()-mcPpt)/mcPpt)*100;
+       }
+
+       UInt_t statusP = fV0Reader->GetPositiveESDTrack()->GetStatus(); 
+//     AliESDtrack * posTr= fV0Reader->GetPositiveESDTrack();
+       UInt_t kTRDoutP =  (statusP & AliESDtrack::kTRDout);
+       
+       Int_t ITSclsP = fV0Reader->GetPositiveTracknITSClusters();
+       // filling Resolution_Pt_dPt with respect to the Number of ITS clusters for Positrons
+        switch(ITSclsP){
+         case 0: // 0 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS0", mcPpt, resPdPt);
+           break;
+         case 1:  // 1 ITS cluster
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS1", mcPpt, resPdPt);
+           break;
+         case 2:  // 2 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS2", mcPpt, resPdPt);
+           break;
+         case 3: // 3 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS3", mcPpt, resPdPt);
+           break;
+         case 4: // 4 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS4", mcPpt, resPdPt);
+           break;
+         case 5: // 5 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS5", mcPpt, resPdPt);
+           break;
+         case 6: // 6 ITS clusters
+               fHistograms->FillHistogram("Resolution_P_dPt_Pt_ITS6", mcPpt, resPdPt);
+           break;
+         }
+       //Filling histograms with respect to Positron resolution
+       fHistograms->FillHistogram("Resolution_P_dPt_Pt", mcPpt, resPdPt);
+       fHistograms->FillHistogram("Resolution_P_dPt_Phi", fV0Reader->GetPositiveTrackPhi(), resPdPt);
+       if(kTRDoutP){
+       fHistograms->FillHistogram("Resolution_P_nTRDtracklets_ESDPt", fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDntracklets());
+       fHistograms->FillHistogram("Resolution_P_nTRDtracklets_MCPt", mcPpt, fV0Reader->GetPositiveESDTrack()->GetTRDntracklets());
+       fHistograms->FillHistogram("Resolution_P_nTRDclusters_ESDPt",fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDncls());
+       fHistograms->FillHistogram("Resolution_P_nTRDclusters_MCPt",mcPpt, fV0Reader->GetPositiveESDTrack()->GetTRDncls());
+       fHistograms->FillHistogram("Resolution_P_TRDsignal_ESDPt", fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDsignal());
+       }
+
+               
        Double_t resdR = 0;
        if(fV0Reader->GetNegativeMCParticle()->R() != 0){
          resdR = ((fV0Reader->GetXYRadius() - fV0Reader->GetNegativeMCParticle()->R())/fV0Reader->GetNegativeMCParticle()->R())*100;
@@ -1357,8 +1451,8 @@ void AliAnalysisTaskGammaConversion::ProcessV0s(){
        fHistograms->FillHistogram("Resolution_dR", fV0Reader->GetNegativeMCParticle()->R(), resdR);
        fHistograms->FillHistogram("Resolution_MC_R", fV0Reader->GetNegativeMCParticle()->R());
        fHistograms->FillHistogram("Resolution_ESD_R", fV0Reader->GetXYRadius());
-       fHistograms->FillHistogram("Resolution_dR_dPt", resdR, resdPt);
-
+       fHistograms->FillHistogram("Resolution_R_dPt", fV0Reader->GetNegativeMCParticle()->R(), resdPt);
        Double_t resdPhiAbs=0;
        resdPhiAbs=0;
        resdPhiAbs= (fV0Reader->GetMotherCandidatePhi()-fV0Reader->GetNegativeMCParticle()->Phi());
index cf99742..457a66d 100644 (file)
@@ -32,6 +32,7 @@ Bool_t kGCrunCF           = kFALSE;
 Bool_t kGCcalculateBackground = kTRUE;
 Bool_t kGCdoNeutralMesonV0MCCheck =kFALSE;
 Bool_t kGCrunOmegaMeson = kFALSE;
+Bool_t kGCrunRES = kFALSE;
 
 /** ---------------------------------- define cuts here ------------------------------------*/
 
@@ -351,7 +352,7 @@ Bool_t kGCplotResolutiondRAbs  = kTRUE;
 Bool_t kGCplotResolutiondZAbs  = kTRUE;
 Bool_t kGCplotResolutiondPhiAbs  = kTRUE;
 
-Bool_t kGCplotResolutiondRdPt = kFALSE;
+Bool_t kGCplotResolutiondRdPt = kTRUE;
 
 Bool_t kGCplotResolutionMCPt = kTRUE;
 Bool_t kGCplotResolutionMCR  = kTRUE;
@@ -558,9 +559,9 @@ Double_t kGClastYBinMapping = 2;
 Int_t kGCnXBinsResdPt=1000;
 Int_t kGCfirstXBinResdPt= 0;
 Int_t kGClastXBinResdPt=100;
-Int_t kGCnYBinsResdPt=1000;
-Int_t kGCfirstYBinResdPt= -5;
-Int_t kGClastYBinResdPt=5;
+Int_t kGCnYBinsResdPt=500;
+Int_t kGCfirstYBinResdPt= -10;
+Int_t kGClastYBinResdPt=10;
 
 //RESdR
 Int_t kGCnXBinsResdR=500;
@@ -579,15 +580,12 @@ Int_t kGCfirstYBinResdZ= -20;
 Int_t kGClastYBinResdZ=20;
 
 //RESdRdPt
-Int_t kGCnXBinsResdRdPt=440;
-Int_t kGCfirstXBinResdRdPt= -22;
-Int_t kGClastXBinResdRdPt=22;
-Int_t kGCnYBinsResdRdPt=100;
-Int_t kGCfirstYBinResdRdPt= -5;
-Int_t kGClastYBinResdRdPt=5;
+Int_t kGCnYBinsResdRdPt=400;
+Int_t kGCfirstYBinResdRdPt= -10;
+Int_t kGClastYBinResdRdPt=10;
 
 //RESMCPt
-Int_t kGCnXBinsResPt=1000;
+Int_t kGCnXBinsResPt=500;
 Int_t kGCfirstXBinResPt= 0;
 Int_t kGClastXBinResPt=100;
 
@@ -853,7 +851,10 @@ Bool_t scanArguments(TString arguments){
        cout<<"Running CF"<<endl;
        kGCrunCF = kTRUE;
       }
-
+      else if (argument.CompareTo("-run-resolution") == 0){
+       cout<<"Running Resolution"<<endl;
+       kGCrunRES = kTRUE;
+      }
       else if (argument.CompareTo("-jet-off") == 0){
        cout<<"Skipping jet analysis"<<endl;
        kGCrunJet = kFALSE;
@@ -1145,8 +1146,26 @@ AliAnalysisTaskGammaConversion* ConfigGammaConversion(TString arguments, AliAnal
   
   TString outputfile = AliAnalysisManager::GetCommonFileName();
   cout<<"Analyis cut selection ID is: "<<kGCAnalysisCutSelectionId.Data()<<endl;
-  //  outputfile += Form(":PWG4_GammaConversion_%llu",(ULong_t)kGCAnalysisCutSelectionId);
-  outputfile += Form(":PWG4_GammaConversion_%s",kGCAnalysisCutSelectionId.Data());
+  //  outputfile += Form(":PWG4_GammaConversion_%s",kGCAnalysisCutSelectionId.Data());
+  outputfile += Form(":PWG4_GammaConversion_");
+
+  if(kGCrunNeutralMeson==kTRUE) outputfile +="1";  else outputfile +="0";
+
+  if(kGCrunJet==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCrunChic==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCrunCF==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCcalculateBackground==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCdoNeutralMesonV0MCCheck==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCrunOmegaMeson==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  if(kGCrunRES==kTRUE) outputfile +="1"; else outputfile +="0";
+
+  outputfile += Form("_%s",kGCAnalysisCutSelectionId.Data());
 
   cout<<"Ouput file::"<<  outputfile <<endl;
   AliAnalysisDataContainer *coutput2 = mgr->CreateContainer(Form("histogramsAliGammaConversion_%s",kGCAnalysisCutSelectionId.Data()), TList::Class(),AliAnalysisManager::kOutputContainer, outputfile);
@@ -1642,34 +1661,90 @@ void AddHistograms(AliGammaConversionHistograms *histograms){
       histograms->AddMappingHistograms(kGCnPhiIndex,kGCnRIndex,kGCnXBinsMapping,kGCfirstXBinMapping,kGClastXBinMapping,kGCnYBinsMapping,kGCfirstYBinMapping,kGClastYBinMapping);
       //      histograms->AddMappingHistograms(kGCnPhiIndex,kGCnRIndex,kGCnXBinsMapping,kGCminRadius,kGCmaxRadius,kGCnYBinsMapping,kGCminPhi,kGCmaxPhi);
     }
-               
-    if(kGCplotResolutiondRAbs== kTRUE){histograms->AddHistogram("Resolution_dRAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
-    if(kGCplotResolutiondZAbs== kTRUE){histograms->AddHistogram("Resolution_dZAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
-
-    if(kGCplotResolutiondPhiAbs== kTRUE){histograms->AddHistogram("Resolution_dPhiAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR, -TMath::Pi()/30., TMath::Pi()/30., "", "");}
 
-    if(kGCplotResolutiondPt == kTRUE){histograms->AddHistogram("Resolution_dPt" ,"" , kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");}
-    if(kGCplotResolutiondR == kTRUE){histograms->AddHistogram("Resolution_dR" ,"" , kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR, kGCnYBinsResdR, kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
-    if(kGCplotResolutiondZ == kTRUE){histograms->AddHistogram("Resolution_dZ" ,"" , kGCnXBinsResdZ, kGCfirstXBinResdZ, kGClastXBinResdZ, kGCnYBinsResdZ, kGCfirstYBinResdZ, kGClastYBinResdZ, "", "");}
-               
-    if(kGCplotResolutiondRdPt == kTRUE){histograms->AddHistogram("Resolution_dR_dPt" ,"" , kGCnXBinsResdRdPt, kGCfirstXBinResdRdPt, kGClastXBinResdRdPt, kGCnYBinsResdRdPt, kGCfirstYBinResdRdPt, kGClastYBinResdRdPt, "", "");}
-               
-    if(kGCplotResolutionMCPt == kTRUE){histograms->AddHistogram("Resolution_MC_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
-    if(kGCplotResolutionMCR == kTRUE){histograms->AddHistogram("Resolution_MC_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
-    if(kGCplotResolutionMCZ == kTRUE){histograms->AddHistogram("Resolution_MC_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
-               
-    if(kGCplotResolutionESDPt == kTRUE){histograms->AddHistogram("Resolution_ESD_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
-    if(kGCplotResolutionESDR == kTRUE){histograms->AddHistogram("Resolution_ESD_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
-    if(kGCplotResolutionESDZ == kTRUE){histograms->AddHistogram("Resolution_ESD_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
-       
+    //
+    //************************************* Defining Resolution histograms *******************************************************/
+    //
+    // written by Friederike Bock 
+    // contact: Friederike.Bock@cern.ch
+    //
+
+    if(kGCrunRES == kTRUE){
+       //------------------------------------------ Absolute Resolutions --------------------------------------------------------
+    if(kGCplotResolutiondRAbs== kTRUE){
+               histograms->AddHistogram("Resolution_dRAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
+    if(kGCplotResolutiondZAbs== kTRUE){
+               histograms->AddHistogram("Resolution_dZAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR,kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
+    if(kGCplotResolutiondPhiAbs== kTRUE){
+               histograms->AddHistogram("Resolution_dPhiAbs_VS_R","" ,kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR,kGCnYBinsResdR, -TMath::Pi()/30., TMath::Pi()/30., "", "");}
+
+       //------------------------------------------ Relative Resolutions --------------------------------------------------------
+    if(kGCplotResolutiondR == kTRUE){
+               histograms->AddHistogram("Resolution_dR" ,"" , kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR, kGCnYBinsResdR, kGCfirstYBinResdR, kGClastYBinResdR, "", "");}
+    if(kGCplotResolutiondZ == kTRUE){
+               histograms->AddHistogram("Resolution_dZ" ,"" , kGCnXBinsResdZ, kGCfirstXBinResdZ, kGClastXBinResdZ, kGCnYBinsResdZ, kGCfirstYBinResdZ, kGClastYBinResdZ, "", "");}
+
+       //------------------------------------------- Pt vs R ---------------------------------------------------------------------             
+    if(kGCplotResolutiondRdPt == kTRUE){
+               histograms->AddHistogram("Resolution_R_dPt" ,"" , kGCnXBinsResdR, kGCfirstXBinResdR, kGClastXBinResdR, kGCnYBinsResdRdPt, kGCfirstYBinResdRdPt, kGClastYBinResdRdPt, "", "");}
+
+
+       // ------------------------------------------- Reconstruction Plots for Resolution ----------------------------------------             
+    if(kGCplotResolutionMCPt == kTRUE){
+               histograms->AddHistogram("Resolution_MC_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
+    if(kGCplotResolutionMCR == kTRUE){
+               histograms->AddHistogram("Resolution_MC_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
+    if(kGCplotResolutionMCZ == kTRUE){
+               histograms->AddHistogram("Resolution_MC_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
+               
+    if(kGCplotResolutionESDPt == kTRUE){
+               histograms->AddHistogram("Resolution_ESD_Pt" ,"" , kGCnXBinsResPt, kGCfirstXBinResPt, kGClastXBinResPt,"","");}
+    if(kGCplotResolutionESDR == kTRUE){
+               histograms->AddHistogram("Resolution_ESD_R" ,"" , kGCnXBinsResR, kGCfirstXBinResR, kGClastXBinResR,"","");}
+    if(kGCplotResolutionESDZ == kTRUE){
+               histograms->AddHistogram("Resolution_ESD_Z" ,"" , kGCnXBinsResZ, kGCfirstXBinResZ, kGClastXBinResZ,"","");}
+
+       // ------------------------------------------- Plots for specific Gamma Trigger Studies -----------------------------------     
     if(kGCplotResolutionPtdPt = kTRUE){
-       histograms->AddHistogram("Resolution_Gamma_dPt_Pt" ,"" , kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-       histograms->AddHistogram("Resolution_E_dPt_Pt" ,"" , kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-       histograms->AddHistogram("Resolution_P_dPt_Pt" ,"" , kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-       histograms->AddHistogram("Resolution_Gamma_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-       //      histograms->AddHistogram("Resolution_E_dPt_Pt" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-       histograms->AddHistogram("Resolution_P_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
-    }
+               // ::::::::::::::::::::::::::::::::::::::: histograms for gammas ::::::::::::::::::::::::::::::::::::::::::::::::::::::
+               histograms->AddHistogram("Resolution_Gamma_dPt_Pt" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_Gamma_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               
+               // ::::::::::::::::::::::::::::::::::::::: histograms for electrons :::::::::::::::::::::::::::::::::::::::::::::::::::
+               histograms->AddHistogram("Resolution_E_dPt_Pt" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS0" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS1" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS2" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS3" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS4" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_E_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
+               histograms->AddHistogram("Resolution_E_nTRDtracklets_MCPt","" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");   
+               histograms->AddHistogram("Resolution_E_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201,"", "");
+               histograms->AddHistogram("Resolution_E_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201.,"", "");
+               //              histograms->AddHistogram("Resolution_E_TRDsignal_ESDPt","", fV0Reader->GetNegativeTrackPt(), fV0Reader->GetNegativeESDTrack()->GetTRDsignal());
+               
+               // :::::::::::::::::::::::::::::::::::::::: histograms for positrons :::::::::::::::::::::::::::::::::::::::::::::::::::
+               histograms->AddHistogram("Resolution_P_dPt_Pt" ,"" , kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS0" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS1" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS2" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS3" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS4" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS5" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Pt_ITS6" ,"" ,kGCnYBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_dPt_Phi" ,"" , kGCnYBinsResdR, -TMath::Pi(), TMath::Pi(), kGCnYBinsResdPt, kGCfirstYBinResdPt, kGClastYBinResdPt, "", "");
+               histograms->AddHistogram("Resolution_P_nTRDtracklets_ESDPt" ,"" ,kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");   
+               histograms->AddHistogram("Resolution_P_nTRDtracklets_MCPt","", kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 7.5, -0.5, 8.,"", "");
+               histograms->AddHistogram("Resolution_P_nTRDclusters_ESDPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5, -0.5, 201.,"", "");
+               histograms->AddHistogram("Resolution_P_nTRDclusters_MCPt","",kGCnXBinsResdPt, kGCfirstXBinResdPt, kGClastXBinResdPt, 200.5,-0.5, 201.0,"", "");
+               //              histograms->AddHistogram("Resolution_P_TRDsignal_ESDPt", "",fV0Reader->GetPositiveTrackPt(), fV0Reader->GetPositiveESDTrack()->GetTRDsignal());
+    } //end of specific trigger study resolution plots
+    } //end if(kGCrunRES=true)
+    
+    // ___________________________________________________________________________________________________________________________________________________
 
     if(kGCplotESDNumberOfV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfV0s","Number of v0s",100, -0.5, 99.5,"","");}
     if(kGCplotESDNumberOfSurvivingV0s == kTRUE){histograms->AddHistogram("ESD_NumberOfSurvivingV0s","Number of surviving v0s",100, -0.5, 99.5,"","");}
@@ -2116,6 +2191,22 @@ Int_t SetAnalysisCutSelection(TString analysisCutSelection){
 }
 
 
+void string2array(const std::string& number, int a[c_array_size]) 
+{
+    if (number.size() == c_array_size) {
+#define ASSIGNARRAY(i)  a[i] = number[i] - '0'
+        ASSIGNARRAY(0);
+        ASSIGNARRAY(1);
+        ASSIGNARRAY(2);
+        ASSIGNARRAY(3);
+        ASSIGNARRAY(4);
+        ASSIGNARRAY(5);
+        ASSIGNARRAY(6);
+        ASSIGNARRAY(7);
+        ASSIGNARRAY(8);
+        ASSIGNARRAY(9);
+  }
+}