31 #ifndef FALAISE_SNEMO_GEOMETRY_CALO_LOCATOR_H 32 #define FALAISE_SNEMO_GEOMETRY_CALO_LOCATOR_H 1 39 #include <boost/cstdint.hpp> 91 calo_locator(const ::geomtools::manager& mgr_, uint32_t module_number_,
101 virtual void reset();
110 bool id_is_valid(uint32_t side_, uint32_t column_, uint32_t row_)
const;
115 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
118 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
125 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE);
185 double get_column_y(uint32_t side_, uint32_t column_)
const;
189 double get_row_z(uint32_t side_, uint32_t row_)
const;
212 uint32_t row_)
const;
230 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
236 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
242 uint32_t row_,
double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
248 uint32_t column_, uint32_t row_,
249 double tolerance_ = GEOMTOOLS_PROPER_TOLERANCE)
const;
265 std::vector<geomtools::geom_id>& ids_,
310 virtual void tree_dump(std::ostream& out_ = std::clog,
const std::string& title_ =
"",
311 const std::string& indent_ =
"",
bool inherit_ =
false)
const;
314 void dump(std::ostream& out_)
const;
326 uint32_t _module_number_;
327 uint32_t _block_part_;
330 uint32_t _module_type_;
331 uint32_t _calorimeter_submodule_type_;
332 uint32_t _block_type_;
333 uint32_t _wrapper_type_;
334 bool _block_partitioned_;
343 bool _composite_block_shape_;
346 double _block_window_x_[2];
347 std::vector<double> _back_block_z_;
348 std::vector<double> _front_block_z_;
349 std::vector<double> _back_block_y_;
350 std::vector<double> _front_block_y_;
352 double _block_width_;
353 double _block_height_;
354 double _block_thickness_;
357 int _module_address_index_;
358 int _side_address_index_;
359 int _column_address_index_;
360 int _row_address_index_;
361 int _part_address_index_;
364 bool _submodules_[2];
371 #endif // FALAISE_SNEMO_GEOMETRY_CALO_LOCATOR_H double get_block_width() const
calo_locator()
Default constructor.
double get_row_z(uint32_t side_, uint32_t row_) const
bool find_block_geom_id_(const geomtools::vector_3d &in_module_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE)
uint32_t extract_part(const geomtools::geom_id &gid_) const
void compute_block_window_position(uint32_t side_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const
int get_side_address_index() const
void set_module_number(uint32_t module_number_)
geomtools::vector_3d get_block_window_position(uint32_t side_, uint32_t column_, uint32_t row_) const
double get_column_y(uint32_t side_, uint32_t column_) const
void transform_world_to_module(const geomtools::vector_3d &world_position_, geomtools::vector_3d &module_position_) const
bool is_in_block(const geomtools::vector_3d &module_position_, uint32_t side_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
void initialize()
Initialization.
int get_column_address_index() const
Front volume of scintillator (entrance window)
Definition: calo_locator.h:82
bool has_submodule(uint32_t side_) const
Check if the calorimeter setup includes submodule with given side number.
double get_wall_window_x(uint32_t side_) const
bool id_is_valid(uint32_t side_, uint32_t column_, uint32_t row_) const
Check if a set of calorimeter block identifiers is valid.
block_part_type
Block part identifier (for geometry config snemo::demonstrator >=2.0)
Definition: calo_locator.h:79
void transform_module_to_world(const geomtools::vector_3d &module_position_, geomtools::vector_3d &world_position_) const
int get_row_address_index() const
int get_module_address_index() const
virtual ~calo_locator()
Destructor.
geomtools::vector_3d get_block_position(uint32_t side_, uint32_t column_, uint32_t row_) const
uint32_t get_module_number() const
size_t get_number_of_rows(uint32_t side_) const
uint32_t extract_row(const geomtools::geom_id &gid_) const
size_t get_number_of_sides() const
D : nearest diagonal.
Definition: utils.h:91
void dump(std::ostream &out_) const
Dump.
virtual bool find_geom_id(const geomtools::vector_3d &world_position_, int type_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
virtual void tree_dump(std::ostream &out_=std::clog, const std::string &title_="", const std::string &indent_="", bool inherit_=false) const
Smart print.
virtual void reset()
Reset.
bool find_block_geom_id(const geomtools::vector_3d &world_position_, geomtools::geom_id &gid_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
Definition: calo_tapered_scin_box_model.h:54
Definition: calo_locator.h:80
double get_block_height() const
uint32_t get_block_part() const
double get_block_thickness() const
uint32_t extract_column(const geomtools::geom_id &gid_) const
bool is_block_partitioned() const
uint32_t extract_side(const geomtools::geom_id &gid_) const
int get_part_address_index() const
virtual bool is_initialized() const
void _hack_trace()
Hack trace.
bool is_world_position_in_module(const geomtools::vector_3d &world_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
bool is_calo_block_in_current_module(const geomtools::geom_id &gid_) const
void compute_block_position(uint32_t side_, uint32_t column_, uint32_t row_, geomtools::vector_3d &module_position_) const
Back volume of scintillator (possibly extruded)
Definition: calo_locator.h:81
size_t get_number_of_neighbours(uint32_t side_, uint32_t column_, uint32_t row_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const
double get_wall_x(uint32_t side_) const
bool is_calo_block(const geomtools::geom_id &gid_) const
bool is_world_position_in_block(const geomtools::vector_3d &world_position_, uint32_t side_, uint32_t column_, uint32_t row_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const
uint32_t extract_module(const geomtools::geom_id &gid_) const
size_t get_number_of_columns(uint32_t side_) const
void get_neighbours_ids(uint32_t side_, uint32_t column_, uint32_t row_, std::vector< geomtools::geom_id > &ids_, uint8_t mask_=utils::NEIGHBOUR_FIRST) const
Fast locator class for SuperNEMO main calorimeter scintillator block volumes.
Definition: calo_locator.h:63
void set_block_part(uint32_t block_part_)
bool is_in_module(const geomtools::vector_3d &module_position_, double tolerance_=GEOMTOOLS_PROPER_TOLERANCE) const