Ejemplo n.º 1
0
Double_t KVHarpeeIC::GetCalibE()
{
   // Calculate energy in MeV from coder values. Only the 7 segments B
   // are used to calculate calibrated energy.
   // Returns 0 if calibration not ready for fired acquisition parameters
   // or if no acquisition parameter is fired.
   // (we require that at least one acquisition parameter has a value
   // greater than the current pedestal value).


   Bool_t ok    = kTRUE;
   Double_t E   = 0;

   TIter next(GetListOfCalibrators());
   KVFunctionCal* cal = NULL;
   while (ok && (cal = (KVFunctionCal*)next())) {

      //Energy only coded in ACQParam with label 'A'
      if (cal->GetLabel()[0] != 'A') continue;

//    Int_t num = cal->GetUniqueID();
//    if( ((num%100)/10) != 1 ) continue;

      if (cal->GetACQParam()->Fired("P")) {
         if (cal->GetStatus()) {
            E += cal->Compute();
         } else ok = kFALSE;
      }
   }
   return (ok ? E : 0.);
}
Ejemplo n.º 2
0
Double_t KVHarpeeIC::GetCalibE(Int_t seg_num)
{
   // Calculate energy in MeV from the coder value of the acquisition parameter
   // with number 'seg_num' (i.e. segment number) and its corresponding calibrator.
   // Returns 0 if calibration not ready for the acquisition parameter.

   KVFunctionCal* cal = (KVFunctionCal*)GetListOfCalibrators()->FindObjectWithMethod(Form("%d", seg_num), "GetNumber");
   if (cal && cal->GetStatus() && cal->GetACQParam()->Fired("P")) return cal->Compute();
   return 0.;
}
Ejemplo n.º 3
0
Double_t KVVAMOSDetector::GetCalibE()
{
   // Calculate energy in MeV from coder values.
   // Returns 0 if calibration not ready or acquisition parameter not fired
   // (we require that the acquisition parameter has a value
   // greater than the current pedestal value)
   KVFunctionCal* cal = GetECalibrator();
   if (cal && cal->GetStatus() && cal->GetACQParam()->Fired("P"))
      return cal->Compute();
   return 0;
}
Ejemplo n.º 4
0
Double_t KVVAMOSDetector::GetCalibT(const Char_t* type)
{
   // Calculate calibrated time in ns of type 'type' (SED_HF, SI_HF,
   // SI_SED1, ...) 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)


   KVFunctionCal* cal = GetTCalibrator(type);
   if (cal && cal->GetStatus() && cal->GetACQParam()->Fired("P"))
      return cal->Compute() + GetT0(type);
   return 0;
}
Ejemplo n.º 5
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;
}