LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
recob::TrajectoryPointFlags Class Reference

Set of flags pertaining a point of the track. More...

#include "TrajectoryPointFlags.h"

Public Types

using flag = TrajectoryPointFlagTraits
 Type of flag traits (indices and meaning of flags). More...
 
using Flags_t = flag::Flags_t
 Type holding the flags. More...
 
using Mask_t = Flags_t::Mask_t
 Type holding the flags. More...
 
using Flag_t = Flags_t::Flag_t
 Type of single flag. More...
 
using FlagIndex_t = Flags_t::FlagIndex_t
 Type of index of single flag. More...
 
using HitIndex_t = unsigned int
 Type for hit index. More...
 

Public Member Functions

constexpr TrajectoryPointFlags ()=default
 
constexpr TrajectoryPointFlags (HitIndex_t fromHit)
 Constructor: specified hit index, default flags. More...
 
constexpr TrajectoryPointFlags (HitIndex_t fromHit, Mask_t flags)
 Constructor: copies all the flags. More...
 
template<typename... Flags>
constexpr TrajectoryPointFlags (HitIndex_t fromHit, Flags...flags)
 Constructor: activates only the specified flags. More...
 
constexpr Mask_t const & mask () const
 Returns the entire set of bits as a bit mask. More...
 
constexpr Flags_t const & flags () const
 Returns the entire set of bits. More...
 
constexpr bool operator== (TrajectoryPointFlags const &other) const
 Returns whether other has the same content as this one. More...
 
constexpr bool operator!= (TrajectoryPointFlags const &other) const
 Returns whether other has content different than this one. More...
 
