File indexing completed on 2025-07-09 08:30:24
0001
0002
0003
0004
0005 #pragma once
0006
0007 #include <DD4hep/DetElement.h>
0008 #include <DD4hep/Detector.h>
0009 #include <DD4hep/Objects.h>
0010 #include <DDRec/CellIDPositionConverter.h>
0011 #include <DDRec/DetectorData.h>
0012 #include <IRT/CherenkovDetector.h>
0013 #include <IRT/CherenkovDetectorCollection.h>
0014 #include <Math/GenVector/Cartesian3D.h>
0015 #include <Math/GenVector/DisplacementVector3D.h>
0016 #include <spdlog/logger.h>
0017 #include <gsl/pointers>
0018 #include <memory>
0019 #include <string>
0020 #include <unordered_map>
0021
0022
0023 #include "RichGeo.h"
0024
0025 namespace richgeo {
0026 class IrtGeo {
0027 public:
0028
0029 IrtGeo(std::string detName_, gsl::not_null<const dd4hep::Detector*> det_,
0030 gsl::not_null<const dd4hep::rec::CellIDPositionConverter*> conv_,
0031 std::shared_ptr<spdlog::logger> log_);
0032 virtual ~IrtGeo();
0033
0034
0035 CherenkovDetectorCollection* GetIrtDetectorCollection() const { return m_irtDetectorCollection; }
0036
0037 protected:
0038
0039 virtual void DD4hep_to_IRT() = 0;
0040 void
0041 SetReadoutIDToPositionLambda();
0042 void SetRefractiveIndexTable();
0043
0044 template <class VecT>
0045 VecT GetVectorFromVariantParameters(dd4hep::rec::VariantParameters* pars, std::string key) const {
0046 return VecT(pars->get<double>(key + "_x"), pars->get<double>(key + "_y"),
0047 pars->get<double>(key + "_z"));
0048 }
0049
0050
0051 std::string m_detName;
0052
0053
0054 gsl::not_null<const dd4hep::Detector*> m_det;
0055 dd4hep::DetElement m_detRich;
0056 dd4hep::Position m_posRich;
0057
0058
0059 gsl::not_null<const dd4hep::rec::CellIDPositionConverter*> m_converter;
0060 std::unordered_map<int, richgeo::Sensor> m_sensor_info;
0061
0062
0063 CherenkovDetectorCollection* m_irtDetectorCollection{};
0064 CherenkovDetector* m_irtDetector{};
0065
0066
0067 std::shared_ptr<spdlog::logger> m_log;
0068
0069 private:
0070
0071 void Bind();
0072 };
0073 }