Falaise  4.0.1
SuperNEMO Software Toolkit
Public Member Functions | Protected Member Functions | List of all members
snemo::geometry::gg_locator Class Reference

Fast locator class for SuperNEMO drift chamber volumes. More...

#include <falaise/snemo/geometry/gg_locator.h>

Inheritance diagram for snemo::geometry::gg_locator:
geomtools::base_locator datatools::i_tree_dumpable geomtools::i_base_locator

Public Member Functions

virtual bool is_initialized () const
 Check intialization flag. More...
 
 gg_locator ()
 Constructor. More...
 
 gg_locator (const ::geomtools::manager &mgr_, uint32_t module_number_)
 Constructor. More...
 
virtual ~gg_locator ()
 Destructor. More...
 
virtual void reset ()
 Reset. More...
 
virtual void initialize (const datatools::properties &config_)
 Initialize. More...
 
void initialize ()
 Initialize. More...
 
virtual bool find_geom_id (const geomtools::vector_3d &world_position_, int type_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
bool find_cell_geom_id (const geomtools::vector_3d &world_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
uint32_t get_module_number () const
 
void set_module_number (uint32_t module_number_)
 
double get_cell_diameter () const
 
double get_cell_length () const
 
double get_anode_wire_length () const
 
double get_anode_wire_diameter () const
 
double get_field_wire_length () const
 
double get_field_wire_diameter () const
 
size_t get_number_of_sides () const
 
bool has_submodules (uint32_t side_) const
 
size_t get_number_of_layers (uint32_t side_) const
 
size_t get_number_of_rows (uint32_t side_) const
 
double get_layer_x (uint32_t side_, uint32_t layer_) const
 
double get_row_y (uint32_t side_, uint32_t row_) const
 
void compute_cell_position (uint32_t side_, uint32_t layer_, uint32_t row_, geomtools::vector_3d &module_position_) const
 
geomtools::vector_3d get_cell_position (uint32_t side_, uint32_t layer_, uint32_t row_) const
 
void transform_world_to_module (const geomtools::vector_3d &world_position_, geomtools::vector_3d &module_position_) const
 
void transform_module_to_world (const geomtools::vector_3d &module_position_, geomtools::vector_3d &world_position_) const
 
bool is_world_position_in_module (const geomtools::vector_3d &world_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
bool is_in_module (const geomtools::vector_3d &module_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
bool is_in_cell (const geomtools::vector_3d &module_position_, uint32_t side_, uint32_t layer_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
bool is_world_position_in_cell (const geomtools::vector_3d &world_position_, uint32_t side_, uint32_t layer_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
 
size_t get_number_of_neighbours (uint32_t side_, uint32_t layer_, uint32_t row_, bool other_side_=false) const
 
size_t get_number_of_neighbours (const geomtools::geom_id &gid_, bool other_side_=false) const
 
void get_neighbours_ids (uint32_t side_, uint32_t layer_, uint32_t row_, std::vector< geomtools::geom_id > &ids_, bool other_side_=false) const
 
void get_neighbours_ids (const geomtools::geom_id &gid_, std::vector< geomtools::geom_id > &ids_, bool other_side_=false) const
 
void get_cell_position (const geomtools::geom_id &gid_, geomtools::vector_3d &position_) const
 
void get_cell_position (uint32_t side_, uint32_t layer_, uint32_t row_, geomtools::vector_3d &position_) const
 
uint32_t extract_module (const geomtools::geom_id &gid_) const
 
uint32_t extract_side (const geomtools::geom_id &gid) const
 
uint32_t extract_layer (const geomtools::geom_id &gid_) const
 
uint32_t extract_row (const geomtools::geom_id &gid_) const
 
bool is_drift_cell_volume (const geomtools::geom_id &gid_) const
 
bool is_drift_cell_volume_in_current_module (const geomtools::geom_id &gid_) const
 
virtual void tree_dump (std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
 Smart print. More...
 
void dump (std::ostream &out_=std::clog) const
 Dump. More...
 
- Public Member Functions inherited from geomtools::base_locator
 base_locator ()
 
virtual ~base_locator ()
 
bool has_geo_manager () const
 
void set_geo_manager (const manager &mgr_)
 
const managerget_geo_manager () const
 
datatools::logger::priority get_logging_priority () const
 
void set_logging_priority (datatools::logger::priority)
 
- Public Member Functions inherited from datatools::i_tree_dumpable
 i_tree_dumpable ()
 
virtual ~i_tree_dumpable ()
 
virtual void print_tree (std::ostream &out_=std::clog, const boost::property_tree::ptree &options_=empty_options()) const
 
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
 

Protected Member Functions

bool _find_cell_geom_id (const geomtools::vector_3d &in_module_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE)
 
void _construct ()
 
void _set_defaults ()
 Set default values. More...
 
void _hack_trace ()
 Hack trace. More...
 
- Protected Member Functions inherited from geomtools::base_locator
void _basic_initialize (const datatools::properties &config_)
 

Additional Inherited Members

- Public Types inherited from datatools::i_tree_dumpable
enum  ostream_type
 
- 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_)
 
- Public Attributes inherited from datatools::i_tree_dumpable
 OSTREAM_COUT
 
 OSTREAM_CERR
 
 OSTREAM_CLOG
 
- Protected Attributes inherited from geomtools::base_locator
datatools::logger::priority _logging_priority
 

Detailed Description

Fast locator class for SuperNEMO drift chamber volumes.

Constructor & Destructor Documentation

◆ gg_locator() [1/2]

snemo::geometry::gg_locator::gg_locator ( )

Constructor.

◆ gg_locator() [2/2]

snemo::geometry::gg_locator::gg_locator ( const ::geomtools::manager mgr_,
uint32_t  module_number_ 
)

Constructor.

◆ ~gg_locator()

virtual snemo::geometry::gg_locator::~gg_locator ( )
virtual

Destructor.

Member Function Documentation

◆ _construct()

void snemo::geometry::gg_locator::_construct ( )
protected

Protected construction method.

◆ _find_cell_geom_id()

bool snemo::geometry::gg_locator::_find_cell_geom_id ( const geomtools::vector_3d in_module_position_,
geomtools::geom_id gid_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
)
protected

◆ _hack_trace()

void snemo::geometry::gg_locator::_hack_trace ( )
protected

Hack trace.

◆ _set_defaults()

void snemo::geometry::gg_locator::_set_defaults ( )
protected

Set default values.

◆ compute_cell_position()

void snemo::geometry::gg_locator::compute_cell_position ( uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
geomtools::vector_3d module_position_ 
) const

! Compute the position of a cell for specific side, layer and row (in module coordinate system).

◆ dump()

void snemo::geometry::gg_locator::dump ( std::ostream &  out_ = std::clog) const

Dump.

◆ extract_layer()

uint32_t snemo::geometry::gg_locator::extract_layer ( const geomtools::geom_id gid_) const

◆ extract_module()

uint32_t snemo::geometry::gg_locator::extract_module ( const geomtools::geom_id gid_) const

◆ extract_row()

uint32_t snemo::geometry::gg_locator::extract_row ( const geomtools::geom_id gid_) const

◆ extract_side()

uint32_t snemo::geometry::gg_locator::extract_side ( const geomtools::geom_id gid) const

◆ find_cell_geom_id()

bool snemo::geometry::gg_locator::find_cell_geom_id ( const geomtools::vector_3d world_position_,
geomtools::geom_id gid_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const

◆ find_geom_id()

virtual bool snemo::geometry::gg_locator::find_geom_id ( const geomtools::vector_3d world_position_,
int  type_,
geomtools::geom_id gid_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const
virtual

◆ get_anode_wire_diameter()

double snemo::geometry::gg_locator::get_anode_wire_diameter ( ) const

!

Returns
the diameter of anode wires.

◆ get_anode_wire_length()

double snemo::geometry::gg_locator::get_anode_wire_length ( ) const

!

Returns
the length of anode wires.

◆ get_cell_diameter()

double snemo::geometry::gg_locator::get_cell_diameter ( ) const

!

Returns
the diameter of a cell.

◆ get_cell_length()

double snemo::geometry::gg_locator::get_cell_length ( ) const

!

Returns
the length of a cell (including the base and cathode ring).

◆ get_cell_position() [1/3]

geomtools::vector_3d snemo::geometry::gg_locator::get_cell_position ( uint32_t  side_,
uint32_t  layer_,
uint32_t  row_ 
) const

!

Returns
the position of a cell for specific side, layer and row (in module coordinate system).

◆ get_cell_position() [2/3]

void snemo::geometry::gg_locator::get_cell_position ( const geomtools::geom_id gid_,
geomtools::vector_3d position_ 
) const

Given a cell with a specific geometry IDs, compute its position in the module coordinate system.

◆ get_cell_position() [3/3]

void snemo::geometry::gg_locator::get_cell_position ( uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
geomtools::vector_3d position_ 
) const

Given a cell with a specific side, layer and row, compute its position in the module coordinate system.

◆ get_field_wire_diameter()

double snemo::geometry::gg_locator::get_field_wire_diameter ( ) const

!

Returns
the length field wires.

◆ get_field_wire_length()

double snemo::geometry::gg_locator::get_field_wire_length ( ) const

!

Returns
the diameter of field wires.

◆ get_layer_x()

double snemo::geometry::gg_locator::get_layer_x ( uint32_t  side_,
uint32_t  layer_ 
) const

!

Returns
the X-position of a cell for specific side and layer (in module coordinate system).

◆ get_module_number()

uint32_t snemo::geometry::gg_locator::get_module_number ( ) const

!

Returns
the number of the module (>=0).

◆ get_neighbours_ids() [1/2]

void snemo::geometry::gg_locator::get_neighbours_ids ( uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
std::vector< geomtools::geom_id > &  ids_,
bool  other_side_ = false 
) const

Given a cell at specific side, layer and row, compute the array of geometry IDs for associated neighbouring cells.

◆ get_neighbours_ids() [2/2]

void snemo::geometry::gg_locator::get_neighbours_ids ( const geomtools::geom_id gid_,
std::vector< geomtools::geom_id > &  ids_,
bool  other_side_ = false 
) const

Given a cell with a specific geometry IDs, compute the array of geometry IDs for associated neighbouring cells.

◆ get_number_of_layers()

size_t snemo::geometry::gg_locator::get_number_of_layers ( uint32_t  side_) const

!

Returns
the number of drift cells layers in one side of the tracking chamber.

◆ get_number_of_neighbours() [1/2]

size_t snemo::geometry::gg_locator::get_number_of_neighbours ( uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
bool  other_side_ = false 
) const

Given a cell at specific side, layer and row, returns the number of neighbouring cells. If asked, cells on the layer==0 on any side of the chamber are associated to cells on the other side of the source plane.

◆ get_number_of_neighbours() [2/2]

size_t snemo::geometry::gg_locator::get_number_of_neighbours ( const geomtools::geom_id gid_,
bool  other_side_ = false 
) const

Given a cell with a specific geometry ID, returns the number of neighbouring cells.

◆ get_number_of_rows()

size_t snemo::geometry::gg_locator::get_number_of_rows ( uint32_t  side_) const

!

Returns
the number of drift cells rows in one side of the tracking chamber.

◆ get_number_of_sides()

size_t snemo::geometry::gg_locator::get_number_of_sides ( ) const

!

Returns
the number of sides on the tracking chamber.

◆ get_row_y()

double snemo::geometry::gg_locator::get_row_y ( uint32_t  side_,
uint32_t  row_ 
) const

!

Returns
the Y-position of a cell for specific side and row (in module coordinate system.

◆ has_submodules()

bool snemo::geometry::gg_locator::has_submodules ( uint32_t  side_) const

!

Returns
true if the submodule at given side is present

◆ initialize() [1/2]

virtual void snemo::geometry::gg_locator::initialize ( const datatools::properties config_)
virtual

Initialize.

Implements geomtools::base_locator.

◆ initialize() [2/2]

void snemo::geometry::gg_locator::initialize ( )

Initialize.

◆ is_drift_cell_volume()

bool snemo::geometry::gg_locator::is_drift_cell_volume ( const geomtools::geom_id gid_) const
  • a_gid the GID to be checked.
    Returns
    true if the GID corresponds to a Geiger cell's drift volume.

◆ is_drift_cell_volume_in_current_module()

bool snemo::geometry::gg_locator::is_drift_cell_volume_in_current_module ( const geomtools::geom_id gid_) const
  • a_gid the GID to be checked
    Returns
    true if the GID corresponds to a Geiger cell's drift volume in the module number associated to the locator.

◆ is_in_cell()

bool snemo::geometry::gg_locator::is_in_cell ( const geomtools::vector_3d module_position_,
uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const

Check if a module coordinate system position is in a specific cell virtual volume (its bounding envelope).

◆ is_in_module()

bool snemo::geometry::gg_locator::is_in_module ( const geomtools::vector_3d module_position_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const

Check if a module coordinate system position is in the module virtual volume (its bounding envelope).

◆ is_initialized()

virtual bool snemo::geometry::gg_locator::is_initialized ( ) const
virtual

Check intialization flag.

Implements geomtools::base_locator.

◆ is_world_position_in_cell()

bool snemo::geometry::gg_locator::is_world_position_in_cell ( const geomtools::vector_3d world_position_,
uint32_t  side_,
uint32_t  layer_,
uint32_t  row_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const

Check if a world coordinate system position is in a specific cell virtual volume (its bounding envelope).

◆ is_world_position_in_module()

bool snemo::geometry::gg_locator::is_world_position_in_module ( const geomtools::vector_3d world_position_,
double  tolerance_ = GEOMTOOLS_PROPER_TOLERANCE 
) const

Check if a world coordinate system position is in the module virtual volume (its bounding envelope).

◆ reset()

virtual void snemo::geometry::gg_locator::reset ( )
virtual

Reset.

Implements geomtools::base_locator.

◆ set_module_number()

void snemo::geometry::gg_locator::set_module_number ( uint32_t  module_number_)

!

Returns
set the number of the module for this locator.

◆ transform_module_to_world()

void snemo::geometry::gg_locator::transform_module_to_world ( const geomtools::vector_3d module_position_,
geomtools::vector_3d world_position_ 
) const

Tranform a module coordinate system position to the corresponding world coordinate system position.

◆ transform_world_to_module()

void snemo::geometry::gg_locator::transform_world_to_module ( const geomtools::vector_3d world_position_,
geomtools::vector_3d module_position_ 
) const

Tranform a world coordinate system position to the corresponding module coordinate system position.

◆ tree_dump()

virtual void snemo::geometry::gg_locator::tree_dump ( std::ostream &  out_ = std::clog,
const std::string &  title_ = "",
const std::string &  indent_ = "",
bool  inherit_ = false 
) const
virtual

Smart print.

Reimplemented from datatools::i_tree_dumpable.


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