template<typename Stream >
void dump (Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const
 Prints the flags content into a stream. More...
 
template<typename Stream >
void dump (Stream &&out, unsigned int verbosity=1, std::string indent={}) const
 Prints flag content into a stream. More...
 
template<typename... Flags>
constexpr recob::TrajectoryPointFlags::Mask_t makeMask (Flags...flags)
 
Access to flags by index
constexpr bool isAllocated (FlagIndex_t flagIndex) const
 Returns whether there is room for a flag with the specified index. More...
 
constexpr FlagIndex_t nFlags () const
 Returns the number of defined flags. More...
 
constexpr bool isFlag (FlagIndex_t flagIndex) const
 
constexpr bool isFlag (Flag_t flag) const
 
bool test (FlagIndex_t index) const
 Returns whether the specified flag is set. More...
 
bool test (Flag_t flag) const
 Returns whether the specified flag is set. More...
 
bool get (Flag_t flag) const
 Returns whether the specified flag is set. More...
 
bool isDefined (Flag_t flag) const
 Returns true if the flag has been assigned a value. More...
 
bool isSet (Flag_t flag) const
 Returns true if the flag exists and is set. More...
 
bool isUnset (Flag_t flag) const
 Returns true if the flag exists and is not set. More...
 
bool match (Mask_t mask) const
 Returns true if the specified mask is matched. More...
 
Multiple flag access
Note
This implementation is partial. Please contact the author to discuss your need.
bool anySet (Mask_t mask) const
 Returns whether any of the bits set in the mask are set. More...
 
bool noneSet (Mask_t mask) const
 Returns whether none of the bits set in the mask is set. More...
 
Access to flags by meaning
bool isHitIgnored () const
 Returns whether the associated hit is considered ignored. More...
 
bool isPointValid () const
 Returns whether the associated point is valid. More...
 
bool isMerged () const
 Returns whether the point has the Merged flag set. More...
 
bool isShared () const
 Returns whether the point has the Shared flag set. More...
 
bool isDeltaRay () const
 Returns whether the point has the DeltaRay flag set. More...
 
bool hasDetectorIssues () const
 Returns whether the point has the DetectorIssue flag set. More...
 
bool isOtherwiseSuspicious () const
 Returns whether the point has the Suspicious flag set. More...
 
bool isExclusive () const
 
bool isExcludedFromFit () const
 Returns whether the point has the ExcludedFromFit flag set. More...
 
bool belongsToTrack () const
 Returns whether the point has the Rejected flag set. More...
 
bool isHitReinterpreted () const
 Returns whether the point has the Reinterpreted flag set. More...
 
bool isIncludedInFit () const
 
bool isPointFlawed () const
 Returns whether the trajectory point has any problem flagged. More...
 
bool isPointFlawless () const
 Returns whether the trajectory point has no flagged problem. More...
 
Access to hit index
constexpr bool hasOriginalHitIndex () const
 
constexpr HitIndex_t fromHit () const
 

Static Public Member Functions

template<typename... Flags>
static constexpr Mask_t makeMask (Flags...flags)
 Returns a bit mask with only the specified bit set. More...
 
static constexpr Mask_t DefaultFlagsMask ()
 Flags used in default construction. More...
 

Static Public Attributes

static constexpr HitIndex_t InvalidHitIndex = std::numeric_limits<HitIndex_t>::max()
 Value marking an invalid hit index. More...
 

Private Member Functions

constexpr bool sameAs (TrajectoryPointFlags const &other) const
 Implementation detail of operator==() More...
 

Static Private Member Functions

static constexpr Mask_t ImperfectPointMask ()
 Flags to define a non-perfect trajectory point. More...
 
static constexpr Mask_t SomehowSharedMask ()
 Flags to define a hit that is in some way shared. More...
 
static constexpr Mask_t ExcludedFromTrackFitMask ()
 Flags to define a hit that is not included in the track fit. More...
 

Private Attributes

HitIndex_t fFromHit = InvalidHitIndex
 Index of the original hit. More...
 
Flags_t fFlags { DefaultFlagsMask() }
 Set of flags. More...
 

Detailed Description

Set of flags pertaining a point of the track.

Template Parameters
FlagTraitstype with the definition of the flag values
See also
recob::TrackTrajectory

The "flags" contain metadata pertaining a single point in a trajectory or track.

The metadata includes:

  • a set of flags, including some for a trajectory, some specific to a fitted track, some reserved for future use and some available to the users
  • an index pointing to the position of the hit in an originating trajectory, if such a trajectory exists. The specific convention to use this index must be documented by the using class (see recob::TrackTrajectory)

The meaning of the flags is described in the FlagTraits type. This type needs to provide a maxFlags() static constexpr method to express how many flags should be stored, d

Definition at line 318 of file TrajectoryPointFlags.h.

Member Typedef Documentation

Type of flag traits (indices and meaning of flags).

Definition at line 323 of file TrajectoryPointFlags.h.

Type of single flag.

Definition at line 330 of file TrajectoryPointFlags.h.

Type of index of single flag.

Definition at line 332 of file TrajectoryPointFlags.h.

Type holding the flags.

Definition at line 326 of file TrajectoryPointFlags.h.

Type for hit index.

Definition at line 334 of file TrajectoryPointFlags.h.

Type holding the flags.

Definition at line 328 of file TrajectoryPointFlags.h.

Constructor & Destructor Documentation

constexpr recob::TrajectoryPointFlags::TrajectoryPointFlags ( )
default

Default constructor: invalid hit index, default flags (DefaultFlagsMask()).

constexpr recob::TrajectoryPointFlags::TrajectoryPointFlags ( HitIndex_t  fromHit)
inline

Constructor: specified hit index, default flags.

Parameters
fromHitthe original hit index

This constructor can be used in constexpr flag definitions:

Definition at line 356 of file TrajectoryPointFlags.h.

357  : fFromHit(fromHit)
358  {}
constexpr HitIndex_t fromHit() const
HitIndex_t fFromHit
Index of the original hit.
constexpr recob::TrajectoryPointFlags::TrajectoryPointFlags ( HitIndex_t  fromHit,
Mask_t  flags 
)
inline

Constructor: copies all the flags.

Parameters
fromHitthe original hit index
flagsall the flags to set, as a bit mask

This constructor can be used in constexpr flag definitions:

12,
trkflag::NoPoint,
trkflag::HitIgnored
)
);

Definition at line 378 of file TrajectoryPointFlags.h.

379  : fFromHit(fromHit)
380  , fFlags(flags)
381  {}
constexpr HitIndex_t fromHit() const
constexpr Flags_t const & flags() const
Returns the entire set of bits.
HitIndex_t fFromHit
Index of the original hit.
template<typename... Flags>
constexpr recob::TrajectoryPointFlags::TrajectoryPointFlags ( HitIndex_t  fromHit,
Flags...  flags 
)
inline

