-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calibration target upstream of everything in ldmx-sw #5
Comments
|
So, I've been able to write a The issue is that when I do this procedure, all events, including ones with actual muons produced, are aborted. I caved and did a debug build of ldmx-sw and was able to observe the following (normal running printout omitted). gdb setupnormal
|
|
I doubt its (1) since the momentum directions are computed using cosine and sines, but it could be (2). I doubt (3) since this process does nothing to alter the default time behavior. |
|
I am very puzzled on how this error comes to be. The
I cannot find any place within the geant4 source code that changes the debug flag via the public member function tom@zuko:~/code/ldmx/geant4$ rg --no-ignore SetDebugFlag
source/track/include/G4VParticleChange.hh
303: void SetDebugFlag();
source/track/include/G4VParticleChange.icc
296: void G4VParticleChange::SetDebugFlag()nor any other place that directly modifies the (protected) member variabled tom@zuko:~/code/ldmx/geant4$ rg --no-ignore debugFlag
source/geometry/magneticfield/include/G4MagIntegratorDriver.hh
167: G4int debugFlag);
source/track/include/G4VParticleChange.hh
314: G4bool debugFlag;
source/track/src/G4ParticleChangeForGamma.cc
53: debugFlag = false;
source/track/src/G4ParticleChangeForTransport.cc
202: if (debugFlag) CheckIt(*aTrack);
source/track/include/G4VParticleChange.icc
292: debugFlag = false;
298: debugFlag = true; #SetDebugFlag function definition
304: return debugFlag;
source/track/src/G4ParticleChange.cc
341: if (debugFlag) CheckIt(*aTrack);
394: if (debugFlag) CheckIt(*aTrack);
434: if (debugFlag) CheckIt(*aTrack);
source/track/src/G4ParticleChangeForDecay.cc
177: if (debugFlag) CheckIt(*aTrack);
source/track/src/G4VParticleChange.cc
64: debugFlag(false)
68: debugFlag = true; # constructor wrapped with #ifdef G4VERBOSE
105: debugFlag(right.debugFlag)
154: debugFlag = right.debugFlag;
173: if (debugFlag) CheckSecondary(*aTrack);
source/track/src/G4ParticleChangeForLoss.cc
57: debugFlag = false;
source/processes/parameterisation/History
213:3) Call to CheckIt controled by the G4VParticleChange::debugFlag attribute.
419: debugFlag
426: G4bool debugFlag;
source/processes/parameterisation/src/G4FastStep.cc
392: if (debugFlag) CheckIt(*aTrack);
425: if (debugFlag) CheckIt(*aTrack);There is no reference to the and so the only way to enable it would be to define it at the cmake time which we don't do. So I'm truly perplexed. |
|
I added a breakpoint on the |
|
I can't figure out how the debugFlag ends up being true, but I did find the issue. We time-shift primaries so that global time t=0 corresponds to the beam arriving at the target. In this calibration running mode, we end up calling a process of importance on a track with a negative global time (since its upstream of the target) which fails the checking mechanism and aborts the event. |
|
It seems like setting the number of secondaries modifies the debug flag member as well. Not sure why this would be, but the good news is that this appears to be GammaConversion specific |
|
I've fleshed out the reasoning for this more thoroughly and opened an issue in our copy of Geant4. My initial analysis of the code gives no evidence that this bug (or its patch) could affect physics distributions and so I hope that it can be passed into the development image with ease. |
|
The updated version of Geant4 is now in 4.2.1 of the development image. This enables this repository to run with a build of ldmx-sw:trunk (or recent version) within this new image without any modifications to the config. As such, I am going to close this issue and transition to generating larger samples for further analysis. As a side note, I believe we can simply remove the magnetic field from the |
Another calibration possibility is to just put the thicker tungsten target in front of everything that is currently apart of the LDMX detector apparatus. This would resolve a few issues we are seeing
To Dos
If neither of these require C++ changes, we could do an initial study of this proposal without having to edit ldmx-sw.
detector.gdmland have the rest stay the same, but if the world volume is not big enough, I may need to enlarge that as well.The text was updated successfully, but these errors were encountered: