Re: Obtain Raw Info from Calorimeter (old GetMicroCandidate from TCandList class) [message #16324 is a reply to message #16321] |
Tue, 15 April 2014 18:42 |
Mamen
Messages: 55 Registered: January 2009 Location: Mainz
|
continuous participant |
From: *kph.uni-mainz.de
|
|
Thanks Stefano and Klaus,
GetRecoCandidate somehow works, however, there is still something which is not really working.
Although i can see the method GetEmcIndex() defined in the code here: https://subversion.gsi.de/trac/fairroot/browser/pandaroot/trunk/pnddata/ PidData/PndPidCandidate.h
I get errors when I run the analysis:
Test code:
cout<< "GetEmcIndex() -> "<< negative[j].GetRecoCandidate().GetEmcIndex() <<endl;
Error:
Warning: wrong member access operator '.' ana_complete.C:157:
Warning: wrong member access operator '.' ana_complete.C:157:
Error: Can't call FairRecoCandidate::GetEmcIndex() in current scope ana_complete.C:157:
Possible candidates are...
(in FairRecoCandidate)
(in FairMultiLinkedData)
Error: non class,struct,union object GetRecoCandidate() used with . or -> ana_complete.C:157:
GetEmcIndex() -> (class G__CINT_ENDL)26133456
*** Interpreter error recovered ***
And it breaks...
Other methods, like for example:
negative[j].GetRecoCandidate().GetMomentum().Mag()
work instead:
Code, commenting out the other line:
cout<< "GetMomentum() -> "<< negative[j].GetRecoCandidate().GetMomentum().Mag() <<endl;
some of the outputs inside the loop:
....
GetMomentum() -> 0.883354
GetMomentum() -> 0.976688
GetMomentum() -> 1.15377
evt 500
....
(of course I'm just printing it out on screen as a control sequence )
Somehow it looks to me like some kind of bug(?), or am I still doing something wrong?
Thanks again!
Cheers,
Mamen
|
|
|