LArSoft
v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
|
Namespace for the trajectory point flags. More...
#include "TrajectoryPointFlags.h"
Public Types | |
using | Flags_t = util::flags::FlagSet< MaxFlags > |
Type of mask of bits. More... | |
using | Mask_t = Flags_t::Mask_t |
Type of mask of bits. More... | |
using | Flag_t = Flags_t::Flag_t |
Type of single flag. More... | |
using | FlagIndex_t = Flags_t::FlagIndex_t |
Type of index of a single flag. More... | |
Static Public Member Functions | |
static constexpr FlagIndex_t | maxFlags () |
Number of flags allocated (may be unused and unassigned). More... | |
static constexpr bool | isFlag (Flag_t flag) |
Returns whether the specified index represents a valid flag. More... | |
Static Public Attributes | |
static constexpr unsigned int | MaxFlags = 32 |
Number of flags allocated (may be unused and unassigned). More... | |
Trajectory flags. | |
The definition of the flags will result somehow ambiguous, because it requires a judgement that is in the end arbitrary enough that it may be inconsistent between different algorithms. The design idea is that typically at most one flag is set. For example, if a hit is known to be associated to another trajectory, the point will be marked as Also note that there may be better ways than these flags to discover information. For example, the Implementation noteThe single flags are of type | |
static constexpr FlagIndex_t | BeginTrajectoryFlags = 0 |
First trajectory flag index. More... | |
static constexpr Flag_t | HitIgnored {0} |
Hit was not included for the computation of the trajectory. More... | |
static constexpr Flag_t | NoPoint {1} |
The trajectory point is not defined. More... | |
static constexpr Flag_t | Suspicious {2} |
The point reconstruction is somehow questionable. More... | |
static constexpr Flag_t | Merged {3} |
The hit might have contribution from particles other than this. More... | |
static constexpr Flag_t | DeltaRay {4} |
The hit might have contribution from a δ ray. More... | |
static constexpr Flag_t | DetectorIssue {5} |
The hit is associated to a problematic channel. More... | |
static constexpr Flag_t | Shared {6} |
The hit is known to be associated also to another trajectory. More... | |
static constexpr Flag_t | TrajReserved1 {7} |
Reserved for a future trajectory flag. More... | |
static constexpr FlagIndex_t | EndTrajectoryFlags = 8 |
After-the-last trajectory flag index. More... | |
Track flags. | |
As for the trajectory flags, the ones pertaining the track fitting are designed to be set in the most exclusive way possible. For example, a hit that is | |
static constexpr FlagIndex_t | BeginTrackFlags = EndTrajectoryFlags |
First track flag index. More... | |
static constexpr Flag_t | ExcludedFromFit {8} |
static constexpr Flag_t | Rejected {9} |
The hit is extraneous to this track. More... | |
static constexpr Flag_t | Reinterpreted {10} |
The hit content has been elaborated before being used in the fit. More... | |
static constexpr Flag_t | TrackReserved5 {11} |
Reserved for a future track flag. More... | |
static constexpr Flag_t | TrackReserved4 {12} |
Reserved for a future track flag. More... | |
static constexpr Flag_t | TrackReserved3 {13} |
Reserved for a future track flag. More... | |
static constexpr Flag_t | TrackReserved2 {14} |
Reserved for a future track flag. More... | |
static constexpr Flag_t | TrackReserved1 {15} |
Reserved for a future track flag. More... | |
static constexpr FlagIndex_t | EndTrackFlags = 16 |
After-the-last track flag index. More... | |
Flag reserved for the experiments (not to be used in LArSoft). | |
static constexpr FlagIndex_t | BeginExperimentReservedFlags = EndTrackFlags |
First flag reserved to experiment. More... | |
static constexpr FlagIndex_t | EndExperimentReservedFlags = 24 |
After-the-last flag reserved to experiment. More... | |
Flag reserved for the users (algorithm-specific). | |
static constexpr FlagIndex_t | BeginUserReservedFlags = EndExperimentReservedFlags |
First flag reserved to users. More... | |
static constexpr FlagIndex_t | EndUserReservedFlags = 32 |
After-the-last flag reserved to users. More... | |
Static Private Member Functions | |
static std::string | decorateFlagName (std::string baseName, Flag_t flag) |
Combines a base name and an index into a flag name. More... | |
static std::string | invalidFlagName (Flag_t flag) |
Returns the name of an invalid flag with the specified index. More... | |
static void | initDefaultFlagRangeNames (NameMap_t &flagNames, FlagIndex_t BeginFlags, FlagIndex_t EndFlags, std::string baseName) |
Initializes a range of flag names with default (decorated) names. More... | |
static void | initDefaultFlagsNames (NameMap_t &flagNames) |
Initialises all flag names with a default name. More... | |
static void | setFlagNames (NameMap_t &flagNames) |
Sets the names of the flags after default initialization. More... | |
Static Private Attributes | |
static const NameMap_t | names |
Names of the flags. More... | |
Flag names | |
using | NameMap_t = std::array< std::string, MaxFlags > |
Type storing flag names. More... | |
static std::string | name (Flag_t flag) |
Returns a string with the name of the specified flag. More... | |
static NameMap_t | initNames () |
Returns a map of flag names. More... | |
Namespace for the trajectory point flags.
This class is a glorified namespace for the definition of named flags.
Each flag must have an identifier that is of integral type FlagIndex_t
. There are four types of flags: pertaining a trajectory (and pattern recognition output), pertaining a track (and track fit output), experiment specific and user specific.
The trajectory flags have a meaning in the bare context of reconstructed trajectory in space and patter recognition (see recob::Trajectory
and see recob::TrackTrajectory
), and they should preserve the same meaning after fitting into a track.
The track flags have a meaning only in the context of a track (see recob::Track
).
The experiment-specific flags are placeholders that are expected to get a meaning that is consistent within a single experiment, and unrelated between experiments.
The user-specific flags are placeholders that are expected to get a meaning that is specific to an algorithm. Objects from different algorithms will give these flags unrelated meaning.
Code shared in LArSoft using the flags should rely only on the flags of the first two categories. Code that requires access to experiment-specific flags should be also experiment-specific.
Definition at line 57 of file TrajectoryPointFlags.h.
Type of single flag.
Definition at line 69 of file TrajectoryPointFlags.h.
Type of index of a single flag.
Definition at line 72 of file TrajectoryPointFlags.h.
Type of mask of bits.
Definition at line 63 of file TrajectoryPointFlags.h.
Type of mask of bits.
Definition at line 66 of file TrajectoryPointFlags.h.
using recob::TrajectoryPointFlagTraits::NameMap_t = std::array<std::string, MaxFlags> |
Type storing flag names.
Definition at line 246 of file TrajectoryPointFlags.h.
|
staticprivate |
Combines a base name and an index into a flag name.
Definition at line 40 of file TrajectoryPointFlags.cxx.
References util::to_string().
Referenced by initDefaultFlagRangeNames(), and invalidFlagName().
|
staticprivate |
Initializes a range of flag names with default (decorated) names.
Definition at line 52 of file TrajectoryPointFlags.cxx.
References decorateFlagName().
Referenced by initDefaultFlagsNames().
|
staticprivate |
Initialises all flag names with a default name.
Definition at line 70 of file TrajectoryPointFlags.cxx.
References BeginExperimentReservedFlags, BeginTrackFlags, BeginTrajectoryFlags, BeginUserReservedFlags, EndExperimentReservedFlags, EndTrackFlags, EndTrajectoryFlags, EndUserReservedFlags, and initDefaultFlagRangeNames().
Referenced by initNames().
|
static |
Returns a map of flag names.
Definition at line 107 of file TrajectoryPointFlags.cxx.
References initDefaultFlagsNames(), and setFlagNames().
|
staticprivate |
Returns the name of an invalid flag with the specified index.
Definition at line 46 of file TrajectoryPointFlags.cxx.
References decorateFlagName().
Referenced by name().
|
inlinestatic |
Returns whether the specified index represents a valid flag.
Definition at line 234 of file TrajectoryPointFlags.h.
References MaxFlags.
Referenced by name().
|
inlinestatic |
Number of flags allocated (may be unused and unassigned).
Definition at line 231 of file TrajectoryPointFlags.h.
References MaxFlags.
|
inlinestatic |
Returns a string with the name of the specified flag.
Definition at line 240 of file TrajectoryPointFlags.h.
References invalidFlagName(), isFlag(), and names.
|
staticprivate |
Sets the names of the flags after default initialization.
Definition at line 83 of file TrajectoryPointFlags.cxx.
References DeltaRay, DetectorIssue, ExcludedFromFit, util::get(), HitIgnored, Merged, NoPoint, Reinterpreted, Rejected, Shared, and Suspicious.
Referenced by initNames().
|
static |
First flag reserved to experiment.
Definition at line 212 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
First track flag index.
Definition at line 164 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
First trajectory flag index.
Definition at line 112 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
First flag reserved to users.
Definition at line 223 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
The hit might have contribution from a δ ray.
Definition at line 134 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), and setFlagNames().
|
static |
The hit is associated to a problematic channel.
Definition at line 137 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), and setFlagNames().
|
static |
After-the-last flag reserved to experiment.
Definition at line 215 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
After-the-last track flag index.
Definition at line 204 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
After-the-last trajectory flag index.
Definition at line 146 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
After-the-last flag reserved to users.
Definition at line 226 of file TrajectoryPointFlags.h.
Referenced by initDefaultFlagsNames().
|
static |
The point belongs to this track but it was not included in the fit because dubious in some sense.
Definition at line 168 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), trkf::TrackKalmanFitter::fillResult(), setFlagNames(), trkf::TrackKalmanFitter::setupInputStates(), and trkf::TrackKalmanFitter::sortOutput().
|
static |
Hit was not included for the computation of the trajectory.
Definition at line 115 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), trkf::TrackKalmanFitter::fillResult(), and setFlagNames().
|
static |
Number of flags allocated (may be unused and unassigned).
Definition at line 60 of file TrajectoryPointFlags.h.
Referenced by isFlag(), and maxFlags().
|
static |
The hit might have contribution from particles other than this.
Definition at line 131 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), setFlagNames(), and trkf::TrackKalmanFitter::setupInputStates().
|
staticprivate |
Names of the flags.
Definition at line 254 of file TrajectoryPointFlags.h.
Referenced by name().
|
static |
The trajectory point is not defined.
Definition at line 118 of file TrajectoryPointFlags.h.
Referenced by lar_pandora::LArPandoraTrackCreation::BuildTrack(), ShowerRecoTools::ShowerTrackDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerTrackTrajToSpacePoint::CalculateElement(), ShowerRecoTools::ShowerTrackColinearTrajPointDirection::CalculateElement(), ShowerRecoTools::ShowerPandoraSlidingFitTrackFinder::CalculateElement(), ShowerRecoTools::ShowerTrajPointdEdx::CalculateElement(), shower::LArPandoraShowerAlg::DebugEVD(), trkf::TrackKalmanFitter::doFitWork(), trkf::TrackKalmanFitter::fillResult(), recob::TrackTrajectory::HasValidPoint(), trkf::KalmanFilterTrajectoryFitter::restoreInputPoints(), trkf::KalmanFilterFinalTrackFitter::restoreInputPoints(), trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), setFlagNames(), and trkf::TrackKalmanFitter::setupInputStates().
|
static |
The hit content has been elaborated before being used in the fit.
In this case, it is good practise for the fitting algorithm to associate the fitted point to the new hit. Nevertheless, a simpler code might assume that all associated hits are from the same data product, and fail to find the new one which will necessarily have to belong to a new hit collection.
If you find yourself in the situation where you consider setting this flag, it may be useful to consult with LArSoft experts to determine if further support is needed for your use case.
Definition at line 186 of file TrajectoryPointFlags.h.
Referenced by setFlagNames().
|
static |
The hit is extraneous to this track.
Definition at line 171 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), trkf::TrackKalmanFitter::fillResult(), and setFlagNames().
|
static |
The hit is known to be associated also to another trajectory.
Definition at line 140 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), and setFlagNames().
|
static |
The point reconstruction is somehow questionable.
For example, the hit might look ambiguous but there is no evidence of another track nearby or a δ ray emission. Reconstruction of the point might be biased, but we can't guess which type of bias we have.
Definition at line 128 of file TrajectoryPointFlags.h.
Referenced by trkf::TrackKalmanFitter::doFitWork(), setFlagNames(), and trkf::TrackKalmanFitter::setupInputStates().
|
static |
Reserved for a future track flag.
Definition at line 201 of file TrajectoryPointFlags.h.
|
static |
Reserved for a future track flag.
Definition at line 198 of file TrajectoryPointFlags.h.
|
static |
Reserved for a future track flag.
Definition at line 195 of file TrajectoryPointFlags.h.
|
static |
Reserved for a future track flag.
Definition at line 192 of file TrajectoryPointFlags.h.
|
static |
Reserved for a future track flag.
Definition at line 189 of file TrajectoryPointFlags.h.
|
static |
Reserved for a future trajectory flag.
Definition at line 143 of file TrajectoryPointFlags.h.