Falaise  4.0.1
SuperNEMO Software Toolkit
Public Types | Public Member Functions | Static Public Member Functions | List of all members
snemo::datamodel::particle_track Class Reference

SuperNEMO particle track. More...

#include <falaise/snemo/datamodels/particle_track.h>

Inheritance diagram for snemo::datamodel::particle_track:
geomtools::base_hit datatools::i_serializable datatools::i_tree_dumpable datatools::i_clear

Public Types

enum  charge_type {
  INVALID = 0x0, invalid = INVALID, UNDEFINED = datatools::bit_mask::bit00, undefined = UNDEFINED,
  NEUTRAL = datatools::bit_mask::bit01, neutral = NEUTRAL, POSITIVE = datatools::bit_mask::bit02, positive = POSITIVE,
  NEGATIVE = datatools::bit_mask::bit03, negative = NEGATIVE
}
 Electric charge enumeration. More...
 
enum  vertex_type {
  VERTEX_NONE = 0x0, VERTEX_ON_SOURCE_FOIL = datatools::bit_mask::bit00, VERTEX_ON_MAIN_CALORIMETER = datatools::bit_mask::bit01, VERTEX_ON_X_CALORIMETER = datatools::bit_mask::bit02,
  VERTEX_ON_GAMMA_VETO = datatools::bit_mask::bit03, VERTEX_ON_WIRE = datatools::bit_mask::bit04
}
 Vertex flags. More...
 
typedef datatools::handle< geomtools::blur_spothandle_spot
 Handle on vertex spot. More...
 
typedef std::vector< handle_spotvertex_collection_type
 Collection of vertex spots. More...
 
typedef datatools::handle< particle_trackhandle_type
 Handle on particle track. More...
 
- Public Types inherited from geomtools::base_hit
enum  store_mask_type
 
- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type
 

Public Member Functions

 particle_track ()
 Default constructor. More...
 
virtual ~particle_track ()
 Destructor. More...
 
bool has_track_id () const
 Check if there is a valid track ID. More...
 
int get_track_id () const
 Get the track ID. More...
 
void set_track_id (int32_t track_id_)
 Set the track ID. More...
 
void invalidate_track_id ()
 Invalidate the track ID. More...
 
void set_charge (charge_type charge_)
 
charge_type get_charge () const
 Get particle charge. More...
 
bool has_trajectory () const
 Check if the trajectory is present. More...
 
void detach_trajectory ()
 Detach the trajectory. More...
 
void set_trajectory_handle (const tracker_trajectory::handle_type &trajectory_handle_)
 Attach a trajectory by handle. More...
 
tracker_trajectory::handle_typegrab_trajectory_handle ()
 Return a mutable reference on the trajectory handle. More...
 
const tracker_trajectory::handle_typeget_trajectory_handle () const
 Return a non mutable reference on the trajectory handle. More...
 
tracker_trajectorygrab_trajectory ()
 Return a mutable reference on the trajectory. More...
 
const tracker_trajectoryget_trajectory () const
 Return a non mutable reference on the trajectory. More...
 
bool has_vertices () const
 Check if there are some vertices along the fitted trajectory. More...
 
void reset_vertices ()
 Reset the collection of vertices. More...
 
vertex_collection_typegrab_vertices ()
 Return a mutable reference on the collection of vertices (handles) More...
 
const vertex_collection_typeget_vertices () const
 Return a non mutable reference on the collection of vertices (handles) More...
 
size_t fetch_vertices (vertex_collection_type &vertices_, const uint32_t flags_, const bool clear_=false) const
 
bool has_associated_calorimeter_hits () const
 Check if there are some associated calorimeter hits. More...
 
void reset_associated_calorimeter_hits ()
 Reset the collection of associated calorimeter hits. More...
 
calibrated_calorimeter_hit::collection_typegrab_associated_calorimeter_hits ()
 Return a mutable reference on the collection of associated calorimeter hits (handles) More...
 
const calibrated_calorimeter_hit::collection_typeget_associated_calorimeter_hits () const
 Return a non mutable reference on the collection of associated calorimeter hits (handles) More...
 
void clear ()
 Empty the contents of the particle track. More...
 
void reset ()
 Reset the particle track (see clear) More...
 
