(SOLVED)Obtain Raw Info from Calorimeter (old GetMicroCandidate from TCandList class) [message #16321] |
Tue, 15 April 2014 18:12 |
Mamen
Messages: 55 Registered: January 2009 Location: Mainz
|
continuous participant |
From: *kph.uni-mainz.de
|
|
Hi, everybody!
Finally after so many years of delay I'm learning how to use PandaRoot.
I got some macro from Dmitry Khaneft and I am trying to reproduce his analysis to start learning a bit the code.
By now I have already encountered some problems. The Class TCandList has been changed to RhoCandList, and some of the methods seem not to be available anymore.
For instance I was trying to get some EMC information:
for (Int_t j=0;j<negative.GetLength();++j){
if(negative[j].GetMicroCandidate().GetEmcIndex()>-1){
// *** Fill momentum vs E/p
hEPvsP-> Fill(negative[j].GetMicroCandidate().GetMomentum().Mag(),negative[j].Get MicroCandidate().GetEmcCalEnergy()/negative[j].GetMicroCandidate().GetMo mentum().Mag());
// *** Fill number of crystals hit in the EMC
hNCrystalsEMC->Fill(negative[j].GetMicroCandidate().GetEmcNumberOfCrystals());
}
the object 'negative' is defined as follows:
RhoCandList negative;
and it refers to the negative tracks.
The method GetMicroCandidate() doesn't exist anymore in the class RhoCandList.
I was trying to find out how to do this using the new RhoCandList, instead of the old TCandList, but I could not manage to find any documentation ...
Could somebody help me? Please!
Thanks a lot in advance!
Cheers!
Mamen
[Updated on: Wed, 16 April 2014 10:49] Report message to a moderator
|
|
|
|
|
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
|
|
|
|
|
|
|
|