Plots using MakeClass method

Hello I have a header file and a loop file which were created using makeclass (See attached files). How can I plot vx? Thank you.

mc_tracks.C (1.5 KB)
mc_tracks.h (6.3 KB)

for (int i = 0; i < vx->size(); i++) histo->Fill(vx->at(i));
1 Like

What if I want to plot vz Vs vx? Can I plot that on a histogram? Thank you.

TH2F *histo2 = new TH2F("histo2", "title", 40, 0., 20., 40, 0., 20.);
// ...
int imax = TMath::Min(vx->size(), vz->size()); // just a precaution
for (int i = 0; i < imax; i++) histo2->Fill(vx->at(i), vz->at(i));
1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.