예제 #1
0
Bool_t KVHarpeeSi::PositionIsOK()
{
   // Returns true if all the conditions to access to the particle position
   // are verified. In this case the position is given by the method
   // GetPosition(...).
   // The conditions are:
   //   -the multiplicity of fired ( "Pany" option of Fired() ) Harpee Si
   //    detectors must be equal to one;
   //   -this detectector must be the fired detector.

   if (!TestBit(kPosIsOK)) {
      Int_t mult   = 0;
      TIter next(fHarpeeSiList);
      KVHarpeeSi* si = NULL;
      while ((si = (KVHarpeeSi*)next())) {
         if (si->Fired("Pany")) {
            mult++;
            fSiForPosition = si;
         }
      }
      if (mult != 1) fSiForPosition = NULL;
      SetBit(kPosIsOK);
   }
   return fSiForPosition == this;
}
예제 #2
0
KVHarpeeSi *KVHarpeeSi::GetFiredHarpeeSi(Option_t *opt){
	// This static method returns the first fired detector found
	// in the list of all the existing silicon detectors of HARPEE.
	// See KVDetector::Fired() for more information about the option 'opt'.

	TIter next( fHarpeeSiList );
	KVHarpeeSi *si = NULL;
	while( (si =(KVHarpeeSi *)next()) ){
		if( si->Fired( opt ) ) return si;
	}
	return NULL;
}
예제 #3
0
Int_t KVHarpeeSi::GetMult(Option_t *opt){
	// Returns the multiplicity of fired silicon detectors of HARPEE. 
	// See KVDetector::Fired() for more information about the option 'opt'.

	Int_t mult   = 0;

	TIter next( fHarpeeSiList );
	KVHarpeeSi *si = NULL;
	while( (si = (KVHarpeeSi *)next()) ){
		if( si->Fired( opt ) ) mult++;
	}
	return mult;
}