Hi, new to ROOT! I am trying to create a 2D histogram using data from two different branches. We are getting a 2D histogram, but we aren’t sure if it is filling correctly, because it does not look the same as when we made the histogram using a different software.
So far this is what we have, with the doppler_energy branch being branch12 and doppler_energy_corrected being branch 14 declared up above!
All->SetBranchAddress("doppler_energy",&doppler_energy);
for(int i = 0; i < branch12->GetEntries();i++){
All->GetEntry(i);
}
All->SetBranchAddress("doppler_energy_corrected", &doppler_energy_corrected);
for(int i = 0; i < branch14->GetEntries();i++){
All->GetEntry(i);
h9->Fill(doppler_energy_corrected,doppler_energy);
}
//Drawing and saving the histogram
//cc->SetLogy(); //sets a logrithmic axis
h9->Draw(" ");
h9->SetLineColor(kBlue);
h9->SetMarkerColor(kRed);
cc->SaveAs("doppler_energy.pdf");
h9->Write();
Please read tips for efficient and successful posting and posting code
ROOT Version: Not Provided
Platform: Not Provided
Compiler: Not Provided