Constructor: activates only the specified flags.

Template Parameters
Flagsthe type of flags to be set
Parameters
fromHitthe original hit index
flagsall the flags to set

This constructor can be used in constexpr flag definitions:

Definition at line 400 of file TrajectoryPointFlags.h.

402  {}
static constexpr Mask_t makeMask(Flags...flags)
Returns a bit mask with only the specified bit set.
constexpr HitIndex_t fromHit() const
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr TrajectoryPointFlags()=default

Member Function Documentation

bool recob::TrajectoryPointFlags::anySet ( Mask_t  mask) const
inline

Returns whether any of the bits set in the mask are set.

Parameters
maskmask with the bits to be checked defined and set (isSet())
Returns
whether any of the bits set in the mask are set

The method returns true if of all the flags that are set (Mask_t::isSet()) in mask, at least one is set. Flags of mask that are unset or undefined are ignored.

Definition at line 543 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::anySet().

544  { return flags().anySet(mask); }
constexpr bool anySet(Mask_t const &mask) const
Returns whether any of the bits set in the mask are set.
constexpr Mask_t const & mask() const
Returns the entire set of bits as a bit mask.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
bool recob::TrajectoryPointFlags::belongsToTrack ( ) const
inline

Returns whether the point has the Rejected flag set.

Definition at line 602 of file TrajectoryPointFlags.h.

603  { return !isSet(flag::Rejected); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t Rejected
The hit is extraneous to this track.
constexpr recob::TrajectoryPointFlags::Mask_t recob::TrajectoryPointFlags::DefaultFlagsMask ( )
inlinestatic

Flags used in default construction.

Definition at line 792 of file TrajectoryPointFlags.h.

References util::flags::makeMask().

Referenced by trkf::TrackKalmanFitter::setupInputStates().

792  {
793  return makeMask( -flag::NoPoint );
794 } // recob::TrajectoryPointFlags::DefaultFlagsMask()
static constexpr Mask_t makeMask(Flags...flags)
Returns a bit mask with only the specified bit set.
static constexpr Flag_t NoPoint
The trajectory point is not defined.
template<typename Stream >
void recob::TrajectoryPointFlags::dump ( Stream &&  out,
unsigned int  verbosity,
std::string  indent,
std::string  indentFirst 
) const

Prints the flags content into a stream.

Template Parameters
Streamtype of the output stream
Parameters
outstream to output the information into
verbosityverbosity level (default: 1)
indentindentation string (default: none)
indentFirstindentation for first output line (default: as indent)

Prints on a single line all the flags that are set.

Currently indent is not used since the output is single line.

Information printed out (verbosity argument)

  • level 0: number of the flags set, and index
  • level 1: name of the flags set, and index
template<typename Stream >
void recob::TrajectoryPointFlags::dump ( Stream &&  out,
unsigned int  verbosity = 1,
std::string  indent = {} 
) const
inline

Prints flag content into a stream.

Template Parameters
Streamtype of the output stream
Parameters
outstream to output the information into
verbosityverbosity level (default: 1)
indentindentation string (default: none)
See also
Dump(Stream&&, unsigned int, std::string, std::string)

Implementation detail for Dump(Stream&&, unsigned int, std::string, std::string).

Definition at line 698 of file TrajectoryPointFlags.h.

References util::flags::makeMask().

698  {})
699  const
700  { dump(std::forward<Stream>(out), verbosity, indent, indent); }
void dump(Stream &&out, unsigned int verbosity, std::string indent, std::string indentFirst) const
Prints the flags content into a stream.
std::string indent(std::size_t const i)
constexpr recob::TrajectoryPointFlags::Mask_t recob::TrajectoryPointFlags::ExcludedFromTrackFitMask ( )
inlinestaticprivate

Flags to define a hit that is not included in the track fit.

Definition at line 786 of file TrajectoryPointFlags.h.

static constexpr Flag_t Rejected
The hit is extraneous to this track.
static constexpr Flag_t ExcludedFromFit
constexpr Flags_t const& recob::TrajectoryPointFlags::flags ( ) const
inline

