diff --git a/Alignment/CommonAlignmentProducer/interface/AlignmentProducerBase.h b/Alignment/CommonAlignmentProducer/interface/AlignmentProducerBase.h index 3f9f3fb197ae3..c3f8ec1660df5 100644 --- a/Alignment/CommonAlignmentProducer/interface/AlignmentProducerBase.h +++ b/Alignment/CommonAlignmentProducer/interface/AlignmentProducerBase.h @@ -250,6 +250,7 @@ class AlignmentProducerBase { const bool saveToDB_, saveApeToDB_, saveDeformationsToDB_; const bool useSurvey_; const bool enableAlignableUpdates_; + const std::string tkAliRcdName_; /*** ESTokens ***/ const edm::ESGetToken ttopoToken_; diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_Output_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_Output_cff.py new file mode 100644 index 0000000000000..694ad2d5ff459 --- /dev/null +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_Output_cff.py @@ -0,0 +1,12 @@ +import FWCore.ParameterSet.Config as cms + +OutALCARECOPromptCalibProdSiPixelAliHG_noDrop = cms.PSet( + SelectEvents = cms.untracked.PSet( + SelectEvents = cms.vstring('pathALCARECOPromptCalibProdSiPixelAliHG') + ), + outputCommands = cms.untracked.vstring( + 'keep *_SiPixelAliMillePedeFileConverterHG_*_*') +) + +OutALCARECOPromptCalibProdSiPixelAliHG=OutALCARECOPromptCalibProdSiPixelAliHG_noDrop.clone() +OutALCARECOPromptCalibProdSiPixelAliHG.outputCommands.insert(0, "drop *") diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_cff.py new file mode 100644 index 0000000000000..9fe329e660658 --- /dev/null +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAliHG_cff.py @@ -0,0 +1,79 @@ +import FWCore.ParameterSet.Config as cms + +# ------------------------------------------------------------------------------ +# configure a filter to run only on the events selected by TkAlMinBias AlcaReco +from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAli_cff import * +ALCARECOTkAlMinBiasFilterForSiPixelAliHG = ALCARECOTkAlMinBiasFilterForSiPixelAli.clone() + + +from Alignment.CommonAlignmentProducer.LSNumberFilter_cfi import * + +# Ingredient: offlineBeamSpot +from RecoVertex.BeamSpotProducer.BeamSpot_cfi import offlineBeamSpot + +# Ingredient: AlignmentTrackSelector +# track selector for HighPurity tracks +#-- AlignmentTrackSelector +SiPixelAliHighPuritySelectorHG = SiPixelAliHighPuritySelector.clone() + +# track selection for alignment +SiPixelAliTrackSelectorHG = SiPixelAliTrackSelector.clone( + src = 'SiPixelAliTrackFitterHG' +) + +# Ingredient: SiPixelAliTrackRefitter0 +# refitting +SiPixelAliTrackRefitterHG0 = SiPixelAliTrackRefitter0.clone( + src = 'SiPixelAliHighPuritySelectorHG' +) +SiPixelAliTrackRefitterHG1 = SiPixelAliTrackRefitterHG0.clone( + src = 'SiPixelAliTrackSelectorHG' +) + +#-- Alignment producer +SiPixelAliMilleAlignmentProducerHG = SiPixelAliMilleAlignmentProducer.clone( + ParameterBuilder = dict( + Selector = cms.PSet( + alignParams = cms.vstring( + "TrackerP1PXBLadder,111111", + "TrackerP1PXECPanel,111111", + ) + ) + ), + tjTkAssociationMapTag = 'SiPixelAliTrackRefitterHG1', + algoConfig = MillePedeAlignmentAlgorithm.clone( + binaryFile = 'milleBinaryHG_0.dat', + treeFile = 'treeFileHG.root', + monitorFile = 'millePedeMonitorHG.root' + ) +) + +# Ingredient: SiPixelAliTrackerTrackHitFilter +SiPixelAliTrackerTrackHitFilterHG = SiPixelAliTrackerTrackHitFilter.clone( + src = 'SiPixelAliTrackRefitterHG0' +) + +# Ingredient: SiPixelAliSiPixelAliTrackFitter +SiPixelAliTrackFitterHG = SiPixelAliTrackFitter.clone( + src = 'SiPixelAliTrackerTrackHitFilterHG' +) + +SiPixelAliMillePedeFileConverterHG = cms.EDProducer("MillePedeFileConverter", + fileDir = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.fileDir.value()), + inputBinaryFile = cms.string(SiPixelAliMilleAlignmentProducerHG.algoConfig.binaryFile.value()), + fileBlobLabel = cms.string(''), + ) + + + +seqALCARECOPromptCalibProdSiPixelAliHG = cms.Sequence(ALCARECOTkAlMinBiasFilterForSiPixelAliHG* + lsNumberFilter* + offlineBeamSpot* + SiPixelAliHighPuritySelectorHG* + SiPixelAliTrackRefitterHG0* + SiPixelAliTrackerTrackHitFilterHG* + SiPixelAliTrackFitterHG* + SiPixelAliTrackSelectorHG* + SiPixelAliTrackRefitterHG1* + SiPixelAliMilleAlignmentProducerHG* + SiPixelAliMillePedeFileConverterHG) diff --git a/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAli_Output_cff.py b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAli_Output_cff.py index 152d6bb98f215..d654608815e66 100644 --- a/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAli_Output_cff.py +++ b/Alignment/CommonAlignmentProducer/python/ALCARECOPromptCalibProdSiPixelAli_Output_cff.py @@ -8,7 +8,5 @@ 'keep *_SiPixelAliMillePedeFileConverter_*_*') ) -import copy - -OutALCARECOPromptCalibProdSiPixelAli=copy.deepcopy(OutALCARECOPromptCalibProdSiPixelAli_noDrop) +OutALCARECOPromptCalibProdSiPixelAli=OutALCARECOPromptCalibProdSiPixelAli_noDrop.clone() OutALCARECOPromptCalibProdSiPixelAli.outputCommands.insert(0, "drop *") diff --git a/Alignment/CommonAlignmentProducer/python/AlcaSiPixelAliHarvesterHG_cff.py b/Alignment/CommonAlignmentProducer/python/AlcaSiPixelAliHarvesterHG_cff.py new file mode 100644 index 0000000000000..81715f051b149 --- /dev/null +++ b/Alignment/CommonAlignmentProducer/python/AlcaSiPixelAliHarvesterHG_cff.py @@ -0,0 +1,80 @@ +import FWCore.ParameterSet.Config as cms + +SiPixelAliMilleFileExtractorHG = cms.EDAnalyzer("MillePedeFileExtractor", + fileBlobInputTag = cms.InputTag("SiPixelAliMillePedeFileConverterHG",''), + fileDir = cms.string('HGalignment/'), + # File names the Extractor will use to write the fileblobs in the root + # file as real binary files to disk, so that the pede step can read them. + # This includes the formatting directive "%04d" which will be expanded to + # 0000, 0001, 0002,... + outputBinaryFile = cms.string('pedeBinaryHG%04d.dat')) + +from Alignment.MillePedeAlignmentAlgorithm.MillePedeAlignmentAlgorithm_cfi import * +from Alignment.CommonAlignmentProducer.AlignmentProducerAsAnalyzer_cff import AlignmentProducer +from Alignment.MillePedeAlignmentAlgorithm.MillePedeDQMModule_cff import * + +SiPixelAliPedeAlignmentProducerHG = AlignmentProducer.clone( + ParameterBuilder = dict( + Selector = cms.PSet( + alignParams = cms.vstring( + "TrackerP1PXBLadder,111111", + "TrackerP1PXECPanel,111111", + ) + ) + ), + doMisalignmentScenario = False, + checkDbAlignmentValidity = False, + applyDbAlignment = True, + tjTkAssociationMapTag = 'TrackRefitter2', + saveToDB = True, + trackerAlignmentRcdName = "TrackerAlignmentHGRcd" +) + +SiPixelAliPedeAlignmentProducerHG.algoConfig = MillePedeAlignmentAlgorithm.clone( + mode = 'pede', + runAtPCL = True, + mergeBinaryFiles = [SiPixelAliMilleFileExtractorHG.outputBinaryFile.value()], + binaryFile = '', + TrajectoryFactory = cms.PSet(BrokenLinesTrajectoryFactory), + minNumHits = 10, + fileDir = 'HGalignment/', + pedeSteerer = dict( + pedeCommand = 'pede', + method = 'inversion 5 0.8', + options = cms.vstring( + #'regularisation 1.0 0.05', # non-stated pre-sigma 50 mrad or 500 mum + 'entries 500', + 'chisqcut 30.0 4.5', + 'threads 1 1', + 'closeandreopen', + 'skipemptycons' + #'outlierdownweighting 3','dwfractioncut 0.1' + #'outlierdownweighting 5','dwfractioncut 0.2' + ), + fileDir = 'HGalignment/', + runDir = cms.untracked.string('HGalignment/'), + steerFile = 'pedeSteerHG', + pedeDump = 'pedeHG.dump' + ), + pedeReader = dict( + fileDir = 'HGalignment/' + ), + MillePedeFileReader = dict( + fileDir = "HGalignment/", + isHG = True + ) +) + +SiPixelAliDQMModuleHG = SiPixelAliDQMModule.clone() +SiPixelAliDQMModuleHG.MillePedeFileReader.fileDir = "HGalignment/" +SiPixelAliDQMModuleHG.MillePedeFileReader.isHG = True + +from DQMServices.Core.DQMEDHarvester import DQMEDHarvester +dqmEnvSiPixelAliHG = DQMEDHarvester('DQMHarvestingMetadata', + subSystemFolder = cms.untracked.string('AlCaReco'), + ) + +ALCAHARVESTSiPixelAliHG = cms.Sequence(SiPixelAliMilleFileExtractorHG* + SiPixelAliPedeAlignmentProducerHG* + SiPixelAliDQMModuleHG* + dqmEnvSiPixelAliHG) diff --git a/Alignment/CommonAlignmentProducer/python/AlignmentProducerAsAnalyzer_cff.py b/Alignment/CommonAlignmentProducer/python/AlignmentProducerAsAnalyzer_cff.py index 189c4ad24a165..8fd486b38149e 100644 --- a/Alignment/CommonAlignmentProducer/python/AlignmentProducerAsAnalyzer_cff.py +++ b/Alignment/CommonAlignmentProducer/python/AlignmentProducerAsAnalyzer_cff.py @@ -75,6 +75,9 @@ # update alignables if triggered by corresponding input IOV boundary enableAlignableUpdates = cms.bool(False), + + # Change tracker alignment record name to avoid confusion bettwen HG and LG PCL alignment + trackerAlignmentRcdName = cms.string("TrackerAlignmentRcd") ) import Geometry.DTGeometryBuilder.dtGeometryDB_cfi DTGeometryAlignmentProducerAsAnalyzer = Geometry.DTGeometryBuilder.dtGeometryDB_cfi.DTGeometryESModule.clone() diff --git a/Alignment/CommonAlignmentProducer/python/customizeLSNumberFilterForRelVals.py b/Alignment/CommonAlignmentProducer/python/customizeLSNumberFilterForRelVals.py new file mode 100644 index 0000000000000..5c990fee2c902 --- /dev/null +++ b/Alignment/CommonAlignmentProducer/python/customizeLSNumberFilterForRelVals.py @@ -0,0 +1,26 @@ +import FWCore.ParameterSet.Config as cms + +## +## Do not filter out the first 20 LS when +## running the PCL alignment in the RelVal case +## + +def doNotFilterLS(process): + if hasattr(process,'lsNumberFilter'): + process.lsNumberFilter.minLS = 1 + return process + +## +## Required 10 instead of 500 hits per structure +## when running the HG PCL alignment in the RelVal case +## + +def lowerHitsPerStructure(process): + if hasattr(process,'SiPixelAliPedeAlignmentProducerHG'): + process.SiPixelAliPedeAlignmentProducerHG.algoConfig.pedeSteerer.options = cms.vstring( + 'entries 10', + 'chisqcut 30.0 4.5', + 'threads 1 1', + 'closeandreopen' + ) + return process diff --git a/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc b/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc index e288064900d85..4bd4c6488a54d 100644 --- a/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc +++ b/Alignment/CommonAlignmentProducer/src/AlignmentProducerBase.cc @@ -47,6 +47,7 @@ AlignmentProducerBase::AlignmentProducerBase(const edm::ParameterSet& config, ed saveDeformationsToDB_{config.getParameter("saveDeformationsToDB")}, useSurvey_{config.getParameter("useSurvey")}, enableAlignableUpdates_{config.getParameter("enableAlignableUpdates")}, + tkAliRcdName_{config.getParameter("trackerAlignmentRcdName")}, ttopoToken_(iC.esConsumes()), geomDetToken_(iC.esConsumes()), ptpToken_(iC.esConsumes()), @@ -854,7 +855,13 @@ void AlignmentProducerBase::writeForRunRange(cond::Time_t time) { auto alignments = alignableTracker_->alignments(); auto alignmentErrors = alignableTracker_->alignmentErrors(); this->writeDB( - alignments, "TrackerAlignmentRcd", alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time); + // ~alignments, "TrackerAlignmentRcd", alignmentErrors, "TrackerAlignmentErrorExtendedRcd", trackerGlobal, time); + alignments, + tkAliRcdName_, + alignmentErrors, + "TrackerAlignmentErrorExtendedRcd", + trackerGlobal, + time); // Save surface deformations to database if (saveDeformationsToDB_) { diff --git a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h index 8c9aa66b4af6c..16b45bdaf4a09 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h +++ b/Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h @@ -13,6 +13,7 @@ /*** Alignment ***/ #include "Alignment/MillePedeAlignmentAlgorithm/interface/PedeLabelerBase.h" #include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyMap.h" struct mpPCLresults { private: @@ -59,27 +60,45 @@ class MillePedeFileReader { public: //==================================================================== explicit MillePedeFileReader(const edm::ParameterSet&, const std::shared_ptr&, - const std::shared_ptr&); + const std::shared_ptr&, + const std::shared_ptr&); virtual ~MillePedeFileReader() = default; void read(); bool storeAlignments(); - const std::array& getXobs() const { return Xobs_; } - const std::array& getXobsErr() const { return XobsErr_; } - const std::array& getTXobs() const { return tXobs_; } - const std::array& getTXobsErr() const { return tXobsErr_; } + enum { SIZE_LG_STRUCTS = 6, SIZE_HG_STRUCTS = 820 }; - const std::array& getYobs() const { return Yobs_; } - const std::array& getYobsErr() const { return YobsErr_; } - const std::array& getTYobs() const { return tYobs_; } - const std::array& getTYobsErr() const { return tYobsErr_; } + const std::array& getXobs() const { return Xobs_; } + const std::array& getXobsErr() const { return XobsErr_; } + const std::array& getTXobs() const { return tXobs_; } + const std::array& getTXobsErr() const { return tXobsErr_; } - const std::array& getZobs() const { return Zobs_; } - const std::array& getZobsErr() const { return ZobsErr_; } - const std::array& getTZobs() const { return tZobs_; } - const std::array& getTZobsErr() const { return tZobsErr_; } + const std::array& getYobs() const { return Yobs_; } + const std::array& getYobsErr() const { return YobsErr_; } + const std::array& getTYobs() const { return tYobs_; } + const std::array& getTYobsErr() const { return tYobsErr_; } + + const std::array& getZobs() const { return Zobs_; } + const std::array& getZobsErr() const { return ZobsErr_; } + const std::array& getTZobs() const { return tZobs_; } + const std::array& getTZobsErr() const { return tZobsErr_; } + + const std::array& getXobs_HG() const { return Xobs_HG_; } + const std::array& getXobsErr_HG() const { return XobsErr_HG_; } + const std::array& getTXobs_HG() const { return tXobs_HG_; } + const std::array& getTXobsErr_HG() const { return tXobsErr_HG_; } + + const std::array& getYobs_HG() const { return Yobs_HG_; } + const std::array& getYobsErr_HG() const { return YobsErr_HG_; } + const std::array& getTYobs_HG() const { return tYobs_HG_; } + const std::array& getTYobsErr_HG() const { return tYobsErr_HG_; } + + const std::array& getZobs_HG() const { return Zobs_HG_; } + const std::array& getZobsErr_HG() const { return ZobsErr_HG_; } + const std::array& getTZobs_HG() const { return tZobs_HG_; } + const std::array& getTZobsErr_HG() const { return tZobsErr_HG_; } const AlignPCLThresholdsHG::threshold_map getThresholdMap() const { return theThresholds_.get()->getThreshold_Map(); } @@ -95,12 +114,22 @@ class MillePedeFileReader { enum class PclHLS : int { NotInPCL = -1, + TPEHalfCylinderXplusZminus = 0, + TPEHalfCylinderXminusZminus = 1, TPBHalfBarrelXplus = 2, TPBHalfBarrelXminus = 3, TPEHalfCylinderXplusZplus = 4, TPEHalfCylinderXminusZplus = 5, - TPEHalfCylinderXplusZminus = 0, - TPEHalfCylinderXminusZminus = 1 + TPBLadderLayer1 = 6, + TPBLadderLayer2 = 7, + TPBLadderLayer3 = 8, + TPBLadderLayer4 = 9, + TPEPanelDisk1 = 10, + TPEPanelDisk2 = 11, + TPEPanelDisk3 = 12, + TPEPanelDiskM1 = 13, + TPEPanelDiskM2 = 14, + TPEPanelDiskM3 = 15, }; //========================= PRIVATE METHODS ================================== @@ -111,6 +140,8 @@ class MillePedeFileReader { void readMillePedeResultFile(); PclHLS getHLS(const Alignable*); std::string getStringFromHLS(PclHLS HLS); + int getIndexForHG(align::ID id, PclHLS HLS); + void initializeIndexHelper(); //========================== PRIVATE DATA ==================================== //============================================================================ @@ -121,6 +152,12 @@ class MillePedeFileReader { // thresholds from DB const std::shared_ptr theThresholds_; + // PixelTopologyMap + const std::shared_ptr pixelTopologyMap_; + + // input directory name + std::string dirName_; + // file-names const std::string millePedeEndFile_; const std::string millePedeLogFile_; @@ -136,6 +173,7 @@ class MillePedeFileReader { bool updateDB_{false}; bool vetoUpdateDB_{false}; + const bool isHG_; // stores in a compact format the 4 decisions: // 1st bit: exceeds maximum thresholds @@ -151,20 +189,37 @@ class MillePedeFileReader { int exitCode_{-1}; std::string exitMessage_{""}; - std::array Xobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array XobsErr_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tXobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tXobsErr_ = {{0., 0., 0., 0., 0., 0.}}; - - std::array Yobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array YobsErr_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tYobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tYobsErr_ = {{0., 0., 0., 0., 0., 0.}}; - - std::array Zobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array ZobsErr_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tZobs_ = {{0., 0., 0., 0., 0., 0.}}; - std::array tZobsErr_ = {{0., 0., 0., 0., 0., 0.}}; + std::array Xobs_ = std::array(); + std::array XobsErr_ = std::array(); + std::array tXobs_ = std::array(); + std::array tXobsErr_ = std::array(); + + std::array Yobs_ = std::array(); + std::array YobsErr_ = std::array(); + std::array tYobs_ = std::array(); + std::array tYobsErr_ = std::array(); + + std::array Zobs_ = std::array(); + std::array ZobsErr_ = std::array(); + std::array tZobs_ = std::array(); + std::array tZobsErr_ = std::array(); + + std::array Xobs_HG_ = std::array(); + std::array XobsErr_HG_ = std::array(); + std::array tXobs_HG_ = std::array(); + std::array tXobsErr_HG_ = std::array(); + + std::array Yobs_HG_ = std::array(); + std::array YobsErr_HG_ = std::array(); + std::array tYobs_HG_ = std::array(); + std::array tYobsErr_HG_ = std::array(); + + std::array Zobs_HG_ = std::array(); + std::array ZobsErr_HG_ = std::array(); + std::array tZobs_HG_ = std::array(); + std::array tZobsErr_HG_ = std::array(); + + std::unordered_map> indexHelper; }; const std::array coord_str = {{"X", "Y", "Z", "theta_X", "theta_Y", "theta_Z", "extra_DOF", "none"}}; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc index 4772b85a74f20..6a8c351acf744 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.cc @@ -88,6 +88,7 @@ MillePedeAlignmentAlgorithm::MillePedeAlignmentAlgorithm(const edm::ParameterSet : AlignmentAlgorithmBase(cfg, iC), topoToken_(iC.esConsumes()), aliThrToken_(iC.esConsumes()), + geomToken_(iC.esConsumes()), theConfig(cfg), theMode(this->decodeMode(theConfig.getUntrackedParameter("mode"))), theDir(theConfig.getUntrackedParameter("fileDir")), @@ -180,11 +181,17 @@ void MillePedeAlignmentAlgorithm::initialize(const edm::EventSetup &setup, //Retrieve tracker topology from geometry const TrackerTopology *const tTopo = &setup.getData(topoToken_); + //Retrieve tracker geometry + const TrackerGeometry *tGeom = &setup.getData(geomToken_); + + //Retrieve PixelTopologyMap + pixelTopologyMap = std::make_shared(tGeom, tTopo); + //Retrieve the thresolds cuts from DB for the PCL if (runAtPCL_) { const auto &th = &setup.getData(aliThrToken_); theThresholds = std::make_shared(); - storeThresholds(th->getNrecords(), th->getThreshold_Map()); + storeThresholds(th->getNrecords(), th->getThreshold_Map(), th->getFloatMap()); } theAlignableNavigator = std::make_unique(extras, tracker, muon); @@ -301,8 +308,10 @@ bool MillePedeAlignmentAlgorithm::addCalibrations(const std::vectorsetAlignPCLThresholds(nRecords, thresholdMap); + theThresholds->setFloatMap(floatMap); return true; } @@ -319,8 +328,10 @@ bool MillePedeAlignmentAlgorithm::processesEvents() { bool MillePedeAlignmentAlgorithm::storeAlignments() { if (isMode(myPedeReadBit)) { if (runAtPCL_) { - MillePedeFileReader mpReader( - theConfig.getParameter("MillePedeFileReader"), thePedeLabels, theThresholds); + MillePedeFileReader mpReader(theConfig.getParameter("MillePedeFileReader"), + thePedeLabels, + theThresholds, + pixelTopologyMap); mpReader.read(); return mpReader.storeAlignments(); } else { diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h index d1d29bb0c78ba..62f3d5f396cb4 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeAlignmentAlgorithm.h @@ -25,6 +25,10 @@ #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyMap.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" + #include "CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h" #include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" @@ -76,7 +80,9 @@ 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 AlignPCLThresholdsHG::threshold_map &thresholdMap); + virtual bool storeThresholds(const int &nRecords, + const AlignPCLThresholdsHG::threshold_map &thresholdMap, + const AlignPCLThresholdsHG::param_map &floatMap); /// Called at end of job void terminate(const edm::EventSetup &iSetup) override; @@ -272,6 +278,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase { const edm::ESGetToken topoToken_; const edm::ESGetToken aliThrToken_; + const edm::ESGetToken geomToken_; enum EModeBit { myMilleBit = 1 << 0, myPedeRunBit = 1 << 1, myPedeSteerBit = 1 << 2, myPedeReadBit = 1 << 3 }; unsigned int decodeMode(const std::string &mode) const; @@ -292,6 +299,7 @@ class MillePedeAlignmentAlgorithm : public AlignmentAlgorithmBase { std::unique_ptr theTrajectoryFactory; std::vector theCalibrations; std::shared_ptr theThresholds; + std::shared_ptr pixelTopologyMap; 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 cae0f4596e82d..eea45cb8fc8ca 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.cc @@ -31,7 +31,9 @@ MillePedeDQMModule ::MillePedeDQMModule(const edm::ParameterSet& config) ptpToken_(esConsumes()), ptitpToken_(esConsumes()), aliThrToken_(esConsumes()), - mpReaderConfig_(config.getParameter("MillePedeFileReader")) { + geomToken_(esConsumes()), + mpReaderConfig_(config.getParameter("MillePedeFileReader")), + isHG_(mpReaderConfig_.getParameter("isHG")) { consumes(config.getParameter("alignmentTokenSrc")); } @@ -45,14 +47,61 @@ void MillePedeDQMModule ::bookHistograms(DQMStore::IBooker& booker) { edm::LogInfo("MillePedeDQMModule") << "Booking histograms"; booker.cd(); - booker.setCurrentFolder("AlCaReco/SiPixelAli/"); - - h_xPos = booker.book1D("Xpos", "Alignment fit #DeltaX;;#mum", 36, 0., 36.); - h_xRot = booker.book1D("Xrot", "Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.); - h_yPos = booker.book1D("Ypos", "Alignment fit #DeltaY;;#mum", 36, 0., 36.); - h_yRot = booker.book1D("Yrot", "Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.); - h_zPos = booker.book1D("Zpos", "Alignment fit #DeltaZ;;#mum", 36, 0., 36.); - h_zRot = booker.book1D("Zrot", "Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.); + if (!isHG_) { + booker.setCurrentFolder("AlCaReco/SiPixelAli/"); + h_xPos = booker.book1D("Xpos", "Alignment fit #DeltaX;;#mum", 36, 0., 36.); + h_xRot = booker.book1D("Xrot", "Alignment fit #Delta#theta_{X};;#murad", 36, 0., 36.); + h_yPos = booker.book1D("Ypos", "Alignment fit #DeltaY;;#mum", 36, 0., 36.); + h_yRot = booker.book1D("Yrot", "Alignment fit #Delta#theta_{Y};;#murad", 36, 0., 36.); + h_zPos = booker.book1D("Zpos", "Alignment fit #DeltaZ;;#mum", 36, 0., 36.); + h_zRot = booker.book1D("Zrot", "Alignment fit #Delta#theta_{Z};;#murad", 36, 0., 36.); + } else { + booker.setCurrentFolder("AlCaReco/SiPixelAliHG/"); + + layerVec = {{"Layer1", pixelTopologyMap_->getPXBLadders(1)}, + {"Layer2", pixelTopologyMap_->getPXBLadders(2)}, + {"Layer3", pixelTopologyMap_->getPXBLadders(3)}, + {"Layer4", pixelTopologyMap_->getPXBLadders(4)}, + {"Disk-3", pixelTopologyMap_->getPXFBlades(-3) * 2}, + {"Disk-2", pixelTopologyMap_->getPXFBlades(-2) * 2}, + {"Disk-1", pixelTopologyMap_->getPXFBlades(-1) * 2}, + {"Disk1", pixelTopologyMap_->getPXFBlades(1) * 2}, + {"Disk2", pixelTopologyMap_->getPXFBlades(2) * 2}, + {"Disk3", pixelTopologyMap_->getPXFBlades(3) * 2}}; + + for (const auto& layer : layerVec) { + h_xPos_HG[layer.first] = booker.book1D("Xpos_HG_" + layer.first, + "Alignment fit #DeltaX for " + layer.first + ";;#mum", + layer.second, + 0., + layer.second); + h_xRot_HG[layer.first] = booker.book1D("Xrot_HG_" + layer.first, + "Alignment fit #Delta#theta_{X} for " + layer.first + ";;#murad", + layer.second, + 0., + layer.second); + h_yPos_HG[layer.first] = booker.book1D("Ypos_HG_" + layer.first, + "Alignment fit #DeltaY for " + layer.first + ";;#mum", + layer.second, + 0., + layer.second); + h_yRot_HG[layer.first] = booker.book1D("Yrot_HG_" + layer.first, + "Alignment fit #Delta#theta_{Y} for " + layer.first + ";;#murad", + layer.second, + 0., + layer.second); + h_zPos_HG[layer.first] = booker.book1D("Zpos_HG_" + layer.first, + "Alignment fit #DeltaZ for " + layer.first + ";;#mum", + layer.second, + 0., + layer.second); + h_zRot_HG[layer.first] = booker.book1D("Zrot_HG_" + layer.first, + "Alignment fit #Delta#theta_{Z} for " + layer.first + ";;#murad", + layer.second, + 0., + layer.second); + } + } statusResults = booker.book2D("statusResults", "Status of SiPixelAli PCL workflow;;", 6, 0., 6., 1, 0., 1.); binariesAvalaible = booker.bookInt("BinariesFound"); @@ -69,7 +118,11 @@ void MillePedeDQMModule ::dqmEndJob(DQMStore::IBooker& booker, DQMStore::IGetter throw cms::Exception("LogicError") << "@SUB=MillePedeDQMModule::dqmEndJob\n" << "Try to read MillePede results before initializing MillePedeFileReader"; } - fillExpertHistos(); + if (!isHG_) { + fillExpertHistos(); + } else { + fillExpertHistos_HG(); + } fillStatusHisto(statusResults); binariesAvalaible->Fill(mpReader_->binariesAmount()); auto theResults = mpReader_->getResults(); @@ -89,12 +142,16 @@ void MillePedeDQMModule ::beginRun(const edm::Run&, const edm::EventSetup& setup const GeometricDet* geometricDet = &setup.getData(gDetToken_); const PTrackerParameters* ptp = &setup.getData(ptpToken_); const PTrackerAdditionalParametersPerDet* ptitp = &setup.getData(ptitpToken_); + const TrackerGeometry* geom = &setup.getData(geomToken_); + + pixelTopologyMap_ = std::make_shared(geom, tTopo); // take the thresholds from DB const auto& thresholds_ = &setup.getData(aliThrToken_); auto myThresholds = std::make_shared(); myThresholds->setAlignPCLThresholds(thresholds_->getNrecords(), thresholds_->getThreshold_Map()); + myThresholds->setFloatMap(thresholds_->getFloatMap()); TrackerGeomBuilderFromGeometricDet builder; @@ -110,7 +167,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), pixelTopologyMap_); } void MillePedeDQMModule ::fillStatusHisto(MonitorElement* statusHisto) { @@ -238,6 +295,110 @@ void MillePedeDQMModule ::fillExpertHisto(MonitorElement* histo, } } +void MillePedeDQMModule ::fillExpertHistos_HG() { + 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 Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_; + std::array tZcut_, sigtZcut_, maxMovetZcut_, maxErrortZcut_; + + auto myMap = mpReader_->getThresholdMap(); + + std::vector alignablesList; + for (auto it = myMap.begin(); it != myMap.end(); ++it) { + alignablesList.push_back(it->first); + } + + for (auto& alignable : alignablesList) { + int detIndex = getIndexFromString(alignable); + + Xcut_[detIndex] = myMap[alignable].getXcut(); + sigXcut_[detIndex] = myMap[alignable].getSigXcut(); + maxMoveXcut_[detIndex] = myMap[alignable].getMaxMoveXcut(); + maxErrorXcut_[detIndex] = myMap[alignable].getErrorXcut(); + + Ycut_[detIndex] = myMap[alignable].getYcut(); + sigYcut_[detIndex] = myMap[alignable].getSigYcut(); + maxMoveYcut_[detIndex] = myMap[alignable].getMaxMoveYcut(); + maxErrorYcut_[detIndex] = myMap[alignable].getErrorYcut(); + + Zcut_[detIndex] = myMap[alignable].getZcut(); + sigZcut_[detIndex] = myMap[alignable].getSigZcut(); + maxMoveZcut_[detIndex] = myMap[alignable].getMaxMoveZcut(); + maxErrorZcut_[detIndex] = myMap[alignable].getErrorZcut(); + + tXcut_[detIndex] = myMap[alignable].getThetaXcut(); + sigtXcut_[detIndex] = myMap[alignable].getSigThetaXcut(); + maxMovetXcut_[detIndex] = myMap[alignable].getMaxMoveThetaXcut(); + maxErrortXcut_[detIndex] = myMap[alignable].getErrorThetaXcut(); + + tYcut_[detIndex] = myMap[alignable].getThetaYcut(); + sigtYcut_[detIndex] = myMap[alignable].getSigThetaYcut(); + maxMovetYcut_[detIndex] = myMap[alignable].getMaxMoveThetaYcut(); + maxErrortYcut_[detIndex] = myMap[alignable].getErrorThetaYcut(); + + tZcut_[detIndex] = myMap[alignable].getThetaZcut(); + sigtZcut_[detIndex] = myMap[alignable].getSigThetaZcut(); + maxMovetZcut_[detIndex] = myMap[alignable].getMaxMoveThetaZcut(); + maxErrortZcut_[detIndex] = myMap[alignable].getErrorThetaZcut(); + } + + fillExpertHisto_HG( + h_xPos_HG, Xcut_, sigXcut_, maxMoveXcut_, maxErrorXcut_, mpReader_->getXobs_HG(), mpReader_->getXobsErr_HG()); + fillExpertHisto_HG(h_xRot_HG, + tXcut_, + sigtXcut_, + maxMovetXcut_, + maxErrortXcut_, + mpReader_->getTXobs_HG(), + mpReader_->getTXobsErr_HG()); + + fillExpertHisto_HG( + h_yPos_HG, Ycut_, sigYcut_, maxMoveYcut_, maxErrorYcut_, mpReader_->getYobs_HG(), mpReader_->getYobsErr_HG()); + fillExpertHisto_HG(h_yRot_HG, + tYcut_, + sigtYcut_, + maxMovetYcut_, + maxErrortYcut_, + mpReader_->getTYobs_HG(), + mpReader_->getTYobsErr_HG()); + + fillExpertHisto_HG( + h_zPos_HG, Zcut_, sigZcut_, maxMoveZcut_, maxErrorZcut_, mpReader_->getZobs_HG(), mpReader_->getZobsErr_HG()); + fillExpertHisto_HG(h_zRot_HG, + tZcut_, + sigtZcut_, + maxMovetZcut_, + maxErrortZcut_, + mpReader_->getTZobs_HG(), + mpReader_->getTZobsErr_HG()); +} + +void MillePedeDQMModule ::fillExpertHisto_HG(std::map& histo_map, + const std::array& cut, + const std::array& sigCut, + const std::array& maxMoveCut, + const std::array& maxErrorCut, + const std::array& obs, + const std::array& obsErr) { + int currentStart = 0; + + for (const auto& layer : layerVec) { + TH1F* histo_0 = histo_map[layer.first]->getTH1F(); + + for (int i = currentStart; i < (currentStart + layer.second); ++i) { + // first obs.size() bins for observed movements + int bin = i - currentStart + 1; + histo_0->SetBinContent(bin, obs[i]); + histo_0->SetBinError(bin, obsErr[i]); + } + currentStart += layer.second; + } +} + bool MillePedeDQMModule ::setupChanged(const edm::EventSetup& setup) { bool changed{false}; diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h index 54346b8623efe..d7b8617439233 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeDQMModule.h @@ -28,6 +28,8 @@ #include "CondFormats/GeometryObjects/interface/PTrackerParameters.h" #include "DataFormats/TrackerCommon/interface/TrackerTopology.h" #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeomBuilderFromGeometricDet.h" +#include "Geometry/TrackerGeometryBuilder/interface/PixelTopologyMap.h" +#include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" /*** Thresholds from DB ***/ #include "CondFormats/DataRecord/interface/AlignPCLThresholdsHGRcd.h" @@ -41,6 +43,7 @@ #include "Geometry/Records/interface/PTrackerParametersRcd.h" #include "Geometry/Records/interface/PTrackerAdditionalParametersPerDetRcd.h" #include "Geometry/Records/interface/TrackerTopologyRcd.h" +#include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" /*** MillePede ***/ #include "Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h" @@ -53,7 +56,7 @@ class MillePedeDQMModule : public DQMEDHarvester { void dqmEndJob(DQMStore::IBooker&, DQMStore::IGetter&) override; - enum { SIZE_LG_STRUCTS = 6, SIZE_INDEX = 8 }; + enum { SIZE_LG_STRUCTS = 6, SIZE_HG_STRUCTS = 820, SIZE_INDEX = 8 }; //========================= PRIVATE METHODS ================================== private: //=================================================================== @@ -65,6 +68,8 @@ class MillePedeDQMModule : public DQMEDHarvester { void fillExpertHistos(); + void fillExpertHistos_HG(); + void fillExpertHisto(MonitorElement* histo, const std::array& cut, const std::array& sigCut, @@ -73,6 +78,14 @@ class MillePedeDQMModule : public DQMEDHarvester { const std::array& obs, const std::array& obsErr); + void fillExpertHisto_HG(std::map& histo_map, + 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); @@ -85,10 +98,14 @@ class MillePedeDQMModule : public DQMEDHarvester { const edm::ESGetToken ptpToken_; const edm::ESGetToken ptitpToken_; const edm::ESGetToken aliThrToken_; + const edm::ESGetToken geomToken_; const edm::ParameterSet mpReaderConfig_; std::unique_ptr tracker_; std::unique_ptr mpReader_; + std::shared_ptr pixelTopologyMap_; + + std::vector> layerVec; edm::ESWatcher watchTrackerTopologyRcd_; edm::ESWatcher watchIdealGeometryRcd_; @@ -102,9 +119,18 @@ class MillePedeDQMModule : public DQMEDHarvester { MonitorElement* h_zPos; MonitorElement* h_zRot; + std::map h_xPos_HG; + std::map h_xRot_HG; + std::map h_yPos_HG; + std::map h_yRot_HG; + std::map h_zPos_HG; + std::map h_zRot_HG; + MonitorElement* statusResults; MonitorElement* binariesAvalaible; MonitorElement* exitCode; + + bool isHG_; }; // define this as a plug-in diff --git a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc index f74ab198de9fb..18a33b6c818c2 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/plugins/MillePedeFileExtractor.cc @@ -11,6 +11,8 @@ #include "FWCore/Utilities/interface/InputTag.h" #include "FWCore/Utilities/interface/EDGetToken.h" +#include + MillePedeFileExtractor::MillePedeFileExtractor(const edm::ParameterSet& iConfig) : outputDir_(iConfig.getParameter("fileDir")), outputFileName_(iConfig.getParameter("outputBinaryFile")), @@ -28,6 +30,14 @@ void MillePedeFileExtractor::endLuminosityBlock(const edm::LuminosityBlock& iLum if (enoughBinaries()) return; + // Create output directory if not available + if (!outputDir_.empty()) { + std::string command = "mkdir -p " + outputDir_; + int shellReturn = gSystem->Exec(command.c_str()); + edm::LogInfo("MillePedeFileActions") << "@SUB=MillePedeFileExtractor::endLuminosityBlock" + << "Command returns " << shellReturn; + } + // Getting our hands on the vector of FileBlobs edm::Handle fileBlobCollection; iLumi.getByToken(fileBlobToken_, fileBlobCollection); diff --git a/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeAlignmentAlgorithm_cfi.py b/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeAlignmentAlgorithm_cfi.py index c7db386378c18..29dfa48b05cbe 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeAlignmentAlgorithm_cfi.py +++ b/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeAlignmentAlgorithm_cfi.py @@ -45,6 +45,7 @@ pedeSteerer = cms.PSet( fileDir = cms.untracked.string(''), + runDir = cms.untracked.string(''), steerFile = cms.string('pedeSteer'), ## beginning of steering file names steerFileDebug = cms.untracked.bool(False), # If MillePedeAlignmentAlgorithm.mode causes pede to run (e.g. 'full', 'pede' etc.), diff --git a/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeFileReader_cfi.py b/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeFileReader_cfi.py index 257158ad6ea2f..170180ea0d972 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeFileReader_cfi.py +++ b/Alignment/MillePedeAlignmentAlgorithm/python/MillePedeFileReader_cfi.py @@ -1,7 +1,11 @@ import FWCore.ParameterSet.Config as cms MillePedeFileReader = cms.PSet( + fileDir = cms.string(''), + millePedeEndFile = cms.string('millepede.end'), millePedeLogFile = cms.string('millepede.log'), - millePedeResFile = cms.string('millepede.res') + millePedeResFile = cms.string('millepede.res'), + + isHG = cms.bool(False) ) diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc index 7eff90d772ae5..f93333f5bd8ae 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/MillePedeFileReader.cc @@ -1,5 +1,6 @@ /*** Header file ***/ #include "Alignment/MillePedeAlignmentAlgorithm/interface/MillePedeFileReader.h" +#include "Alignment/CommonAlignment/interface/AlignableObjectId.h" /*** system includes ***/ #include // include floating-point std::abs functions @@ -14,14 +15,24 @@ MillePedeFileReader ::MillePedeFileReader(const edm::ParameterSet& config, const std::shared_ptr& pedeLabeler, - const std::shared_ptr& theThresholds) + const std::shared_ptr& theThresholds, + const std::shared_ptr& pixelTopologyMap) : pedeLabeler_(pedeLabeler), theThresholds_(theThresholds), + pixelTopologyMap_(pixelTopologyMap), + dirName_(config.getParameter("fileDir")), millePedeEndFile_(config.getParameter("millePedeEndFile")), millePedeLogFile_(config.getParameter("millePedeLogFile")), - millePedeResFile_(config.getParameter("millePedeResFile")) {} + millePedeResFile_(config.getParameter("millePedeResFile")), + isHG_(config.getParameter("isHG")) { + if (!dirName_.empty() && dirName_.find_last_of('/') != dirName_.size() - 1) + dirName_ += '/'; // may need '/' +} void MillePedeFileReader ::read() { + if (isHG_) { + initializeIndexHelper(); + } readMillePedeEndFile(); readMillePedeLogFile(); readMillePedeResultFile(); @@ -34,7 +45,7 @@ bool MillePedeFileReader ::storeAlignments() { return (updateDB_ && !vetoUpdateD //============================================================================= void MillePedeFileReader ::readMillePedeEndFile() { std::ifstream endFile; - endFile.open(millePedeEndFile_.c_str()); + endFile.open((dirName_ + millePedeEndFile_).c_str()); if (endFile.is_open()) { edm::LogInfo("MillePedeFileReader") << "Reading millepede end-file"; @@ -63,7 +74,7 @@ void MillePedeFileReader ::readMillePedeEndFile() { void MillePedeFileReader ::readMillePedeLogFile() { std::ifstream logFile; - logFile.open(millePedeLogFile_.c_str()); + logFile.open((dirName_ + millePedeLogFile_).c_str()); if (logFile.is_open()) { edm::LogInfo("MillePedeFileReader") << "Reading millepede log-file"; @@ -103,6 +114,12 @@ void MillePedeFileReader ::readMillePedeResultFile() { std::map > significances_; std::map > thresholds_; std::map > errors_; + std::map > fractions_; + + std::map > countsAbove_; + std::map > countsTotal_; + + AlignableObjectId alignableObjectId{AlignableObjectId::Geometry::General}; std::vector alignables_ = theThresholds_->getAlignableList(); for (auto& ali : alignables_) { @@ -110,12 +127,18 @@ void MillePedeFileReader ::readMillePedeResultFile() { significances_[ali] = theThresholds_->getSigCut(ali); thresholds_[ali] = theThresholds_->getMaxMoveCut(ali); errors_[ali] = theThresholds_->getMaxErrorCut(ali); + + if (theThresholds_->hasFloatMap(ali)) { + fractions_[ali] = theThresholds_->getFractionCut(ali); + countsAbove_[ali] = {{0, 0, 0, 0, 0, 0}}; + countsTotal_[ali] = {{0, 0, 0, 0, 0, 0}}; + } } updateDB_ = false; vetoUpdateDB_ = false; std::ifstream resFile; - resFile.open(millePedeResFile_.c_str()); + resFile.open((dirName_ + millePedeResFile_).c_str()); if (resFile.is_open()) { edm::LogInfo("MillePedeFileReader") << "Reading millepede result-file"; @@ -132,55 +155,99 @@ void MillePedeFileReader ::readMillePedeResultFile() { tokens.push_back(token); } + auto alignableLabel = std::stoul(tokens[0]); + const auto alignable = pedeLabeler_->alignableFromLabel(alignableLabel); + auto det = getHLS(alignable); + int detIndex = static_cast(det); + auto alignableIndex = alignableLabel % 10 - 1; + std::string detLabel = getStringFromHLS(det); + + countsTotal_[detLabel][alignableIndex]++; + if (tokens.size() > 4 /*3*/) { - auto alignableLabel = std::stoul(tokens[0]); - auto alignableIndex = alignableLabel % 10 - 1; - const auto alignable = pedeLabeler_->alignableFromLabel(alignableLabel); + const auto paramNum = pedeLabeler_->paramNumFromLabel(alignableLabel); + align::StructureType type = alignable->alignableObjectId(); + align::ID id = alignable->id(); double ObsMove = std::stof(tokens[3]) * multiplier_[alignableIndex]; double ObsErr = std::stof(tokens[4]) * multiplier_[alignableIndex]; - auto det = getHLS(alignable); - int detIndex = static_cast(det); auto coord = static_cast(alignableIndex); - std::string detLabel = getStringFromHLS(det); if (det != PclHLS::NotInPCL) { - switch (coord) { - case AlignPCLThresholdsHG::X: - Xobs_[detIndex] = ObsMove; - XobsErr_[detIndex] = ObsErr; - break; - case AlignPCLThresholdsHG::Y: - Yobs_[detIndex] = ObsMove; - YobsErr_[detIndex] = ObsErr; - break; - case AlignPCLThresholdsHG::Z: - Zobs_[detIndex] = ObsMove; - ZobsErr_[detIndex] = ObsErr; - break; - case AlignPCLThresholdsHG::theta_X: - tXobs_[detIndex] = ObsMove; - tXobsErr_[detIndex] = ObsErr; - break; - case AlignPCLThresholdsHG::theta_Y: - tYobs_[detIndex] = ObsMove; - tYobsErr_[detIndex] = ObsErr; - break; - case AlignPCLThresholdsHG::theta_Z: - tZobs_[detIndex] = ObsMove; - tZobsErr_[detIndex] = ObsErr; - break; - default: - edm::LogError("MillePedeFileReader") << "Currently not able to handle DOF " << coord << std::endl; - break; + if (type != align::TPBLadder && type != align::TPEPanel) { + switch (coord) { + case AlignPCLThresholdsHG::X: + Xobs_[detIndex] = ObsMove; + XobsErr_[detIndex] = ObsErr; + break; + case AlignPCLThresholdsHG::Y: + Yobs_[detIndex] = ObsMove; + YobsErr_[detIndex] = ObsErr; + break; + case AlignPCLThresholdsHG::Z: + Zobs_[detIndex] = ObsMove; + ZobsErr_[detIndex] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_X: + tXobs_[detIndex] = ObsMove; + tXobsErr_[detIndex] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_Y: + tYobs_[detIndex] = ObsMove; + tYobsErr_[detIndex] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_Z: + tZobs_[detIndex] = ObsMove; + tZobsErr_[detIndex] = ObsErr; + break; + default: + edm::LogError("MillePedeFileReader") << "Currently not able to handle DOF " << coord << std::endl; + break; + } + } else { + auto hgIndex = getIndexForHG(id, det); + switch (coord) { + case AlignPCLThresholdsHG::X: + Xobs_HG_[hgIndex - 1] = ObsMove; + XobsErr_HG_[hgIndex - 1] = ObsErr; + break; + case AlignPCLThresholdsHG::Y: + Yobs_HG_[hgIndex - 1] = ObsMove; + YobsErr_HG_[hgIndex - 1] = ObsErr; + break; + case AlignPCLThresholdsHG::Z: + Zobs_HG_[hgIndex - 1] = ObsMove; + ZobsErr_HG_[hgIndex - 1] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_X: + tXobs_HG_[hgIndex - 1] = ObsMove; + tXobsErr_HG_[hgIndex - 1] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_Y: + tYobs_HG_[hgIndex - 1] = ObsMove; + tYobsErr_HG_[hgIndex - 1] = ObsErr; + break; + case AlignPCLThresholdsHG::theta_Z: + tZobs_HG_[hgIndex - 1] = ObsMove; + tZobsErr_HG_[hgIndex - 1] = ObsErr; + break; + default: + edm::LogError("MillePedeFileReader") << "Currently not able to handle DOF " << coord << std::endl; + break; + } } + } else { + edm::LogError("MillePedeFileReader") + << "Currently not able to handle coordinate: " << coord << " (" << paramNum << ") " + << Form(" %s with ID %d (subdet %d)", alignableObjectId.idToString(type), id, DetId(id).subdetId()) + << std::endl; continue; } edm::LogVerbatim("MillePedeFileReader") - << " alignableLabel: " << alignableLabel << " with alignableIndex " << alignableIndex << " detIndex" + << " alignableLabel: " << alignableLabel << " with alignableIndex " << alignableIndex << " detIndex " << detIndex << "\n" << " i.e. detLabel: " << detLabel << " (" << coord << ")\n" << " has movement: " << ObsMove << " +/- " << ObsErr << "\n" @@ -191,12 +258,17 @@ void MillePedeFileReader ::readMillePedeResultFile() { << "\n" << " max movement (thresholds_[" << detLabel << "][" << coord << "]): " << thresholds_[detLabel][alignableIndex] << "\n" + << " fraction (fractions_[" << detLabel << "][" << coord << "]): " << fractions_[detLabel][alignableIndex] + << "\n" << "=============" << std::endl; if (std::abs(ObsMove) > thresholds_[detLabel][alignableIndex]) { - edm::LogWarning("MillePedeFileReader") << "Aborting payload creation." - << " Exceeding maximum thresholds for movement: " << std::abs(ObsMove) - << " for" << detLabel << "(" << coord << ")"; + if (!isHG_) { + edm::LogWarning("MillePedeFileReader") + << "Aborting payload creation." + << " Exceeding maximum thresholds for movement: " << std::abs(ObsMove) << " for" << detLabel << "(" + << coord << ")"; + } updateBits_.set(0); vetoUpdateDB_ = true; continue; @@ -205,9 +277,11 @@ void MillePedeFileReader ::readMillePedeResultFile() { updateBits_.set(1); if (std::abs(ObsErr) > errors_[detLabel][alignableIndex]) { - edm::LogWarning("MillePedeFileReader") << "Aborting payload creation." - << " Exceeding maximum thresholds for error: " << std::abs(ObsErr) - << " for" << detLabel << "(" << coord << ")"; + if (!isHG_) { + edm::LogWarning("MillePedeFileReader") << "Aborting payload creation." + << " Exceeding maximum thresholds for error: " << std::abs(ObsErr) + << " for" << detLabel << "(" << coord << ")"; + } updateBits_.set(2); vetoUpdateDB_ = true; continue; @@ -218,9 +292,12 @@ void MillePedeFileReader ::readMillePedeResultFile() { } } updateDB_ = true; - edm::LogInfo("MillePedeFileReader") - << "This correction: " << ObsMove << "+/-" << ObsErr << " for " << detLabel << "(" << coord - << ") will trigger a new Tracker Alignment payload!"; + if (!isHG_) { + edm::LogInfo("MillePedeFileReader") + << "This correction: " << ObsMove << "+/-" << ObsErr << " for " << detLabel << "(" << coord + << ") will trigger a new Tracker Alignment payload!"; + } + countsAbove_[detLabel][alignableIndex]++; } } } @@ -230,6 +307,35 @@ void MillePedeFileReader ::readMillePedeResultFile() { updateDB_ = false; Nrec_ = 0; } + + if (isHG_) { // check fractionCut + updateDB_ = false; // reset both booleans since only fractionCut is considered for HG + vetoUpdateDB_ = false; + std::stringstream ss; + for (auto& ali : alignables_) { + ss << ali << std::endl; + for (long unsigned int i = 0; i < countsTotal_[ali].size(); i++) { + if (countsTotal_[ali][i] != 0 && fractions_[ali][i] != -1) { + float fraction_ = countsAbove_[ali][i] / (1.0 * countsTotal_[ali][i]); + ss << static_cast(i) << ": Fraction = " << fraction_ + << " Fraction Threshold = " << fractions_[ali][i]; + if (fraction_ >= fractions_[ali][i]) { + updateDB_ = true; + ss << " above fraction threshold" << std::endl; + } else + ss << std::endl; + } else + ss << "No entries available or no fraction thresholds defined" << std::endl; + } + ss << "===================" << std::endl; + } + if (updateDB_) { + ss << "Alignment will be updated" << std::endl; + } else { + ss << "Alignment will NOT be updated" << std::endl; + } + edm::LogWarning("MillePedeFileReader") << ss.str(); + } } MillePedeFileReader::PclHLS MillePedeFileReader ::getHLS(const Alignable* alignable) { @@ -237,47 +343,85 @@ MillePedeFileReader::PclHLS MillePedeFileReader ::getHLS(const Alignable* aligna return PclHLS::NotInPCL; const auto& tns = pedeLabeler_->alignableTracker()->trackerNameSpace(); + const align::ID id = alignable->id(); switch (alignable->alignableObjectId()) { case align::TPBHalfBarrel: - switch (tns.tpb().halfBarrelNumber(alignable->id())) { + switch (tns.tpb().halfBarrelNumber(id)) { case 1: return PclHLS::TPBHalfBarrelXminus; case 2: return PclHLS::TPBHalfBarrelXplus; default: - throw cms::Exception("LogicError") << "@SUB=MillePedeFileReader::getHLS\n" - << "Found a pixel half-barrel number that should not exist: " - << tns.tpb().halfBarrelNumber(alignable->id()); + throw cms::Exception("LogicError") + << "@SUB=MillePedeFileReader::getHLS\n" + << "Found a pixel half-barrel number that should not exist: " << tns.tpb().halfBarrelNumber(id); } case align::TPEHalfCylinder: - switch (tns.tpe().endcapNumber(alignable->id())) { + switch (tns.tpe().endcapNumber(id)) { case 1: - switch (tns.tpe().halfCylinderNumber(alignable->id())) { + switch (tns.tpe().halfCylinderNumber(id)) { case 1: return PclHLS::TPEHalfCylinderXminusZminus; case 2: return PclHLS::TPEHalfCylinderXplusZminus; default: - throw cms::Exception("LogicError") << "@SUB=MillePedeFileReader::getHLS\n" - << "Found a pixel half-cylinder number that should not exist: " - << tns.tpe().halfCylinderNumber(alignable->id()); + throw cms::Exception("LogicError") + << "@SUB=MillePedeFileReader::getHLS\n" + << "Found a pixel half-cylinder number that should not exist: " << tns.tpe().halfCylinderNumber(id); } case 2: - switch (tns.tpe().halfCylinderNumber(alignable->id())) { + switch (tns.tpe().halfCylinderNumber(id)) { case 1: return PclHLS::TPEHalfCylinderXminusZplus; case 2: return PclHLS::TPEHalfCylinderXplusZplus; default: - throw cms::Exception("LogicError") << "@SUB=MillePedeFileReader::getHLS\n" - << "Found a pixel half-cylinder number that should not exist: " - << tns.tpe().halfCylinderNumber(alignable->id()); + throw cms::Exception("LogicError") + << "@SUB=MillePedeFileReader::getHLS\n" + << "Found a pixel half-cylinder number that should not exist: " << tns.tpe().halfCylinderNumber(id); } default: throw cms::Exception("LogicError") << "@SUB=MillePedeFileReader::getHLS\n" - << "Found a pixel endcap number that should not exist: " << tns.tpe().endcapNumber(alignable->id()); + << "Found a pixel endcap number that should not exist: " << tns.tpe().endcapNumber(id); + } + case align::TPBLadder: + switch (tns.tpb().layerNumber(id)) { + case 1: + return PclHLS::TPBLadderLayer1; + case 2: + return PclHLS::TPBLadderLayer2; + case 3: + return PclHLS::TPBLadderLayer3; + case 4: + return PclHLS::TPBLadderLayer4; + default: + throw cms::Exception("LogicError") + << "@SUB=MillePedeFileReader::getHLS\n" + << "Found a pixel layer number that should not exist: " << tns.tpb().layerNumber(id); + } + case align::TPEPanel: + switch (static_cast((tns.tpe().endcapNumber(id) == 1) ? -1 * tns.tpe().halfDiskNumber(id) + : tns.tpe().halfDiskNumber(id))) { + case -3: + return PclHLS::TPEPanelDiskM3; + case -2: + return PclHLS::TPEPanelDiskM2; + case -1: + return PclHLS::TPEPanelDiskM1; + case 3: + return PclHLS::TPEPanelDisk3; + case 2: + return PclHLS::TPEPanelDisk2; + case 1: + return PclHLS::TPEPanelDisk1; + default: + throw cms::Exception("LogicError") + << "@SUB=MillePedeFileReader::getHLS\n" + << "Found a pixel disk number that should not exist: " + << static_cast((tns.tpe().endcapNumber(id) == 1) ? -1 * tns.tpe().halfDiskNumber(id) + : tns.tpe().halfDiskNumber(id)); } default: return PclHLS::NotInPCL; @@ -298,10 +442,107 @@ std::string MillePedeFileReader::getStringFromHLS(MillePedeFileReader::PclHLS HL return "TPEHalfCylinderXminusZplus"; case PclHLS::TPEHalfCylinderXplusZplus: return "TPEHalfCylinderXplusZplus"; + case PclHLS::TPBLadderLayer1: + return "TPBLadderLayer1"; + case PclHLS::TPBLadderLayer2: + return "TPBLadderLayer2"; + case PclHLS::TPBLadderLayer3: + return "TPBLadderLayer3"; + case PclHLS::TPBLadderLayer4: + return "TPBLadderLayer4"; + case PclHLS::TPEPanelDisk1: + return "TPEPanelDisk1"; + case PclHLS::TPEPanelDisk2: + return "TPEPanelDisk2"; + case PclHLS::TPEPanelDisk3: + return "TPEPanelDisk3"; + case PclHLS::TPEPanelDiskM1: + return "TPEPanelDiskM1"; + case PclHLS::TPEPanelDiskM2: + return "TPEPanelDiskM2"; + case PclHLS::TPEPanelDiskM3: + return "TPEPanelDiskM3"; default: + //return "NotInPCL"; throw cms::Exception("LogicError") << "@SUB=MillePedeFileReader::getStringFromHLS\n" - << "Found an alignable structure not possible to map in the default AlignPCLThresholds partitions"; + << "Found an alignable structure not possible to map in the default AlignPCLThresholdsHG partitions"; + } +} + +void MillePedeFileReader::initializeIndexHelper() { + int currentSum = 0; + + indexHelper[PclHLS::TPBLadderLayer1] = + std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXBLadders(1) / 2); + currentSum += pixelTopologyMap_->getPXBLadders(1); + indexHelper[PclHLS::TPBLadderLayer2] = + std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXBLadders(2) / 2); + currentSum += pixelTopologyMap_->getPXBLadders(2); + indexHelper[PclHLS::TPBLadderLayer3] = + std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXBLadders(3) / 2); + currentSum += pixelTopologyMap_->getPXBLadders(3); + indexHelper[PclHLS::TPBLadderLayer4] = + std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXBLadders(4) / 2); + currentSum += pixelTopologyMap_->getPXBLadders(4); + + indexHelper[PclHLS::TPEPanelDiskM3] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(-3)); + currentSum += pixelTopologyMap_->getPXFBlades(-3) * 2; + indexHelper[PclHLS::TPEPanelDiskM2] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(-2)); + currentSum += pixelTopologyMap_->getPXFBlades(-2) * 2; + indexHelper[PclHLS::TPEPanelDiskM1] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(-1)); + currentSum += pixelTopologyMap_->getPXFBlades(-1) * 2; + + indexHelper[PclHLS::TPEPanelDisk1] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(1)); + currentSum += pixelTopologyMap_->getPXFBlades(1) * 2; + indexHelper[PclHLS::TPEPanelDisk2] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(2)); + currentSum += pixelTopologyMap_->getPXFBlades(2) * 2; + indexHelper[PclHLS::TPEPanelDisk3] = std::make_pair(currentSum, currentSum + pixelTopologyMap_->getPXFBlades(3)); + currentSum += pixelTopologyMap_->getPXFBlades(3) * 2; +} + +int MillePedeFileReader::getIndexForHG(align::ID id, PclHLS HLS) { + const auto& tns = pedeLabeler_->alignableTracker()->trackerNameSpace(); + + switch (HLS) { + case PclHLS::TPBLadderLayer1: + return (tns.tpb().halfBarrelNumber(id) == 1) ? tns.tpb().ladderNumber(id) + indexHelper[HLS].first + : tns.tpb().ladderNumber(id) + indexHelper[HLS].second; + case PclHLS::TPBLadderLayer2: + return (tns.tpb().halfBarrelNumber(id) == 1) ? tns.tpb().ladderNumber(id) + indexHelper[HLS].first + : tns.tpb().ladderNumber(id) + indexHelper[HLS].second; + case PclHLS::TPBLadderLayer3: + return (tns.tpb().halfBarrelNumber(id) == 1) ? tns.tpb().ladderNumber(id) + indexHelper[HLS].first + : tns.tpb().ladderNumber(id) + indexHelper[HLS].second; + case PclHLS::TPBLadderLayer4: + return (tns.tpb().halfBarrelNumber(id) == 1) ? tns.tpb().ladderNumber(id) + indexHelper[HLS].first + : tns.tpb().ladderNumber(id) + indexHelper[HLS].second; + case PclHLS::TPEPanelDisk1: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + case PclHLS::TPEPanelDisk2: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + case PclHLS::TPEPanelDisk3: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + case PclHLS::TPEPanelDiskM1: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + case PclHLS::TPEPanelDiskM2: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + case PclHLS::TPEPanelDiskM3: + return (tns.tpe().halfCylinderNumber(id) == 1) + ? (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].first + : (tns.tpe().bladeNumber(id) * 2 - (tns.tpe().panelNumber(id) % 2)) + indexHelper[HLS].second; + default: + return -200; } } diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.cc b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.cc index e87b4f73a296f..90ca15e3e623a 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.cc +++ b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.cc @@ -63,6 +63,7 @@ PedeSteerer::PedeSteerer(AlignableTracker *aliTracker, alignableObjectId_{AlignableObjectId::commonObjectIdProvider(aliTracker, aliMuon)}, myConfig(config), myDirectory(myConfig.getUntrackedParameter("fileDir")), + myRunDirectory(myConfig.getUntrackedParameter("runDir")), myNoSteerFiles(noSteerFiles), myIsSteerFileDebug(myConfig.getUntrackedParameter("steerFileDebug")), myParameterSign(myConfig.getUntrackedParameter("parameterSign")), @@ -82,6 +83,13 @@ PedeSteerer::PedeSteerer(AlignableTracker *aliTracker, myDirectory += '/'; // directory may need '/' } + if (myRunDirectory.empty()) + myRunDirectory = defaultDir; + if (!myRunDirectory.empty() && myRunDirectory.find_last_of('/') != myRunDirectory.size() - 1) { + myRunDirectory += '/'; // directory may need '/' + myDirectory = myRunDirectory; + } + const auto &alis = myParameterStore->alignables(); if (!this->checkParameterChoices(alis)) { } // anyway thrown exception @@ -762,7 +770,10 @@ std::string PedeSteerer::buildMasterSteer(const std::vector &binary // add binary files to master steering file mainSteerRef << "\nCfiles\n"; for (unsigned int iFile = 0; iFile < binaryFiles.size(); ++iFile) { - mainSteerRef << binaryFiles[iFile] << "\n"; + if (myRunDirectory.empty()) + mainSteerRef << binaryFiles[iFile] << "\n"; + else + mainSteerRef << "../" + binaryFiles[iFile] << "\n"; } // add method @@ -788,8 +799,18 @@ int PedeSteerer::runPede(const std::string &masterSteer) const { return 0; //false; } - std::string command(myConfig.getUntrackedParameter("pedeCommand")); - (command += " ") += masterSteer; + // Change pede command if running in different directory + std::string command; + if (myRunDirectory.empty()) { + command = myConfig.getUntrackedParameter("pedeCommand"); + (command += " ") += masterSteer; + } else { + command = "(cd " + myRunDirectory + " && "; + command += myConfig.getUntrackedParameter("pedeCommand"); + (command += " ") += "../" + masterSteer; + command += ")"; + } + const std::string dump(myConfig.getUntrackedParameter("pedeDump")); if (!dump.empty()) { command += " > "; diff --git a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.h b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.h index 581b4c2fe3426..b228153172b4d 100644 --- a/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.h +++ b/Alignment/MillePedeAlignmentAlgorithm/src/PedeSteerer.h @@ -126,6 +126,7 @@ class PedeSteerer { const edm::ParameterSet myConfig; std::string myDirectory; /// directory of all files + std::string myRunDirectory; /// directory where pede is executed bool myNoSteerFiles; /// flag to write steering files to /dev/null bool myIsSteerFileDebug; /// whether or not to fill pede steering files with debug info int myParameterSign; /// old pede versions (before May '07) need a sign flip... diff --git a/Calibration/TkAlCaRecoProducers/test/parseFwkJobReport.py b/Calibration/TkAlCaRecoProducers/test/parseFwkJobReport.py index bd8f552e7ff34..0e00433c55046 100644 --- a/Calibration/TkAlCaRecoProducers/test/parseFwkJobReport.py +++ b/Calibration/TkAlCaRecoProducers/test/parseFwkJobReport.py @@ -15,7 +15,8 @@ 'SiStripApvGainAAG_pcl', 'SiStripBadStrip_pcl', 'SiStripBadStripRcdHitEff_pcl', - 'SiPixelAli_pcl'] #Alignment + 'SiPixelAli_pcl', # Alignment + 'SiPixelAliHG_pcl'] TARGET_DQM_FILES=1 TARGET_DQM_FILENAME='./DQM_V0001_R000325022__Express__PCLTest__ALCAPROMPT.root' TARGET_DB_FILES=len(TARGET_LIST_OF_TAGS) diff --git a/Calibration/TkAlCaRecoProducers/test/testAlCaHarvesting.sh b/Calibration/TkAlCaRecoProducers/test/testAlCaHarvesting.sh index 95b953a2006ee..3ad6257e4a2e6 100755 --- a/Calibration/TkAlCaRecoProducers/test/testAlCaHarvesting.sh +++ b/Calibration/TkAlCaRecoProducers/test/testAlCaHarvesting.sh @@ -6,6 +6,7 @@ function cleanTheHouse { rm -fr pede* rm -fr treeFile.root rm -fr testPCLAlCaHarvesting.db + rm -fr HGalignment } echo "TESTING Calibration/TkAlCaRecoProducers ..." diff --git a/Calibration/TkAlCaRecoProducers/test/testPCLAlCaHarvesting.py b/Calibration/TkAlCaRecoProducers/test/testPCLAlCaHarvesting.py index 28c1d76e187a8..514ad224358d3 100644 --- a/Calibration/TkAlCaRecoProducers/test/testPCLAlCaHarvesting.py +++ b/Calibration/TkAlCaRecoProducers/test/testPCLAlCaHarvesting.py @@ -82,6 +82,7 @@ def findRunStopTime(run_number): process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiStripGainsAAG_dbOutput ) process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiStripHitEff_dbOutput) process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiPixelAli_dbOutput) +process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiPixelAliHG_dbOutput) process.PoolDBOutputService.toPut.append(process.ALCAHARVESTSiPixelLA_dbOutput) process.PoolDBOutputService.toPut.extend(process.ALCAHARVESTSiPixelQuality_dbOutput) process.PoolDBOutputService.toPut.append(process.ALCAHARVESTBeamSpotByRun_dbOutput) @@ -102,6 +103,7 @@ def findRunStopTime(run_number): process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiStripGainsAAG_metadata) process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiStripHitEff_metadata) process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiPixelAli_metadata) +process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiPixelAliHG_metadata) process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTSiPixelLA_metadata) process.pclMetadataWriter.recordsToMap.extend(process.ALCAHARVESTSiPixelQuality_metadata) process.pclMetadataWriter.recordsToMap.append(process.ALCAHARVESTBeamSpotByRun_metadata) @@ -135,6 +137,10 @@ def findRunStopTime(run_number): process.SiPixelAliMilleFileExtractor.outputBinaryFile = cms.string('') process.SiPixelAliPedeAlignmentProducer.algoConfig.mergeBinaryFiles=[] +process.SiPixelAliHG = cms.Path(process.ALCAHARVESTSiPixelAliHG) +process.SiPixelAliMilleFileExtractorHG.outputBinaryFile = cms.string('') +process.SiPixelAliPedeAlignmentProducerHG.algoConfig.mergeBinaryFiles=[] + process.SiPixelLA = cms.Path(process.ALCAHARVESTSiPixelLorentzAngle) process.SiPixelQuality = cms.Path(process.ALCAHARVESTSiPixelQuality) @@ -151,6 +157,7 @@ def findRunStopTime(run_number): process.SiStripGainsAAG, process.SiStripHitEff, process.SiPixelAli, + process.SiPixelAliHG, process.SiPixelLA, process.SiPixelQuality, process.BeamSpotByRun, diff --git a/CondFormats/Common/data/SiPixelAliHGRcd_prep.json b/CondFormats/Common/data/SiPixelAliHGRcd_prep.json new file mode 100644 index 0000000000000..bb3e2d144975c --- /dev/null +++ b/CondFormats/Common/data/SiPixelAliHGRcd_prep.json @@ -0,0 +1,10 @@ +{ + "destinationDatabase": "oracle://cms_orcoff_prep/CMS_CONDITIONS", + "destinationTags": { + "SiPixelAliHG_PCL_v0_hlt": {}, + "SiPixelAliHG_PCL_v0_prompt": {} + }, + "inputTag": "SiPixelAliHG_pcl", + "since": null, + "userText": "T0 PCL Upload for SiPixel HG Ali. (prep)" +} diff --git a/CondFormats/Common/data/SiPixelAliHGRcd_prod.json b/CondFormats/Common/data/SiPixelAliHGRcd_prod.json new file mode 100644 index 0000000000000..c5472bde8999e --- /dev/null +++ b/CondFormats/Common/data/SiPixelAliHGRcd_prod.json @@ -0,0 +1,10 @@ +{ + "destinationDatabase": "oracle://cms_orcon_prod/CMS_CONDITIONS", + "destinationTags": { + "SiPixelAliHG_PCL_v0_hlt": {}, + "TrackerAlignmentHG_PCL_byRun_v2_express": {} + }, + "inputTag": "SiPixelAliHG_pcl", + "since": null, + "userText": "T0 PCL Upload for SiPixel HG Ali - moved to the tag consumed by prompt. (prod)" +} diff --git a/CondFormats/Common/test/DropBoxMetadataReader.py b/CondFormats/Common/test/DropBoxMetadataReader.py index 2d489416672e1..3c0ff3012bb3b 100644 --- a/CondFormats/Common/test/DropBoxMetadataReader.py +++ b/CondFormats/Common/test/DropBoxMetadataReader.py @@ -37,6 +37,7 @@ 'SiStripBadStripFromHitEffRcd', 'SiStripApvGainRcd', 'TrackerAlignmentRcd', + 'TrackerAlignmentHGRcd', 'SiStripApvGainRcdAfterAbortGap', 'SiStripApvGainRcdAAG', 'EcalPedestalsRcd', diff --git a/CondFormats/Common/test/ProduceDropBoxMetadata.py b/CondFormats/Common/test/ProduceDropBoxMetadata.py index 8aa2abd6bb96b..c77da20320f14 100644 --- a/CondFormats/Common/test/ProduceDropBoxMetadata.py +++ b/CondFormats/Common/test/ProduceDropBoxMetadata.py @@ -67,6 +67,10 @@ def encodeJsonInString(filename): SiPixelAliRcd_prod_str = encodeJsonInString("SiPixelAliRcd_prod.json") SiPixelAliRcd_prep_str = encodeJsonInString("SiPixelAliRcd_prep.json") +#SiPixelAliHG +SiPixelAliHGRcd_prod_str = encodeJsonInString("SiPixelAliHGRcd_prod.json") +SiPixelAliHGRcd_prep_str = encodeJsonInString("SiPixelAliHGRcd_prep.json") + #EcalPedestalsRcd EcalPedestalsRcd_prod_str = encodeJsonInString("EcalPedestal_prod.json") EcalPedestalsRcd_prep_str = encodeJsonInString("EcalPedestal_prep.json") @@ -155,6 +159,12 @@ def encodeJsonInString(filename): prodMetaData = cms.untracked.string(SiPixelAliRcd_prod_str), prepMetaData = cms.untracked.string(SiPixelAliRcd_prep_str), ), + cms.PSet(record = cms.untracked.string('TrackerAlignmentHGRcd'), + Source = cms.untracked.string("AlcaHarvesting"), + FileClass = cms.untracked.string("ALCA"), + prodMetaData = cms.untracked.string(SiPixelAliHGRcd_prod_str), + prepMetaData = cms.untracked.string(SiPixelAliHGRcd_prep_str), + ), cms.PSet(record = cms.untracked.string('SiStripApvGainRcdAfterAbortGap'), # can be removed, once 92x deployed... Source = cms.untracked.string("AlcaHarvesting"), FileClass = cms.untracked.string("ALCA"), diff --git a/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h b/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h index c8f07bc83ef10..6448a57bdecd2 100644 --- a/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h +++ b/CondFormats/PCLConfig/interface/AlignPCLThresholdsHG.h @@ -26,6 +26,7 @@ class AlignPCLThresholdsHG : public AlignPCLThresholds { enum IntParamIndex { ISIZE = 0 }; enum StringParamIndex { SSIZE = 0 }; + void setFloatMap(const param_map &floatMap); void setFractionCut(const std::string &AlignableId, const coordType &type, const float &cut); const param_map &getFloatMap() const { return floatMap_; } @@ -34,6 +35,8 @@ class AlignPCLThresholdsHG : public AlignPCLThresholds { float getFractionCut(const std::string &AlignableId, const coordType &type) const; std::array getFractionCut(const std::string &AlignableId) const; + const bool hasFloatMap(const std::string &AlignableId) const; + const int payloadVersion() const; void printAll() const; diff --git a/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc b/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc index 0f8d94427b9c8..edb264fb9ec1a 100644 --- a/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc +++ b/CondFormats/PCLConfig/src/AlignPCLThresholdsHG.cc @@ -23,6 +23,11 @@ namespace AlignPCLThresholdsHGImpl { } //namespace AlignPCLThresholdsHGImpl +//****************************************************************************// +void AlignPCLThresholdsHG::setFloatMap(const std::unordered_map> &floatMap) { + floatMap_ = floatMap; +} + //****************************************************************************// const std::vector &AlignPCLThresholdsHG::getFloatVec(const std::string &AlignableId) const { const auto &it = floatMap_.find(AlignableId); @@ -93,6 +98,17 @@ float AlignPCLThresholdsHG::getFractionCut(const std::string &AlignableId, const } } +//****************************************************************************// +const bool AlignPCLThresholdsHG::hasFloatMap(const std::string &AlignableId) const { + const auto &it = floatMap_.find(AlignableId); + + if (it != floatMap_.end()) { + return true; + } else { + return false; + } +} + //****************************************************************************// const int AlignPCLThresholdsHG::payloadVersion() const { switch (FSIZE + ISIZE + SSIZE) { diff --git a/Configuration/AlCa/python/autoPCL.py b/Configuration/AlCa/python/autoPCL.py index aa253cc4c6a2c..4f67f9815da83 100644 --- a/Configuration/AlCa/python/autoPCL.py +++ b/Configuration/AlCa/python/autoPCL.py @@ -10,6 +10,7 @@ 'PromptCalibProdSiStripGainsAAG' : 'SiStripGainsAAG', 'PromptCalibProdSiStripHitEff' : 'SiStripHitEff', 'PromptCalibProdSiPixelAli' : 'SiPixelAli', + 'PromptCalibProdSiPixelAliHG' : 'SiPixelAliHG', 'PromptCalibProdSiPixel' : 'SiPixelQuality', 'PromptCalibProdSiPixelLA' : 'SiPixelLA', 'PromptCalibProdEcalPedestals': 'EcalPedestals', diff --git a/Configuration/EventContent/python/AlCaRecoOutput_cff.py b/Configuration/EventContent/python/AlCaRecoOutput_cff.py index 71a6e5f8ab25e..c4fb1dff232ec 100644 --- a/Configuration/EventContent/python/AlCaRecoOutput_cff.py +++ b/Configuration/EventContent/python/AlCaRecoOutput_cff.py @@ -168,6 +168,7 @@ from Calibration.TkAlCaRecoProducers.ALCARECOPromptCalibProdSiPixelLorentzAngle_Output_cff import * from Calibration.TkAlCaRecoProducers.ALCARECOSiStripPCLHistos_Output_cff import * from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAli_Output_cff import * +from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHG_Output_cff import * from CalibTracker.SiPixelQuality.ALCARECOPromptCalibProdSiPixel_Output_cff import * diff --git a/Configuration/PyReleaseValidation/python/relval_production.py b/Configuration/PyReleaseValidation/python/relval_production.py index 389aa7799c176..11e9028203435 100644 --- a/Configuration/PyReleaseValidation/python/relval_production.py +++ b/Configuration/PyReleaseValidation/python/relval_production.py @@ -11,7 +11,7 @@ ## data production test workflows[1000] = [ '',['RunMinBias2011A','TIER0','SKIMD','HARVESTDfst2','ALCASPLIT']] workflows[1001] = [ '',['RunMinBias2011A','TIER0EXP','ALCAEXP','ALCAHARVDSIPIXELCALRUN1','ALCAHARVD1','ALCAHARVD2','ALCAHARVD3','ALCAHARVD4','ALCAHARVD5','ALCAHARVD7','ALCAHARVD8']] -workflows[1001.2] = [ '',['RunZeroBias2017F','TIER0EXPRUN2','ALCAEXPRUN2','ALCAHARVDSIPIXELCAL','ALCAHARVDSIPIXELCALLA']] +workflows[1001.2] = [ '',['RunZeroBias2017F','TIER0EXPRUN2','ALCAEXPRUN2','ALCAHARVDSIPIXELCAL','ALCAHARVDSIPIXELCALLA','ALCAHARVD4','ALCAHARVDSIPIXELALIHG']] workflows[1002]=['RRD',['RunMinBias2011A','RECODR1','COPYPASTE']] workflows[1003]=['', ['RunMinBias2012A','RECODDQM','HARVESTDDQM']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index a995ad43c2287..915d012d303f7 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -2229,6 +2229,13 @@ def lhegensim2018ml(fragment,howMuch): '--data':'', '--era':'Run2_2017', '--filein':'file:PromptCalibProdSiPixelLA.root'} + +steps['ALCAHARVDSIPIXELALIHG']={'-s':'ALCAHARVEST:%s'%(autoPCL['PromptCalibProdSiPixelAliHG']), + '--conditions':'auto:run2_data', + '--scenario':'pp', + '--data':'', + '--filein':'file:PromptCalibProdSiPixelAliHG.root', + '--customise':'Alignment/CommonAlignmentProducer/customizeLSNumberFilterForRelVals.lowerHitsPerStructure'} steps['ALCAHARVDPPSCAL']={'-s':'ALCAHARVEST:%s'%(autoPCL['PromptCalibProdPPSTimingCalib']), '--conditions':'auto:run3_data_express', @@ -2726,12 +2733,14 @@ def gen2021HiMix(fragment,howMuch): '--datatier':'ALCARECO', '--eventcontent':'ALCARECO'} steps['ALCAEXP']={'-s':'ALCAOUTPUT:SiStripCalZeroBias+TkAlMinBias+Hotline+LumiPixelsMinBias+AlCaPCCZeroBiasFromRECO+AlCaPCCRandomFromRECO+SiPixelCalSingleMuon,ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiStripGains+PromptCalibProdSiStripGainsAAG+PromptCalibProdSiStripHitEff+PromptCalibProdSiPixelAli+PromptCalibProdSiPixel+PromptCalibProdSiPixelLA', + '--customise': 'Alignment/CommonAlignmentProducer/customizeLSNumberFilterForRelVals.doNotFilterLS', '--conditions':'auto:run1_data', '--datatier':'ALCARECO', '--eventcontent':'ALCARECO', '--triggerResultsProcess': 'RECO'} -steps['ALCAEXPRUN2']={'-s':'ALCAOUTPUT:SiStripCalZeroBias+TkAlMinBias+LumiPixelsMinBias+AlCaPCCZeroBiasFromRECO+AlCaPCCRandomFromRECO+SiPixelCalZeroBias+SiPixelCalSingleMuon,ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiStripGains+PromptCalibProdSiStripGainsAAG+PromptCalibProdSiStripHitEff+PromptCalibProdSiPixelAli+PromptCalibProdSiPixel+PromptCalibProdSiPixelLA', +steps['ALCAEXPRUN2']={'-s':'ALCAOUTPUT:SiStripCalZeroBias+TkAlMinBias+LumiPixelsMinBias+AlCaPCCZeroBiasFromRECO+AlCaPCCRandomFromRECO+SiPixelCalZeroBias+SiPixelCalSingleMuon,ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiStripGains+PromptCalibProdSiStripGainsAAG+PromptCalibProdSiStripHitEff+PromptCalibProdSiPixelAli+PromptCalibProdSiPixelAliHG+PromptCalibProdSiPixel+PromptCalibProdSiPixelLA', + '--customise': 'Alignment/CommonAlignmentProducer/customizeLSNumberFilterForRelVals.doNotFilterLS', '--conditions':'auto:run2_data', '--datatier':'ALCARECO', '--eventcontent':'ALCARECO', @@ -2745,14 +2754,14 @@ def gen2021HiMix(fragment,howMuch): '--eventcontent':'ALCARECO', '--triggerResultsProcess': 'RECO'} -steps['ALCARECOEXPR3']=merge([{'-s':'ALCAOUTPUT:SiPixelCalZeroBias+SiStripCalZeroBias+SiStripCalMinBias+SiStripCalMinBiasAAG+TkAlMinBias,ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiPixelAli+PromptCalibProdSiStripGains+PromptCalibProdSiStripGainsAAG+PromptCalibProdSiPixel', +steps['ALCARECOEXPR3']=merge([{'-s':'ALCAOUTPUT:SiPixelCalZeroBias+SiStripCalZeroBias+SiStripCalMinBias+SiStripCalMinBiasAAG+TkAlMinBias,ALCA:PromptCalibProd+PromptCalibProdSiStrip+PromptCalibProdSiPixelAli+PromptCalibProdSiPixelAliHG+PromptCalibProdSiStripGains+PromptCalibProdSiStripGainsAAG+PromptCalibProdSiPixel', '--conditions':'auto:run3_data_express', '--scenario':'pp', '--era':'Run3', '--datatier':'ALCARECO', '--eventcontent':'ALCARECO', '--triggerResultsProcess': 'RECO', - '--customise':'Configuration/DataProcessing/RecoTLR.customiseExpress'},steps['RECODR3']]) + '--customise':'Configuration/DataProcessing/RecoTLR.customiseExpress,Alignment/CommonAlignmentProducer/customizeLSNumberFilterForRelVals.doNotFilterLS'},steps['RECODR3']]) steps['ALCARECOPROMPTR3']=merge([{'-s':'RAW2DIGI,L1Reco,RECO,ALCA:SiStripCalZeroBias+SiStripCalMinBias+TkAlMinBias+HcalCalHO+HcalCalIterativePhiSym+HcalCalHBHEMuonProducerFilter+HcalCalIsoTrkProducerFilter,DQM:@standardDQMFakeHLT', '--conditions':'auto:run3_data_prompt', diff --git a/Configuration/StandardSequences/python/AlCaHarvesting_cff.py b/Configuration/StandardSequences/python/AlCaHarvesting_cff.py index b4b6b499fe88e..2fba7c2062fdf 100644 --- a/Configuration/StandardSequences/python/AlCaHarvesting_cff.py +++ b/Configuration/StandardSequences/python/AlCaHarvesting_cff.py @@ -8,6 +8,7 @@ from Calibration.TkAlCaRecoProducers.AlcaSiStripHitEfficiencyHarvester_cff import * from Calibration.TkAlCaRecoProducers.AlcaSiPixelLorentzAngleHarvester_cff import * from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvester_cff import * +from Alignment.CommonAlignmentProducer.AlcaSiPixelAliHarvesterHG_cff import * from Calibration.EcalCalibAlgos.AlcaEcalPedestalsHarvester_cff import * from Calibration.LumiAlCaRecoProducers.AlcaLumiPCCHarvester_cff import * from CalibTracker.SiPixelQuality.SiPixelStatusHarvester_cfi import * @@ -167,6 +168,15 @@ timetype = cms.untracked.string('runnumber') ) +# -------------------------------------------------------------------------------------- +# SiPixel Alignment HG +ALCAHARVESTSiPixelAliHG_metadata = cms.PSet(record = cms.untracked.string('TrackerAlignmentHGRcd')) + +ALCAHARVESTSiPixelAliHG_dbOutput = cms.PSet(record = cms.string('TrackerAlignmentHGRcd'), + tag = cms.string('SiPixelAliHG_pcl'), + timetype = cms.untracked.string('runnumber') + ) + # -------------------------------------------------------------------------------------- # SiPixel Lorentz Angle ALCAHARVESTSiPixelLA_metadata = cms.PSet(record = cms.untracked.string('SiPixelLorentzAngleRcd')) @@ -266,6 +276,7 @@ SiStripGainsAAG = cms.Path(ALCAHARVESTSiStripGainsAAG) SiStripHitEff = cms.Path(ALCAHARVESTSiStripHitEfficiency) SiPixelAli = cms.Path(ALCAHARVESTSiPixelAli) +SiPixelAliHG = cms.Path(ALCAHARVESTSiPixelAliHG) SiPixelLA = cms.Path(ALCAHARVESTSiPixelLorentzAngle) EcalPedestals = cms.Path(ALCAHARVESTEcalPedestals) LumiPCC = cms.Path(ALCAHARVESTLumiPCC) diff --git a/Configuration/StandardSequences/python/AlCaRecoStreams_cff.py b/Configuration/StandardSequences/python/AlCaRecoStreams_cff.py index 22aa03ead9cd7..08474d18eca0d 100644 --- a/Configuration/StandardSequences/python/AlCaRecoStreams_cff.py +++ b/Configuration/StandardSequences/python/AlCaRecoStreams_cff.py @@ -164,6 +164,7 @@ from Calibration.TkAlCaRecoProducers.ALCARECOSiStripPCLHistos_cff import * from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAli_cff import * +from Alignment.CommonAlignmentProducer.ALCARECOPromptCalibProdSiPixelAliHG_cff import * from CalibTracker.SiPixelQuality.ALCARECOPromptCalibProdSiPixel_cff import * @@ -286,6 +287,7 @@ pathALCARECOPromptCalibProdSiStripHitEfficiency = cms.Path(seqALCARECOPromptCalibProdSiStripHitEfficiency) pathALCARECOPromptCalibProdSiPixelLorentzAngle = cms.Path(seqALCARECOPromptCalibProdSiPixelLorentzAngle) pathALCARECOPromptCalibProdSiPixelAli = cms.Path(seqALCARECOPromptCalibProdSiPixelAli) +pathALCARECOPromptCalibProdSiPixelAliHG = cms.Path(seqALCARECOPromptCalibProdSiPixelAliHG) pathALCARECOPromptCalibProdSiPixel = cms.Path(seqALCARECOPromptCalibProdSiPixel) pathALCARECOPromptCalibProdEcalPedestals = cms.Path(seqALCARECOPromptCalibProdEcalPedestals) pathALCARECOPromptCalibProdLumiPCC = cms.Path(seqALCARECOPromptCalibProdLumiPCC) @@ -1045,6 +1047,15 @@ dataTier = cms.untracked.string('ALCARECO') ) +ALCARECOStreamPromptCalibProdSiPixelAliHG = cms.FilteredStream( + responsible = 'Danilo Meuser', + name = 'PromptCalibProdSiPixelAliHG', + paths = (pathALCARECOPromptCalibProdSiPixelAliHG), + content = OutALCARECOPromptCalibProdSiPixelAliHG.outputCommands, + selectEvents = OutALCARECOPromptCalibProdSiPixelAliHG.SelectEvents, + dataTier = cms.untracked.string('ALCARECO') + ) + ALCARECOStreamSiStripPCLHistos = cms.FilteredStream( responsible = 'Gianluca Cerminara', name = 'SiStripPCLHistos',