Help with ATLFast and ROOT

Hi
I am currently working on a projekt with black hole simulation but get af problem when trying to access my stored “black hole particles” (in atlfast.root) via MyClass.C

It’s probably because I use the gATLFast command wrongly but i haven’t been able to find any clues. The error I get in ROOT is:

root [0] .x loadlibs
root [1] .L MyClass.C
root [2] MyClass t;
root [3] t.Anal();
Error: illegal pointer to class object gATLFast 0x0 2193 MyClass.C:109:
*** Interpreter error recovered ***
root [4]

I have attached MyClass.C & MyClass.h

Any help would be most appreciated

When using the output of TTree::MakeClass, you can use directly the members of the class. You do not need Atlfast anymore to analyze your data. You can access directly the members in your analysis code. So look at the long list of members/arrays in MyClass.h
and use them directly.

Rene

Thanks for the quick response.
My problem seems to be I can’t make a loop over all the particles. My black hole particles are stored with KF=78 and KF=79 and I wanted to make a loop over alle the particles, select the ones with this KF code and then store mass etc in my histograms, but isn’t it right that there is no information on the number of particles in MyClass.h?
Sincerly Ask

You can loop on the list of all particles, eg

for (int i=0;i<Particles_;i++) { if (Particles_fKF[i] != something) continue; ..//your analysis code }
Rene

Thanks for the help, it works just fine now.
Ask