virtual void tree_dump (std::ostream &out=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
- Public Member Functions inherited from geomtools::base_hit
bool has_hit_id () const
 
int32_t get_hit_id () const
 
void set_hit_id (int32_t)
 
void invalidate_hit_id ()
 
bool has_geom_id () const
 
const geomtools::geom_idget_geom_id () const
 
geomtools::geom_idgrab_geom_id ()
 
void set_geom_id (const geomtools::geom_id &)
 
void invalidate_geom_id ()
 
bool has_auxiliaries () const
 
const datatools::propertiesget_auxiliaries () const
 
datatools::propertiesgrab_auxiliaries ()
 
void set_auxiliaries (const datatools::properties &)
 
void invalidate_auxiliaries ()
 
 base_hit ()
 
virtual ~base_hit ()
 
virtual bool is_valid () const
 
virtual void invalidate ()
 
void reset ()
 
base_hitmeasure (i_measurement &)
 
void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=datatools::i_tree_dumpable::empty_options()) const override
 
void dump () const
 
- Public Member Functions inherited from datatools::i_serializable
 i_serializable ()
 
virtual ~i_serializable ()
 
virtual const std::string & get_serial_tag () const=0
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 
virtual ~i_tree_dumpable ()
 
void print_tree_json (std::ostream &out_=std::clog, const std::string &json_options_="") const
 
void print_tree_json (std::ostream &out_=std::clog, const char *json_options_=nullptr) const
 
void tree_dump_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="", const bool inherit_=false) const
 
void tree_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="") const
 
void smart_print_id (const int out_type_=OSTREAM_CLOG, const std::string &title_="", const std::string &indent_="") const
 
- Public Member Functions inherited from datatools::i_clear
virtual ~i_clear ()
 

Static Public Member Functions

static bool particle_has (const particle_track &, charge_type)
 Check a particle charge type. More...
 
static bool particle_has_negative_charge (const particle_track &)
 Check a particle is electron. More...
 
static bool particle_has_positive_charge (const particle_track &)
 Check a particle is positron. More...
 
static bool particle_has_undefined_charge (const particle_track &)
 Check a particle is alpha. More...
 
static bool particle_has_neutral_charge (const particle_track &)
 Check a particle is gamma. More...
 
static const std::string & vertex_type_key ()
 Key for the vertex type property. More...
 
static const std::string & vertex_type_to_label (vertex_type)
 Return the label from the vertex type. More...
 
static vertex_type label_to_vertex_type (const std::string &)
 Return the vertex type from the label. More...
 
static const std::string & vertex_none_label ()
 Associated 'VERTEX_NONE' flag for auxiliary property. More...
 
static const std::string & vertex_on_source_foil_label ()
 Associated 'VERTEX_ON_SOURCE_FOIL' flag for auxiliary property. More...
 
static const std::string & vertex_on_main_calorimeter_label ()
 Associated 'VERTEX_ON_MAIN_CALORIMETER' flag for auxiliary property. More...
 
static const std::string & vertex_on_x_calorimeter_label ()
 Associated 'VERTEX_ON_X_CALORIMETER' flag for auxiliary property. More...
 
static const std::string & vertex_on_gamma_veto_label ()
 Associated 'VERTEX_ON_GAMMA_CALORIMETER' flag for auxiliary property. More...
 
static const std::string & vertex_on_wire_label ()
 Associated 'VERTEX_ON_WIRE' flag for auxiliary property. More...
 
static bool vertex_is (const geomtools::blur_spot &, vertex_type)
 Check a vertex type. More...
 
static bool vertex_is_on_source_foil (const geomtools::blur_spot &)
 Check a vertex on source foil. More...
 
static bool vertex_is_on_main_calorimeter (const geomtools::blur_spot &)
 Check a vertex on main calorimeter. More...
 
static bool vertex_is_on_x_calorimeter (const geomtools::blur_spot &)
 Check a vertex on X calorimeter. More...
 
static bool vertex_is_on_gamma_veto (const geomtools::blur_spot &)
 Check a vertex on gamma veto. More...
 
static bool vertex_is_on_wire (const geomtools::blur_spot &)
 Check a vertex on wire. More...
 
- Static Public Member Functions inherited from datatools::i_tree_dumpable
static const boost::property_tree::ptree & empty_options ()
 
static boost::property_tree::ptree make_base_print_options (const std::string &title_, const std::string &indent_="", const bool inherit_=false)
 
static std::ostream & last_skip_tag (std::ostream &out_)
 
static std::ostream & skip_tag (std::ostream &out_)
 
static std::ostream & last_tag (std::ostream &out_)
 
static std::ostream & tag (std::ostream &out_)
 

Additional Inherited Members

- Public Attributes inherited from geomtools::base_hit
 STORE_NOTHING
 
 STORE_HIT_ID
 
 STORE_GEOM_ID
 
 STORE_AUXILIARIES
 
 STORE_RESERVED30
 
 STORE_RESERVED31
 
- Public Attributes inherited from datatools::i_tree_dumpable
 OSTREAM_COUT
 
 OSTREAM_CERR
 
 OSTREAM_CLOG
 
