Gasfile issue during running

still same error…

Ok, we need to find out where/why this happens. If you need help doing that, please send the files to which you made modifications.

ok dear, i have made changes to these files you can check tetrafluoroethane is placed there.
GarfieldPhysics.cc (14.4 KB) GarfieldDetectorConstruction.cc (11.4 KB)

will wait for your answer. cause programmes are stuck here. and i have tried different things for its removal but no change in errors.

hschindl did you got any answer for that error?

any answers???

can anyone resolve my issue?

Sorry, I had very little time in the last week to debug your problem.
Can you send your gas file? I ran the program with a (low quality) gas file that I generated myself and with that I don’t manage to reproduce the crash you reported.
Also can you make some small modifications to GarfieldPhysics.cc?

  • Can you add a line
fDrift->SetDistanceSteps(1.e-4);

after

fDrift = new Garfield::AvalancheMC();

to set explicitly the step size used?

  • Since C2H2F4 has a significant attachment cross-section, there might be a non-negligible chance that the electron is lost (attached) before it reaches the wire (I should check how frequently this happens with a better quality gas file). I would therefore add a check if the electron has been attached (i. e. if the status code returned by the function GetElectronEndpoint is -7) and skip the avalanche in that case, something like
if (status == -7) continue;
  • You should comment out or delete the line
fMediumMagboltz->EnablePenningTransfer(rPenning, lambdaPenning, "TETRAFLUOROETHANE");

Penning transfer only makes sense for a gas mixture with more than one component (and besides that the value Penning transfer probability used in the program is for Ar/CO2).

More generally, I’m wondering if the program doesn’t need more significant modifications to be useful for your purposes. The example is meant primarily to illustrate the possibilities for interfacing Geant4 and Garfield++, I’m not sure if it really corresponds to the detector you intend to simulate. For instance, from what I’ve seen you’ve replaced the gas mixture used in the drift tube but if you do that, you normally also need to change the voltage settings. And is it really a straw tube that you would like to simulate?

I can try to help, but I would need to understand a bit better what it is that you are trying to achieve with the simulation.

1 Like

its ok dear i know can understand your work load. indeed till now i’m just producing the plots which already this examples produces at the end but with the gas mixture as we are using tetrafluoroethane. but if we have to change the detector shape or something like that i’ll let you know too. but the plots shows that the detector is in square 3-D shape. ok then what you suggests about the voltage settings?

gas file pics. it is restricting that gas file cannot be sent.

i have removed this file dear. and also changes and put the line just after the point where you said to do. and it worked i think so program moved the point furthur but with this message. see

also i have searched for the values and i found this table what you suggests we can use these values or i have to use some other defined values? like you said to me earlier that consider the gas ideal and put its density around 2.686 i think so. but founded table value is different. need your suggestion what to do?

Not sure what you mean. The active volume in the example is a cylindrical tube with a wire inside.

If Just rename the file (change the extension to .txt).

The density in this table must be for the liquid phase. At atmospheric pressure and temperature I get a density of 0.00424154 g / cm3 from the ideal gas law.

i don’t understand what you mean to change the extension to the .txt?

that means for tetrtafluoroehtane i have to put the density 0.00424154 g / cm3?

You said that you could not upload the gas file. That’s probably because of the .gas extension. If you rename it to .txt it should work.

Yes, I think so (if you want atmospheric pressure and room temperature).

but i have copied that gas file in the build directory and i think its working see. you also said that to me. see the pic if it still nor working then let me know i’ll change it.