diff --git a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h index 4ebf978656a6c..8c9aa66b4af6c 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h +++ b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h @@ -12,7 +12,7 @@ /*** Alignment ***/ #include "Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h" -#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" struct mpPCLresults { private: @@ -59,7 +59,7 @@ class MillePedeFileReader { public: //==================================================================== explicit MillePedeFileReader(const edm::ParameterSet&, const std::shared_ptr&, - const std::shared_ptr&); + const std::shared_ptr&); virtual ~MillePedeFileReader() = default; @@ -81,7 +81,7 @@ class MillePedeFileReader { const std::array& getTZobs() const { return tZobs_; } const std::array& getTZobsErr() const { return tZobsErr_; } - const AlignPCLThresholds::threshold_map getThresholdMap() const { return theThresholds_.get()->getThreshold_Map(); } + const AlignPCLThresholdsHG::threshold_map getThresholdMap() const { return theThresholds_.get()->getThreshold_Map(); } const int binariesAmount() const { return binariesAmount_; } @@ -119,7 +119,7 @@ class MillePedeFileReader { const std::shared_ptr pedeLabeler_; // thresholds from DB - const std::shared_ptr theThresholds_; + const std::shared_ptr theThresholds_; // file-names const std::string millePedeEndFile_; @@ -168,8 +168,8 @@ class MillePedeFileReader { }; const std::array coord_str = {{"X", "Y", "Z", "theta_X", "theta_Y", "theta_Z", "extra_DOF", "none"}}; -inline std::ostream& operator<<(std::ostream& os, const AlignPCLThresholds::coordType& c) { - if (c >= AlignPCLThresholds::endOfTypes || c < AlignPCLThresholds::X) +inline std::ostream& operator<<(std::ostream& os, const AlignPCLThresholdsHG::coordType& c) { + if (c >= AlignPCLThresholdsHG::endOfTypes || c < AlignPCLThresholdsHG::X) return os << "unrecongnized coordinate"; return os << coord_str[c]; } diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc index 552675fdc4153..4772b85a74f20 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc @@ -87,7 +87,7 @@ using namespace gbl; MillePedeAlignmentAlgorithm::MillePedeAlignmentAlgorithm(const edm::ParameterSet &cfg, edm::ConsumesCollector &iC) : AlignmentAlgorithmBase(cfg, iC), topoToken_(iC.esConsumes()), - aliThrToken_(iC.esConsumes()), + aliThrToken_(iC.esConsumes()), theConfig(cfg), theMode(this->decodeMode(theConfig.getUntrackedParameter("mode"))), theDir(theConfig.getUntrackedParameter("fileDir")), @@ -183,7 +183,7 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup, //Retrieve the thresolds cuts from DB for the PCL if (runAtPCL_) { const auto &th = &setup.getData(aliThrToken_); - theThresholds = std::make_shared(); + theThresholds = std::make_shared(); storeThresholds(th->getNrecords(), th->getThreshold_Map()); } @@ -301,7 +301,7 @@ bool MillePedeAlignmentAlgorithm::addCalibrations(const std::vectorsetAlignPCLThresholds(nRecords, thresholdMap); return true; } diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h index 04dadeffd92b4..d1d29bb0c78ba 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h @@ -25,8 +25,8 @@ #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" -#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" -#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" +#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" #include #include @@ -76,7 +76,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase { /// Pass integrated calibrations to Millepede (they are not owned by Millepede!) bool addCalibrations(const std::vector &iCals) override; - virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholds::threshold_map &thresholdMap); + virtual bool storeThresholds(const int &nRecords, const AlignPCLThresholdsHG::threshold_map &thresholdMap); /// Called at end of job void terminate(const edm::EventSetup &iSetup) override; @@ -271,7 +271,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase { //-------------------------------------------------------- const edm::ESGetToken topoToken_; - const edm::ESGetToken aliThrToken_; + const edm::ESGetToken aliThrToken_; enum EModeBit { myMilleBit = 1 << 0, myPedeRunBit = 1 << 1, myPedeSteerBit = 1 << 2, myPedeReadBit = 1 << 3 }; unsigned int decodeMode(const std::string &mode) const; @@ -291,7 +291,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase { std::unique_ptr thePedeSteer; std::unique_ptr theTrajectoryFactory; std::vector theCalibrations; - std::shared_ptr theThresholds; + std::shared_ptr theThresholds; unsigned int theMinNumHits; double theMaximalCor2D; /// maximal correlation allowed for 2D hit in TID/TEC. /// If larger, the 2D measurement gets diagonalized!!! diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc index 3424d31129229..cae0f4596e82d 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc @@ -93,7 +93,7 @@ void MillePedeDQMModule ::beginRun(const edm::Run&, const edm::EventSetup& setup // take the thresholds from DB const auto& thresholds_ = &setup.getData(aliThrToken_); - auto myThresholds = std::make_shared(); + auto myThresholds = std::make_shared(); myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map()); TrackerGeomBuilderFromGeometricDet builder; @@ -110,7 +110,7 @@ void MillePedeDQMModule ::beginRun(const edm::Run&, const edm::EventSetup& setup labelerPlugin, PedeLabelerBase::TopLevelAlignables(tracker_.get(), nullptr, nullptr), labelerConfig)}; mpReader_ = std::make_unique( - mpReaderConfig_, pedeLabeler, std::shared_ptr(myThresholds)); + mpReaderConfig_, pedeLabeler, std::shared_ptr(myThresholds)); } void MillePedeDQMModule ::fillStatusHisto(MonitorElement* statusHisto) { @@ -132,14 +132,14 @@ void MillePedeDQMModule ::fillStatusHisto(MonitorElement* statusHisto) { } void MillePedeDQMModule ::fillExpertHistos() { - std::array Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_; - std::array tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_; + std::array Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_; + std::array tXcut_, sigtXcut_, maxMovetXcut_, maxErrortXcut_; - std::array Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_; - std::array tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_; + std::array Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_; + std::array tYcut_, sigtYcut_, maxMovetYcut_, maxErrortYcut_; - std::array Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_; - std::array tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_; + std::array Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_; + std::array tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_; auto myMap = mpReader_->getThresholdMap(); @@ -196,12 +196,12 @@ void MillePedeDQMModule ::fillExpertHistos() { } void MillePedeDQMModule ::fillExpertHisto(MonitorElement* histo, - const std::array& cut, - const std::array& sigCut, - const std::array& maxMoveCut, - const std::array& maxErrorCut, - const std::array& obs, - const std::array& obsErr) { + const std::array& cut, + const std::array& sigCut, + const std::array& maxMoveCut, + const std::array& maxErrorCut, + const std::array& obs, + const std::array& obsErr) { TH1F* histo_0 = histo->getTH1F(); double max_ = *std::max_element(maxMoveCut.begin(), maxMoveCut.end()); @@ -264,6 +264,10 @@ int MillePedeDQMModule ::getIndexFromString(const std::string& alignableId) { return 5; } else if (alignableId == "TPEHalfCylinderXplusZplus") { return 4; + } else if (alignableId.rfind("TPBLadder", 0) == 0) { + return 6; + } else if (alignableId.rfind("TPEPanel", 0) == 0) { + return 7; } else { throw cms::Exception("LogicError") << "@SUB=MillePedeDQMModule::getIndexFromString\n" << "Retrieving conversion for not supported Alignable partition" << alignableId; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h index cb05faa56c1ad..54346b8623efe 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h @@ -30,7 +30,7 @@ #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h" /*** Thresholds from DB ***/ -#include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h" +#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" /*** DQM ***/ #include "DQMServices/Core/interface/DQMEDHarvester.h" @@ -53,6 +53,8 @@ class MillePedeDQMModule : public DQMEDHarvester { void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; + enum { SIZE_LG_STRUCTS = 6, SIZE_INDEX = 8 }; + //========================= PRIVATE METHODS ================================== private: //=================================================================== void beginRun(const edm::Run&, const edm::EventSetup&) override; @@ -64,12 +66,12 @@ class MillePedeDQMModule : public DQMEDHarvester { void fillExpertHistos(); void fillExpertHisto(MonitorElement* histo, - const std::array& cut, - const std::array& sigCut, - const std::array& maxMoveCut, - const std::array& maxErrorCut, - const std::array& obs, - const std::array& obsErr); + const std::array& cut, + const std::array& sigCut, + const std::array& maxMoveCut, + const std::array& maxErrorCut, + const std::array& obs, + const std::array& obsErr); bool setupChanged(const edm::EventSetup&); int getIndexFromString(const std::string& alignableId); @@ -82,7 +84,7 @@ class MillePedeDQMModule : public DQMEDHarvester { const edm::ESGetToken gDetToken_; const edm::ESGetToken ptpToken_; const edm::ESGetToken ptitpToken_; - const edm::ESGetToken aliThrToken_; + const edm::ESGetToken aliThrToken_; const edm::ParameterSet mpReaderConfig_; std::unique_ptr tracker_; diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc index 6db9fe70e4bee..7eff90d772ae5 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc @@ -14,7 +14,7 @@ MillePedeFileReader ::MillePedeFileReader(const edm::ParameterSet& config, const std::shared_ptr& pedeLabeler, - const std::shared_ptr& theThresholds) + const std::shared_ptr& theThresholds) : pedeLabeler_(pedeLabeler), theThresholds_(theThresholds), millePedeEndFile_(config.getParameter("millePedeEndFile")), @@ -142,32 +142,32 @@ void MillePedeFileReader ::readMillePedeResultFile() { auto det = getHLS(alignable); int detIndex = static_cast(det); - auto coord = static_cast(alignableIndex); + auto coord = static_cast(alignableIndex); std::string detLabel = getStringFromHLS(det); if (det != PclHLS::NotInPCL) { switch (coord) { - case AlignPCLThresholds::X: + case AlignPCLThresholdsHG::X: Xobs_[detIndex] = ObsMove; XobsErr_[detIndex] = ObsErr; break; - case AlignPCLThresholds::Y: + case AlignPCLThresholdsHG::Y: Yobs_[detIndex] = ObsMove; YobsErr_[detIndex] = ObsErr; break; - case AlignPCLThresholds::Z: + case AlignPCLThresholdsHG::Z: Zobs_[detIndex] = ObsMove; ZobsErr_[detIndex] = ObsErr; break; - case AlignPCLThresholds::theta_X: + case AlignPCLThresholdsHG::theta_X: tXobs_[detIndex] = ObsMove; tXobsErr_[detIndex] = ObsErr; break; - case AlignPCLThresholds::theta_Y: + case AlignPCLThresholdsHG::theta_Y: tYobs_[detIndex] = ObsMove; tYobsErr_[detIndex] = ObsErr; break; - case AlignPCLThresholds::theta_Z: + case AlignPCLThresholdsHG::theta_Z: tZobs_[detIndex] = ObsMove; tZobsErr_[detIndex] = ObsErr; break; diff --git a/CondCore/PCLConfigPlugins/src/plugin.cc b/CondCore/PCLConfigPlugins/src/plugin.cc index b9ad38cad20c1..e98e68b914075 100644 --- a/CondCore/PCLConfigPlugins/src/plugin.cc +++ b/CondCore/PCLConfigPlugins/src/plugin.cc @@ -1,5 +1,8 @@ #include "CondCore/ESSources/interface/registration_macros.h" #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" #include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h" +#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" REGISTER_PLUGIN(AlignPCLThresholdsRcd, AlignPCLThresholds); +REGISTER_PLUGIN(AlignPCLThresholdsHGRcd, AlignPCLThresholdsHG); diff --git a/CondCore/Utilities/plugins/Module_2XML.cc b/CondCore/Utilities/plugins/Module_2XML.cc index 34b02814b32b7..0e99a897e891b 100644 --- a/CondCore/Utilities/plugins/Module_2XML.cc +++ b/CondCore/Utilities/plugins/Module_2XML.cc @@ -5,6 +5,7 @@ PAYLOAD_2XML_MODULE(pluginUtilities_payload2xml) { m.def("boost_version_label", &cond::boost_version_label, "Get boost version for this release"); PAYLOAD_2XML_CLASS(AlCaRecoTriggerBits); PAYLOAD_2XML_CLASS(AlignPCLThresholds); + PAYLOAD_2XML_CLASS(AlignPCLThresholdsHG); PAYLOAD_2XML_CLASS(AlignmentErrors); PAYLOAD_2XML_CLASS(AlignmentErrorsExtended); PAYLOAD_2XML_CLASS(AlignmentSurfaceDeformations); diff --git a/CondCore/Utilities/src/CondDBFetch.cc b/CondCore/Utilities/src/CondDBFetch.cc index b7f2885ed9b2f..10b7e3a15436c 100644 --- a/CondCore/Utilities/src/CondDBFetch.cc +++ b/CondCore/Utilities/src/CondDBFetch.cc @@ -33,6 +33,7 @@ namespace cond { FETCH_PAYLOAD_CASE(AlignmentSurfaceDeformations) FETCH_PAYLOAD_CASE(Alignments) FETCH_PAYLOAD_CASE(AlignPCLThresholds) + FETCH_PAYLOAD_CASE(AlignPCLThresholdsHG) FETCH_PAYLOAD_CASE(BeamSpotObjects) FETCH_PAYLOAD_CASE(BeamSpotOnlineObjects) FETCH_PAYLOAD_CASE(CSCBadChambers) diff --git a/CondCore/Utilities/src/CondDBImport.cc b/CondCore/Utilities/src/CondDBImport.cc index 6f2e371abce4e..94262be2d9e61 100644 --- a/CondCore/Utilities/src/CondDBImport.cc +++ b/CondCore/Utilities/src/CondDBImport.cc @@ -53,6 +53,7 @@ namespace cond { IMPORT_PAYLOAD_CASE(AlignmentSurfaceDeformations) IMPORT_PAYLOAD_CASE(Alignments) IMPORT_PAYLOAD_CASE(AlignPCLThresholds) + IMPORT_PAYLOAD_CASE(AlignPCLThresholdsHG) IMPORT_PAYLOAD_CASE(BeamSpotObjects) IMPORT_PAYLOAD_CASE(BeamSpotOnlineObjects) IMPORT_PAYLOAD_CASE(CSCBadChambers) diff --git a/CondCore/Utilities/src/CondFormats.h b/CondCore/Utilities/src/CondFormats.h index 97afa8c3b3464..38e8e8273909f 100644 --- a/CondCore/Utilities/src/CondFormats.h +++ b/CondCore/Utilities/src/CondFormats.h @@ -279,6 +279,7 @@ #include "CondFormats/BTauObjects/interface/TrackProbabilityCalibration.h" #include "CondFormats/MFObjects/interface/MagFieldConfig.h" #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" #include "CondFormats/SiPhase2TrackerObjects/interface/TrackerDetToDTCELinkCablingMap.h" #include "CondFormats/SiPhase2TrackerObjects/interface/SiPhase2OuterTrackerLorentzAngle.h" #include "CondFormats/SiPhase2TrackerObjects/interface/DTCELinkId.h" diff --git a/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h b/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h new file mode 100644 index 0000000000000..0e7761fdfca5e --- /dev/null +++ b/CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h @@ -0,0 +1,8 @@ +#ifndef AlignPCLThresholdsRcd_AlignPCLThresholdsHGRcd_h +#define AlignPCLThresholdsRcd_AlignPCLThresholdsHGRcd_h + +#include "FWCore/Framework/interface/EventSetupRecordImplementation.h" + +class AlignPCLThresholdsHGRcd : public edm::eventsetup::EventSetupRecordImplementation {}; + +#endif diff --git a/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc b/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc new file mode 100644 index 0000000000000..78c8ab331baa1 --- /dev/null +++ b/CondFormats/DataRecord/src/AlignPCLThresholdsHGRcd.cc @@ -0,0 +1,4 @@ +#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" +#include "FWCore/Framework/interface/eventsetuprecord_registration_macro.h" + +EVENTSETUP_RECORD_REG(AlignPCLThresholdsHGRcd); diff --git a/CondFormats/PCLConfig/interface/AlignPCLThresholds.h b/CondFormats/PCLConfig/interface/AlignPCLThresholds.h index 9ab1045f6e5d7..4912d8c03b85c 100644 --- a/CondFormats/PCLConfig/interface/AlignPCLThresholds.h +++ b/CondFormats/PCLConfig/interface/AlignPCLThresholds.h @@ -45,7 +45,7 @@ class AlignPCLThresholds { void printAll() const; -private: +protected: threshold_map m_thresholds; int m_nrecords; diff --git a/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h b/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h new file mode 100644 index 0000000000000..c8f07bc83ef10 --- /dev/null +++ b/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h @@ -0,0 +1,52 @@ +#ifndef CondFormats_PCLConfig_AlignPCLThresholdsHG_h +#define CondFormats_PCLConfig_AlignPCLThresholdsHG_h + +#include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/Serialization/interface/Serializable.h" + +#include +#include +#include + +class AlignPCLThresholdsHG : public AlignPCLThresholds { +public: + typedef std::unordered_map> param_map; + AlignPCLThresholdsHG() {} + + enum FloatParamIndex { + FRACTION_CUT_X = 0, + FRACTION_CUT_Y = 1, + FRACTION_CUT_Z = 2, + FRACTION_CUT_TX = 3, + FRACTION_CUT_TY = 4, + FRACTION_CUT_TZ = 5, + FSIZE = 6 + }; + + enum IntParamIndex { ISIZE = 0 }; + enum StringParamIndex { SSIZE = 0 }; + + void setFractionCut(const std::string &AlignableId, const coordType &type, const float &cut); + + const param_map &getFloatMap() const { return floatMap_; } + const std::vector &getFloatVec(const std::string &AlignableId) const; + + float getFractionCut(const std::string &AlignableId, const coordType &type) const; + std::array getFractionCut(const std::string &AlignableId) const; + + const int payloadVersion() const; + + void printAll() const; + + ~AlignPCLThresholdsHG() override = default; + +private: + param_map floatMap_; + // yet unused, but kept for possible extensions + std::unordered_map> intMap_; + std::unordered_map> stringMap_; + + COND_SERIALIZABLE; +}; + +#endif diff --git a/CondFormats/PCLConfig/plugins/AlignPCLThresholdsReader.cc b/CondFormats/PCLConfig/plugins/AlignPCLThresholdsReader.cc index e899bf6fa4c1c..78c5ed3d24e99 100644 --- a/CondFormats/PCLConfig/plugins/AlignPCLThresholdsReader.cc +++ b/CondFormats/PCLConfig/plugins/AlignPCLThresholdsReader.cc @@ -6,9 +6,13 @@ #include "FWCore/Framework/interface/EventSetup.h" #include "FWCore/Framework/interface/MakerMacros.h" #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" #include "CondFormats/DataRecord/interface/AlignPCLThresholdsRcd.h" +#include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" +#include "HLTrigger/HLTcore/interface/defaultModuleLabel.h" namespace edmtest { + template class AlignPCLThresholdsReader : public edm::one::EDAnalyzer<> { public: explicit AlignPCLThresholdsReader(edm::ParameterSet const& p); @@ -20,38 +24,42 @@ namespace edmtest { void analyze(const edm::Event& e, const edm::EventSetup& c) override; // ----------member data --------------------------- - const edm::ESGetToken thresholdToken_; + const edm::ESGetToken thresholdToken_; const bool printdebug_; const std::string formatedOutput_; }; - AlignPCLThresholdsReader::AlignPCLThresholdsReader(edm::ParameterSet const& p) + template + AlignPCLThresholdsReader::AlignPCLThresholdsReader(edm::ParameterSet const& p) : thresholdToken_(esConsumes()), printdebug_(p.getUntrackedParameter("printDebug", true)), formatedOutput_(p.getUntrackedParameter("outputFile", "")) { edm::LogInfo("AlignPCLThresholdsReader") << "AlignPCLThresholdsReader" << std::endl; } - AlignPCLThresholdsReader::~AlignPCLThresholdsReader() { + template + AlignPCLThresholdsReader::~AlignPCLThresholdsReader() { edm::LogInfo("AlignPCLThresholdsReader") << "~AlignPCLThresholdsReader " << std::endl; } - void AlignPCLThresholdsReader::analyze(const edm::Event& e, const edm::EventSetup& context) { + template + void AlignPCLThresholdsReader::analyze(const edm::Event& e, const edm::EventSetup& context) { edm::LogInfo("AlignPCLThresholdsReader") << "### AlignPCLThresholdsReader::analyze ###" << std::endl; edm::LogInfo("AlignPCLThresholdsReader") << " I AM IN RUN NUMBER " << e.id().run() << std::endl; edm::LogInfo("AlignPCLThresholdsReader") << " ---EVENT NUMBER " << e.id().event() << std::endl; + edm::eventsetup::EventSetupRecordKey inputKey = edm::eventsetup::EventSetupRecordKey::makeKey(); edm::eventsetup::EventSetupRecordKey recordKey( - edm::eventsetup::EventSetupRecordKey::TypeTag::findType("AlignPCLThresholdsRcd")); + edm::eventsetup::EventSetupRecordKey::TypeTag::findType(inputKey.type().name())); if (recordKey.type() == edm::eventsetup::EventSetupRecordKey::TypeTag()) { //record not found - edm::LogInfo("AlignPCLThresholdsReader") << "Record \"AlignPCLThresholdsRcd" - << "\" does not exist " << std::endl; + edm::LogInfo("AlignPCLThresholdsReader") + << "Record \"" << inputKey.type().name() << "\" does not exist " << std::endl; } //this part gets the handle of the event source and the record (i.e. the Database) - edm::ESHandle thresholdHandle = context.getHandle(thresholdToken_); + edm::ESHandle thresholdHandle = context.getHandle(thresholdToken_); edm::LogInfo("AlignPCLThresholdsReader") << "got eshandle" << std::endl; if (!thresholdHandle.isValid()) { @@ -59,7 +67,7 @@ namespace edmtest { return; } - const AlignPCLThresholds* thresholds = thresholdHandle.product(); + const T* thresholds = thresholdHandle.product(); edm::LogInfo("AlignPCLThresholdsReader") << "got AlignPCLThresholds* " << std::endl; edm::LogInfo("AlignPCLThresholdsReader") << "print pointer address : "; edm::LogInfo("AlignPCLThresholdsReader") << thresholds << std::endl; @@ -67,7 +75,7 @@ namespace edmtest { edm::LogInfo("AlignPCLThresholdsReader") << "Size " << thresholds->size() << std::endl; edm::LogInfo("AlignPCLThresholdsReader") << "Content of myThresholds " << std::endl; // use built-in method in the CondFormat to print the content - if (printdebug_) { + if (thresholds && printdebug_) { thresholds->printAll(); } @@ -78,45 +86,118 @@ namespace edmtest { fprintf(pFile, "AlignPCLThresholds::printAll() \n"); fprintf(pFile, " =======================================================================================================" - "============ \n"); + "============\n"); fprintf(pFile, "N records cut: %i \n", thresholds->getNrecords()); AlignPCLThresholds::threshold_map m_thresholds = thresholds->getThreshold_Map(); + AlignPCLThresholdsHG::param_map m_floatMap{}; + + if constexpr (std::is_same_v) { + m_floatMap = thresholds->getFloatMap(); + } for (auto it = m_thresholds.begin(); it != m_thresholds.end(); ++it) { + bool hasFractionCut = (m_floatMap.find(it->first) != m_floatMap.end()); + fprintf(pFile, " =====================================================================================================" - "============== \n"); - fprintf(pFile, "key : %s \n ", (it->first).c_str()); + "==============\n"); + fprintf(pFile, "key : %s \n", (it->first).c_str()); fprintf(pFile, "- Xcut : %8.3f um ", (it->second).getXcut()); fprintf(pFile, "| sigXcut : %8.3f ", (it->second).getSigXcut()); fprintf(pFile, "| maxMoveXcut : %8.3f um ", (it->second).getMaxMoveXcut()); - fprintf(pFile, "| ErrorXcut : %8.3f um\n ", (it->second).getErrorXcut()); + fprintf(pFile, "| ErrorXcut : %8.3f um ", (it->second).getErrorXcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| X_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::X)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } fprintf(pFile, "- thetaXcut : %8.3f urad ", (it->second).getThetaXcut()); fprintf(pFile, "| sigThetaXcut : %8.3f ", (it->second).getSigThetaXcut()); fprintf(pFile, "| maxMoveThetaXcut : %8.3f urad ", (it->second).getMaxMoveThetaXcut()); - fprintf(pFile, "| ErrorThetaXcut : %8.3f urad\n ", (it->second).getErrorThetaXcut()); + fprintf(pFile, "| ErrorThetaXcut : %8.3f urad ", (it->second).getErrorThetaXcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| thetaX_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::theta_X)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } fprintf(pFile, "- Ycut : %8.3f um ", (it->second).getYcut()); fprintf(pFile, "| sigYcut : %8.3f ", (it->second).getSigXcut()); fprintf(pFile, "| maxMoveYcut : %8.3f um ", (it->second).getMaxMoveYcut()); - fprintf(pFile, "| ErrorYcut : %8.3f um\n ", (it->second).getErrorYcut()); + fprintf(pFile, "| ErrorYcut : %8.3f um ", (it->second).getErrorYcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| Y_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::Y)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } fprintf(pFile, "- thetaYcut : %8.3f urad ", (it->second).getThetaYcut()); fprintf(pFile, "| sigThetaYcut : %8.3f ", (it->second).getSigThetaYcut()); fprintf(pFile, "| maxMoveThetaYcut : %8.3f urad ", (it->second).getMaxMoveThetaYcut()); - fprintf(pFile, "| ErrorThetaYcut : %8.3f urad\n ", (it->second).getErrorThetaYcut()); + fprintf(pFile, "| ErrorThetaYcut : %8.3f urad ", (it->second).getErrorThetaYcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| thetaY_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::theta_Y)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } fprintf(pFile, "- Zcut : %8.3f um ", (it->second).getZcut()); fprintf(pFile, "| sigZcut : %8.3f ", (it->second).getSigZcut()); fprintf(pFile, "| maxMoveZcut : %8.3f um ", (it->second).getMaxMoveZcut()); - fprintf(pFile, "| ErrorZcut : %8.3f um\n ", (it->second).getErrorZcut()); + fprintf(pFile, "| ErrorZcut : %8.3f um ", (it->second).getErrorZcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| Z_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::Z)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } fprintf(pFile, "- thetaZcut : %8.3f urad ", (it->second).getThetaZcut()); fprintf(pFile, "| sigThetaZcut : %8.3f ", (it->second).getSigThetaZcut()); fprintf(pFile, "| maxMoveThetaZcut : %8.3f urad ", (it->second).getMaxMoveThetaZcut()); - fprintf(pFile, "| ErrorThetaZcut : %8.3f urad\n ", (it->second).getErrorThetaZcut()); + fprintf(pFile, "| ErrorThetaZcut : %8.3f urad ", (it->second).getErrorThetaZcut()); + if constexpr (std::is_same_v) { + if (hasFractionCut) { + fprintf(pFile, + "| thetaZ_fractionCut : %8.3f \n", + thresholds->getFractionCut(it->first, AlignPCLThresholds::coordType::theta_Z)); + } else { + fprintf(pFile, "\n"); + } + } else { + fprintf(pFile, "\n"); + } if ((it->second).hasExtraDOF()) { for (unsigned int j = 0; j < (it->second).extraDOFSize(); j++) { @@ -135,13 +216,18 @@ namespace edmtest { } } - void AlignPCLThresholdsReader::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + template + void AlignPCLThresholdsReader::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.setComment("Reads payloads of type AlignPCLThresholds"); desc.addUntracked("printDebug", true); desc.addUntracked("outputFile", ""); - descriptions.add("AlignPCLThresholdsReader", desc); + descriptions.add(defaultModuleLabel>(), desc); } - DEFINE_FWK_MODULE(AlignPCLThresholdsReader); + typedef AlignPCLThresholdsReader AlignPCLThresholdsLGReader; + typedef AlignPCLThresholdsReader AlignPCLThresholdsHGReader; + + DEFINE_FWK_MODULE(AlignPCLThresholdsLGReader); + DEFINE_FWK_MODULE(AlignPCLThresholdsHGReader); } // namespace edmtest diff --git a/CondFormats/PCLConfig/plugins/AlignPCLThresholdsWriter.cc b/CondFormats/PCLConfig/plugins/AlignPCLThresholdsWriter.cc index a42461bc85a20..69ad5b2805eb5 100644 --- a/CondFormats/PCLConfig/plugins/AlignPCLThresholdsWriter.cc +++ b/CondFormats/PCLConfig/plugins/AlignPCLThresholdsWriter.cc @@ -26,6 +26,7 @@ #include "FWCore/ParameterSet/interface/ParameterSet.h" #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" #include "FWCore/ServiceRegistry/interface/Service.h" #include "CondCore/DBOutputService/interface/PoolDBOutputService.h" @@ -37,6 +38,7 @@ namespace DOFs { enum dof { X, Y, Z, thetaX, thetaY, thetaZ, extraDOF }; } +template class AlignPCLThresholdsWriter : public edm::one::EDAnalyzer<> { public: explicit AlignPCLThresholdsWriter(const edm::ParameterSet&); @@ -48,6 +50,9 @@ class AlignPCLThresholdsWriter : public edm::one::EDAnalyzer<> { void analyze(const edm::Event&, const edm::EventSetup&) override; DOFs::dof mapOntoEnum(std::string coord); + void writePayload(T& myThresholds); + void storeHGthresholds(AlignPCLThresholdsHG& myThresholds, const std::vector& alignables); + // ----------member data --------------------------- const std::string m_record; const unsigned int m_minNrecords; @@ -57,7 +62,8 @@ class AlignPCLThresholdsWriter : public edm::one::EDAnalyzer<> { // // constructors and destructor // -AlignPCLThresholdsWriter::AlignPCLThresholdsWriter(const edm::ParameterSet& iConfig) +template +AlignPCLThresholdsWriter::AlignPCLThresholdsWriter(const edm::ParameterSet& iConfig) : m_record(iConfig.getParameter("record")), m_minNrecords(iConfig.getParameter("minNRecords")), m_parameters(iConfig.getParameter >("thresholds")) {} @@ -67,11 +73,56 @@ AlignPCLThresholdsWriter::AlignPCLThresholdsWriter(const edm::ParameterSet& iCon // // ------------ method called for each event ------------ -void AlignPCLThresholdsWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { - using namespace edm; +template +void AlignPCLThresholdsWriter::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) { + // detect if new payload is used + bool newClass = false; + for (auto& thePSet : m_parameters) { + if (thePSet.exists("fractionCut")) { + newClass = true; + break; + } + } + + T myThresholds{}; + if constexpr (std::is_same_v) { + if (newClass) { + this->writePayload(myThresholds); + } else { + throw cms::Exception("AlignPCLThresholdsWriter") << "mismatched configuration"; + } + } else { + if (!newClass) { + this->writePayload(myThresholds); + } else { + throw cms::Exception("AlignPCLThresholdsWriter") << "mismatched configuration"; + } + } +} + +template +DOFs::dof AlignPCLThresholdsWriter::mapOntoEnum(std::string coord) { + if (coord == "X") { + return DOFs::X; + } else if (coord == "Y") { + return DOFs::Y; + } else if (coord == "Z") { + return DOFs::Z; + } else if (coord == "thetaX") { + return DOFs::thetaX; + } else if (coord == "thetaY") { + return DOFs::thetaY; + } else if (coord == "thetaZ") { + return DOFs::thetaZ; + } else { + return DOFs::extraDOF; + } +} - // output object - AlignPCLThresholds myThresholds{}; +// ------------ templated method to write the payload ------------ +template +void AlignPCLThresholdsWriter::writePayload(T& myThresholds) { + using namespace edm; edm::LogInfo("AlignPCLThresholdsWriter") << "Size of AlignPCLThresholds object " << myThresholds.size() << std::endl; @@ -164,7 +215,12 @@ void AlignPCLThresholdsWriter::analyze(const edm::Event& iEvent, const edm::Even myThresholds.setNRecords(m_minNrecords); edm::LogInfo("AlignPCLThresholdsWriter") << "Content of AlignPCLThresholds " << std::endl; - // use buil-in method in the CondFormat + // additional thresholds for AlignPCLThresholdsHG + if constexpr (std::is_same_v) { + storeHGthresholds(myThresholds, alignables); + } + + // use built-in method in the CondFormat myThresholds.printAll(); // Form the data here @@ -176,29 +232,36 @@ void AlignPCLThresholdsWriter::analyze(const edm::Event& iEvent, const edm::Even } } -DOFs::dof AlignPCLThresholdsWriter::mapOntoEnum(std::string coord) { - if (coord == "X") { - return DOFs::X; - } else if (coord == "Y") { - return DOFs::Y; - } else if (coord == "Z") { - return DOFs::Z; - } else if (coord == "thetaX") { - return DOFs::thetaX; - } else if (coord == "thetaY") { - return DOFs::thetaY; - } else if (coord == "thetaZ") { - return DOFs::thetaZ; - } else { - return DOFs::extraDOF; +// ------------ method to store additional HG thresholds ------------ +template +void AlignPCLThresholdsWriter::storeHGthresholds(AlignPCLThresholdsHG& myThresholds, + const std::vector& alignables) { + edm::LogInfo("AlignPCLThresholdsWriter") + << "Found type AlignPCLThresholdsHG, additional thresholds are written" << std::endl; + + for (auto& alignable : alignables) { + for (auto& thePSet : m_parameters) { + const std::string alignableId(thePSet.getParameter("alignableId")); + const std::string DOF(thePSet.getParameter("DOF")); + + // Get coordType from DOF + AlignPCLThresholds::coordType type = static_cast(mapOntoEnum(DOF)); + + if (alignableId == alignable) { + if (thePSet.exists("fractionCut")) { + const double fractionCut(thePSet.getParameter("fractionCut")); + myThresholds.setFractionCut(alignableId, type, fractionCut); + } + } + } } } // ------------ method fills 'descriptions' with the allowed parameters for the module ------------ -void AlignPCLThresholdsWriter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { +template +void AlignPCLThresholdsWriter::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; desc.setComment("Plugin to write payloads of type AlignPCLThresholds"); - desc.add("record", "AlignPCLThresholdsRcd"); desc.add("minNRecords", 25000); edm::ParameterSetDescription desc_thresholds; @@ -208,11 +271,21 @@ void AlignPCLThresholdsWriter::fillDescriptions(edm::ConfigurationDescriptions& desc_thresholds.add("sigCut"); desc_thresholds.add("maxMoveCut"); desc_thresholds.add("maxErrorCut"); + if constexpr (std::is_same_v) { + desc.add("record", "AlignPCLThresholdsHGRcd"); + //optional thresholds from new payload version (not for all the alignables) + desc_thresholds.addOptional("fractionCut"); + } else { + desc.add("record", "AlignPCLThresholdsRcd"); + } std::vector default_thresholds(1); desc.addVPSet("thresholds", desc_thresholds, default_thresholds); descriptions.addWithDefaultLabel(desc); } -//define this as a plug-in -DEFINE_FWK_MODULE(AlignPCLThresholdsWriter); +typedef AlignPCLThresholdsWriter AlignPCLThresholdsLGWriter; +typedef AlignPCLThresholdsWriter AlignPCLThresholdsHGWriter; + +DEFINE_FWK_MODULE(AlignPCLThresholdsLGWriter); +DEFINE_FWK_MODULE(AlignPCLThresholdsHGWriter); diff --git a/CondFormats/PCLConfig/python/ThresholdsHG_cff.py b/CondFormats/PCLConfig/python/ThresholdsHG_cff.py new file mode 100644 index 0000000000000..cde469be6c1ed --- /dev/null +++ b/CondFormats/PCLConfig/python/ThresholdsHG_cff.py @@ -0,0 +1,962 @@ +import FWCore.ParameterSet.Config as cms +import copy + +# ----------------------------------------------------------------------- +# Default configuration + +default = cms.VPSet( + #### Barrel Pixel HB X- + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXminus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Barrel Pixel HB X+ + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0), + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPBHalfBarrelXplus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Forward Pixel HC X-,Z- + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZminus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Forward Pixel HC X+,Z- + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZminus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Forward Pixel HC X-,Z+ + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXminusZplus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Forward Pixel HC X+,Z+ + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + cms.PSet(alignableId = cms.string("TPEHalfCylinderXplusZplus"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + maxMoveCut = cms.double(200.0), + maxErrorCut = cms.double(10.0) + ), + + ### Barrel Pixel Ladder + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadder"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanel"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### Barrel Pixel Ladder Layer 1 + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer1"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### Barrel Pixel Ladder Layer 2 + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer2"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### Barrel Pixel Ladder Layer 3 + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer3"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### Barrel Pixel Ladder Layer 4 + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPBLadderLayer4"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel Disk1 + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk1"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel Disk2 + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk2"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel Disk3 + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDisk3"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel DiskM1 + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM1"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel DiskM2 + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM2"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + ### EndCap Pixel Panel DiskM3 + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("X"), + cut = cms.double(5.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("thetaX"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("Y"), + cut = cms.double(10.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("thetaY"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("Z"), + cut = cms.double(15.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ), + + cms.PSet(alignableId = cms.string("TPEPanelDiskM3"), + DOF = cms.string("thetaZ"), + cut = cms.double(30.0), + sigCut = cms.double(2.5), + fractionCut = cms.double(0.25), + maxMoveCut = cms.double(100000.0), + maxErrorCut = cms.double(10000.0) + ) + ) + diff --git a/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc b/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc new file mode 100644 index 0000000000000..0f8d94427b9c8 --- /dev/null +++ b/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc @@ -0,0 +1,202 @@ +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" +#include "FWCore/Utilities/interface/Exception.h" +#include "FWCore/MessageLogger/interface/MessageLogger.h" + +#include +#include // std::setw + +//****************************************************************************// +namespace AlignPCLThresholdsHGImpl { + template + const T &getParam(const std::vector ¶ms, size_t index) { + if (index >= params.size()) + throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range."); + return params[index]; + } + + template + void setParam(std::vector ¶ms, size_t index, const T &value) { + if (index >= params.size()) + throw std::out_of_range("Parameter with index " + std::to_string(index) + " is out of range."); + params[index] = value; + } + +} //namespace AlignPCLThresholdsHGImpl + +//****************************************************************************// +const std::vector &AlignPCLThresholdsHG::getFloatVec(const std::string &AlignableId) const { + const auto &it = floatMap_.find(AlignableId); + + if (it != floatMap_.end()) { + return it->second; + } else { + throw cms::Exception("AlignPCLThresholdsHG") << "No float vector defined for Alignable id " << AlignableId << "\n"; + } +} + +//****************************************************************************// +void AlignPCLThresholdsHG::setFractionCut(const std::string &AlignableId, const coordType &type, const float &cut) { + // Set entry in map if not yet available + const auto &it = floatMap_.find(AlignableId); + if (it == floatMap_.end()) + floatMap_[AlignableId] = std::vector(FSIZE, -1.); + + switch (type) { + case X: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_X, cut); + case Y: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_Y, cut); + case Z: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_Z, cut); + case theta_X: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_TX, cut); + case theta_Y: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_TY, cut); + case theta_Z: + return AlignPCLThresholdsHGImpl::setParam(floatMap_[AlignableId], FRACTION_CUT_TZ, cut); + default: + throw cms::Exception("AlignPCLThresholdsHG") + << "Requested setting fraction threshold for undefined coordinate" << type << "\n"; + } +} + +//****************************************************************************// +std::array AlignPCLThresholdsHG::getFractionCut(const std::string &AlignableId) const { + const std::vector vec = getFloatVec(AlignableId); + return {{AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_X), + AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_Y), + AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_Z), + AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TX), + AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TY), + AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TZ)}}; +} + +//****************************************************************************// +float AlignPCLThresholdsHG::getFractionCut(const std::string &AlignableId, const coordType &type) const { + const std::vector vec = getFloatVec(AlignableId); + switch (type) { + case X: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_X); + case Y: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_Y); + case Z: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_Z); + case theta_X: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TX); + case theta_Y: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TY); + case theta_Z: + return AlignPCLThresholdsHGImpl::getParam(vec, FRACTION_CUT_TZ); + default: + throw cms::Exception("AlignPCLThresholdsHG") + << "Requested fraction threshold for undefined coordinate" << type << "\n"; + } +} + +//****************************************************************************// +const int AlignPCLThresholdsHG::payloadVersion() const { + switch (FSIZE + ISIZE + SSIZE) { + case 6: + return 1; + default: + throw cms::Exception("AlignPCLThresholdsHG") + << "Payload version with parameter size equal to " << FSIZE + ISIZE + SSIZE << " is not defined.\n"; + } +} + +//****************************************************************************// +void AlignPCLThresholdsHG::printAll() const { + edm::LogVerbatim out("AlignPCLThresholdsHG"); + + out << "AlignPCLThresholdsHG::printAll()\n"; + out << "=============================================================================================================" + "======\n"; + out << "N records cut: " << this->getNrecords() << "\n"; + for (auto it = m_thresholds.begin(); it != m_thresholds.end(); ++it) { + out << "===========================================================================================================" + "========\n"; + + std::stringstream ss; + + ss << "key : " << it->first << " \n" + << "- Xcut : " << std::setw(4) << (it->second).getXcut() << std::setw(5) << " um" + << "| sigXcut : " << std::setw(4) << (it->second).getSigXcut() << std::setw(1) << " " + << "| maxMoveXcut : " << std::setw(4) << (it->second).getMaxMoveXcut() << std::setw(5) << " um" + << "| ErrorXcut : " << std::setw(4) << (it->second).getErrorXcut() << std::setw(5) << " um"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| X_fractionCut : " << std::setw(4) << getFractionCut(it->first, X) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + ss << "- thetaXcut : " << std::setw(4) << (it->second).getThetaXcut() << std::setw(5) << " urad" + << "| sigThetaXcut : " << std::setw(4) << (it->second).getSigThetaXcut() << std::setw(1) << " " + << "| maxMoveThetaXcut : " << std::setw(4) << (it->second).getMaxMoveThetaXcut() << std::setw(5) << " urad" + << "| ErrorThetaXcut : " << std::setw(4) << (it->second).getErrorThetaXcut() << std::setw(5) << " urad"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| thetaX_fractionCut : " << std::setw(4) << getFractionCut(it->first, theta_X) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + ss << "- Ycut : " << std::setw(4) << (it->second).getYcut() << std::setw(5) << " um" + << "| sigYcut : " << std::setw(4) << (it->second).getSigXcut() << std::setw(1) << " " + << "| maxMoveYcut : " << std::setw(4) << (it->second).getMaxMoveYcut() << std::setw(5) << " um" + << "| ErrorYcut : " << std::setw(4) << (it->second).getErrorYcut() << std::setw(5) << " um"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| Y_fractionCut : " << std::setw(4) << getFractionCut(it->first, Y) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + ss << "- thetaYcut : " << std::setw(4) << (it->second).getThetaYcut() << std::setw(5) << " urad" + << "| sigThetaYcut : " << std::setw(4) << (it->second).getSigThetaYcut() << std::setw(1) << " " + << "| maxMoveThetaYcut : " << std::setw(4) << (it->second).getMaxMoveThetaYcut() << std::setw(5) << " urad" + << "| ErrorThetaYcut : " << std::setw(4) << (it->second).getErrorThetaYcut() << std::setw(5) << " urad"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| thetaY_fractionCut : " << std::setw(4) << getFractionCut(it->first, theta_Y) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + ss << "- Zcut : " << std::setw(4) << (it->second).getZcut() << std::setw(5) << " um" + << "| sigZcut : " << std::setw(4) << (it->second).getSigZcut() << std::setw(1) << " " + << "| maxMoveZcut : " << std::setw(4) << (it->second).getMaxMoveZcut() << std::setw(5) << " um" + << "| ErrorZcut : " << std::setw(4) << (it->second).getErrorZcut() << std::setw(5) << " um"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| Z_fractionCut : " << std::setw(4) << getFractionCut(it->first, Z) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + ss << "- thetaZcut : " << std::setw(4) << (it->second).getThetaZcut() << std::setw(5) << " urad" + << "| sigThetaZcut : " << std::setw(4) << (it->second).getSigThetaZcut() << std::setw(1) << " " + << "| maxMoveThetaZcut : " << std::setw(4) << (it->second).getMaxMoveThetaZcut() << std::setw(5) << " urad" + << "| ErrorThetaZcut : " << std::setw(4) << (it->second).getErrorThetaZcut() << std::setw(5) << " urad"; + + if (floatMap_.find(it->first) != floatMap_.end()) { + ss << "| thetaZ_fractionCut : " << std::setw(4) << getFractionCut(it->first, theta_Z) << std::setw(5) << "\n"; + } else { + ss << "\n"; + } + + out << ss.str() << std::endl; + + if ((it->second).hasExtraDOF()) { + for (unsigned int j = 0; j < (it->second).extraDOFSize(); j++) { + std::array extraDOFCuts = getExtraDOFCutsForAlignable(it->first, j); + + out << "Extra DOF " << j << " with label: " << getExtraDOFLabelForAlignable(it->first, j); + out << "- cut : " << std::setw(4) << extraDOFCuts.at(0) << std::setw(5) << " " + << "| sigCut : " << std::setw(4) << extraDOFCuts.at(1) << std::setw(1) << " " + << "| maxMoveCut : " << std::setw(4) << extraDOFCuts.at(2) << std::setw(5) << " " + << "| maxErrorCut : " << std::setw(4) << extraDOFCuts.at(3) << std::setw(5) << " "; + } + } + } +} diff --git a/CondFormats/PCLConfig/src/T_EventSetup_AlignPCLThresholdsHG.cc b/CondFormats/PCLConfig/src/T_EventSetup_AlignPCLThresholdsHG.cc new file mode 100644 index 0000000000000..e1bc185fa8452 --- /dev/null +++ b/CondFormats/PCLConfig/src/T_EventSetup_AlignPCLThresholdsHG.cc @@ -0,0 +1,4 @@ +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" +#include "FWCore/Utilities/interface/typelookup.h" + +TYPELOOKUP_DATA_REG(AlignPCLThresholdsHG); diff --git a/CondFormats/PCLConfig/src/classes_def.xml b/CondFormats/PCLConfig/src/classes_def.xml index 39195a5fe5e08..4dd83f55fa9ac 100644 --- a/CondFormats/PCLConfig/src/classes_def.xml +++ b/CondFormats/PCLConfig/src/classes_def.xml @@ -4,4 +4,5 @@ + diff --git a/CondFormats/PCLConfig/src/headers.h b/CondFormats/PCLConfig/src/headers.h index facace9aa2dc9..dc0933c2705b8 100644 --- a/CondFormats/PCLConfig/src/headers.h +++ b/CondFormats/PCLConfig/src/headers.h @@ -1 +1,2 @@ #include "CondFormats/PCLConfig/interface/AlignPCLThresholds.h" +#include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" diff --git a/CondFormats/PCLConfig/test/AlignPCLThresholdsReader_cfg.py b/CondFormats/PCLConfig/test/AlignPCLThresholdsReader_cfg.py index 324bf01a43adf..b386277c61b8a 100644 --- a/CondFormats/PCLConfig/test/AlignPCLThresholdsReader_cfg.py +++ b/CondFormats/PCLConfig/test/AlignPCLThresholdsReader_cfg.py @@ -18,9 +18,29 @@ reportEvery = cms.untracked.int32(1000) ), AlignPCLThresholdsReader = cms.untracked.PSet( limit = cms.untracked.int32(-1)), - AlignPCLThresholds = cms.untracked.PSet( limit = cms.untracked.int32(-1)) + AlignPCLThresholds = cms.untracked.PSet( limit = cms.untracked.int32(-1)), + AlignPCLThresholdsHG = cms.untracked.PSet( limit = cms.untracked.int32(-1)) ) +## +## Var Parsing +## +import FWCore.ParameterSet.VarParsing as VarParsing +options = VarParsing.VarParsing() +options.register('readLGpayload', + False, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.bool, + "Read old payload type used for LG thresholds") +options.parseArguments() + +## +## Define record, class and module based on option +## +[rcdName, className, moduleName] = ["AlignPCLThresholdsRcd","AlignPCLThresholds","AlignPCLThresholdsLGReader"] \ + if (options.readLGpayload) else ["AlignPCLThresholdsHGRcd","AlignPCLThresholdsHG","AlignPCLThresholdsHGReader"] + +print("using %s %s %s" % (rcdName, className, moduleName)) ## ## Empty Source ## @@ -34,11 +54,13 @@ ## Get the payload ## from CondCore.CondDB.CondDB_cfi import * -CondDBThresholds = CondDB.clone(connect = cms.string("sqlite_file:mythresholds.db")) +inputDBfile = 'sqlite_file:mythresholds_%s.db' % ("LG" if(options.readLGpayload) else "HG") + +CondDBThresholds = CondDB.clone(connect = cms.string(inputDBfile)) process.dbInput = cms.ESSource("PoolDBESSource", CondDBThresholds, - toGet = cms.VPSet(cms.PSet(record = cms.string('AlignPCLThresholdsRcd'), + toGet = cms.VPSet(cms.PSet(record = cms.string(rcdName), tag = cms.string('PCLThresholds_express_v0') # choose tag you want ) ) @@ -47,17 +69,28 @@ ## Retrieve it and check it's available in the ES ## process.get = cms.EDAnalyzer("EventSetupRecordDataGetter", - toGet = cms.VPSet(cms.PSet(record = cms.string('AlignPCLThresholdsRcd'), - data = cms.vstring('AlignPCLThresholds') + toGet = cms.VPSet(cms.PSet(record = cms.string(rcdName), + data = cms.vstring(className) ) ), verbose = cms.untracked.bool(True) ) + ## ## Read it back ## -process.ReadDB = cms.EDAnalyzer("AlignPCLThresholdsReader") -process.ReadDB.printDebug = cms.untracked.bool(True) -process.ReadDB.outputFile = cms.untracked.string('AlignPCLThresholds.log') +from CondFormats.PCLConfig.edmtestAlignPCLThresholdsReaderAlignPCLThresholdsAlignPCLThresholdsRcd_cfi import * +from CondFormats.PCLConfig.edmtestAlignPCLThresholdsReaderAlignPCLThresholdsHGAlignPCLThresholdsHGRcd_cfi import * + +if(options.readLGpayload): + process.ReadDB = edmtestAlignPCLThresholdsReaderAlignPCLThresholdsAlignPCLThresholdsRcd.clone( + printDebug = True, + outputFile = 'AlignPCLThresholds_%s.log' % ("LG" if(options.readLGpayload) else "HG") + ) +else: + process.ReadDB = edmtestAlignPCLThresholdsReaderAlignPCLThresholdsHGAlignPCLThresholdsHGRcd.clone( + printDebug = True, + outputFile = 'AlignPCLThresholds_%s.log' % ("LG" if(options.readLGpayload) else "HG") + ) process.p = cms.Path(process.get+process.ReadDB) diff --git a/CondFormats/PCLConfig/test/AlignPCLThresholdsWriter_cfg.py b/CondFormats/PCLConfig/test/AlignPCLThresholdsWriter_cfg.py index ed0d445d651b6..970eb27c52f0c 100644 --- a/CondFormats/PCLConfig/test/AlignPCLThresholdsWriter_cfg.py +++ b/CondFormats/PCLConfig/test/AlignPCLThresholdsWriter_cfg.py @@ -19,9 +19,22 @@ reportEvery = cms.untracked.int32(1000) ), AlignPCLThresholdsWriter = cms.untracked.PSet( limit = cms.untracked.int32(-1)), - AlignPCLThresholds = cms.untracked.PSet( limit = cms.untracked.int32(-1)) + AlignPCLThresholds = cms.untracked.PSet( limit = cms.untracked.int32(-1)), + AlignPCLThresholdsHG = cms.untracked.PSet( limit = cms.untracked.int32(-1)) ) +## +## Var Parsing +## +import FWCore.ParameterSet.VarParsing as VarParsing +options = VarParsing.VarParsing() +options.register('writeLGpayload', + False, + VarParsing.VarParsing.multiplicity.singleton, + VarParsing.VarParsing.varType.bool, + "Write old payload type used for LG thresholds") +options.parseArguments() + ## ## Empty source ## @@ -39,11 +52,11 @@ ## ## Output database (in this case local sqlite file) ## -process.CondDB.connect = 'sqlite_file:mythresholds.db' +process.CondDB.connect = 'sqlite_file:mythresholds_%s.db' % ("LG" if(options.writeLGpayload) else "HG") process.PoolDBOutputService = cms.Service("PoolDBOutputService", process.CondDB, timetype = cms.untracked.string('runnumber'), - toPut = cms.VPSet(cms.PSet(record = cms.string('AlignPCLThresholdsRcd'), + toPut = cms.VPSet(cms.PSet(record = cms.string('FooRcd'), tag = cms.string('PCLThresholds_express_v0') ) ) @@ -53,11 +66,14 @@ ## Impot the thresholds configuration ## import CondFormats.PCLConfig.Thresholds_cff as Thresholds +import CondFormats.PCLConfig.ThresholdsHG_cff as ThresholdsHG ## ## Example on how to add to the default extra degrees of freedom ## AddSurfaceThresholds = copy.deepcopy(Thresholds.default) +AddSurfaceThresholdsHG = copy.deepcopy(ThresholdsHG.default) + BPixSurface= cms.VPSet( cms.PSet(alignableId = cms.string("TPBModule"), DOF = cms.string("Surface1"), @@ -71,13 +87,27 @@ DefaultPlusSurface = AddSurfaceThresholds+BPixSurface #print DefaultPlusSurface.dumpPython() -process.WriteInDB = cms.EDAnalyzer("AlignPCLThresholdsWriter", - record= cms.string('AlignPCLThresholdsRcd'), - ### minimum number of records found in pede output - minNRecords = cms.uint32(25000), - #thresholds = cms.VPSet() # empty object - #thresholds = DefaultPlusSurface # add extra deegree of freedom - thresholds = Thresholds.default # as a cms.VPset - ) +[MODULE_NAME, THRS_NAME] = ["AlignPCLThresholdsLGWriter",AddSurfaceThresholds] if(options.writeLGpayload) else ["AlignPCLThresholdsHGWriter",AddSurfaceThresholdsHG] +print("Writing payload with",MODULE_NAME) + +from CondFormats.PCLConfig.alignPCLThresholdsHGWriter_cfi import alignPCLThresholdsHGWriter +from CondFormats.PCLConfig.alignPCLThresholdsLGWriter_cfi import alignPCLThresholdsLGWriter + +if(options.writeLGpayload): + process.WriteInDB = alignPCLThresholdsLGWriter.clone( + record = 'FooRcd', + ### minimum number of records found in pede output + minNRecords = 25000, + #thresholds = cms.VPSet() # empty object + #thresholds = DefaultPlusSurface # add extra deegree of freedom + thresholds = THRS_NAME + ) +else: + process.WriteInDB = alignPCLThresholdsHGWriter.clone( + record = 'FooRcd', + ### minimum number of records found in pede output + minNRecords = 25000, + thresholds = THRS_NAME + ) process.p = cms.Path(process.WriteInDB) diff --git a/CondFormats/PCLConfig/test/testReadWriteAlignPCLThresholds.sh b/CondFormats/PCLConfig/test/testReadWriteAlignPCLThresholds.sh index 48b3d87ff65fd..13596d09aaa1a 100755 --- a/CondFormats/PCLConfig/test/testReadWriteAlignPCLThresholds.sh +++ b/CondFormats/PCLConfig/test/testReadWriteAlignPCLThresholds.sh @@ -1,4 +1,9 @@ #!/bin/bash function die { echo $1: status $2; exit $2; } +# test High Granularity cmsRun ${LOCAL_TEST_DIR}/AlignPCLThresholdsWriter_cfg.py || die 'failed running AlignPCLThresholdsWriter_cfg.py' $? cmsRun ${LOCAL_TEST_DIR}/AlignPCLThresholdsReader_cfg.py || die 'failed running AlignPCLThresholdsReader_cfg.py' $? + +# test Low Granularity +(cmsRun ${LOCAL_TEST_DIR}/AlignPCLThresholdsWriter_cfg.py writeLGpayload=True) || die 'failed running AlignPCLThresholdsWriter_cfg.py writeLGpayload=True' $? +(cmsRun ${LOCAL_TEST_DIR}/AlignPCLThresholdsReader_cfg.py readLGpayload=True) || die 'failed running AlignPCLThresholdsReader_cfg.py readLGpayload=True' $? diff --git a/Configuration/AlCa/python/autoCond.py b/Configuration/AlCa/python/autoCond.py index ab56514b97f11..131eab9f15d11 100644 --- a/Configuration/AlCa/python/autoCond.py +++ b/Configuration/AlCa/python/autoCond.py @@ -24,23 +24,23 @@ # GlobalTag for MC production (p-Pb collisions) with realistic alignment and calibrations for Run2 'run2_mc_pa' : '123X_mcRun2_pA_v1', # GlobalTag for Run2 data reprocessing - 'run2_data' : '124X_dataRun2_v1', + 'run2_data' : '124X_dataRun2_v2', # GlobalTag for Run2 data 2018B relvals only: HEM-15-16 fail - 'run2_data_HEfail' : '124X_dataRun2_HEfail_v1', + 'run2_data_HEfail' : '124X_dataRun2_HEfail_v2', # GlobalTag for Run2 data relvals: allows customization to run with fixed L1 menu - 'run2_data_relval' : '124X_dataRun2_relval_v1', + 'run2_data_relval' : '124X_dataRun2_relval_v2', # GlobalTag for Run2 HI data - 'run2_data_promptlike_hi' : '123X_dataRun2_PromptLike_HI_v3', + 'run2_data_promptlike_hi' : '124X_dataRun2_PromptLike_HI_v1', # GlobalTag with fixed snapshot time for Run2 HLT RelVals: customizations to run with fixed L1 Menu 'run2_hlt_relval' : '123X_dataRun2_HLT_relval_v3', # GlobalTag for Run3 HLT: identical to the online GT (124X_dataRun3_HLT_v1) but with snapshot at 2022-06-08 15:00:00 (UTC) 'run3_hlt' : '124X_dataRun3_HLT_frozen_v1', # GlobalTag with fixed snapshot time for Run3 HLT RelVals: customizations to run with fixed L1 Menu 'run3_hlt_relval' : '124X_dataRun3_HLT_relval_v2', - # GlobalTag for Run3 data relvals (express GT) - identical to 123X_dataRun3_Express_v8 but with snapshot at 2022-05-31 20:00:00 (UTC) - 'run3_data_express' : '123X_dataRun3_Express_frozen_v4', - # GlobalTag for Run3 data relvals (prompt GT) - identical to 123X_dataRun3_Prompt_v10 but with snapshot at 2022-05-31 20:00:00 (UTC) - 'run3_data_prompt' : '123X_dataRun3_Prompt_frozen_v4', + # GlobalTag for Run3 data relvals (express GT) - identical to 124X_dataRun3_Express_v1 but with snapshot at 2022-06-09 20:00:00 (UTC) + 'run3_data_express' : '124X_dataRun3_Express_frozen_v1', + # GlobalTag for Run3 data relvals (prompt GT) - identical to 124X_dataRun3_Prompt_v1 but with snapshot at 2022-06-09 20:00:00 (UTC) + 'run3_data_prompt' : '124X_dataRun3_Prompt_frozen_v1', # GlobalTag for Run3 offline data reprocessing 'run3_data' : '124X_dataRun3_v2', # GlobalTag for Run3 data relvals: allows customization to run with fixed L1 menu