Hi,
I am trying to use TTree::Project on two variable of a TTree to fill a TH2D and ultimately, use TH2::ProfileX on it. However, when I’m doing this :
TFile* file = TFile::Open("file.root", "READ");
TTree* tree = (TTree*)file->Get("Tuple");
TH2D* hist2 = new TH2D("h2", "", 100, 0, 25e6, 100, 0, 1);
tree->Project("h2", "B_Regression_Q2_BEST_LINEAR_Run2:Resp_MLP__SvsRun1_Vars_All_TRIMMER_AllCuts");
hist2->Draw("colz");
I’m obtaining the following canvas :
A.pdf (13.7 KB)
It is weird because when I’m doing :
tree->Draw("B_Regression_Q2_BEST_LINEAR_Run2:Resp_MLP__SvsRun1_Vars_All_TRIMMER_AllCuts", "", "colz");
It is working perfectly fine :
B.pdf (19.9 KB)