Returns the entire set of bits.

Definition at line 522 of file TrajectoryPointFlags.h.

Referenced by sameAs().

523  { return fFlags; }
constexpr HitIndex_t recob::TrajectoryPointFlags::fromHit ( ) const
inline

Returns the original index of the hit.

Returns
the index of the original hit (InvalidHitIndex if not set)
See also
hasOriginalHitIndex()

Definition at line 646 of file TrajectoryPointFlags.h.

References art::detail::indent(), geo::details::operator!=(), geo::details::operator==(), and fhicl::other.

Referenced by trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints(), and sameAs().

647  { return fFromHit; }
HitIndex_t fFromHit
Index of the original hit.
bool recob::TrajectoryPointFlags::get ( Flag_t  flag) const
inline

Returns whether the specified flag is set.

Parameters
flagindex of the flag to be tested
Returns
whether the specified flag is set

A single flag is tested. If the flag is not defined (invalid index), the result is undefined.

Definition at line 467 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::get().

468  { return flags().get(flag); }
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr bool get(Flag_t flag) const
Returns if the specified flag is on ("set").
bool recob::TrajectoryPointFlags::hasDetectorIssues ( ) const
inline

Returns whether the point has the DetectorIssue flag set.

Definition at line 585 of file TrajectoryPointFlags.h.

