Closed athompson-git closed 6 years ago
hey @athompson-tamu it looks like the object TH1F_scaled
doesn't point to an actual histogram. Can you check what it is pointing to and how it's created? I'm not familiar enough to answer this right now, but I can look into it in a few days
Taking a look - +@rymuelle if he's more familiar
Found the culprit for the first 3 errors. In Step2 the histograms are called by name to do the comparison, for example "TH1F_sta_trk_delta_phi", but the actual names of the 1D histograms in the input files are named with capital letters: "TH1F_sta_TRK_delta_phi". I think the best way to fix this is to conform to the all-lowercase convention, since most of the TH1F's use all-lowercase; this means changing TH1F_sta_trk_delta_phi*
in histograms.py and recoMuonLoop.py (and anywhere else the capital TRK naming is used).
TH1F_scaled gets called like this:
def make1D(TH1F_name):
...
TH1F_scaled = file.Get(TH1F_name)
where this particular name is passed from Step2_makeProfiles.py:
make1D("TH1F_sta_trk_delta_phi")
Each file
is called from a fileList
is eventually declared at the start of the file with the user inputs. The file inputs are declared from Step1_make_2d_plots.py, which has its histograms defined in histograms.py:
#phi TRK
TH1F_sta_TRK_delta_phi_barrel = TH1F("TH1F_sta_TRK_delta_phi_barrel", "(#phi_{TRK}-#phi_{STA})/#phi_{GLB Error} |#eta| < 0.9; #delta #phi",phiResBins, phiResMin, phiResMax )
So the names that get called in make1D() need to inherit from the same names in histograms.py.
As for the last error, glb_sta_pt_v_ptRes
is not found because it does not exist in histograms.py like its cousins glb_sta_phi_v_ptRes
and glb_sta_eta_v_ptRes
.
I can try to put in a PR to fix the issues above.
Going back to the other issue that I mentioned in post # 1, here's an example of how two of the same plots disagree between the Step1_make_2d_plots_histogrammar.py and Step1_make_2d_plots.py workflows, respectively:
Another example:
Which branch are you on?
FTR this is 10_0_X branch
is this fixed by #10 or are there are things that are still incorrect?
My PR was merged and addressed the crashes, but the second issue I mention is still open:
Additionally, if I try an alternate workflow of using Step1_make_2d_plots_histogrammar.py instead for Step 1, I don't run into any crashes but the plots that I get in the end show much different results than the workflow above. Everything from the means and widths of the distributions to the data ranges disagree, and the displays are nonsensical when compared with Step1_make_2d_plots.py which I have historically used.
(see plot comparisons in the above comments)
okay, so Step1_make_2d_plots_histogrammar.py
is still producing something completely different from Step1_make_2d_plots.py
, correct?
That's correct
Ok so, I am going to close this issue and reopen the second issue.
The histogram comparison
glb_sta_pt_v_ptRes_gaus_mean
fails to plot when running the ordinary workflow of performance plots. That is, by first using Step1_make_2d_plots.py to create ROOT files and then running Step2_makeProfiles.py to run the comparison, Step2_makeProfiles.py fails with the following stack trace:
The python also fails on
TH1F_sta_trk_delta_phi_barrel
,TH1F_sta_trk_delta_phi_endcap
for the same reason. In addition,glb_sta_pt_v_ptRes
also fails creation with the following trace:Additionally, if I try an alternate workflow of using Step1_make_2d_plots_histogrammar.py instead for Step 1, I don't run into any crashes but the plots that I get in the end show much different results than the workflow above. Everything from the means and widths of the distributions to the data ranges disagree, and the displays are nonsensical when compared with Step1_make_2d_plots.py which I have historically used.