1 #ifndef LMD_LMDMC_PNDLMDGEOMETRYHELPER_H_
2 #define LMD_LMDMC_PNDLMDGEOMETRYHELPER_H_
8 #include <boost/property_tree/json_parser.hpp>
9 #include <boost/property_tree/ptree.hpp>
11 #include <TGeoManager.h>
23 stream <<
"detector half: " << (
unsigned int) hit_info.
detector_half <<
"\n";
24 stream <<
"detector plane: " << (
unsigned int) hit_info.
plane <<
"\n";
25 stream <<
"module on half plane: " << (
unsigned int) hit_info.
module <<
"\n";
26 stream <<
"side of module: " << (
unsigned int) hit_info.
module_side <<
"\n";
54 for (boost::property_tree::ptree::value_type &nav_path : pt_general.get_child(
"navigation_paths")) {
56 std::make_pair(nav_path.second.get<std::string>(
"name"),
57 nav_path.second.get<
bool>(
"is_alignable")));
61 std::stringstream lmd_path;
65 if (actPath !=
"" && actPath !=
" ")
fGeoManager->cd(actPath);
98 const std::string
getPath(
unsigned char...);
107 std::vector<std::string>
getAllAlignPaths(
bool sensors=
true,
bool modules=
false,
bool planes=
false,
108 bool halfs=
false,
bool detector=
false);
TVector3 transformPndGlobalToSensor(const TVector3 &vec, int sensorId)
PndLmdHitLocationInfo translateVolumePathToHitLocationInfo(const std::string &volume_path) const
static std::vector< int > getAvailableOverlapIDs()
const PndLmdHitLocationInfo & createMappingEntry(int sensor_id)
PndLmdGeometryHelper(const std::string &geo_params_config_file_url="lmd-geo-params.json")
static PndLmdGeometryHelper & getInstance()
bool operator<(const PndLmdHitLocationInfo &o)
TGeoManager * gGeoManager
std::vector< std::pair< std::string, bool > > navigation_paths
friend std::ostream & operator<<(std::ostream &stream, const PndLmdHitLocationInfo &hit_info)
const TGeoHMatrix getMatrixSensorToPndGlobal(const int sensorId)
std::vector< std::string > getAllAlignPaths(bool sensors=true, bool modules=false, bool planes=false, bool halfs=false, bool detector=false)
unsigned char module_side
std::vector< std::string > getAllAlignableVolumePaths() const
std::map< std::string, PndLmdHitLocationInfo > volume_path_to_hit_info_mapping
TGeoManager * fGeoManager
const TGeoHMatrix getMatrixPndGlobalToLmdLocal()
const TGeoHMatrix getMatrixPndGlobalToSensor(const int sensorId)
const std::string getPath(unsigned char...)
const PndLmdHitLocationInfo & getHitLocationInfo(const std::string &volume_path)
std::map< int, PndLmdHitLocationInfo > sensor_id_to_hit_info_mapping
void operator=(const PndLmdGeometryHelper &)=delete
unsigned char module_sensor_id
const TGeoHMatrix getMatrixLmdLocalToPndGlobal()
boost::property_tree::ptree geometry_properties
TVector3 transformPndGlobalToLmdLocal(const TVector3 &vec)
std::string lmd_root_path
int getOverlapIdFromSensorIDs(int id1, int id2)
bool isOverlappingArea(const int id1, const int id2)
unsigned char detector_half
virtual ~PndLmdGeometryHelper()