AvalancheMC doesn't take magnetic field

Dear experts

I tried to simulate drift lines in a cell, using AvalancheMC method. I set magnetic field to 1T for z+, but seems it doesn’t work to drift process. I confirmed that it works to track trajectory calculation. Any clues?
The basic method I used is:

ComponentAnalyticField* field;
field->SetMagneticField(0,0,1);
//pass to the sensor
//Then make track and make drift

If I use DriftLineRKF it looks fine with curved drift lines.

Can you provide a minimal working example?

xt_simulation.zip (36.1 KB)
I was used this code on a server, when I download this and ran on my local PC, it works with magnetic field…not sure what caused such problem.

Maybe you are using an older version of the code on the server? In the past you had to switch on using the magnetic field explicitly in AvalancheMC (EnableMagneticField).

You are right, after I updated Garfield++ on the server it works fine!

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