-
Notifications
You must be signed in to change notification settings - Fork 29
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
added charge scale factor in channel status #206
base: main
Are you sure you want to change the base?
Conversation
src/core/src/Gsim.cc
Outdated
@@ -544,6 +543,7 @@ void Gsim::MakeEvent(const G4Event *g4ev, DS::Root *ds) { | |||
int numPE = 0; | |||
|
|||
for (int ipmt = 0; ipmt < hitpmts->GetEntries(); ipmt++) { | |||
double chargeScale = 1; |
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.
Can we move this down to l. 558? I believe GetChannelStatus should set the default value via the ratdb entry you added.
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.
done :)
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.
Thanks @rl23, I've added some small comments.
@@ -12,3 +12,9 @@ | |||
"run_range": [0, 0], | |||
"default_value": 1, | |||
} | |||
{ |
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.
Can you add a new line here to separate the tables? I think it would make it slightly easier to read.
} | ||
} | ||
} | ||
mc->SetNumPE(numPE); | ||
} | ||
|
||
void Gsim::AddMCPhoton(DS::MCPMT *rat_mcpmt, const GLG4HitPhoton *photon, EventInfo * /*exinfo*/, std::string process) { | ||
void Gsim::AddMCPhoton(DS::MCPMT *rat_mcpmt, const GLG4HitPhoton *photon, EventInfo * /*exinfo*/, std::string process, | ||
double chargeScale) { |
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.
I don't think this should be a new line.
@@ -592,7 +592,7 @@ void Gsim::AddMCPhoton(DS::MCPMT *rat_mcpmt, const GLG4HitPhoton *photon, EventI | |||
rat_mcphoton->SetCreationTime(photon->GetCreationTime()); | |||
|
|||
rat_mcphoton->SetFrontEndTime(fPMTTime[fPMTInfo->GetModel(rat_mcpmt->GetID())]->PickTime(photon->GetTime())); | |||
rat_mcphoton->SetCharge(fPMTCharge[fPMTInfo->GetModel(rat_mcpmt->GetID())]->PickCharge()); | |||
rat_mcphoton->SetCharge(chargeScale * fPMTCharge[fPMTInfo->GetModel(rat_mcpmt->GetID())]->PickCharge()); |
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.
Can you add a comment here to clarify what "chargeScale" is doing? For example, "Set the charge for the photoelectron, scaled by an optional calibration parameter 'chargeScale' that is default 1.0".
It is probably worth adding this parameter to the meta info in src/io/src/OutNtupleProc.* like the other ChannelStatus parameters. It is interesting that the channel charge is implemented in Gsim - is this the only or best place? Thanks! |
No description provided.