Efficiency graphic

Hi Dear root framework user !
I’m a novice with root. I’m trying to simulate the HPGe detector efficiency with geant4 frame work. I’m using root to analysis my data. now I got my file.root for the spectrum. Now my problem is how can I do to generate the efficiency curve ? someone can help me ?

Hi @felixcepamoq,

thanks for using ROOT! For beginners, I can definitely recommend to check out the users manual on the website.

from your question, it is not clear what data is in your root file and which computations you need to do to arrive at your efficiency curve. Are the efficiency values directly stored in the file and you just need to plot them, or do you have to fill some intermediate histograms for the numerator and denominator of your efficiency? The latter scenario is very common in HEP workflows, and these are the steps you’d need to do:

  1. Open the .root file and access the TTree stored in it
  2. Create your histograms and fill them with TTree::Draw (like discussed in this forum post)
  3. Create your efficiency curve using the TEfficiency class

I hope this already gives you some ideas! If you need more help, please make your question more precise next time and we can surely help you.


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