示例#1
0
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;
}
示例#2
0
	double nextd0(){ return nextd() - 0.5; }
示例#3
0
文件: Lcg.cpp 项目: uttumuttu/niwa
 float Lcg::nextf() {
     return static_cast<float>(nextd());
 }