50 using Translation = ROOT::Math::DisplacementVector3D<ROOT::Math::Cartesian3D<double>>;
72 template <
typename REC,
typename GEO>
73 std::unique_ptr<DetGeomDesc>
produceGD(
const GEO&,
74 const std::optional<REC>&,
98 : verbosity_(iConfig.getUntrackedParameter<unsigned
int>(
"verbosity")),
99 buildMisalignedGeometry_(iConfig.getParameter<
bool>(
"buildMisalignedGeometry")),
100 isRun2_(iConfig.getParameter<
bool>(
"isRun2")),
101 fromPreprocessedDB_(iConfig.getUntrackedParameter<
bool>(
"fromPreprocessedDB",
false)),
102 fromDD4hep_(iConfig.getUntrackedParameter<
bool>(
"fromDD4hep",
false)) {
156 desc.addUntracked<
unsigned int>(
"verbosity", 1);
157 desc.add<
bool>(
"buildMisalignedGeometry",
false)->setComment(
"switch if misaligned geometry shall be built");
158 desc.add<
bool>(
"isRun2",
false)->setComment(
"Switch to legacy (2017-18) definition of diamond geometry");
161 desc.addUntracked<
bool>(
"fromPreprocessedDB",
false);
162 desc.addUntracked<
bool>(
"fromDD4hep",
false);
163 descriptions.
add(
"CTPPSGeometryESModule",
desc);
189 edm::LogInfo(
"CTPPSGeometryESModule") <<
" myDB size = " << myDB.container_.size();
192 auto pdet = std::make_unique<DetGeomDesc>(myDB);
196 template <
typename REC,
typename GEO>
198 GEO
const& iIdealRec,
199 std::optional<REC>
const& iAlignRec,
204 auto const& idealGD = iIdealRec.get(iGDToken);
209 auto alignmentsHandle = iAlignRec->getHandle(iAlignToken);
210 if (alignmentsHandle.isValid()) {
211 alignments = alignmentsHandle.product();
218 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
233 "CTPPSGeometryESModule::produceRealGDFromPreprocessedDB");
244 "CTPPSGeometryESModule::produceMisalignedGDFromPreprocessedDB");
254 "CTPPSGeometryESModule::produceRealGD");
265 "CTPPSGeometryESModule::produceMisalignedGD");
273 return std::make_unique<CTPPSGeometry>(&gD,
verbosity_);
282 return std::make_unique<CTPPSGeometry>(&gD,
verbosity_);
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepToken_
Log< level::Info, true > LogVerbatim
Event setup record containing the ideal PPS geometry information.
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
T getParameter(std::string const &) const
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
edm::ESGetToken< DetGeomDesc, IdealGeometryRecord > idealGDToken_
const bool buildMisalignedGeometry_
const bool fromPreprocessedDB_
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
std::unique_ptr< DetGeomDesc > applyAlignments(const DetGeomDesc &, const CTPPSRPAlignmentCorrectionsData *)
edm::ESGetToken< DDCompactView, IdealGeometryRecord > ddToken_
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
std::vector< int > fillCopyNos(TGeoIterator &it)
Compact representation of the geometrical detector hierarchy.
Event setup record containing the real (actual) geometry information.
const mapType & getRPMap() const
returns the map of RP alignment corrections
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord > misAlignmentToken_
std::unique_ptr< DetGeomDesc > produceGD(const GEO &, const std::optional< REC > &, edm::ESGetToken< DetGeomDesc, GEO > const &, edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, REC > const &, const char *name)
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
std::unique_ptr< DetGeomDesc > buildDetGeomDescFromCompactView(const DDCompactView &myCompactView, const bool isRun2)
edm::ESGetToken< DetGeomDesc, VeryForwardRealGeometryRecord > dgdRealToken_
Log< level::Info, false > LogInfo
edm::ESGetToken< DetGeomDesc, VeryForwardMisalignedGeometryRecord > dgdMisToken_
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
ROOT::Math::Rotation3D RotationMatrix
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord > realAlignmentToken_
edm::ESGetToken< DetGeomDesc, VeryForwardIdealGeometryRecord > idealDBGDToken_
~CTPPSGeometryESModule() override
edm::ESGetToken< PDetGeomDesc, VeryForwardIdealGeometryRecord > dbToken_
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::optional< DepRecordT > tryToGetRecord() const
std::unique_ptr< DetGeomDesc > produceMisalignedGD(const VeryForwardMisalignedGeometryRecord &)
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
CTPPSGeometryESModule(const edm::ParameterSet &)
std::unique_ptr< DetGeomDesc > produceMisalignedGDFromPreprocessedDB(const VeryForwardMisalignedGeometryRecord &)
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
std::unique_ptr< DetGeomDesc > produceIdealGD(const IdealGeometryRecord &)
const DepRecordT getRecord() const
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
const unsigned int verbosity_
std::unique_ptr< DetGeomDesc > produceIdealGDFromPreprocessedDB(const VeryForwardIdealGeometryRecord &)
std::unique_ptr< DetGeomDesc > produceRealGDFromPreprocessedDB(const VeryForwardRealGeometryRecord &)