From a7ab90ff80d1cb5ed024f5312a74834ee2597823 Mon Sep 17 00:00:00 2001 From: Chad Lantz <clantz2@illinois.edu> Date: Tue, 5 May 2020 11:44:13 -0500 Subject: [PATCH] Updated for new data structure --- Analysis/plotHisto.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Analysis/plotHisto.cc b/Analysis/plotHisto.cc index dacfda2..9f37658 100644 --- a/Analysis/plotHisto.cc +++ b/Analysis/plotHisto.cc @@ -21,7 +21,7 @@ int main(int argc, char *argv[]){ if(name.find(".") != string::npos) name.erase( name.find_last_of(".") ); TTree *t = (TTree*)f->Get("lightGuide"); - double x,z; + vector<double> *x=0,*z=0; t->SetBranchAddress("X",&x); t->SetBranchAddress("Z",&z); @@ -31,7 +31,10 @@ int main(int argc, char *argv[]){ int nEvents = t->GetEntries(); for(int ev = 0; ev < nEvents; ev++){ t->GetEntry(ev); - h->Fill(z,x); + int nPoints = x->size(); + for(int i = 0; i < nPoints; i++){ + h->Fill(z->at(i),x->at(i)); + } } gStyle->SetOptStat(0); -- GitLab