Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions Tracking/components/TrackdNdxDelphesBased.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,17 +109,27 @@ edm4hep::RecDqdxCollection TrackdNdxDelphesBased::operator()(const edm4hep::Trac
double betagamma = momentum / mass;
debug() << "MCParticle betagamma: " << betagamma << endmsg;
// Check if betagamma is in valid range of delphes parametrisation (status: 16 June 2025)
if (betagamma < 0.5 || betagamma > 20000.0) {
warning() << "beta*gamma value outside of \"good\" range of delphes parametrisation (0.5-20000), dN/dx will be "
if (betagamma < 0.5) {
warning() << "beta*gamma value below \"good\" range of delphes parametrisation (0.5-10000), dN/dx will be "

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The comment doesn't match, it is below 0.5

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Sorry, I don't see the mismatch?
Could you clarify?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I meant that it is always below 0.5 so it doesn't make sense to say it's below 0.5-10000

"set to dummy value: "
<< dummy_value << " clusters/mm" << endmsg;
goto store_value;
} else if (betagamma > 10000) {
warning() << "beta*gamma value above \"good\" range of delphes parametrisation (0.5-10000), "
"beta*gamma will be set to max value as approximation."
<< endmsg;
betagamma = 9999.9; // 10000 is out of range already
}

// Get number of clusters per length from delphes
// Output from delphes function is in 1/m, so to convert to 1/mm we need to scale accordingly
double nclusters_per_mm = m_delphesTrkUtil.Nclusters(betagamma, m_GasSel.value()) / 1000.0;
debug() << "Number of clusters per mm: " << nclusters_per_mm << endmsg;
if (nclusters_per_mm < 1e-6) {
warning() << "Delphes number of clusters per mm calculation returned 0.0, dN/dx will be set to dummy value: "
<< dummy_value << " clusters/mm" << endmsg;
goto store_value;
}

///////////////////////
// Track Information //
Expand Down
Loading