I have 2 root files from 2 separate simulation and I want only to draw and compare “ParticleEnergy” of the 2 simulation in one Canvas. The idea here it that “ParticleEnergy” is from different particles and I constructed a method to filter only gamma because I want to draw comparison between energy spectrum of gamma entries. I tried to do this but I faced some difficulties that usually the program read and Draw only one root file not both. Any help would be appreciated in this task.
In the attachment are the root file and program used.
I would like to ask about legend to add the description for the Histograms.
I tried to add the following lines in the code and it works correctly but the color of each text of each Histogram inside the legend is not different as I want so where is the problem.