Re: loop over PndMcTracks [message #15732 is a reply to message #15707] |
Fri, 15 November 2013 16:39 |
StefanoSpataro
Messages: 2736 Registered: June 2005 Location: Torino
|
first-grade participant |
From: *to.infn.it
|
|
Hi, PndAnalysis is written as framework to perform physics analysis (invariant mass distributions, fitters,etc...) and not for detector studies. The only think you can do there is, from the charged candidate, retrieve the Tof Index and from the index recover the FtofHit.
I can suggest you to take a look into the macro macro/pid/track_check.C.
This macro loops over MCTrack, select only primary particles (GetMotherID()==-1), and for each mctrack it find the pid candidate correlated to such track. This is a basic scheme, but if you substitute the names with ftof classes you can do whatever you want. Also the macro pid_check.c could help you to understand the mechanism (I am not tousching them since a while then maybe they could crash, but all the basics are inside).
|
|
|