Пример #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;
}
Пример #4
0
Double_t KVHarpeeSi::GetCalibT(const Char_t *type){
	// Calculate calibrated time in ns of type 'type' (SI_HF, SI_SED1,
	// SI_INDRA, SI_MCP, ...) for coder values.
	// Returns 0 if calibration not ready or time ACQ parameter not fired.
	// (we require that the acquisition parameter has a value
   	// greater than the current pedestal value).
   	// The reference time T0 used for the calibration is the one of the
   	// fired silicon detector of Harpee which stopped the time.


	KVHarpeeSi *firedSi = GetFiredHarpeeSi();
	if( !firedSi ) return 0;

	KVFunctionCal *cal = GetTCalibrator( type );
	if( cal && cal->GetStatus() && cal->GetACQParam()->Fired("P"))
		return cal->Compute() + firedSi->GetT0( type );
	return 0;
}
Пример #5
0
KVHarpeeSi::KVHarpeeSi(const KVHarpeeSi& obj)  : KVVAMOSDetector()
{
   // Copy constructor
   // This ctor is used to make a copy of an existing object (for example
   // when a method returns an object), and it is always a good idea to
   // implement it.
   // If your class allocates memory in its constructor(s) then it is ESSENTIAL :-)

   obj.Copy(*this);
}