ldmx-sw icon indicating copy to clipboard operation
ldmx-sw copied to clipboard

Make target PN bias configurable to 4 or 8 GeV beam energy.

Open horohoo opened this issue 8 months ago • 0 comments

I am updating ldmx-sw, here are the details.

What are the issues that this addresses?

Target PN biasing is no longer hard-coded for a 4 GeV beam and now depends on the energy of the input generator, similar to how ECal PN biasing is done now.

Check List

  • [x] I successfully compiled ldmx-sw with my developments.
  • [x] I read, understood and follow the coding rules.
  • [x] I ran my developments and the following shows that they are successful.

I ran a test macro for a target PN simulation, with a similar run configuration as in the example script in LDCS. Below is the RunHeader, showing that the correct biasing factor, threshold, and biased volume are applied for an input beam energy of 8 GeV.

[ Process ] 0  info: RunHeader { run: 12345, numTries: 0, detectorName: ldmx-det-v14-8gev, description: 8 GeV target PN simulation
  intParameters: 
    BiasOperators::PhotoNuclear::Bias Conv Down = 1
    BiasOperators::PhotoNuclear::Only Children Of Primary = 1
    Included Scoring Planes = 1
    RandomNumberMasterSeed[sim] = 12345
    Use Random Seed from Event Header = 0
  floatParameters: 
    BiasOperators::PhotoNuclear::Factor = 550
    BiasOperators::PhotoNuclear::Threshold = 5000
    Gen0 Direction X = 0.0485658
    Gen0 Direction Y = 0
    Gen0 Direction Z = 0.99882
    Gen0 Energy [GeV] = 8
    Gen0 Time [ns] = 0
    Gen0 X [mm] = -21.7459
    Gen0 Y [mm] = 0
    Gen0 Z [mm] = -883
    Smear Beam Spot [mm] X = 20
    Smear Beam Spot [mm] Y = 80
    Smear Beam Spot [mm] Z = 0
  stringParameters: 
    BiasOperators::PhotoNuclear::Volume = target
    Geant4 revision = 
    Gen0 Class = simcore::generators::ParticleGun
    Gen0 Particle = e-
    Pass = sim, version = v4.3.0
    SIM revision = d3dd4179f7c94bd37904b7328d24aff46b52c3e8
    SIM version = v4.3.0
}

I do, however, want to note that while the piece of code I'm modifying makes the correct change, my test script failed due to an unrelated issue:

[ fire ] 9 fatal: [ProductNotFound] : No product found for name 'RecoilTracksClean'
  at /Users/tyler/Desktop/ldmx/ldmx-sw/Framework/include/Framework/Event.h:293 in getObject

horohoo avatar Apr 25 '25 14:04 horohoo