Please read tips for efficient and successful posting and posting code
_ROOT Version: 6.14/04
_Platform: linuxx8664 (Ubuntu 16.04.12)
_Compiler: gcc 5.4.0
Hi,
I am trying to plot histograms from two different ROOT files into the same canvas/pad for several variables, you know as with one signal and background(s). My code is attached herewith. The plots are coming. But, I have some queries:
- In my plots, the stats are for only the signal (or, in the code for nfile=0). But I want to see the stats of the background(s) also. How can I see that? I tried a few things like putting the command “histPhotonPT[nfile]->SetStats(1);” outside the loop with specific values for ‘nfile’ and inside. But with no success.
- How can I set the gridlines to be only from the main tick-marks and NOT also from the sub-ticks? In Logscales it’s looking ugly.
- How can I put the ‘Header’ of the ‘Legend’ inside a box as in the stats-box?
- The last query is regarding a warning I am getting while running the macro in the terminal.
Warning in TROOT::Append: Replacing existing TH1: photon_pt (Potential memory leak).
Warning in TROOT::Append: Replacing existing TH1: photon_energy (Potential memory leak).
What does that mean and how to resolve it?
SampleMacro.C (2.6 KB)
Regards,
Saumyen