Skip to content

Adding offbeam gate counting into the CAFs#298

Closed
jzettle wants to merge 7 commits into
developfrom
feature/jzettle_OffBeamGateCountCAFs
Closed

Adding offbeam gate counting into the CAFs#298
jzettle wants to merge 7 commits into
developfrom
feature/jzettle_OffBeamGateCountCAFs

Conversation

@jzettle
Copy link
Copy Markdown
Contributor

@jzettle jzettle commented Sep 30, 2022

This PR adds offbeam gate counting into the CAFs. The number of gates is computed as a difference with the gate counting performed within the event to compute the number of offbeam gates for BNB or NuMI seen by the trigger hardware on an event-by-event basis.

@jzettle jzettle requested a review from jzennamo September 30, 2022 21:45
@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Sep 30, 2022

This is work largely done a month ago but I missed making the PR then. This is a set of PRs that spans SBNSoftware/sbnana#89, SBNSoftware/sbnobj#67, and SBNSoftware/sbnanaobj#79

@jzennamo
Copy link
Copy Markdown
Contributor

jzennamo commented Oct 3, 2022

Big picture, it looks like you have added the EXT accounting to sbncode/BeamSpillInfoRetriever/BNBRetriever/BNBRetriever_module.cc is that true? If not could you describe what you're changing in each file? Thanks!

@miquelnebot
Copy link
Copy Markdown
Contributor

trigger build SBNSoftware/sbnobj#67 SBNSoftware/sbnanaobj#79

@FNALbuild
Copy link
Copy Markdown

✔️ CI build for LArSoft Succeeded on slf7 for c7:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

✔️ CI build for LArSoft Succeeded on slf7 for e20:prof -- details available through the CI dashboard

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Oct 6, 2022

@jzennamo Sorry for the delay. Yeah the latest commit from me cleans that up that is the way I had it initially and then realized is was better to use a separate module. That should not be the case and is not in my working version. Most of the details here are in CAFMaker that adds a connection to the EXTRetriever module which fills an object like the BNB/NuMIRetriever which the number of offbeam gates. The other PR in the set of 4 add the infrastructure needed to support this. I've tested this on the data and it appears to work.

@FNALbuild
Copy link
Copy Markdown

❌ CI build for SBND Failed at phase build SBND on slf7 for c7:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c7:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for e20:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for SBND Failed at phase build SBND on slf7 for e20:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@miquelnebot
Copy link
Copy Markdown
Contributor

@jzettle could you take a look to the CI errors, please?

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Oct 12, 2022

@miquelnebot Will do ASAP. Took a quick look now and I need to understand better what the error means

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Oct 12, 2022

@miquelnebot I see you merged the branch in this repo (sbncode) with develop before running the trigger build command. I do not see that done in the other repos. This branch at the time you performed that action is based on an older version than develop (v09_59_00) Is that causing a mismatch somewhere when building?

@miquelnebot
Copy link
Copy Markdown
Contributor

miquelnebot commented Oct 13, 2022

@jzettle GitHub flags you "This branch is out-of-date with the base branch" and asks you to either update or rebase (in this case rebase can not be done due to conflicts)
Is this changing any of your developments? if so, could you resolve the conflicts?

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Oct 13, 2022

I honestly have no idea, I thought I resolved this with all the commits I am able to build and run this in my own area with no problems and git did not tell me I had anymore conflicts after I did this last round of commits. So I don't understand where the issue is with git here.

@jzennamo
Copy link
Copy Markdown
Contributor

Looks good!

@miquelnebot
Copy link
Copy Markdown
Contributor

trigger build SBNSoftware/sbnobj#67 SBNSoftware/sbnanaobj#79

@FNALbuild
Copy link
Copy Markdown

✔️ CI build for LArSoft Succeeded on slf7 for c7:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for SBND Failed at phase build SBND on slf7 for c7:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for c7:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