- Static Public Attributes inherited from geomtools::base_hit
static const int32_t INVALID_HIT_ID
 
- Protected Member Functions inherited from geomtools::base_hit
void _store_set (uint32_t bit_mask_)
 
void _store_unset (uint32_t bit_mask_)
 
bool _store_check (uint32_t bit_mask_) const
 
- Protected Attributes inherited from geomtools::base_hit
uint32_t _store
 

Detailed Description

SuperNEMO particle track.

Member Typedef Documentation

◆ handle_spot

Handle on vertex spot.

◆ handle_type

Handle on particle track.

◆ vertex_collection_type

Collection of vertex spots.

Member Enumeration Documentation

◆ charge_type

Electric charge enumeration.

Enumerator
INVALID 
invalid 
UNDEFINED 
undefined 

Particle with undefined charge.

NEUTRAL 
neutral 

Neutral particle.

POSITIVE 
positive 

Positively charged particle.

NEGATIVE 
negative 

Negatively charged particle.

◆ vertex_type

Vertex flags.

Enumerator
VERTEX_NONE 
VERTEX_ON_SOURCE_FOIL 
VERTEX_ON_MAIN_CALORIMETER 
VERTEX_ON_X_CALORIMETER 
VERTEX_ON_GAMMA_VETO 
VERTEX_ON_WIRE 

Constructor & Destructor Documentation

◆ particle_track()

snemo::datamodel::particle_track::particle_track ( )

Default constructor.

◆ ~particle_track()

virtual snemo::datamodel::particle_track::~particle_track ( )
virtual

Destructor.

Member Function Documentation

◆ clear()

void snemo::datamodel::particle_track::clear ( )
virtual

Empty the contents of the particle track.

Reimplemented from geomtools::base_hit.

◆ detach_trajectory()

void snemo::datamodel::particle_track::detach_trajectory ( )

Detach the trajectory.

◆ fetch_vertices()

size_t snemo::datamodel::particle_track::fetch_vertices ( vertex_collection_type vertices_,
const uint32_t  flags_,
const bool  clear_ = false 
) const

Function to return the number of vertices found given a 'vertex' flag bits. The list of vertices can be retrieved, the 'clear' option meaning that the list will be cleaned before pushing new vertex spot.

◆ get_associated_calorimeter_hits()

const calibrated_calorimeter_hit::collection_type& snemo::datamodel::particle_track::get_associated_calorimeter_hits ( ) const

Return a non mutable reference on the collection of associated calorimeter hits (handles)

◆ get_charge()

charge_type snemo::datamodel::particle_track::get_charge ( ) const

Get particle charge.

◆ get_track_id()

int snemo::datamodel::particle_track::get_track_id ( ) const

Get the track ID.

◆ get_trajectory()

const tracker_trajectory& snemo::datamodel::particle_track::get_trajectory ( ) const

Return a non mutable reference on the trajectory.

◆ get_trajectory_handle()

const tracker_trajectory::handle_type& snemo::datamodel::particle_track::get_trajectory_handle ( ) const

Return a non mutable reference on the trajectory handle.

◆ get_vertices()

const vertex_collection_type& snemo::datamodel::particle_track::get_vertices ( ) const

Return a non mutable reference on the collection of vertices (handles)

◆ grab_associated_calorimeter_hits()

calibrated_calorimeter_hit::collection_type& snemo::datamodel::particle_track::grab_associated_calorimeter_hits ( )

Return a mutable reference on the collection of associated calorimeter hits (handles)

◆ grab_trajectory()

tracker_trajectory& snemo::datamodel::particle_track::grab_trajectory ( )

Return a mutable reference on the trajectory.

◆ grab_trajectory_handle()

tracker_trajectory::handle_type& snemo::datamodel::particle_track::grab_trajectory_handle ( )

Return a mutable reference on the trajectory handle.

◆ grab_vertices()

vertex_collection_type& snemo::datamodel::particle_track::grab_vertices ( )

Return a mutable reference on the collection of vertices (handles)

◆ has_associated_calorimeter_hits()

bool snemo::datamodel::particle_track::has_associated_calorimeter_hits ( ) const

Check if there are some associated calorimeter hits.

◆ has_track_id()

bool snemo::datamodel::particle_track::has_track_id ( ) const

Check if there is a valid track ID.

◆ has_trajectory()

bool snemo::datamodel::particle_track::has_trajectory ( ) const

Check if the trajectory is present.

◆ has_vertices()

bool snemo::datamodel::particle_track::has_vertices ( ) const

Check if there are some vertices along the fitted trajectory.

◆ invalidate_track_id()

void snemo::datamodel::particle_track::invalidate_track_id ( )

Invalidate the track ID.

◆ label_to_vertex_type()

