-
Notifications
You must be signed in to change notification settings - Fork 31
Building pulses from SimCalorimeterHitProcessor #1924
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
base: main
Are you sure you want to change the base?
Building pulses from SimCalorimeterHitProcessor #1924
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
Capybara summary for PR 1924
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion this is much too similar to SiliconPulseGeneration to allow this level of code duplication. The main difference is in the input type, so I would propose to template it based on that.
|
||
public: | ||
virtual ~SignalPulse() = default; // Virtual destructor | ||
virtual double operator()(double time, double charge) = 0; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This getter must be const
. It should have always been const
, and the EvaluatorPulse
will need to deal with the map of parameters in a different way.
if (type == "LandauPulse") { | ||
return std::make_unique<LandauPulse>(params); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Factory must support all types.
|
||
void CalorimeterPulseGeneration::init() { | ||
// Initialize seed | ||
m_gen.seed(std::random_device{}()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes the algorithm irreproducible.
Briefly, what does this PR introduce?
This algorithm,
CalorimeterPulseGeneration
, builds pulses for each hit implemented bySimCalorimeterHitProcessor
. Sub-pulses were created for each contribution and combined to build pulse of a hit. Regarding the pulse shape, template pulse implemented bySiliconPulseGeneration
was used. Before the sub-pulses are created, the energy deposit can be converted to number of photoelectrons if necessary.What kind of change does this PR introduce?
Please check if this PR fulfills the following:
Does this PR introduce breaking changes? What changes might users need to make to their code?
Does this PR change default behavior?