Finding the correct value of drift velocity

REST version : v2.3.8
REST commit : 1f4a11a2

I want to make sure I am using the correct drift velocity values in my analysis. If I load a gas and plot the drift velocity, e.g.:

TRestDetectorGas *gas = new TRestDetectorGas("server", "Argon-Isobutane 2.3Pct 10-10E3Vcm");
gas->SetPressure(1.4);
gas->SetElectricField(158); 
gas->GetDriftVelocity();
(double) 19.425841
 gas->PlotDriftVelocity(90,160,100)

I get a value of 19.42 mm/us from GetDriftVelocity(). However, if I read it from the plot, I get 34.2 mm/us.

image

If I use the gas in my RML configuration file and then print the metadata, I find that the value that is used in the analysis matches that of the plot:
image

Which is the correct value?

Well catched! Actually it seems the problem was at the Plot methods. This PR should fix that.

However, still the output of your signalToHits is coherent with the plot, which after the fix it should not.

Please, double check that now what you get at TRestDetectorSignalToHitsProcess is coherent with the TRestDetectorGas output.

I tried with trex-dm pipeline and it looks coherent.

Notice that the argument of SetElectricField should be given in V/mm.

Just understood now the problem was connected with V/mm and V/cm representation. The old plot was in V/mm.

Just approve and merge the following PR so that the argument of Plot methods is expressed in V/cm.

Good, in fact I was going to ask about the units because I was confused. And just to make sure, in the case of the drift velocity, if one inputs the value manually in the RML, it must also be done in mm/us, right?

It should, those are the standard units, it will be the case if you do not specify units. Because you could write it as β€œ3cm/us” to say that the value is written in cm/us

1 Like

Yes, it is coherent BUT in the rml configuration file the drift field has to be defined in V/cm, not V/mm. Otherwise it’s not coherent.

When we define the electricField inside the RML, if we do not specify units, the value will be assumed to be in V/mm. I.e.

 17         <addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="ON" verboseLevel="info" 
 18             electricField="${PRESSURE}*${DRIFT_FIELD}"

The resulting value of multiplying ${PRESSURE} and ${DRIFT_FIELD} should be expressed in V/mm.

However, if the resulting value from multiplying those fields, is in V/cm. Then, I should specify the units inside the field definition as follows:

 17         <addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="ON" verboseLevel="info" 
 18             electricField="${PRESSURE}*${DRIFT_FIELD}V/cm"

This is an example extracted from pipeline/trex/ which in fact needs revision.

In general, I would advice to always write explicitily the units, even if those are the default REST units.

Adding V/mm in here does not harm (when the value is expressed in V/mm).

 17         <addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="ON" verboseLevel="info" 
 18             electricField="${PRESSURE}*${DRIFT_FIELD}V/mm"

–REST release : v2.3.11
– REST date : 2022-03-28 10:35:28 +0200
– REST commit : b05be521
– REST branch : master

– Clean state: Yes
– REST Official release: No


I found the same problem again: diferent drift velocity values in metadata of TRestDetectorGas and TRestDetectorSignalToHitsProcess

It seems that TRestDetectorGas is computing the drift velocity for pressure of 1bar instead of 10bar.
I chekced that if I generate the TRestDetectorGas object by hand as you suggested @jgalan everything works fine.

So I guess the issue is in the inicialization of TRestDetectorGas through the instance <TRestDetectorGas name="Neon-Isobutane 2Pct 10-10E3Vcm" pressure="10" file="server" /> in the TRestRun section of the rml.

PD: I noted that when parameters are defined as a global variable is better not to set units in its definition and do it on each specific section they are used.
Instead of <variable name="DRIFT_FIELD" value="16V/mm" /> better <variable name="DRIFT_FIELD" value="16" /> and then

 <addProcess type="TRestDetectorSignalToHitsProcess" name="signalToHits" value="ON" verboseLevel="info"  
electricField="${PRESSURE}*${DRIFT_FIELD}V/cm"

If not sometimes the value appear divided by 10.

Probably the problem is inside the method TRestDetectorGas::PrintMetadata().

    metadata << "Temperature : " << fTemperatureInK << " K" << endl;
    metadata << "Electric Field : " << fElectricField * units("V/cm") << " V/cm " << endl;
    metadata << "W-value : " << fW << " eV" << endl;
    metadata << "Drift velocity : " << GetDriftVelocity(fElectricField * units("V/cm")) / units("cm/us")

I imagine the GetDriftVelocity method there should be called without arguments, and then you will get 6.41mm/us out on screen which I guess is the right one.

So, I bet the one used by the process is the good one, and the one printed by TRestDetectorGas is the bad one.

Perhaps it is an initialisation problem inside TRestDetectorGas, I believe the problem dissapears when we call TRestDetectorGas::SetPressure. But this probably never happened the time you call PrintMetadata. So if you introduce in the first line inside PrintGasInfo the line this->SetPressure(fPressureInAtm) does it solve the problem?

The problem does not appear in the process or in restRoot because you call SetPressure method.

You could also try : md0_xyz_frt->SetPressure(10) and call again GetDriftVelocity.