✔️ CI build for LArSoft Succeeded on slf7 for e20:prof -- details available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for ICARUS Failed at phase build ICARUS on slf7 for e20:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build ICARUS phase logs

parent CI build details are available through the CI dashboard

@FNALbuild
Copy link
Copy Markdown

❌ CI build for SBND Failed at phase build SBND on slf7 for e20:prof -- details available through the CI dashboard

🚨 For more details about the failed phase, check the build SBND phase logs

parent CI build details are available through the CI dashboard

@PetrilloAtWork
Copy link
Copy Markdown
Member

The error is originating from the changes in sbnanaobj. I have left a review comment in there.

Copy link
Copy Markdown
Member

@PetrilloAtWork PetrilloAtWork left a comment

Choose a reason for hiding this comment

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

Some comments documenting the meaning of the variables would help.
No shining issue, but for once I yield to @jzennamo (and maybe also Gray?) for design comments.

Comment on lines +260 to +266
if(triggerInfo.gate_type == 1)
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB();
else
{
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther();
mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl;
}
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.

Since the logic is identical to the one of the next if branch, I would merge them, something like:

Suggested change
if(triggerInfo.gate_type == 1)
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB();
else
{
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther();
mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl;
}
if(triggerInfo.gate_type == 1) {
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesBNB();
triggerInfo.t_previous_event = (static_cast<double>(frag.getLastTimestampBNB()))/(1e9);
}
else
{
triggerInfo.number_of_gates_since_previous_event = frag.getDeltaGatesOther();
triggerInfo.t_previous_event = (static_cast<double>(frag.getLastTimestampOther()))/(1000000000.0);
mf::LogDebug("BNBRetriever") << "Possibly unsupported gate type: " << triggerInfo.gate_type << "! Using information stored in other gate type." << std::endl;
}

Comment on lines +110 to +116
if(gate_type == 2)
number_of_gates_since_previous_event = frag.getDeltaGatesNuMI();
else
{
number_of_gates_since_previous_event = frag.getDeltaGatesOther();
//mf::LogDebug("NuMIRetriever") << "Possibly unsupported gate type: " << gate_type << "! Using information stored in gate type labeled other." << std::endl;
}
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.

Same comment as above.


simulate: [extinfo ]
simulate: [ extinfo ]
trigger_paths: [ simulate ]
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.

art does not require the definition of trigger_paths when there is only one producer path defined.
It does not hurt to leave it though.

double fPrescaleEvents;
std::vector<caf::SRBNBInfo> fBNBInfo; ///< Store detailed BNB info to save into the first StandardRecord of the output file
std::vector<caf::SRNuMIInfo> fNuMIInfo; ///< Store detailed NuMI info to save into the first StandardRecord of the output file
std::vector<caf::SREXTInfo> fEXTInfo;
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 description of the meaning of this field is missing.

rec.hdr.fno = fFileNumber;
if(fFirstInFile)
{
rec.hdr.pot = fSubRunPOT;
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.

Already present at the end of this scope.

Suggested change
rec.hdr.pot = fSubRunPOT;

@miquelnebot
Copy link
Copy Markdown
Contributor

@jzettle can you take a look at the remaining comments in all related PRs, please?

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Oct 24, 2022

@miquelnebot Sorry a lot going on, will try to do today. Watch this space

@miquelnebot
Copy link
Copy Markdown
Contributor

@jzettle any chance you can update this? Or maybe a timeline estimate?

@jzettle
Copy link
Copy Markdown
Contributor Author

jzettle commented Nov 9, 2022 via email

@miquelnebot
Copy link
Copy Markdown
Contributor

miquelnebot commented Feb 3, 2023

@jzettle can you update this, give an estimated timeline or convert it to a draft, please?
also with the related PRs, please

@jzettle jzettle added the help wanted Extra attention is needed label Feb 3, 2023
@jzettle jzettle marked this pull request as draft February 3, 2023 17:47
@jzettle jzettle closed this Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted Extra attention is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants