Accepts only neutrino-like events with vertices in a specified volume. More...
Classes | |
struct | BoxCoordConfig |
Configuration of box volume geometry. More... | |
struct | Config |
Configuration parameter structure. More... | |
Public Types | |
using | Parameters = art::EDFilter::Table< Config > |
Public Member Functions | |
FilterNeutrinosActiveVolume (Parameters const &config) | |
Constructor: reads configuration and extracts information from geometry. More... | |
virtual bool | filter (art::Event &event) override |
Framework hook: applies the filter. More... | |
virtual void | endJob () override |
Framework hook: prints the summary of the passed events. More... | |
Private Member Functions | |
void | addActiveVolumes () |
Adds all active volumes of detector into the qualifying volume list. More... | |
void | addVolumeBoxes (fhicl::OptionalSequence< fhicl::Table< BoxCoordConfig >> const &boxConfig) |
Adds the specified volumes into the qualifying volume list. More... | |
unsigned | addVolumeByName (std::string const &volumeName) |
Adds all volName from geometry into the qualifying volume list. More... | |
bool | qualifying (simb::MCTruth const &truth) const |
Returns whether the interaction described in truth qualifies. More... | |
bool | qualifyingInteractionType (int const interactionType) const |
Returns whether the interaction type is qualifying. More... | |
bool | qualifyingWeakCurrent (int const CCNC) const |
Returns whether the weak current type is qualifying. More... | |
bool | qualifyingLocation (geo::Point_t const &location) const |
Returns whether the location is among the accepted ones. More... | |
Static Private Member Functions | |
template<typename Coll > | |
static Coll | sorted (Coll const &coll) |
Returns a sorted copy of the specified collection. More... | |
Private Attributes | |
std::vector< geo::BoxBoundedGeo > | fVolumes |
Volumes for qualifying interactions. More... | |
std::vector< int > const | fInteractions |
List of qualifying interaction types. More... | |
icarus::WeakCurrentType const | fWeakCurrentType |
Selected weak current. More... | |
std::string const | fLogCategory |
Category name for the output stream. More... | |
std::atomic< unsigned int > | fNObserved { 0U } |
Number of observed events. More... | |
std::atomic< unsigned int > | fNPassed { 0U } |
Number of passed events. More... | |
Accepts only neutrino-like events with vertices in a specified volume.
The module identifies a list of volumes to filter on. The filter selects "qualifying" neutrino interactions that:
simb::MCNeutrino::InteractionType()
)simb::MCNeutrino::CCNC()
)The event is kept if there is at least one qualifying interaction. In that case, the whole event is passed (including any other interaction).
Truth information from all data products in the form std::vector<simb::MCTruth>
will be evaluated. It is an error for an event to have no such data product (but they can all be empty, in which case the event does not qualify).
The module can be operated in one of two ways: active volumes or generic. In the active volume mode, all TPC active volumes are used for filtering. In the generic mode, all the specified volumes are used for filtering.
inActive
(flag, default: false
): if set to true
, the "active volume
mode" is activated;volumeBoxes
(list of coordinate sets; default: empty): a list of selected volumes is specified as a collection of box coordinates, each one in the form of a table:Xmin
: lower x coordinateXmax
: upper x coordinateYmin
: lower y coordinateYmax
: upper y coordinateZmin
: lower z coordinateZmax
: upper z coordinate each coordinate is in centimeters, and in the "world" reference framevolumeNames
(list of strings; default: empty): a list of selected volume patterns is specified as volume names; all volumes in the detector geometry with the specified names are included in the list (for example, specifying volCryostat
all cryostats will be included); each pattern is a regular expression like parsed by std::regex
with default flags;interactionTypes
(list of integers, optional): if specified, interactions only qualify if they belong to any of these interaction types; see simb::MCNeutrino::InteractionType()
, and simb::int_type_
definition for the values and their meanings;weakCurrent
(CC
or NC
, optional): if specified, interactions qualify only if they are tagged as charged or neutral currents; see icarus::WeakCurrentTypes::parse()
;logCategory
(string, default: FilterNeutrinosActiveVolume
): name of the category this module uses to send messages to the message facility.It is required that at least one among inActive
, volumeNames
, volumeBoxes
, weakCurrent
and interactionTypes
are specified.
This is a filter module: its configuration must appear in the filters
table and to be included in a path in trigger_path
, and the output module must be told to include that path in SelectEvents
configuration key; e.g.:
Definition at line 161 of file FilterNeutrinosActiveVolume_module.cc.
using icarus::simfilter::FilterNeutrinosActiveVolume::Parameters = art::EDFilter::Table<Config> |
Definition at line 244 of file FilterNeutrinosActiveVolume_module.cc.
|
explicit |
Constructor: reads configuration and extracts information from geometry.
Definition at line 317 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Adds all active volumes of detector into the qualifying volume list.
Definition at line 445 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Adds the specified volumes into the qualifying volume list.
Definition at line 466 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Adds all volName
from geometry into the qualifying volume list.
Definition at line 493 of file FilterNeutrinosActiveVolume_module.cc.
|
overridevirtual |
Framework hook: prints the summary of the passed events.
Definition at line 432 of file FilterNeutrinosActiveVolume_module.cc.
|
overridevirtual |
Framework hook: applies the filter.
Definition at line 370 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Returns whether the interaction described in truth
qualifies.
Definition at line 577 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Returns whether the interaction type is qualifying.
Definition at line 625 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Returns whether the location is among the accepted ones.
Definition at line 666 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Returns whether the weak current type is qualifying.
Definition at line 643 of file FilterNeutrinosActiveVolume_module.cc.
|
staticprivate |
Returns a sorted copy of the specified collection.
Definition at line 689 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
List of qualifying interaction types.
Definition at line 264 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Category name for the output stream.
Definition at line 268 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Number of observed events.
Definition at line 275 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Number of passed events.
Definition at line 276 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Volumes for qualifying interactions.
Definition at line 261 of file FilterNeutrinosActiveVolume_module.cc.
|
private |
Selected weak current.
Definition at line 266 of file FilterNeutrinosActiveVolume_module.cc.