Hi,
I have a 2D-Histogram and a TProfile that I have declared:
Double_t x[ ] = {1., 2., 3., 5., 7., 9., 13., 19., 27., 37., 52., 74., 105., 155.};
//define histogram and profile
TProfile *prof = new TProfile("prof", "prof", (sizeof(x) / sizeof(Double_t) - 1), x);
TH2F *h1 = new TH2F("h1","hist",100,0.,10.,100,0.,11.);
After some retrieving of data, I fill the histogram and TProfile.
for(Int_t i =0; i<NumEntries; ++i){
k->GetEntry(i);
Double_t total = c+d+e+ff+g;
//checking results using console output
cout << a << "\t" << "0" << "\t" << g << "\t" <<c << "\t" << d << "\t" << e << "\t" << ff << "\t" << "total: " << total << endl;
h1->Fill(a,total);
prof->Fill(a*a,total);
}
However I don’t think I have done this correctly. Shouldn’t the TProfile depend on my histogram? Whereas the way I have created it they exist independently. The effect this has is that I do not have any error bars on my TPofile y-axis when it is drawn?
Could someone point me in the right direction?
Thanks.