Please help me. I don’t know why I can’t use if_function in my code in root 6.CPviolation_vac_compare.C (5.5 KB)
Always try to pre-compile your source code using ACLiC (the compiler will find many possible source code bugs) …
root [0] .L CPviolation_vac_compare.C++
In your current macro, you need to change (at least):
// ...
void CPviolation_vac_compare(){
TGraph *pGraphMu2ea = 0;
TGraph *pGraphMu2eb = 0;
// ...
pGraphMu2ea = new TGraph(nEnStep, pEne, pProb);
// ...
pGraphMu2eb = new TGraph(nEnStep, pEne, pProb);
// ...
Thank you. In my code, I want to draw both pGraphMu2ea(myEne = 0,6 and myBaseL=295) and pGraphMu2eb(myEne = 2 and myBaseL = 810) on the same graph. If I use if_function as in my code, I can run it in root 5. But I can’t use this one in root 6.
This I don’t believe. Your “myEne” and “myBaseL” are left uninitialized.
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.