Falaise
4.0.1
SuperNEMO Software Toolkit
|
Fast locator class for SuperNEMO drift chamber volumes. More...
#include <falaise/snemo/geometry/gg_locator.h>
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 manager & | get_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 |
Fast locator class for SuperNEMO drift chamber volumes.
snemo::geometry::gg_locator::gg_locator | ( | ) |
Constructor.
snemo::geometry::gg_locator::gg_locator | ( | const ::geomtools::manager & | mgr_, |
uint32_t | module_number_ | ||
) |
Constructor.
|
virtual |
Destructor.
|
protected |
Protected construction method.
|
protected |
|
protected |
Hack trace.
|
protected |
Set default values.
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).
void snemo::geometry::gg_locator::dump | ( | std::ostream & | out_ = std::clog | ) | const |
Dump.
uint32_t snemo::geometry::gg_locator::extract_layer | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::gg_locator::extract_module | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::gg_locator::extract_row | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::gg_locator::extract_side | ( | const geomtools::geom_id & | gid | ) | const |
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 |
|
virtual |
Implements geomtools::base_locator.
double snemo::geometry::gg_locator::get_anode_wire_diameter | ( | ) | const |
!
double snemo::geometry::gg_locator::get_anode_wire_length | ( | ) | const |
!
double snemo::geometry::gg_locator::get_cell_diameter | ( | ) | const |
!
double snemo::geometry::gg_locator::get_cell_length | ( | ) | const |
!
geomtools::vector_3d snemo::geometry::gg_locator::get_cell_position | ( | uint32_t | side_, |
uint32_t | layer_, | ||
uint32_t | row_ | ||
) | const |
!
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.
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.
double snemo::geometry::gg_locator::get_field_wire_diameter | ( | ) | const |
!
double snemo::geometry::gg_locator::get_field_wire_length | ( | ) | const |
!
double snemo::geometry::gg_locator::get_layer_x | ( | uint32_t | side_, |
uint32_t | layer_ | ||
) | const |
!
uint32_t snemo::geometry::gg_locator::get_module_number | ( | ) | const |
!
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.
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.
size_t snemo::geometry::gg_locator::get_number_of_layers | ( | uint32_t | side_ | ) | const |
!
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.
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.
size_t snemo::geometry::gg_locator::get_number_of_rows | ( | uint32_t | side_ | ) | const |
!
size_t snemo::geometry::gg_locator::get_number_of_sides | ( | ) | const |
!
double snemo::geometry::gg_locator::get_row_y | ( | uint32_t | side_, |
uint32_t | row_ | ||
) | const |
!
bool snemo::geometry::gg_locator::has_submodules | ( | uint32_t | side_ | ) | const |
!
|
virtual |
Initialize.
Implements geomtools::base_locator.
void snemo::geometry::gg_locator::initialize | ( | ) |
Initialize.
bool snemo::geometry::gg_locator::is_drift_cell_volume | ( | const geomtools::geom_id & | gid_ | ) | const |
bool snemo::geometry::gg_locator::is_drift_cell_volume_in_current_module | ( | const geomtools::geom_id & | gid_ | ) | const |
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).
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).
|
virtual |
Check intialization flag.
Implements geomtools::base_locator.
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).
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).
|
virtual |
Reset.
Implements geomtools::base_locator.
void snemo::geometry::gg_locator::set_module_number | ( | uint32_t | module_number_ | ) |
!
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.
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.
|
virtual |
Smart print.
Reimplemented from datatools::i_tree_dumpable.