- set X titles in the task, so that the canvases can be filled in loops in the macro
authorkkanaki <kkanaki@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Apr 2011 13:09:27 +0000 (13:09 +0000)
committerkkanaki <kkanaki@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Apr 2011 13:09:27 +0000 (13:09 +0000)
HLT/QA/tasks/AliAnalysisTaskHLT.cxx
HLT/QA/tasks/macros/drawGlobalESDHistograms.C

index c93c6ed..653f938 100644 (file)
@@ -225,35 +225,35 @@ void AliAnalysisTaskHLT::UserCreateOutputObjects(){
 
   if(fBeamType.Contains("Pb")){
      fMultOff  = new TH1F("fMult_off", "",200,0,2000);
-     fMultHLT  = new TH1F("fMult_hlt", "TPC track multiplicity",200,0,2000);     
+     fMultHLT  = new TH1F("fMult_hlt", "TPC track multiplicity",200,0,2000); fMultHLT->SetXTitle("TPC track multiplicity");  
      fNcontOff = new TH1F("fNcont_off","",200,0,2000);
-     fNcontHLT = new TH1F("fNcont_hlt","# of contributors",200,0,2000);     
-     fV0cent   = new TH1F("fV0cent",   "V0 centrality",    100,0, 100);
+     fNcontHLT = new TH1F("fNcont_hlt","# of contributors",200,0,2000); fNcontHLT->SetXTitle("# of contributors");  
+     fV0cent   = new TH1F("fV0cent",   "V0 centrality",    100,0, 100); fV0cent->SetXTitle("V0 centrality");
   } 
   else {
      fMultOff = new TH1F("fMult_off","",200,0,200);
-     fMultHLT = new TH1F("fMult_hlt","TPC track multiplicity",200,0,200);    
+     fMultHLT = new TH1F("fMult_hlt","TPC track multiplicity",200,0,200); fMultHLT->SetXTitle("TPC track multiplicity");     
      fNcontOff = new TH1F("fNcont_off","",200,0,200);
-     fNcontHLT = new TH1F("fNcont_hlt","# of contributors",200,0,200);
+     fNcontHLT = new TH1F("fNcont_hlt","# of contributors",200,0,200); fNcontHLT->SetXTitle("# of contributors");
   }
    
   fXvertexOff = new TH1F("fXvertex_off","",200,-0.5,0.5);
-  fXvertexHLT = new TH1F("fXvertex_hlt","X primary vertex",200,-0.5,0.5);
+  fXvertexHLT = new TH1F("fXvertex_hlt","X primary vertex",200,-0.5,0.5); fXvertexHLT->SetXTitle("x (cm)");
  
   fYvertexOff = new TH1F("fYvertex_off","",200,-0.5,0.5);
-  fYvertexHLT = new TH1F("fYvertex_hlt","Y primary vertex",200,-0.5,0.5);
+  fYvertexHLT = new TH1F("fYvertex_hlt","Y primary vertex",200,-0.5,0.5); fYvertexHLT->SetXTitle("y (cm)");
  
   fZvertexOff = new TH1F("fZvertex_off","",100,-20,20);
-  fZvertexHLT = new TH1F("fZvertex_hlt","Z primary vertex",100,-20,20);
+  fZvertexHLT = new TH1F("fZvertex_hlt","Z primary vertex",100,-20,20); fZvertexHLT->SetXTitle("z (cm)");
 
   fSPDXvertexOff = new TH1F("fSPDXvertex_off","",200,-0.5,0.5);
-  fSPDXvertexHLT = new TH1F("fSPDXvertex_hlt","X SPD primary vertex",200,-0.5,0.5);
+  fSPDXvertexHLT = new TH1F("fSPDXvertex_hlt","X SPD primary vertex",200,-0.5,0.5); fSPDXvertexHLT->SetXTitle("x (cm)");
  
   fSPDYvertexOff = new TH1F("fSPDYvertex_off","",200,-0.5,0.5);
-  fSPDYvertexHLT = new TH1F("fSPDYvertex_hlt","Y SPD primary vertex",200,-0.5,0.5);
+  fSPDYvertexHLT = new TH1F("fSPDYvertex_hlt","Y SPD primary vertex",200,-0.5,0.5); fSPDYvertexHLT->SetXTitle("y (cm)");
  
   fSPDZvertexOff = new TH1F("fSPDZvertex_off","",100,-20,20);
-  fSPDZvertexHLT = new TH1F("fSPDZvertex_hlt","Z SPD primary vertex",100,-20,20);
+  fSPDZvertexHLT = new TH1F("fSPDZvertex_hlt","Z SPD primary vertex",100,-20,20); fSPDZvertexHLT->SetXTitle("z (cm)");
     
   fEventSpecieOff = new TH1F("fEventSpecie_off","",18, 0, 18);
   fEventSpecieHLT = new TH1F("fEventSpecie_hlt","event species",18, 0, 18);
@@ -261,37 +261,37 @@ void AliAnalysisTaskHLT::UserCreateOutputObjects(){
   //============== track properties =================//
 
   fChargeOff = new TH1F("fCharge_off", "", 3, -1.5, 1.5);  
-  fChargeHLT = new TH1F("fCharge_hlt", "charge distribution", 3, -1.5, 1.5);  
+  fChargeHLT = new TH1F("fCharge_hlt", "charge distribution", 3, -1.5, 1.5); fChargeHLT->SetXTitle("polarity");
   
   fMomentumOff = new TH1F("fMomentum_off", "", 100, 0, 10);
-  fMomentumHLT = new TH1F("fMomentum_hlt", "transverse momentum", 100, 0, 10);
+  fMomentumHLT = new TH1F("fMomentum_hlt", "transverse momentum", 100, 0, 10); fMomentumHLT->SetXTitle("p_{T} (GeV/c)");
  
   fDCArOff = new TH1F("fDCAr_off", "", 200, -15, 15);
-  fDCArHLT = new TH1F("fDCAr_hlt", "DCAr", 200, -15, 15);
+  fDCArHLT = new TH1F("fDCAr_hlt", "DCAr", 200, -15, 15); fDCArHLT->SetXTitle("DCAr (cm)");
 
   fDCAzOff = new TH1F("fDCAz_off", "", 200, -15, 15);
-  fDCAzHLT = new TH1F("fDCAz_hlt", "DCAz", 200, -15, 15);
+  fDCAzHLT = new TH1F("fDCAz_hlt", "DCAz", 200, -15, 15); fDCAzHLT->SetXTitle("DCAz (cm)");
  
   fNclusterOff = new TH1F("fNcluster_off","", 200, 0, 200);
-  fNclusterHLT = new TH1F("fNcluster_hlt","TPC clusters/track", 200, 0, 200);
+  fNclusterHLT = new TH1F("fNcluster_hlt","TPC clusters/track", 200, 0, 200); fNclusterHLT->SetXTitle("TPC clusters/track");
 
   fNITSclusterOff = new TH1F("fNITScluster_off","", 10, 0, 10);
-  fNITSclusterHLT = new TH1F("fNITScluster_hlt","ITS clusters/track", 10, 0, 10);
+  fNITSclusterHLT = new TH1F("fNITScluster_hlt","ITS clusters/track", 10, 0, 10); fNITSclusterHLT->SetXTitle("ITS clusters/track");
  
   fPhiOff = new TH1F("fPhi_off","",90,0,360);
-  fPhiHLT = new TH1F("fPhi_hlt","azimuthal angle",90,0,360);
+  fPhiHLT = new TH1F("fPhi_hlt","azimuthal angle",90,0,360); fPhiHLT->SetXTitle("#phi (deg)");
 
   fEtaOff = new TH1F("fEta_off","",100,-2,2);
-  fEtaHLT = new TH1F("fEta_hlt","pseudorapidity",100,-2,2);
+  fEtaHLT = new TH1F("fEta_hlt","pseudorapidity",100,-2,2); fEtaHLT->SetXTitle("#eta");
   
-  fChargeHLTcut      = new TH1F("fCharge_hltcut",     "",  3, -1.5, 1.5);  
-  fMomentumHLTcut    = new TH1F("fMomentum_hltcut",   "",100,    0,  10); 
-  fDCArHLTcut        = new TH1F("fDCAr_hltcut",       "",200,  -15,  15);
-  fDCAzHLTcut        = new TH1F("fDCAz_hltcut",       "",200,  -15,  15);
-  fNclusterHLTcut    = new TH1F("fNcluster_hltcut",   "",200,    0, 200);
-  fNITSclusterHLTcut = new TH1F("fNITScluster_hltcut","", 10,    0,  10); 
-  fPhiHLTcut         = new TH1F("fPhi_hltcut",        "", 90,    0, 360);
-  fEtaHLTcut         = new TH1F("fEta_hltcut",        "",100,   -2,   2);
+  fChargeHLTcut      = new TH1F("fCharge_hltcut",     "",  3, -1.5, 1.5);  fChargeHLTcut->SetXTitle("polarity");   
+  fMomentumHLTcut    = new TH1F("fMomentum_hltcut",   "",100,    0,  10);  fMomentumHLTcut ->SetXTitle("p_{T} (GeV/c)");  
+  fDCArHLTcut        = new TH1F("fDCAr_hltcut",       "",200,  -15,  15);  fDCArHLTcut->SetXTitle("DCAr (cm)");       
+  fDCAzHLTcut        = new TH1F("fDCAz_hltcut",       "",200,  -15,  15);  fDCAzHLTcut->SetXTitle("DCAz (cm)");      
+  fNclusterHLTcut    = new TH1F("fNcluster_hltcut",   "",200,    0, 200);  fNclusterHLTcut->SetXTitle("TPC clusters/track");   
+  fNITSclusterHLTcut = new TH1F("fNITScluster_hltcut","", 10,    0,  10);  fNITSclusterHLTcut->SetXTitle("ITS clusters/track");
+  fPhiHLTcut         = new TH1F("fPhi_hltcut",        "", 90,    0, 360);  fPhiHLTcut->SetXTitle("#phi (deg)");    
+  fEtaHLTcut         = new TH1F("fEta_hltcut",        "",100,   -2,   2);  fEtaHLTcut->SetXTitle("#eta");           
 
   //--------------------------------------------------//
   
index 3869f75..dcfba46 100644 (file)
@@ -72,265 +72,95 @@ void drawGlobalESDHistograms(const char* filename="HLT-OFFLINE-GLOBAL-comparison
  folder.ReplaceAll(",","_");
  gSystem->Exec("mkdir "+folder); // create a folder whose name contains run number and date of run
 
- TCanvas *c1 = new TCanvas("c1","track properties HLT vs. OFF",1200,700);
+ const static int sizeTrack=8;
+ const char *trackHLT[sizeTrack]={"fMomentum_hlt","fNcluster_hlt","fEta_hlt","fPhi_hlt","fDCAr_hlt","fDCAz_hlt","fCharge_hlt","fNITScluster_hlt"};
+ const char *trackOFF[sizeTrack]={"fMomentum_off","fNcluster_off","fEta_off","fPhi_off","fDCAr_off","fDCAz_off","fCharge_off","fNITScluster_off"};
+ const char *trackHLTcut[sizeTrack]={"fMomentum_hltcut","fNcluster_hltcut","fEta_hltcut","fPhi_hltcut","fDCAr_hltcut","fDCAz_hltcut","fCharge_hltcut","fNITScluster_hltcut"};
+
+ const static int sizeEvent=9;
+ const char *eventHLT[sizeEvent]={"fXvertex_hlt","fYvertex_hlt","fZvertex_hlt","fSPDXvertex_hlt","fSPDYvertex_hlt","fSPDZvertex_hlt","fMult_hlt","fNcont_hlt","fV0cent"};
+ const char *eventOFF[sizeEvent]={"fXvertex_off","fYvertex_off","fZvertex_off","fSPDXvertex_off","fSPDYvertex_off","fSPDZvertex_off","fMult_off","fNcont_off","fV0cent"};
+
+ TCanvas *c1 = new TCanvas("c1","track properties HLT vs. OFF",1250,700);
  c1->Divide(4,2);
 
  TH1F *h1 = NULL;
  TH1F *h2 = NULL;
-
-
- h1 = (TH1F*)list->FindObject("fMomentum_hlt"); if(!h1) { printf("Empty histogram fMomentum_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fMomentum_off"); if(!h2) { printf("Empty histogram fMomentum_off\n"); return; }
- h1->SetXTitle("p_{t} (GeV/c)"); 
-
- c1->cd(1);
- plot(h1,h2);
-
- TLegend *leg1 = new TLegend(0.6,0.2,0.8,0.5);
- leg1->SetFillColor(10);
- leg1->SetLineColor(10);
- leg1->AddEntry(h1,"HLT", "l");
- leg1->AddEntry(h2,"OFF", "l");
- leg1->Draw("same");
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fNcluster_hlt"); if(!h1) { printf("Empty histogram fNcluster_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fNcluster_off"); if(!h2) { printf("Empty histogram fNcluster_off\n"); return; }
- h1->SetXTitle("TPC clusters per track");
-
- c1->cd(2);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fEta_hlt"); if(!h1) { printf("Empty histogram fEta_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fEta_off"); if(!h2) { printf("Empty histogram fEta_off\n"); return; }
- h1->SetXTitle("#eta");
-
- c1->cd(3);
- plot(h1,h2);
-
-//-------------------------------------------------
-
- h1 = (TH1F*)list->FindObject("fPhi_hlt"); if(!h1) { printf("Empty histogram fPhi_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fPhi_off"); if(!h2) { printf("Empty histogram fPhi_off\n"); return; }
- h1->SetXTitle("#phi (deg)");
-
- c1->cd(4);
- plot(h1,h2);
-
-//-------------------------------------------------
-
- h1 = (TH1F*)list->FindObject("fDCAr_hlt"); if(!h1) { printf("Empty histogram fDCAr_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fDCAr_off"); if(!h2) { printf("Empty histogram fDCAr_off\n"); return; }
- h1->SetXTitle("DCAr (cm)");
  
- c1->cd(5);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fDCAz_hlt"); if(!h1) { printf("Empty histogram fDCAz_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fDCAz_off"); if(!h2) { printf("Empty histogram fDCAz_off\n"); return; }
- h1->SetXTitle("DCAz (cm)");
- c1->cd(6);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fCharge_hlt"); if(!h1) { printf("Empty histogram fCharge_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fCharge_off"); if(!h2) { printf("Empty histogram fCharge_off\n"); return; }
-
- c1->cd(7);
- plot(h1,h2);
-
-//------------------------------------------------- 
- h1 = (TH1F*)list->FindObject("fNITScluster_hlt"); if(!h1) { printf("Empty histogram fNITScluster_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fNITScluster_off"); if(!h2) { printf("Empty histogram fNITScluster_off\n"); return; }
- h1->SetXTitle("ITS clusters per track");
-
- c1->cd(8);
- plot(h1,h2);
-
-//============= TRACK PROPERTIES WITH CUTS ===============//
+ for(int i=0;i<sizeTrack;i++){
+     c1->cd(i+1);
+     h1 = (TH1F*)list->FindObject(trackHLT[i]); if(!h1) { return; }
+     h2 = (TH1F*)list->FindObject(trackOFF[i]); if(!h2) { return; }
+     plot(h1,h2);
+     if(i==0){
+        TLegend *leg1 = new TLegend(0.6,0.2,0.8,0.5);
+        leg1->SetFillColor(10);
+        leg1->SetLineColor(10);
+        leg1->AddEntry(h1,"HLT", "l");
+        leg1->AddEntry(h2,"OFF", "l");
+        leg1->Draw("same");
+     }
+ }
 
  TCanvas *c4 = new TCanvas("c4","HLT track properties with and w/o cuts",1250,700);
  c4->Divide(4,2);
-
- h1 = (TH1F*)list->FindObject("fMomentum_hlt");    if(!h1) { printf("Empty histogram fMomentum_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fMomentum_hltcut"); if(!h2) { printf("Empty histogram fMomentum_hltcut\n"); return; }
- h1->SetXTitle("p_{t} (GeV/c)"); 
-
- c4->cd(1);
- plot(h1,h2);
-
-
- TPaveText *pave = new TPaveText(2.1,24000,8.3,31600);
- pave->SetFillColor(kWhite);
- pave->SetLineColor(kWhite);
- pave->SetShadowColor(kWhite);
- TString tmp=cuts->GetTitle();
- pave->SetTextColor(2);
- pave->AddText(tmp);
- pave->SetTextFont(42);
- pave->SetTextSize(0.04);
- pave->Draw();
- c4->Update();
-
-
-//------------------------------------------------- 
- h1 = (TH1F*)list->FindObject("fNcluster_hlt");    if(!h1) { printf("Empty histogram fNcluster_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fNcluster_hltcut"); if(!h2) { printf("Empty histogram fNcluster_hltcut\n"); return; }
- h1->SetXTitle("TPC clusters per track");
-
- c4->cd(2);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fEta_hlt");    if(!h1) { printf("Empty histogram fEta_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fEta_hltcut"); if(!h2) { printf("Empty histogram fEta_hltcut\n"); return; }
- h1->SetXTitle("#eta");
-
- c4->cd(3);
- plot(h1,h2);
-
-//-------------------------------------------------
-
- h1 = (TH1F*)list->FindObject("fPhi_hlt");    if(!h1) { printf("Empty histogram fPhi_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fPhi_hltcut"); if(!h2) { printf("Empty histogram fPhi_hltcut\n"); return; }
- h1->SetXTitle("#phi (deg)");
-
- c4->cd(4);
- plot(h1,h2);
-
-//-------------------------------------------------
-
- h1 = (TH1F*)list->FindObject("fCharge_hlt");    if(!h1) { printf("Empty histogram fCharge_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fCharge_hltcut"); if(!h2) { printf("Empty histogram fCharge_hltcut\n"); return; }
- h1->SetXTitle("polarity"); 
-
- c4->cd(5);
- plot(h1,h2);
-
-//------------------------------------------------- 
- h1 = (TH1F*)list->FindObject("fNITScluster_hlt");    if(!h1) { printf("Empty histogram fNITScluster_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fNITScluster_hltcut"); if(!h2) { printf("Empty histogram fNITScluster_hltcut\n"); return; }
- h1->SetXTitle("ITS clusters per track");
-
- c4->cd(6);
- plot(h1,h2);
-
-//------------------------------------------------- 
  
- h1 = (TH1F*)list->FindObject("fDCAr_hlt");    if(!h1) { printf("Empty histogram fDCAr_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fDCAr_hltcut"); if(!h2) { printf("Empty histogram fDCAr_hltcut\n"); return; }
- h1->SetXTitle("DCAr (cm)");
-
- c4->cd(7);
- plot(h1,h2);
-
-//------------------------------------------------- 
- h1 = (TH1F*)list->FindObject("fDCAz_hlt");    if(!h1) { printf("Empty histogram fDCAz_hlt\n");    return; }
- h2 = (TH1F*)list->FindObject("fDCAz_hltcut"); if(!h2) { printf("Empty histogram fDCAz_hltcut\n"); return; }
- h1->SetXTitle("DCAr (cm)");
-
- c4->cd(8);
- plot(h1,h2);
-
-//============= EVENT PROPERTIES ===============//
+ for(int i=0;i<sizeTrack;i++){
+     c4->cd(i+1);
+     h1 = (TH1F*)list->FindObject(trackHLT[i]);    if(!h1) { return; }
+     h2 = (TH1F*)list->FindObject(trackHLTcut[i]); if(!h2) { return; }
+     plot(h1,h2);
+     if(i==0){
+       TPaveText *pave = new TPaveText(2.1,24000,8.3,31600);
+       pave->SetFillColor(kWhite);
+       pave->SetLineColor(kWhite);
+       pave->SetShadowColor(kWhite);
+       TString tmp=cuts->GetTitle();
+       pave->SetTextColor(2);
+       pave->AddText(tmp);
+       pave->SetTextFont(42);
+       pave->SetTextSize(0.04);
+       pave->Draw();
+       c4->Update();
+     }
+ }
 
  TCanvas *c2 = new TCanvas("c2","vertex event properties",1200,700);
  c2->Divide(3,2);
-
- h1 = (TH1F*)list->FindObject("fXvertex_hlt"); if(!h1) { printf("Empty histogram fXvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fXvertex_off"); if(!h2) { printf("Empty histogram fXvertex_off\n"); return; }
- h1->SetXTitle("x (cm)");
-
- c2->cd(1);
- plot(h1,h2);
- leg1->Draw("same");
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fYvertex_hlt"); if(!h1) { printf("Empty histogram fYvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fYvertex_off"); if(!h2) { printf("Empty histogram fYvertex_off\n"); return; }
- h1->SetXTitle("y (cm)");
  
- c2->cd(2);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fZvertex_hlt"); if(!h1) { printf("Empty histogram fZvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fZvertex_off"); if(!h2) { printf("Empty histogram fZvertex_off\n"); return; }
- h1->SetXTitle("z (cm)");
-
- c2->cd(3);
- plot(h1,h2);
-
-//------------------------------------------------- 
- h1 = (TH1F*)list->FindObject("fSPDXvertex_hlt"); if(!h1) { printf("Empty histogram fSPDXvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fSPDXvertex_off"); if(!h2) { printf("Empty histogram fSPDXvertex_off\n"); return; }
- h1->SetXTitle("x (cm)");
-
- c2->cd(4);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fSPDYvertex_hlt"); if(!h1) { printf("Empty histogram fSPDYvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fSPDYvertex_off"); if(!h2) { printf("Empty histogram fSPDYvertex_off\n"); return; }
- h1->SetXTitle("y (cm)");
- c2->cd(5);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fSPDZvertex_hlt"); if(!h1) { printf("Empty histogram fSPDZvertex_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fSPDZvertex_off"); if(!h2) { printf("Empty histogram fSPDZvertex_off\n"); return; }
- h1->SetXTitle("z (cm)");
-
- c2->cd(6);
- plot(h1,h2);
-
-//------------------------------------------------- 
+ for(int i=0;i<6;i++){
+     c2->cd(i+1);
+     h1 = (TH1F*)list->FindObject(eventHLT[i]); if(!h1) { return; }
+     h2 = (TH1F*)list->FindObject(eventOFF[i]); if(!h2) { return; }
+     plot(h1,h2);
+     if(i==0){
+        TLegend *leg1 = new TLegend(0.6,0.2,0.8,0.5);
+        leg1->SetFillColor(10);
+        leg1->SetLineColor(10);
+        leg1->AddEntry(h1,"HLT", "l");
+        leg1->AddEntry(h2,"OFF", "l");
+        leg1->Draw("same");
+     }
+ }
 
  TCanvas *c3 = new TCanvas("c3","general event properties",1200,500);
  c3->Divide(3,1);
 
- h1 = (TH1F*)list->FindObject("fMult_hlt"); if(!h1) { printf("Empty histogram fMult_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fMult_off"); if(!h2) { printf("Empty histogram fMult_off\n"); return; }
-
- c3->cd(1);
- plot(h1,h2);
- leg1->Draw("same");
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fNcont_hlt"); if(!h1) { printf("Empty histogram fNcont_hlt\n"); return; }
- h2 = (TH1F*)list->FindObject("fNcont_off"); if(!h2) { printf("Empty histogram fNcont_off\n"); return; }
-
- c3->cd(2);
- plot(h1,h2);
-
-//------------------------------------------------- 
-
- h1 = (TH1F*)list->FindObject("fV0cent"); if(!h1) { printf("Empty histogram fV0cent\n"); return; }
- c3->cd(3);
- h1->Draw();
- printStats(h1);
-
-//------------------------------------------------- 
-
+ for(int i=6;i<9;i++){
+     c3->cd(i-5);
+     h2 = (TH1F*)list->FindObject(eventOFF[i]); if(!h2) { return; }
+     h1 = (TH1F*)list->FindObject(eventHLT[i]); if(!h1) { return; }
+     plot(h1,h2);
+     if(i==6){
+        TLegend *leg1 = new TLegend(0.6,0.2,0.8,0.5);
+        leg1->SetFillColor(10);
+        leg1->SetLineColor(10);
+        leg1->AddEntry(h1,"HLT", "l");
+        leg1->AddEntry(h2,"OFF", "l");
+        leg1->Draw("same");
+     }
+ }
  c1->SaveAs(folder+"/track_properties.png");  
  c1->SaveAs(folder+"/track_properties.root");  
  c2->SaveAs(folder+"/vertex_event_properties.png");  
@@ -340,10 +170,9 @@ void drawGlobalESDHistograms(const char* filename="HLT-OFFLINE-GLOBAL-comparison
  c4->SaveAs(folder+"/HLT_track_properties_cuts.png");  
  c4->SaveAs(folder+"/HLT_track_properties_cuts.root");  
  return;       
-}
+ }
 
-void printStats(TH1F* h1, TH1F* h2){  
-  
+void printStats(TH1F* h1, TH1F* h2){    
   gPad->Update();
   TPaveStats *st1 = (TPaveStats*)h1->FindObject("stats"); if(!st1) { printf("TPaveStats st1 is 0x0\n"); return; }      
   st1->SetLineColor(0);