-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
Algorithms should be able to filter out entire events, for example:
- QADB will need this
InclusiveKinematics
could use this for when no scattered lepton is found
Proposal:
- make
Algorithm::Run
returnbool
; a value offalse
will stopAlgorithmSequence::Run
(which can also returnfalse
) - handling action functions:
- filter returns false(s)
- transformers and creators need thought; ideas:
std::optional
, but may not bind well- add a
bool
lvalue reference to all action functions - add a
bool created
member to creator-action-functions' return value structs
Example analysis, but with external event-level filters:
/*****/
iguana_InclusiveKinematics.Run(hipo_banks);
// event filter: if no DIS electron found, skip event
if(bank_inclusive_kin.getRowList().size() != 1) {
iguana_InclusiveKinematics.GetLog()->Trace("event filtered out");
continue;
}
/*****/
iguana_SectorFinder.Run(hipo_banks);
iguana_TrajLinker.Run(hipo_banks);
iguana_CalorimeterLinker.Run(hipo_banks);
iguana_FiducialFilter.Run(hipo_banks);
// event filter: if Fiducial cuts filtered out DIS electron, skip event
if(std::find(
bank_particle.getRowList().begin(),
bank_particle.getRowList().end(),
bank_inclusive_kin.getShort("pindex", 0)
) == bank_particle.getRowList().end())
{
iguana_FiducialFilter.GetLog()->Trace("event filtered out");
continue;
}
/*****/
iguana_DihadronKinematics.Run(hipo_banks);
// event filter: if no dihadrons found, skip event
if(bank_dihadron_kin.getRowList().size() == 0) {
iguana_DihadronKinematics.GetLog()->Trace("event filtered out");
continue;
}
/*****/
iguana_SingleHadronKinematics.Run(hipo_banks);
// event filter: if no single hadrons found, skip event
if(bank_single_hadron_kin.getRowList().size() == 0) {
iguana_SingleHadronKinematics.GetLog()->Trace("event filtered out");
continue;
}
/*****/
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Unsorted