- Fix boundaries for bin labels
authormfasel <mfasel@lbl.gov>
Wed, 27 Aug 2014 08:46:05 +0000 (10:46 +0200)
committermverweij <marta.verweij@cern.ch>
Wed, 27 Aug 2014 09:04:45 +0000 (11:04 +0200)
PWGJE/EMCALJetTasks/UserTasks/AliAnalysisTaskPtEMCalTrigger.cxx

index ef0aba6..31549f0 100644 (file)
@@ -452,7 +452,7 @@ namespace EMCalTriggerPtAnalysis {
                axis.SetTitle(title);
                if(labels){
                        for(int ib = 1; ib <= axis.GetNbins(); ++ib)
-                               axis.SetBinLabel(ib, labels[ib]);
+                               axis.SetBinLabel(ib, labels[ib-1]);
                }
        }
 
@@ -476,7 +476,7 @@ namespace EMCalTriggerPtAnalysis {
                axis.SetTitle(title);
                if(labels){
                        for(int ib = 1; ib <= axis.GetNbins(); ++ib)
-                               axis.SetBinLabel(ib, labels[ib]);
+                               axis.SetBinLabel(ib, labels[ib-1]);
                }
        }