|
|
Go to the documentation of this file.
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>&,
97 : verbosity_(iConfig.getUntrackedParameter<unsigned
int>(
"verbosity")),
98 isRun2_(iConfig.getParameter<
bool>(
"isRun2")),
99 fromPreprocessedDB_(iConfig.getUntrackedParameter<
bool>(
"fromPreprocessedDB",
false)),
100 fromDD4hep_(iConfig.getUntrackedParameter<
bool>(
"fromDD4hep",
false)) {
146 desc.addUntracked<
unsigned int>(
"verbosity", 1);
147 desc.add<
bool>(
"isRun2",
false)->setComment(
"Switch to legacy (2017-18) definition of diamond geometry");
150 desc.addUntracked<
bool>(
"fromPreprocessedDB",
false);
151 desc.addUntracked<
bool>(
"fromDD4hep",
false);
152 descriptions.
add(
"CTPPSGeometryESModule",
desc);
178 edm::LogInfo(
"CTPPSGeometryESModule") <<
" myDB size = " << myDB.container_.size();
181 auto pdet = std::make_unique<DetGeomDesc>(myDB);
185 template <
typename REC,
typename GEO>
187 GEO
const& iIdealRec,
188 std::optional<REC>
const& iAlignRec,
193 auto const& idealGD = iIdealRec.get(iGDToken);
198 auto alignmentsHandle = iAlignRec->getHandle(iAlignToken);
199 if (alignmentsHandle.isValid()) {
200 alignments = alignmentsHandle.product();
207 << alignments->
getSensorMap().size() <<
" sensor alignments applied.";
222 "CTPPSGeometryESModule::produceRealGDFromPreprocessedDB");
233 "CTPPSGeometryESModule::produceMisalignedGDFromPreprocessedDB");
243 "CTPPSGeometryESModule::produceRealGD");
254 "CTPPSGeometryESModule::produceMisalignedGD");
262 return std::make_unique<CTPPSGeometry>(&gD,
verbosity_);
271 return std::make_unique<CTPPSGeometry>(&gD,
verbosity_);
const DepRecordT getRecord() const
CTPPSGeometryESModule(const edm::ParameterSet &)
Event setup record containing the real (actual) geometry information.
edm::ESGetToken< PDetGeomDesc, VeryForwardIdealGeometryRecord > dbToken_
const mapType & getRPMap() const
returns the map of RP alignment corrections
Event setup record containing the ideal PPS geometry information.
const mapType & getSensorMap() const
returns the map of sensor alignment corrections
std::unique_ptr< DetGeomDesc > produceIdealGDFromPreprocessedDB(const VeryForwardIdealGeometryRecord &)
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Log< level::Info, false > LogInfo
ROOT::Math::Rotation3D RotationMatrix
edm::ESGetToken< DetGeomDesc, VeryForwardMisalignedGeometryRecord > dgdMisToken_
std::unique_ptr< DetGeomDesc > produceRealGD(const VeryForwardRealGeometryRecord &)
edm::ESGetToken< DDCompactView, IdealGeometryRecord > ddToken_
void add(std::string const &label, ParameterSetDescription const &psetDescription)
std::unique_ptr< DetGeomDesc > produceGD(const GEO &, const std::optional< REC > &, edm::ESGetToken< DetGeomDesc, GEO > const &, edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, REC > const &, const char *name)
edm::ESGetToken< DetGeomDesc, IdealGeometryRecord > idealGDToken_
Compact representation of the geometrical detector hierarchy.
std::unique_ptr< CTPPSGeometry > produceRealTG(const VeryForwardRealGeometryRecord &)
std::vector< int > fillCopyNos(TGeoIterator &it)
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
edm::ESGetToken< DetGeomDesc, VeryForwardIdealGeometryRecord > idealDBGDToken_
~CTPPSGeometryESModule() override
std::unique_ptr< DetGeomDesc > produceIdealGD(const IdealGeometryRecord &)
const unsigned int verbosity_
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPRealAlignmentRecord > realAlignmentToken_
const bool fromPreprocessedDB_
std::unique_ptr< DetGeomDesc > produceMisalignedGD(const VeryForwardMisalignedGeometryRecord &)
edm::ESGetToken< CTPPSRPAlignmentCorrectionsData, RPMisalignedAlignmentRecord > misAlignmentToken_
std::unique_ptr< DetGeomDesc > applyAlignments(const DetGeomDesc &, const CTPPSRPAlignmentCorrectionsData *)
ROOT::Math::DisplacementVector3D< ROOT::Math::Cartesian3D< double > > Translation
Event setup record containing the misaligned geometry information. It is used for alignment studies o...
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
std::optional< DepRecordT > tryToGetRecord() const
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Log< level::Info, true > LogVerbatim
Container for CTPPS RP alignment corrections. The corrections are stored on two levels - RP and senso...
edm::ESGetToken< DetGeomDesc, VeryForwardRealGeometryRecord > dgdRealToken_
T getParameter(std::string const &) const
PRODUCT const & get(ESGetToken< PRODUCT, T > const &iToken) const
std::unique_ptr< DetGeomDesc > buildDetGeomDescFromCompactView(const DDCompactView &myCompactView, const bool isRun2)
std::unique_ptr< DetGeomDesc > produceMisalignedGDFromPreprocessedDB(const VeryForwardMisalignedGeometryRecord &)
std::unique_ptr< DetGeomDesc > produceRealGDFromPreprocessedDB(const VeryForwardRealGeometryRecord &)
std::unique_ptr< CTPPSGeometry > produceMisalignedTG(const VeryForwardMisalignedGeometryRecord &)
edm::ESGetToken< cms::DDCompactView, IdealGeometryRecord > dd4hepToken_