I believe that plot was generated using v2.1.7b.
Each histogram inside the plot was produced using the result of several files. That means, I had 100 files for 0nuDBD, 100 files for micromegas_Th232, etc.
It is usually the case that we end up with several files that we want to plot together …
To do that with TRestAnalysisPlot I used the runTag
of the file to classify the different files into different histograms. The runTag
being 0nBB, micromegas_Th232, etc. This might also be similar with experimental data, the run Tag could be something like Calibration_Fe55, Calibration_Cd109, LongBackground, etc.
We could perhaps think of classifying it using also other members of TRestRun if needed.
Then, I was using restPlots
providing a list with many files using the file pattern.
restPlots --c config.rml --f "RunXX*_PandaXIII_nudbd*" --f "RunXX_PandaXIII_micromegas*"
Then, TRestAnalysisPlot would get a list of 400-500 files that would classify into 5 histograms using the runTag of each file.
Said that, why we would use a fromFile
inside the histo
statement? The idea is to use TRestAnalysisPlot
to be able to plot a set of generated REST files and combine them.
So that we give all the files through argument, and we decide how to classify them. The case I described is by runTag
, but I imagine I could be interested to plot separately 2 run numbers, that are at the same time several files with a sub-run number.
Then, we would need a parameter to decide which is the TRestRun member used to classify/fill the histograms.
Again, this is already done for runTag
. It will take all the files, and create independent lists with the names of files with common runTag
.
xxxxx
Edit: We do not need several sections to create several histograms of the same variable.
xxxxx
We could have another parameter.
<parameter name="classifyBy" value="fRunTag" />
or
<parameter name="classifyBy" value="fRunNumber" />
xxxxxx
Edit : We might be willing to avoid classifying and that all files are merged at our will. Using for example.
<parameter name="classifyBy" value="none" />
xxxxxxx
So that we could also give a bunch of files from runNumber=X and runNumber=Y, and it would combine several files from runNumber=X and runNumber=Y and create 2 histograms using the variable defined inside <histo>
.
However, the original topic of this thread was about something different. Was about the possibility to define several histograms with different cuts on the same observable inside the same plot.