KVNameValueList* KVASGroup::DetectParticle(KVNucleus* part) { //Calculate energy losses of a charged particle traversing the telescopes of the group. //This method return a list of TNamed where each detector which is throught in the particle //are written with the corrresponding energy loss //WARNING : this KVNameValueList has to be deleted by the user // after use //return 0 if no telescope are on the path of the particle (DEAD zone) TList* d = GetTelescopesWithAngles(part->GetTheta(), part->GetPhi()); if (d) { TIter nextd(d); KVTelescope* t = 0; KVNameValueList* nvl = new KVNameValueList(); while ((t = (KVTelescope*) nextd())) { t->DetectParticle(part, nvl); if (part->GetEnergy() <= 0.0) { delete d; return nvl; } } delete d; return nvl; } return 0; }
double nextd0(){ return nextd() - 0.5; }
float Lcg::nextf() { return static_cast<float>(nextd()); }