Falaise
4.0.1
SuperNEMO Software Toolkit
|
Fast locator class for SuperNEMO X calorimeter scintillator block volumes. More...
#include <falaise/snemo/geometry/xcalo_locator.h>
Public Types | |
enum | wall_type { WALL_INVALID = -1, WALL_LEFT = 0, WALL_RIGHT = 1 } |
Wall identifier constants (SuperNEMO module Y axis) More... | |
Public Types inherited from datatools::i_tree_dumpable | |
enum | ostream_type |
Public Member Functions | |
virtual bool | is_initialized () const |
xcalo_locator () | |
Constructor. More... | |
xcalo_locator (const ::geomtools::manager &gmgr_, uint32_t module_number_) | |
Constructor: More... | |
virtual | ~xcalo_locator () |
Destructor. More... | |
virtual void | initialize (const datatools::properties &config_) |
virtual void | reset () |
void | initialize () |
bool | has_submodule (uint32_t side_) const |
bool | id_is_valid (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_) const |
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_block_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_) |
bool | is_block_partitioned () const |
double | get_block_width () const |
double | get_block_height () const |
double | get_block_thickness () const |
size_t | get_number_of_sides () const |
size_t | get_number_of_walls () const |
size_t | get_number_of_columns (uint32_t side_, uint32_t wall_) const |
size_t | get_number_of_rows (uint32_t side_, uint32_t wall_) const |
double | get_wall_y (uint32_t side_, uint32_t wall_) const |
double | get_wall_window_y (uint32_t side_, uint32_t wall_) const |
double | get_column_x (uint32_t side_, uint32_t wall_, uint32_t column_) const |
double | get_row_z (uint32_t side_, uint32_t wall_, uint32_t row_) const |
void | compute_block_position (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const |
void | compute_block_window_position (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const |
geomtools::vector_3d | get_block_position (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_) const |
geomtools::vector_3d | get_block_window_position (uint32_t side_, uint32_t wall_, uint32_t column_, 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_block (const geomtools::vector_3d &module_position_, uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const |
bool | is_world_position_in_block (const geomtools::vector_3d &world_position_, uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const |
size_t | get_number_of_neighbours (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const |
size_t | get_number_of_neighbours (const geomtools::geom_id &gid_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const |
void | get_neighbours_ids (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, std::vector< geomtools::geom_id > &ids_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const |
void | get_neighbours_ids (const geomtools::geom_id &gid_, std::vector< geomtools::geom_id > &ids_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const |
void | get_block_position (const geomtools::geom_id &gid_, geomtools::vector_3d &position_) const |
void | get_block_position (uint32_t side_, uint32_t wall_, uint32_t column_, uint32_t row_, geomtools::vector_3d &position_) const |
int | get_module_address_index () const |
int | get_side_address_index () const |
int | get_wall_address_index () const |
int | get_column_address_index () const |
int | get_row_address_index () const |
int | get_part_address_index () const |
uint32_t | extract_module (const geomtools::geom_id &gid_) const |
uint32_t | extract_side (const geomtools::geom_id &gid_) const |
uint32_t | extract_wall (const geomtools::geom_id &gid_) const |
uint32_t | extract_column (const geomtools::geom_id &gid_) const |
uint32_t | extract_row (const geomtools::geom_id &gid_) const |
uint32_t | extract_part (const geomtools::geom_id &gid_) const |
bool | is_calo_block (const geomtools::geom_id &gid_) const |
bool | is_calo_block_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_) 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 |
Static Public Attributes | |
static const unsigned int | NWALLS_PER_SIDE = 2 |
Number of X-calorimeter walls per side (on the Y-axis) More... | |
Protected Member Functions | |
bool | find_block_geom_id_ (const geomtools::vector_3d &in_module_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) |
void | _assert_initialized (const std::string &where_) const |
void | _set_defaults_ () |
void | _construct () |
void | _hack_trace () |
Hack trace. More... | |
Protected Member Functions inherited from geomtools::base_locator | |
void | _basic_initialize (const datatools::properties &config_) |
Additional Inherited Members | |
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 X calorimeter scintillator block volumes.
snemo::geometry::xcalo_locator::xcalo_locator | ( | ) |
Constructor.
snemo::geometry::xcalo_locator::xcalo_locator | ( | const ::geomtools::manager & | gmgr_, |
uint32_t | module_number_ | ||
) |
Constructor:
|
virtual |
Destructor.
|
protected |
Checks if the locator has been intialized or throw an exception.
|
protected |
|
protected |
Hack trace.
|
protected |
void snemo::geometry::xcalo_locator::compute_block_position | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
geomtools::vector_3d & | module_position_ | ||
) | const |
! Compute the position of a block for specific side, wall, column and row (in module coordinate system).
void snemo::geometry::xcalo_locator::compute_block_window_position | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
geomtools::vector_3d & | module_position_ | ||
) | const |
! Compute the position of the center of the entrance window of a block for specific side, column and row (in module coordinate system).
void snemo::geometry::xcalo_locator::dump | ( | std::ostream & | out_ | ) | const |
Dump.
uint32_t snemo::geometry::xcalo_locator::extract_column | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::xcalo_locator::extract_module | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::xcalo_locator::extract_part | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::xcalo_locator::extract_row | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::xcalo_locator::extract_side | ( | const geomtools::geom_id & | gid_ | ) | const |
uint32_t snemo::geometry::xcalo_locator::extract_wall | ( | const geomtools::geom_id & | gid_ | ) | const |
bool snemo::geometry::xcalo_locator::find_block_geom_id | ( | const geomtools::vector_3d & | world_position_, |
geomtools::geom_id & | gid_, | ||
double | tolerance_ = GEOMTOOLS_PROPER_TOLERANCE |
||
) | const |
|
protected |
|
virtual |
Implements geomtools::base_locator.
double snemo::geometry::xcalo_locator::get_block_height | ( | ) | const |
!
geomtools::vector_3d snemo::geometry::xcalo_locator::get_block_position | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_ | ||
) | const |
!
void snemo::geometry::xcalo_locator::get_block_position | ( | const geomtools::geom_id & | gid_, |
geomtools::vector_3d & | position_ | ||
) | const |
Given a block with a specific geometry IDs, compute its position in the module coordinate system.
void snemo::geometry::xcalo_locator::get_block_position | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
geomtools::vector_3d & | position_ | ||
) | const |
Given a block with a specific side, wall, column and row, compute its position in the module coordinate system.
double snemo::geometry::xcalo_locator::get_block_thickness | ( | ) | const |
!
double snemo::geometry::xcalo_locator::get_block_width | ( | ) | const |
!
geomtools::vector_3d snemo::geometry::xcalo_locator::get_block_window_position | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_ | ||
) | const |
!
int snemo::geometry::xcalo_locator::get_column_address_index | ( | ) | const |
double snemo::geometry::xcalo_locator::get_column_x | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_ | ||
) | const |
!
int snemo::geometry::xcalo_locator::get_module_address_index | ( | ) | const |
uint32_t snemo::geometry::xcalo_locator::get_module_number | ( | ) | const |
!
void snemo::geometry::xcalo_locator::get_neighbours_ids | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
std::vector< geomtools::geom_id > & | ids_, | ||
uint8_t | mask_ = utils::NEIGHBOUR_FIRST |
||
) | const |
Given a block at specific side, wall, column and row, compute the array of geometry IDs for associated neighbouring blocks.
void snemo::geometry::xcalo_locator::get_neighbours_ids | ( | const geomtools::geom_id & | gid_, |
std::vector< geomtools::geom_id > & | ids_, | ||
uint8_t | mask_ = utils::NEIGHBOUR_FIRST |
||
) | const |
Given a block with a specific geometry IDs, compute the array of geometry IDs for associated neighbouring blocks.
size_t snemo::geometry::xcalo_locator::get_number_of_columns | ( | uint32_t | side_, |
uint32_t | wall_ | ||
) | const |
!
size_t snemo::geometry::xcalo_locator::get_number_of_neighbours | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
uint8_t | mask_ = utils::NEIGHBOUR_FIRST |
||
) | const |
Given a block at specific side, wall, column and row, returns the number of neighbouring blocks.
size_t snemo::geometry::xcalo_locator::get_number_of_neighbours | ( | const geomtools::geom_id & | gid_, |
uint8_t | mask_ = utils::NEIGHBOUR_FIRST |
||
) | const |
Given a block with a specific geometry ID, returns the number of neighbouring blocks.
size_t snemo::geometry::xcalo_locator::get_number_of_rows | ( | uint32_t | side_, |
uint32_t | wall_ | ||
) | const |
!
size_t snemo::geometry::xcalo_locator::get_number_of_sides | ( | ) | const |
!
size_t snemo::geometry::xcalo_locator::get_number_of_walls | ( | ) | const |
!
int snemo::geometry::xcalo_locator::get_part_address_index | ( | ) | const |
int snemo::geometry::xcalo_locator::get_row_address_index | ( | ) | const |
double snemo::geometry::xcalo_locator::get_row_z | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | row_ | ||
) | const |
!
int snemo::geometry::xcalo_locator::get_side_address_index | ( | ) | const |
int snemo::geometry::xcalo_locator::get_wall_address_index | ( | ) | const |
double snemo::geometry::xcalo_locator::get_wall_window_y | ( | uint32_t | side_, |
uint32_t | wall_ | ||
) | const |
!
double snemo::geometry::xcalo_locator::get_wall_y | ( | uint32_t | side_, |
uint32_t | wall_ | ||
) | const |
!
bool snemo::geometry::xcalo_locator::has_submodule | ( | uint32_t | side_ | ) | const |
bool snemo::geometry::xcalo_locator::id_is_valid | ( | uint32_t | side_, |
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_ | ||
) | const |
|
virtual |
Implements geomtools::base_locator.
void snemo::geometry::xcalo_locator::initialize | ( | ) |
bool snemo::geometry::xcalo_locator::is_block_partitioned | ( | ) | const |
! check if block is partitioned in the current setup.
bool snemo::geometry::xcalo_locator::is_calo_block | ( | const geomtools::geom_id & | gid_ | ) | const |
bool snemo::geometry::xcalo_locator::is_calo_block_in_current_module | ( | const geomtools::geom_id & | gid_ | ) | const |
bool snemo::geometry::xcalo_locator::is_in_block | ( | const geomtools::vector_3d & | module_position_, |
uint32_t | side_, | ||
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
double | tolerance_ = GEOMTOOLS_PROPER_TOLERANCE |
||
) | const |
Check if a module coordinate system position is in a specific block virtual volume (its bounding envelope).
bool snemo::geometry::xcalo_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 |
Implements geomtools::base_locator.
bool snemo::geometry::xcalo_locator::is_world_position_in_block | ( | const geomtools::vector_3d & | world_position_, |
uint32_t | side_, | ||
uint32_t | wall_, | ||
uint32_t | column_, | ||
uint32_t | row_, | ||
double | tolerance_ = GEOMTOOLS_PROPER_TOLERANCE |
||
) | const |
Check if a world coordinate system position is in a specific block virtual volume (its bounding envelope).
bool snemo::geometry::xcalo_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 |
Implements geomtools::base_locator.
void snemo::geometry::xcalo_locator::set_module_number | ( | uint32_t | module_number_ | ) |
! set the number of the module for this locator.
void snemo::geometry::xcalo_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::xcalo_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.
|
static |
Number of X-calorimeter walls per side (on the Y-axis)