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>&,
100 : verbosity_(iConfig.getUntrackedParameter<unsigned
int>(
"verbosity")),
101 buildMisalignedGeometry_(iConfig.getParameter<
bool>(
"buildMisalignedGeometry")),
102 isRun2_(iConfig.getParameter<
bool>(
"isRun2")),
103 fromPreprocessedDB_(iConfig.getUntrackedParameter<
bool>(
"fromPreprocessedDB",
false)),
104 fromDD4hep_(iConfig.getUntrackedParameter<
bool>(
"fromDD4hep",
false)) {
161 desc.addUntracked<
unsigned int>(
"verbosity", 1);
162 desc.add<
bool>(
"buildMisalignedGeometry",
false)->setComment(
"switch if misaligned geometry shall be built");
163 desc.add<
bool>(
"isRun2",
false)->setComment(
"Switch to legacy (2017-18) definition of diamond geometry");
166 desc.addUntracked<
bool>(
"fromPreprocessedDB",
false);
167 desc.addUntracked<
bool>(
"fromDD4hep",
false);
168 descriptions.
add(
"CTPPSGeometryESModule",
desc);
194 edm::LogInfo(
"CTPPSGeometryESModule") <<
" myDB size = " << myDB.container_.size();
197 auto pdet = std::make_unique<DetGeomDesc>(myDB);
201 template <
typename REC,
typename GEO>
203 GEO
const& iIdealRec,
204 std::optional<REC>
const& iAlignRec,
209 auto const& idealGD = iIdealRec.get(iGDToken);
214 auto alignmentsHandle = iAlignRec->getHandle(iAlignToken);
215 if (alignmentsHandle.isValid()) {
216 alignments = alignmentsHandle.product();
223 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
238 "CTPPSGeometryESModule::produceRealGDFromPreprocessedDB");
249 "CTPPSGeometryESModule::produceMisalignedGDFromPreprocessedDB");
259 "CTPPSGeometryESModule::produceRealGD");
270 "CTPPSGeometryESModule::produceMisalignedGD");
278 return std::make_unique<CTPPSGeometry>(&gD,
verbosity_);
287 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, VeryForwardIdealGeometryRecord > idealDBGDToken2_
edm::ESGetToken< DetGeomDesc, IdealGeometryRecord > idealGDToken2_
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 &)