static vertex_type snemo::datamodel::particle_track::label_to_vertex_type ( const std::string &  )
static

Return the vertex type from the label.

◆ particle_has()

static bool snemo::datamodel::particle_track::particle_has ( const particle_track ,
charge_type   
)
static

Check a particle charge type.

◆ particle_has_negative_charge()

static bool snemo::datamodel::particle_track::particle_has_negative_charge ( const particle_track )
static

Check a particle is electron.

◆ particle_has_neutral_charge()

static bool snemo::datamodel::particle_track::particle_has_neutral_charge ( const particle_track )
static

Check a particle is gamma.

◆ particle_has_positive_charge()

static bool snemo::datamodel::particle_track::particle_has_positive_charge ( const particle_track )
static

Check a particle is positron.

◆ particle_has_undefined_charge()

static bool snemo::datamodel::particle_track::particle_has_undefined_charge ( const particle_track )
static

Check a particle is alpha.

◆ reset()

void snemo::datamodel::particle_track::reset ( )

Reset the particle track (see clear)

◆ reset_associated_calorimeter_hits()

void snemo::datamodel::particle_track::reset_associated_calorimeter_hits ( )

Reset the collection of associated calorimeter hits.

◆ reset_vertices()

void snemo::datamodel::particle_track::reset_vertices ( )

Reset the collection of vertices.

◆ set_charge()

void snemo::datamodel::particle_track::set_charge ( charge_type  charge_)

◆ set_track_id()

void snemo::datamodel::particle_track::set_track_id ( int32_t  track_id_)

Set the track ID.

◆ set_trajectory_handle()

void snemo::datamodel::particle_track::set_trajectory_handle ( const tracker_trajectory::handle_type trajectory_handle_)

Attach a trajectory by handle.

◆ tree_dump()

virtual void snemo::datamodel::particle_track::tree_dump ( std::ostream &  out = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from geomtools::base_hit.

◆ vertex_is()

static bool snemo::datamodel::particle_track::vertex_is ( const geomtools::blur_spot ,
vertex_type   
)
static

Check a vertex type.

◆ vertex_is_on_gamma_veto()

static bool snemo::datamodel::particle_track::vertex_is_on_gamma_veto ( const geomtools::blur_spot )
static

Check a vertex on gamma veto.

◆ vertex_is_on_main_calorimeter()

static bool snemo::datamodel::particle_track::vertex_is_on_main_calorimeter ( const geomtools::blur_spot )
static

Check a vertex on main calorimeter.

◆ vertex_is_on_source_foil()

static bool snemo::datamodel::particle_track::vertex_is_on_source_foil ( const geomtools::blur_spot )
static

Check a vertex on source foil.

◆ vertex_is_on_wire()

static bool snemo::datamodel::particle_track::vertex_is_on_wire ( const geomtools::blur_spot )
static

Check a vertex on wire.

◆ vertex_is_on_x_calorimeter()

static bool snemo::datamodel::particle_track::vertex_is_on_x_calorimeter ( const geomtools::blur_spot )
static

Check a vertex on X calorimeter.

◆ vertex_none_label()

static const std::string& snemo::datamodel::particle_track::vertex_none_label ( )
static

Associated 'VERTEX_NONE' flag for auxiliary property.

◆ vertex_on_gamma_veto_label()

static const std::string& snemo::datamodel::particle_track::vertex_on_gamma_veto_label ( )
static

Associated 'VERTEX_ON_GAMMA_CALORIMETER' flag for auxiliary property.

◆ vertex_on_main_calorimeter_label()

static const std::string& snemo::datamodel::particle_track::vertex_on_main_calorimeter_label ( )
static

Associated 'VERTEX_ON_MAIN_CALORIMETER' flag for auxiliary property.

◆ vertex_on_source_foil_label()

static const std::string& snemo::datamodel::particle_track::vertex_on_source_foil_label ( )
static

Associated 'VERTEX_ON_SOURCE_FOIL' flag for auxiliary property.

◆ vertex_on_wire_label()

static const std::string& snemo::datamodel::particle_track::vertex_on_wire_label ( )
static

Associated 'VERTEX_ON_WIRE' flag for auxiliary property.

◆ vertex_on_x_calorimeter_label()

static const std::string& snemo::datamodel::particle_track::vertex_on_x_calorimeter_label ( )
static

Associated 'VERTEX_ON_X_CALORIMETER' flag for auxiliary property.

◆ vertex_type_key()

static const std::string& snemo::datamodel::particle_track::vertex_type_key ( )
static

Key for the vertex type property.

◆ vertex_type_to_label()

static const std::string& snemo::datamodel::particle_track::vertex_type_to_label ( vertex_type  )
static

Return the label from the vertex type.


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