Skip to content

Comments

Add EBTriggerGrouper tool for EBV2#335

Merged
marc1uk merged 3 commits intoANNIEsoft:Applicationfrom
fengyvoid:EBTrigger_PR
Feb 15, 2026
Merged

Add EBTriggerGrouper tool for EBV2#335
marc1uk merged 3 commits intoANNIEsoft:Applicationfrom
fengyvoid:EBTrigger_PR

Conversation

@fengyvoid
Copy link
Contributor

EBPMT Tool in EventBuildingV2 tool set.

This is also splitted from PR #307.

@S81D S81D self-assigned this Aug 22, 2025
@S81D
Copy link
Collaborator

S81D commented Aug 25, 2025

Looks good to me. The time tolerances seem somewhat arbitrary but I know you have tested these and I can confirm they work for all different types of runs (source + beam). Given it's a standalone tool and is in use for the eventbuilder, I think we can merge.

@marc1uk
Copy link
Collaborator

marc1uk commented Sep 19, 2025

i'm not highlighting all instances here, generally it's a few small changes to be made in many places.
Almost all of your printouts are warnings!

else if (found && dt < tolerance)
{
// if found TrigWordForGroup in TrigWords, insert to ThisGroup
if (std::find(TrigWords.begin(), TrigWords.end(), TrigWordForGroup[i]) != TrigWords.end())
Copy link
Collaborator

Choose a reason for hiding this comment

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

use std::map.count instead of find

if (verbosityEBTG > 11)
cout << "EBTG: FillByTrigWord: mainTrigWord = " << mainTrigWord << ", TrigWordForGroup[i] = " << TrigWordForGroup[i] << ", TrigTimeForGroup[i] = " << TrigTimeForGroup[i] << ", tolerance = " << tolerance << endl;
// check is current trigger word in TrigWords
if (std::find(TrigWords.begin(), TrigWords.end(), TrigWordForGroup[i]) == TrigWords.end())
Copy link
Collaborator

Choose a reason for hiding this comment

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

.count rather than find

@marc1uk marc1uk merged commit 300880d into ANNIEsoft:Application Feb 15, 2026
1 check passed
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.

5 participants