Skip to content

Conversation

@horohoo
Copy link
Contributor

@horohoo horohoo commented Apr 25, 2025

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

  • I successfully compiled ldmx-sw with my developments.
  • I read, understood and follow the coding rules.
  • 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 horohoo changed the title Target p nbias Make target PN bias configurable to 4 or 8 GeV beam energy. Apr 25, 2025
Copy link
Member

@tvami tvami left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great thanks Tyler!

@tvami
Copy link
Member

tvami commented May 13, 2025

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:

This is expected if you didnt run the full tracking sequence: nowadays the ECAL veto relies on real ACTS tracking so you need to add that to the sequence OR have EcalVeto rely on truth (i..e change the configurable variable)

@horohoo horohoo requested a review from bryngemark May 13, 2025 14:04
@tvami tvami requested a review from tomeichlersmith May 13, 2025 14:04
Copy link
Member

@tomeichlersmith tomeichlersmith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, looks good

@tvami tvami merged commit 4f43ae4 into trunk May 13, 2025
13 checks passed
@tvami tvami deleted the targetPNbias branch May 13, 2025 14:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants