]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
On the fly calculation of the ranges for the 2d efficiency plots
authorpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 May 2009 11:49:44 +0000 (11:49 +0000)
committerpchrist <pchrist@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 28 May 2009 11:49:44 +0000 (11:49 +0000)
PWG2/SPECTRA/macros/drawProtonQAResults.C

index 74a85a7511a45e9214d9bd7918056f380135439a..0b05b8f6aa6efb84fdd57e8535087924e5dcfc3f 100644 (file)
@@ -2996,22 +2996,28 @@ void draw2DEfficiency(const char *analysisMode = "TPC",
   switch(projection) {
     case "yx":
       gId->GetZaxis()->SetRangeUser(90,100);
-      h->GetXaxis()->SetRangeUser(-0.6,0.6);
-      h->GetYaxis()->SetRangeUser(0.4,1.0);
+      h->GetXaxis()->SetRangeUser(gHistESDInitYPtProtons->GetXaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetXaxis()->GetXmax());
+      h->GetYaxis()->SetRangeUser(gHistESDInitYPtProtons->GetYaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetYaxis()->GetXmax());
       h->GetXaxis()->SetTitle(gId->GetXaxis()->GetTitle());
       h->GetYaxis()->SetTitle(gId->GetYaxis()->GetTitle());
       break;
     case "zx":
       gId->GetZaxis()->SetRangeUser(0,100);
-      h->GetXaxis()->SetRangeUser(-0.6,0.6);
-      h->GetYaxis()->SetRangeUser(0.,210.0);
+      h->GetXaxis()->SetRangeUser(gHistESDInitYPtProtons->GetXaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetXaxis()->GetXmax());
+      h->GetYaxis()->SetRangeUser(gHistESDInitYPtProtons->GetZaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetZaxis()->GetXmax());
       h->GetXaxis()->SetTitle(gId->GetXaxis()->GetTitle());
       h->GetYaxis()->SetTitle(gId->GetYaxis()->GetTitle());
       break;
     case "zy":
       gId->GetZaxis()->SetRangeUser(0,100);
-      h->GetXaxis()->SetRangeUser(0.4,1.0);
-      h->GetYaxis()->SetRangeUser(0.,210.);
+      h->GetXaxis()->SetRangeUser(gHistESDInitYPtProtons->GetYaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetYaxis()->GetXmax());
+      h->GetYaxis()->SetRangeUser(gHistESDInitYPtProtons->GetZaxis()->GetXmin(),
+                                 gHistESDInitYPtProtons->GetZaxis()->GetXmax());
       h->GetXaxis()->SetTitle(gId->GetXaxis()->GetTitle());
       h->GetYaxis()->SetTitle(gId->GetYaxis()->GetTitle());
       break;