Skip to content

Update FEMC for new geometry: #1848

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Update FEMC for new geometry: #1848

wants to merge 14 commits into from

Conversation

akioogawa
Copy link
Contributor

@akioogawa akioogawa commented May 2, 2025

Briefly, what does this PR introduce?

Following Forward EM calorimeter geometry update:
eic/epic#855
this provides switch between Homogeneous and ScFi geometry implementations based on xml file loaded

  • For Homogenous, we keep energy smearing as is. SF=1.0
  • For ScFi, hits from fibers are summed to a tower and no enrgy smearing applied. SF=0.03.
  • Remove active insert which won't be built

Added an option to put SiPM saturation to CalorimeterHitDigi

  • Specify 2 new parameters : totalPixel and nPhotonPerGeV
  • default for totalPixel is 0, which case no attenuation is applied
  • For FEMC for both geometry models, SiPM saturation is ON by default
  • Use "-PFEMC:SiPMSaturation=OFF" to turn it off

See following links for some more details:
https://www.star.bnl.gov/~akio/epic/geometry/index.html
https://www.star.bnl.gov/~akio/epic/reco/index.html
https://www.star.bnl.gov/~akio/epic/hadron/index.html

What kind of change does this PR introduce?

  • Bug fix (issue #__)
  • New feature (issue #__)
  • Documentation update
  • Other: __

Please check if this PR fulfills the following:

  • Tests for the changes have been added
  • Documentation has been added / updated
  • Changes have been communicated to collaborators

Does this PR introduce breaking changes? What changes might users need to make to their code?

I don't think so, unless one provides wrong config xml file (until sum check in place)

Does this PR change default behavior?

It does apply SiPM attenuation by default for FEMC (but not other calorimeters).

Adding switch between Homogeneous and ScFi geometry implementations based on xml file loaded
  - For Homogenous, we keep enrgy smeasring as is. SF=1.0
  - For ScFi, hits from fibers are summed to a tower and no enrgy smearing applied. SF=0.03.
Added option to put SiPM saturation to CalorimeterHitDigi
  - Specify 2 new parameters : totalPixel and nPhotonPerGeV
  - default for totalPixel is 0, which case no attenuation is applied
For FEMC for both geometry models, SiPM saturation is ON by default
 - Use "-PFEMC:SiPMSaturation=OFF" to turn it off
@wdconinc
Copy link
Contributor

wdconinc commented May 2, 2025

Please address the conflicts by performing a git rebase (preferably). As long as there are conflicts the automatic checks can't even start to run.

@akioogawa
Copy link
Contributor Author

Done

@akioogawa
Copy link
Contributor Author

As I understand, FEMC insert wil not be build. So it was removed from geometry and here FEMC factories. How can I remove it from auto checks?

@wdconinc
Copy link
Contributor

wdconinc commented May 6, 2025

As I understand, FEMC insert wil not be build. So it was removed from geometry and here FEMC factories. How can I remove it from auto checks?

Removing a detector would be something to do in a separate pr.

@akioogawa
Copy link
Contributor Author

#1852

akioogawa and others added 4 commits May 12, 2025 09:23
… to Homogeneous model

  (see https://www.star.bnl.gov/~akio/epic/reco/index.html)
- Adding ScFi model's resolution smearing of 2.2% constant term based on high energy end
  (see https://www.star.bnl.gov/~akio/epic/reco/index.html)
- Changing ADC threshold from 2 (~9MeV which was too low) to 3 (~15MeV as intended)
- Rename an unfortunate variable name
// Note: both adc and tdc values must be positive numbers to avoid integer wraparound
unsigned long long adc =
std::max(std::llround(ped + edep * corrMeanScale_value * (1.0 + eResRel) /
std::max(std::llround(ped + edep * corrMeanScale_value * (1.0 + eResRel) * saturation /
Copy link
Member

Choose a reason for hiding this comment

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

Would you consider reviewing #1064 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Once #1064 is in, I can switch to using that.

Copy link
Contributor

Choose a reason for hiding this comment

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

#1064 is merged.


int SiPMSaturation = 1;
std::string opt("ON");
app->SetDefaultParameter("FEMC:SiPMSaturation", opt, "Turn ON(default) or OFF SiPM Saturation");
Copy link
Member

Choose a reason for hiding this comment

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

We should avoid adding options inside plugins, when algorithm option would apply to different detectors. See how its made into algorithm parameter in #1064 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants