Questions with trackPAI in Garfield++

Dear experts,

I want to use trackPAI to simulate process in the gas detector. However, I face problems when I try to define a trackPAI variable.

The error is shown as the following:

TrackPAI::SetupMedium:
Could not load optical data for medium .
TrackPAI::NewTrack:
Properties of medium He/iC4H10 are not available.

The error happened when I defined a new track. I looked through the script and it seemed that fuction GetOpticalDataRange would always return false. I wonder if I have any mistakes about the use of trackPAI. I attached the related part in Garfield ++ here.

bool TrackPAI::SetupMedium(Medium* medium) {

...
  // Get the dielectric function.
  double emin, emax;
  if (!medium->GetOpticalDataRange(emin, emax)) {
    std::cerr << m_className << "::SetupMedium:\n";
    std::cerr << "    Could not load optical data for medium " << m_mediumName
              << ".\n";
    return false;
  }
...
}


bool Medium::GetOpticalDataRange(double& emin, double& emax,
                                 const unsigned int i) {
  if (i >= m_nComponents) {
    std::cerr << m_className << "::GetOpticalDataRange: Index out of range.\n";
    return false;
  }

  if (m_debug) PrintNotImplemented(m_className, "GetOpticalDataRange");
  emin = emax = 0.;
  return false;
}

Best,
Linnuo

I’m sure @hschindl can help you

Hi,
many thanks for your message! Please use TrackHeed instead of TrackPAI.

TrackPAI is a bit of an experimental development; I used it at some point to compare different implementations of the PAI model (which is also what is used in HEED), specifically for silicon. I should probably remove it from the main branch.

Thank you very much!