Skip to content

add ch-by-ch gain file and modify Deconvolution fhicl#125

Open
szhang17phys wants to merge 2 commits intoDUNE:feature/vpec_chbych_gain_in_deconvfrom
szhang17phys:feature/vpec_chbych_gain_in_deconv
Open

add ch-by-ch gain file and modify Deconvolution fhicl#125
szhang17phys wants to merge 2 commits intoDUNE:feature/vpec_chbych_gain_in_deconvfrom
szhang17phys:feature/vpec_chbych_gain_in_deconv

Conversation

@szhang17phys
Copy link
Copy Markdown
Contributor

Add channel-by-channel gain file to OpticalDetector folder.
Then modify the Deconvolution.fcl accordingly

@vpec0 vpec0 self-requested a review December 19, 2025 11:10
@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Dec 19, 2025

What does v6 refer to?
Can you add reference to the source of the gains? I think that can go into a comment in the fhicl configuration.

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.

What does v6 refer to?
Can you add reference to the source of the gains? I think that can go into a comment in the fhicl configuration.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sorry for my delayed reply! I just added comments in the fhicl.

@szhang17phys
Copy link
Copy Markdown
Contributor Author

Thank you for the comments @vpec0 .
I just made the notes to explain "v6" and sources of values defined in the reco_channel_gain_protoDUNEHD_v6.dat

@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Mar 25, 2026

Thanks @szhang17phys. Why do you refer to a geometry file in the channel gain file name, is there a direct link between the two? I.e. would we need different gains file for different geometry versions?

values inside reco_channel_gain_protoDUNEHD_v6.dat are from protodunehd_opdigi.SPEAmplitudeVector

Does this mean these gains are valid for the simulations only? If so, the fact should be reflected in the name of the .dat file.

We should think of a better place to put the gains file to. I don't know if we want to keep it in the repository. If yes, then we need to use a dedicated dubdirectory. If no, we can have it copied over to stash cache.

@lpaulucc
Copy link
Copy Markdown
Member

We should think of a better place to put the gains file to. I don't know if we want to keep it in the repository. If yes, then we need to use a dedicated dubdirectory. If no, we can have it copied over to stash cache.

Those file are small so probably not a bid deal having them in duneopdet. But I agree, we should have at least a subdirectory to put files inside.

@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Mar 26, 2026

I was also thinking about consistency. I know there's some data being coded into the fhicl files and there are other that are stored in stash cache ( and there are instances where it is hard-coded in the code itself).

I haven't seen any best-practice guidance on this, so I assume either fhicl of stash-cache are acceptable.

@szhang17phys , Shu, can you create duneopdet/OpticalDetector/data/gains directory and move the gains file there?

We will then start moving the other leftover data files into data.

@lpaulucc
Copy link
Copy Markdown
Member

I was also thinking about consistency. I know there's some data being coded into the fhicl files and there are other that are stored in stash cache ( and there are instances where it is hard-coded in the code itself).

I haven't seen any best-practice guidance on this, so I assume either fhicl of stash-cache are acceptable.

True, we should discuss with Tom what is the best practice here. Hard-coded values are a huge NO so if you remember any place where you found an example of this, we need to change it.

@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Mar 26, 2026

Hard-coded values are a huge NO so if you remember any place where you found an example of this, we need to change it.

Yeah, it was the PD SP calibrator, but that's fixed now, #122. I'll try to act if I see any other hard-coding.

@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Mar 31, 2026

@szhang17phys
Bumping the following questions:

Why do you refer to a geometry file in the channel gain file name, is there a direct link between the two? I.e. would we need different gains file for different geometry versions?

values inside reco_channel_gain_protoDUNEHD_v6.dat are from protodunehd_opdigi.SPEAmplitudeVector

Does this mean these gains are valid for the simulations only? If so, the fact should be reflected in the name of the .dat file.

We should think of a better place to put the gains file to. I don'

and

@szhang17phys , Shu, can you create duneopdet/OpticalDetector/data/gains directory and move the gains file there?

@szhang17phys
Copy link
Copy Markdown
Contributor Author

Hello Viktor, sorry for my delayed reply. My GitHub account is not connected with my main email address.
The reason why I refer to a geometry file in the gain file name is that the current PDHD simulation workflow is based on protodunehdv6_geo instead of newer protodunehdv7 or protodunehdv8.
This gain file is in principle compatible with v7 or v8 given the fact that the geometry updates are about the Bi radioactive source.

@vpec0
Copy link
Copy Markdown
Member

vpec0 commented Apr 2, 2026

@szhang17phys
Thanks Shu,
I suggest you remove the reference to the geometry as the gains should necessarily be independent of the geometry file. They depend on the channel map. I am not sure if the channel map changes over time in such way we would need to change the gains file.

However, please, add the file's version number as I think we can foresee the gains will change. In this case I would make it v0. Also, change the name to reflect these are meant to for simulations - ie. add mc or sim.

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.

3 participants