Some trouble in setting transfer function

Hi,everyone. I am simulating the relationship between the drift-time and position of drifttube. I set the threshold=-1 pf and output the time of ThresholdCrossings. I found that when I didn’t set the transfer fuction ,the output is normal but when I use

         double transfer(double t) {
                  constexpr double tau = 25.;
                  return (t / tau) * exp(1 - t / tau);

the time of ThresholdCrossings is wrong(almost hundreds ns when 1mm distance of wire). What is the reason meeting this problem.

I think @hschindl can help.

Apologies for the late response. I’m not 100% sure I understand the question.
Can you provide a minimal working example illustrating what you mean? In particular, what do you compare to when you say that the threshold crossing times after convoluting with the transfer function are wrong?

Hello, I might haven’t expressed my question explicitly, sorry.
I should better deliver you my source file.Here is my code with transfer function.
set_transfer_function.C (3.7 KB)

And then here is the output, which is obvious wrong. The threshold-crossing time couldn’t be so long when the muon passes through the center of the tube (the wire position)

When I Annotate the transfer function
unset_transfer_function.C (3.7 KB)

the output is like here

Although the program output a warning, the drift_time is reasonable.

If you don’t call IntegrateSignals or ConvoluteSignals the signal calculated by your program is the induced current in units of fC / ns (μA). Calculating threshold crossings is probably not very meaningful in this case (hence the warning).

But to answer your question: there are two threshold crossings in your case, one at the rising edge of your signal and one at the falling edge. I don’t recall why it’s numbered this way, but the one you are looking at (the one with index i = 0) is the “falling” one. To get the rising one, take the one with index i = 1:

unsigned int i = 1; 
double time, level;
bool rise;
sensor.GetThresholdCrossing(i, time, level, rise);

So,you mean the wire produce a current signal, and I should use transfer function to convert it a charge signal? I have little knowledge about circuit, what is transfer function exactly?

Actually, my teacher tell me when induced current arrive the preamp’s resistor, it will produce a voltage signal, and we use threshold 60mv to get the crossing-time in practical. We get the shape of signal is also in unit of voltage. I am not sure what transfer fuction used in this proceduce… How should i simulate my practical experiment?

If you want to apply a threshold in mV to the convoluted signal in Garfield++ you need to know the conversion factor from charge (fC) to voltage (mV) of your amplifier.
You can either include this factor in your transfer function or you convert the 60 mV threshold to a charge (fC).

OK. One more question, for one gas, when i increase the pressure, the voltage should also increase, and whether the gas gain change? Should i use SetGainFluctuationsPolya() to set a new value?

Sir, It seems 60mV convert to 60fC, I should integrate the induced current and then use 60fC as a threshold, is it right? By the way, in which situation the transfer functions should be used?

The transfer function represents the response of your front-end electronics to a delta pulse. By convoluting the induced current with the transfer function you obtain the signal at the output of your front-end electronics.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.