586  { return isSet(flag::DetectorIssue); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t DetectorIssue
The hit is associated to a problematic channel.
constexpr bool recob::TrajectoryPointFlags::hasOriginalHitIndex ( ) const
inline

Returns whether the original hit index is valid.

See also
fromHit()

Definition at line 639 of file TrajectoryPointFlags.h.

640  { return fromHit() != InvalidHitIndex; }
constexpr HitIndex_t fromHit() const
static constexpr HitIndex_t InvalidHitIndex
Value marking an invalid hit index.
constexpr recob::TrajectoryPointFlags::Mask_t recob::TrajectoryPointFlags::ImperfectPointMask ( )
inlinestaticprivate

Flags to define a non-perfect trajectory point.

Definition at line 774 of file TrajectoryPointFlags.h.

774  {
778  ;
779 } // recob::TrajectoryPointFlags::ImperfectPointMask()
static constexpr Flag_t Merged
The hit might have contribution from particles other than this.
static constexpr Flag_t Suspicious
The point reconstruction is somehow questionable.
static constexpr Flag_t NoPoint
The trajectory point is not defined.
static constexpr Flag_t HitIgnored
Hit was not included for the computation of the trajectory.
static constexpr Flag_t DetectorIssue
The hit is associated to a problematic channel.
static constexpr Flag_t DeltaRay
The hit might have contribution from a δ ray.
static constexpr Flag_t Shared
The hit is known to be associated also to another trajectory.
constexpr bool recob::TrajectoryPointFlags::isAllocated ( FlagIndex_t  flagIndex) const
inline

Returns whether there is room for a flag with the specified index.

Parameters
flagIndexindex of the flag
Returns
whether there is room for a flag with the specified index.
See also
isFlag()

The flag may still be not present, in the sense that the allocated bit has no meaning associated to it and that flag is "unknown".

Definition at line 417 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::capacity().

418  { return flagIndex < flags().capacity(); }
static constexpr size_t capacity()
Returns the number of flags the set has room for.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
bool recob::TrajectoryPointFlags::isDefined ( Flag_t  flag) const
inline

Returns true if the flag has been assigned a value.

Parameters
flagthe flag index
Returns
true if the flag has been assigned a value
See also
isSet(), isUnset(), test()

Definition at line 477 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::isDefined().

478  { return flags().isDefined(flag); }
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr bool isDefined(Flag_t flag) const
Returns whether the flag is defined.
bool recob::TrajectoryPointFlags::isDeltaRay ( ) const
inline

Returns whether the point has the DeltaRay flag set.

Definition at line 581 of file TrajectoryPointFlags.h.

582  { return isSet(flag::DeltaRay); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t DeltaRay
The hit might have contribution from a δ ray.
bool recob::TrajectoryPointFlags::isExcludedFromFit ( ) const
inline

Returns whether the point has the ExcludedFromFit flag set.

Definition at line 598 of file TrajectoryPointFlags.h.

599  { return get(flag::ExcludedFromFit); }
static constexpr Flag_t ExcludedFromFit
bool recob::TrajectoryPointFlags::isExclusive ( ) const
inline

Returns whether the point has no flag set among Shared, DeltaRay and Merged.

Definition at line 594 of file TrajectoryPointFlags.h.

595  { return noneSet(SomehowSharedMask()); }
bool noneSet(Mask_t mask) const
Returns whether none of the bits set in the mask is set.
static constexpr Mask_t SomehowSharedMask()
Flags to define a hit that is in some way shared.
constexpr bool recob::TrajectoryPointFlags::isFlag ( FlagIndex_t  flagIndex) const
inline

Returns whether a flag with the specified index is known. (all allocated flags are)

Definition at line 426 of file TrajectoryPointFlags.h.

427  { return flags().isFlag(flagIndex); }
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr bool isFlag(FlagIndex_t flagIndex) const
Returns whether the flag index is valid.
constexpr bool recob::TrajectoryPointFlags::isFlag ( Flag_t  flag) const
inline

Returns whether a flag with the specified index is known. (all allocated flags are)

Definition at line 431 of file TrajectoryPointFlags.h.

432  { return flags().isFlag(flag); }
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr bool isFlag(FlagIndex_t flagIndex) const
Returns whether the flag index is valid.
bool recob::TrajectoryPointFlags::isHitIgnored ( ) const
inline

Returns whether the associated hit is considered ignored.

Definition at line 565 of file TrajectoryPointFlags.h.

566  { return isSet(flag::HitIgnored); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t HitIgnored
Hit was not included for the computation of the trajectory.
bool recob::TrajectoryPointFlags::isHitReinterpreted ( ) const
inline

Returns whether the point has the Reinterpreted flag set.

Definition at line 606 of file TrajectoryPointFlags.h.

607  { return isSet(flag::Reinterpreted); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t Reinterpreted
The hit content has been elaborated before being used in the fit.
bool recob::TrajectoryPointFlags::isIncludedInFit ( ) const
inline

Returns false if the point has the ExcludedFromFit or Rejected flag set.

Definition at line 611 of file TrajectoryPointFlags.h.

612  { return noneSet(ExcludedFromTrackFitMask()); }
static constexpr Mask_t ExcludedFromTrackFitMask()
Flags to define a hit that is not included in the track fit.
bool noneSet(Mask_t mask) const
Returns whether none of the bits set in the mask is set.
bool recob::TrajectoryPointFlags::isMerged ( ) const
inline

Returns whether the point has the Merged flag set.

Definition at line 573 of file TrajectoryPointFlags.h.

574  { return isSet(flag::Merged); }
static constexpr Flag_t Merged
The hit might have contribution from particles other than this.
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
bool recob::TrajectoryPointFlags::isOtherwiseSuspicious ( ) const
inline

Returns whether the point has the Suspicious flag set.

Definition at line 589 of file TrajectoryPointFlags.h.

590  { return isSet(flag::Suspicious); }
static constexpr Flag_t Suspicious
The point reconstruction is somehow questionable.
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
bool recob::TrajectoryPointFlags::isPointFlawed ( ) const
inline

Returns whether the trajectory point has any problem flagged.

A problematic point is basically one with any of the defined trajectory point flags set.

Definition at line 620 of file TrajectoryPointFlags.h.

621  { return anySet(ImperfectPointMask()); }
static constexpr Mask_t ImperfectPointMask()
Flags to define a non-perfect trajectory point.
bool anySet(Mask_t mask) const
Returns whether any of the bits set in the mask are set.
bool recob::TrajectoryPointFlags::isPointFlawless ( ) const
inline

Returns whether the trajectory point has no flagged problem.

A problematic point is basically one with any of the defined trajectory point flags set.

Definition at line 629 of file TrajectoryPointFlags.h.

630  { return noneSet(ImperfectPointMask()); }
bool noneSet(Mask_t mask) const
Returns whether none of the bits set in the mask is set.
static constexpr Mask_t ImperfectPointMask()
Flags to define a non-perfect trajectory point.
bool recob::TrajectoryPointFlags::isPointValid ( ) const
inline

Returns whether the associated point is valid.

Definition at line 569 of file TrajectoryPointFlags.h.

570  { return !isSet(flag::NoPoint); }
static constexpr Flag_t NoPoint
The trajectory point is not defined.
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
bool recob::TrajectoryPointFlags::isSet ( Flag_t  flag) const
inline

Returns true if the flag exists and is set.

Parameters
flagthe flag index
Returns
true if the flag exists and is set
See also
isUnset()

Definition at line 486 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::isSet().

Referenced by recob::TrackTrajectory::HasValidPoint().

487  { return flags().isSet(flag); }
constexpr bool isSet(Flag_t flag) const
Returns if the specified flag is set.
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
constexpr Flags_t const & flags() const
Returns the entire set of bits.
bool recob::TrajectoryPointFlags::isShared ( ) const
inline

Returns whether the point has the Shared flag set.

Definition at line 577 of file TrajectoryPointFlags.h.

578  { return isSet(flag::Shared); }
bool isSet(Flag_t flag) const
Returns true if the flag exists and is set.
static constexpr Flag_t Shared
The hit is known to be associated also to another trajectory.
bool recob::TrajectoryPointFlags::isUnset ( Flag_t  flag) const
inline

Returns true if the flag exists and is not set.

Parameters
flagthe flag index
Returns
true if the flag exists and is not set
See also
isSet()

Definition at line 495 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::isUnset().

496  { return flags().isUnset(flag); }
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
constexpr bool isUnset(Flag_t flag) const
Returns if the specified flag is unset.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
template<typename... Flags>
static constexpr Mask_t recob::TrajectoryPointFlags::makeMask ( Flags...  flags)
static

Returns a bit mask with only the specified bit set.

Template Parameters
Flagsthe type of flags to be set
Parameters
flagsall the flags to set

This method can be used in constexpr flag definitions:

(trkflag::NoPoint, trkflag::Merged);

Referenced by pma::convertFrom(), and trkf::KGTrack::fillTrack().

template<typename... Flags>
constexpr recob::TrajectoryPointFlags::Mask_t recob::TrajectoryPointFlags::makeMask ( Flags...  flags)
inline

Definition at line 754 of file TrajectoryPointFlags.h.

References sameAs().

755  { return Mask_t(flags...); }
Flags_t::Mask_t Mask_t
Type holding the flags.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr Mask_t const& recob::TrajectoryPointFlags::mask ( ) const
inline

Returns the entire set of bits as a bit mask.

Definition at line 518 of file TrajectoryPointFlags.h.

Referenced by trkmkr::KalmanFilterFitTrackMaker::restoreInputPoints().

519  { return flags().mask(); }
constexpr Mask_t const & mask() const
Returns all the flags in the form of a mask.
Definition: FlagSet.h:97
constexpr Flags_t const & flags() const
Returns the entire set of bits.
bool recob::TrajectoryPointFlags::match ( Mask_t  mask) const
inline

Returns true if the specified mask is matched.

Parameters
maskthe mask of flags to be tested
Returns
true if the specified mask is matched
See also
util::flags::BitMask::match()

The current flags are tested against the specified mask. The flags that in mask are undefined are not tested at all. For this method to return true, all the remaining flags (that is, all the flags defined in mask) must be defined, and their value must match the one in mask.

Definition at line 510 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::match().

511  { return flags().match(mask); }
constexpr bool match(Mask_t const &mask) const
Returns whether all bits defined in the mask are equal to ours.
constexpr Mask_t const & mask() const
Returns the entire set of bits as a bit mask.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr FlagIndex_t recob::TrajectoryPointFlags::nFlags ( ) const
inline

Returns the number of defined flags.

Definition at line 421 of file TrajectoryPointFlags.h.

422  { return flag::maxFlags(); }
static constexpr FlagIndex_t maxFlags()
Number of flags allocated (may be unused and unassigned).
bool recob::TrajectoryPointFlags::noneSet ( Mask_t  mask) const
inline

Returns whether none of the bits set in the mask is set.

Parameters
maskmask with the bits to be checked defined and set (isSet())
Returns
whether none of the bits set in the mask is set
See also
anySet()

This is the logical negation of anySet().

Definition at line 554 of file TrajectoryPointFlags.h.

References util::flags::BitMask< Storage >::noneSet().

555  { return flags().noneSet(mask); }
constexpr Mask_t const & mask() const
Returns the entire set of bits as a bit mask.
constexpr bool noneSet(Mask_t const &mask) const
Returns whether none of the bits set in the mask is set.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr bool recob::TrajectoryPointFlags::operator!= ( TrajectoryPointFlags const &  other) const
inline

Returns whether other has content different than this one.

Definition at line 768 of file TrajectoryPointFlags.h.

769  { return !sameAs(other); }
constexpr bool sameAs(TrajectoryPointFlags const &other) const
Implementation detail of operator==()
constexpr bool recob::TrajectoryPointFlags::operator== ( TrajectoryPointFlags const &  other) const
inline

Returns whether other has the same content as this one.

Definition at line 764 of file TrajectoryPointFlags.h.

765  { return sameAs(other); }
constexpr bool sameAs(TrajectoryPointFlags const &other) const
Implementation detail of operator==()
constexpr bool recob::TrajectoryPointFlags::sameAs ( TrajectoryPointFlags const &  other) const
inlineprivate

Implementation detail of operator==()

Definition at line 760 of file TrajectoryPointFlags.h.

References flags(), and fromHit().

Referenced by makeMask().

761  { return (flags() == other.flags()) && (fromHit() == other.fromHit()); }
constexpr HitIndex_t fromHit() const
constexpr Flags_t const & flags() const
Returns the entire set of bits.
constexpr recob::TrajectoryPointFlags::Mask_t recob::TrajectoryPointFlags::SomehowSharedMask ( )
inlinestaticprivate

Flags to define a hit that is in some way shared.

Definition at line 782 of file TrajectoryPointFlags.h.

static constexpr Flag_t Merged
The hit might have contribution from particles other than this.
static constexpr Flag_t DeltaRay
The hit might have contribution from a δ ray.
static constexpr Flag_t Shared
The hit is known to be associated also to another trajectory.
bool recob::TrajectoryPointFlags::test ( FlagIndex_t  index) const
inline

Returns whether the specified flag is set.

Parameters
indexindex of the flag to be tested
Returns
whether the specified flag is set
Exceptions
Flags_t::OutOfRangeErrorif the flag is not known (invalid index)
Flags_t::FlagNotDefinedErrorif the flag is not defined

A single flag is tested.

Definition at line 443 of file TrajectoryPointFlags.h.

444  { return flags().test(index); }
bool test(Flag_t flag) const
Returns if the specified flag is set.
constexpr Flags_t const & flags() const
Returns the entire set of bits.
bool recob::TrajectoryPointFlags::test ( Flag_t  flag) const
inline

Returns whether the specified flag is set.

Parameters
flagflag to be tested
Returns
whether the specified flag is set
Exceptions
Flags_t::OutOfRangeErrorif the flag is not known (invalid index)
Flags_t::FlagNotDefinedErrorif the flag is not defined

A single flag is tested.

Definition at line 455 of file TrajectoryPointFlags.h.

456  { return flags().test(flag); }
TrajectoryPointFlagTraits flag
Type of flag traits (indices and meaning of flags).
bool test(Flag_t flag) const
Returns if the specified flag is set.
constexpr Flags_t const & flags() const
Returns the entire set of bits.

Member Data Documentation

Flags_t recob::TrajectoryPointFlags::fFlags { DefaultFlagsMask() }
private

Set of flags.

Definition at line 736 of file TrajectoryPointFlags.h.

HitIndex_t recob::TrajectoryPointFlags::fFromHit = InvalidHitIndex
private

Index of the original hit.

Definition at line 722 of file TrajectoryPointFlags.h.

constexpr HitIndex_t recob::TrajectoryPointFlags::InvalidHitIndex = std::numeric_limits<HitIndex_t>::max()
static

Value marking an invalid hit index.

Definition at line 339 of file TrajectoryPointFlags.h.

Referenced by lar_pandora::LArPandoraTrackCreation::BuildTrack().


The documentation for this class was generated from the following file: