diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBiasHI_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBiasHI_cff.py index 156ec7f5ab2d2..aafde99e8c5b8 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBiasHI_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBiasHI_cff.py @@ -46,7 +46,7 @@ siStripUnbiasedClusterizerConditions = SiStripClusterizerConditionsESProducer.clone(QualityLabel="unbiased", Label="unbiased") calZeroBiasClusters = siStripClusters.clone() -calZeroBiasClusters.Clusterizer.ConditionsLabel = 'unbiased' +if hasattr(calZeroBiasClusters, "Clusterizer"): calZeroBiasClusters.Clusterizer.ConditionsLabel = 'unbiased' # Not persistent collections needed by the filters in the AlCaReco DQM from DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi import * diff --git a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBias_cff.py b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBias_cff.py index e453bc7d3aa45..e53bd83217fe3 100644 --- a/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBias_cff.py +++ b/Calibration/TkAlCaRecoProducers/python/ALCARECOSiStripCalZeroBias_cff.py @@ -40,7 +40,7 @@ siStripUnbiasedClusterizerConditions = SiStripClusterizerConditionsESProducer.clone(QualityLabel="unbiased", Label="unbiased") calZeroBiasClusters = siStripClusters.clone() -calZeroBiasClusters.Clusterizer.ConditionsLabel = 'unbiased' +if hasattr(calZeroBiasClusters, "Clusterizer"): calZeroBiasClusters.Clusterizer.ConditionsLabel = 'unbiased' # Not persistent collections needed by the filters in the AlCaReco DQM from DPGAnalysis.SiStripTools.eventwithhistoryproducerfroml1abc_cfi import * diff --git a/Configuration/EventContent/python/EventContent_cff.py b/Configuration/EventContent/python/EventContent_cff.py index 2851351b16192..8f1cfcb522f9b 100644 --- a/Configuration/EventContent/python/EventContent_cff.py +++ b/Configuration/EventContent/python/EventContent_cff.py @@ -176,6 +176,13 @@ def SwapKeepAndDrop(l): ) RAWEventContent.outputCommands.extend(L1TriggerRAW.outputCommands) RAWEventContent.outputCommands.extend(HLTriggerRAW.outputCommands) + +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +approxSiStripClusters.toModify(RAWEventContent, + outputCommands = RAWEventContent.outputCommands+[ + 'keep *_SiStripClusters2ApproxClustersHLT_*_*' + ]) + # # # HLTONLY Data Tier definition @@ -769,6 +776,10 @@ def SwapKeepAndDrop(l): ) REPACKRAWEventContent.outputCommands.extend(L1TriggerRAW.outputCommands) REPACKRAWEventContent.outputCommands.extend(HLTriggerRAW.outputCommands) +approxSiStripClusters.toModify(REPACKRAWEventContent, + outputCommands = REPACKRAWEventContent.outputCommands+[ + 'keep *_SiStripClusters2ApproxClustersHLT_*_*' + ]) REPACKRAWSIMEventContent = cms.PSet( outputCommands = cms.untracked.vstring(), diff --git a/Configuration/ProcessModifiers/python/approxSiStripClusters_cff.py b/Configuration/ProcessModifiers/python/approxSiStripClusters_cff.py new file mode 100644 index 0000000000000..67df2888c5728 --- /dev/null +++ b/Configuration/ProcessModifiers/python/approxSiStripClusters_cff.py @@ -0,0 +1,3 @@ +import FWCore.ParameterSet.Config as cms + +approxSiStripClusters = cms.Modifier() diff --git a/Configuration/PyReleaseValidation/python/relval_standard.py b/Configuration/PyReleaseValidation/python/relval_standard.py index cf22d37912e47..6e7486795844e 100644 --- a/Configuration/PyReleaseValidation/python/relval_standard.py +++ b/Configuration/PyReleaseValidation/python/relval_standard.py @@ -131,6 +131,7 @@ workflows[140.56] = ['',['RunHI2018','RECOHID18','HARVESTDHI18']] workflows[140.5611] = ['',['RunHI2018AOD','REMINIAODHID18','HARVESTHI18MINIAOD']] workflows[140.57] = ['',['RunHI2018Reduced','RECOHID18','HARVESTDHI18']] +workflows[140.58] = ['',['RunHI2018','RAWPRIMEHI18','RECOHID18APPROXCLUSTERS','HARVESTDHI18']] ### run2 2015B 50ns ### workflows[134.701] = ['',['RunHLTPhy2015B','HLTDR2_50ns','RECODR2_50nsreHLT_HIPM','HARVESTDR2']] @@ -724,6 +725,7 @@ workflows[159.3] = ['',['ZMM_14_HI_2021','DIGIHI2021PPRECO','RECOHI2021PPRECO','HARVESTHI2021PPRECO']] workflows[159.4] = ['',['ZEE_14_HI_2021','DIGIHI2021PPRECO','RECOHI2021PPRECO','HARVESTHI2021PPRECO']] workflows[160] = ['',['Hydjet2Q_MinBias_5020GeV_2018_ppReco','DIGIHI2018PPRECO','RECOHI2018PPRECOMB','ALCARECOHI2018PPRECO','HARVESTHI2018PPRECO']] +workflows[161] = ['',['HydjetQ_B12_5020GeV_2021_ppReco','DIGIHI2021PPRECO','RAWPRIMESIMHI18','RECOHI2021PPRECOMBAPPROXCLUSTERS','ALCARECOHI2021PPRECO','HARVESTHI2021PPRECO4']] ### pp reference test ### workflows[149] = ['',['QCD_Pt_80_120_13_PPREF','DIGIPPREF2017','RECOPPREF2017','HARVESTPPREF2017']] diff --git a/Configuration/PyReleaseValidation/python/relval_steps.py b/Configuration/PyReleaseValidation/python/relval_steps.py index 7c1e784889221..c57f63dc5d40b 100644 --- a/Configuration/PyReleaseValidation/python/relval_steps.py +++ b/Configuration/PyReleaseValidation/python/relval_steps.py @@ -983,6 +983,7 @@ def genS(fragment,howMuch): hiAlca2018 = {'--conditions':'auto:phase1_2018_realistic_hi', '--era':'Run2_2018'} hiAlca2018_ppReco = {'--conditions':'auto:phase1_2018_realistic_hi', '--era':'Run2_2018_pp_on_AA'} hiAlca2021_ppReco = {'--conditions':'auto:phase1_2022_realistic_hi', '--era':'Run3_pp_on_PbPb'} +hiAlca2021_ppReco_approxClusters = {'--conditions':'auto:phase1_2022_realistic_hi', '--era':'Run3_pp_on_PbPb', '--procModifiers':'approxSiStripClusters'} hiDefaults2011=merge([hiAlca2011,{'--scenario':'HeavyIons','-n':2}]) @@ -991,6 +992,7 @@ def genS(fragment,howMuch): hiDefaults2018=merge([hiAlca2018,{'--scenario':'HeavyIons','-n':2}]) hiDefaults2018_ppReco=merge([hiAlca2018_ppReco,{'-n':2}]) hiDefaults2021_ppReco=merge([hiAlca2021_ppReco,{'-n':2}]) +hiDefaults2021_ppReco_approxClusters=merge([hiAlca2021_ppReco_approxClusters,{'-n':2}]) steps['Hydjet2Q_MinBias_5020GeV_2018_ppReco']=merge([{'-n':1},hiDefaults2018_ppReco,gen2018hiprod('Hydjet2_Quenched_MinBias_5020GeV_cfi',U2000by1)]) steps['HydjetQ_B12_5020GeV_2011']=merge([{'-n':1,'--beamspot':'RealisticHI2011Collision'},hiDefaults2011,genS('Hydjet_Quenched_B12_5020GeV_cfi',U2000by1)]) @@ -1736,6 +1738,7 @@ def lhegensim2018ml(fragment,howMuch): #steps['RESIMDIGI']=merge([{'-s':'reGEN,reSIM,DIGI,L1,DIGI2RAW,HLT:@fake,RAW2DIGI,L1Reco','-n':10,'--restoreRNDSeeds':'','--process':'HLT'},steps['DIGI']]) +steps['DIGIHI2021PPRECOAPPROXCLUSTERS']=merge([{'-s':'DIGI:pdigi_hi_nogen,L1,DIGI2RAW,HLT:@fake2'}, hiDefaults2021_ppReco_approxClusters, {'--pileup':'HiMixNoPU'}, step2Upg2015Defaults]) steps['DIGIHI2021PPRECO']=merge([{'-s':'DIGI:pdigi_hi_nogen,L1,DIGI2RAW,HLT:@fake2'}, hiDefaults2021_ppReco, {'--pileup':'HiMixNoPU'}, step2Upg2015Defaults]) steps['DIGIHI2018PPRECO']=merge([{'-s':'DIGI:pdigi_hi_nogen,L1,DIGI2RAW,HLT:HIon'}, hiDefaults2018_ppReco, {'--pileup':'HiMixNoPU'}, step2Upg2015Defaults]) steps['DIGIHI2018']=merge([{'-s':'DIGI:pdigi_hi_nogen,L1,DIGI2RAW,HLT:@fake2'}, hiDefaults2018, {'--pileup':'HiMixNoPU'}, step2Upg2015Defaults]) @@ -1992,6 +1995,42 @@ def lhegensim2018ml(fragment,howMuch): '-n':'10' },steps['RECOHID15']]) +steps['RAWPRIMEHI18']={ '--scenario':'pp', + '--conditions':'auto:run2_data_promptlike_hi', + '-s':'REPACK:DigiToApproxClusterRaw', + '--datatier':'GEN-SIM-DIGI-RAW-HLTDEBUG', + '--eventcontent':'REPACKRAW', + '--era':'Run2_2018_pp_on_AA', + '--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2018_pp_on_AA', + '-n':'10', + '--procModifiers':'approxSiStripClusters', + '--repacked':'', + '--process':'REHLT' +} + +steps['RAWPRIMESIMHI18']={ '--scenario':'pp', + '--conditions':'auto:phase1_2022_realistic_hi', + '-s':'REPACK:DigiToApproxClusterRaw', + '--datatier':'GEN-SIM-DIGI-RAW-HLTDEBUG', + '--eventcontent':'FEVTDEBUGHLT', + '--era':'Run2_2018_pp_on_AA', + '-n':'10', + '--procModifiers':'approxSiStripClusters', + '--customise_commands':'\"process.siStripDigisHLT.ProductLabel=\'rawDataCollector\'\"', + '--process':'REHLT' +} + +steps['RECOHID18APPROXCLUSTERS']=merge([{ '--scenario':'pp', + '--conditions':'auto:run2_data_promptlike_hi', + '-s':'RAW2DIGI,L1Reco,RECO,ALCA:SiStripCalZeroBias+SiPixelCalZeroBias,SKIM:PbPbEMu+PbPbZEE+PbPbZMM+PbPbZMu,DQM:@commonFakeHLT+@standardDQMFakeHLT', + '--datatier':'AOD,DQMIO', + '--eventcontent':'AOD,DQM', + '--era':'Run2_2018_pp_on_AA', + '--customise':'Configuration/DataProcessing/RecoTLR.customisePostEra_Run2_2018_pp_on_AA', + '--procModifiers':'approxSiStripClusters', + '-n':'10' + },steps['RECOHID15']]) + steps['REMINIAODHID18']={ '--scenario':'pp', '--conditions':'auto:run2_data_promptlike_hi', '-s':'PAT,DQM:@miniAODDQM', @@ -2635,6 +2674,17 @@ def gen2021HiMix(fragment,howMuch): steps['RECOUP15_ID']=merge([{'--hltProcess':'HLT2'},steps['RECOUP15']]) +steps['RECOHI2021PPRECOAPPROXCLUSTERS']=merge([hiDefaults2021_ppReco_approxClusters,{'-s':'RAW2DIGI,L1Reco,RECO,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM', + '--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO', + '--eventcontent':'RECOSIM,MINIAODSIM,DQM', + },step3Up2015Defaults]) +steps['RECOHI2021PPRECOMBAPPROXCLUSTERS']=merge([hiDefaults2021_ppReco_approxClusters,{'-s':'RAW2DIGI,L1Reco,RECO,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM', + '--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO', + '--eventcontent':'RECOSIM,MINIAODSIM,DQM', + '--era':'Run3_pp_on_PbPb', + '--procModifiers':'genJetSubEvent', + },step3Up2015Defaults]) + steps['RECOHI2021PPRECO']=merge([hiDefaults2021_ppReco,{'-s':'RAW2DIGI,L1Reco,RECO,PAT,VALIDATION:@standardValidationNoHLT+@miniAODValidation,DQM:@standardDQMFakeHLT+@miniAODDQM', '--datatier':'GEN-SIM-RECO,MINIAODSIM,DQMIO', '--eventcontent':'RECOSIM,MINIAODSIM,DQM', @@ -3155,6 +3205,12 @@ def gen2021HiMix(fragment,howMuch): '--era' : 'Run3_pp_on_PbPb', '--filetype':'DQM'}]) +steps['HARVESTHI2021PPRECO4']=merge([hiDefaults2021_ppReco,{'-s':'HARVESTING:validationHarvestingNoHLT+dqmHarvestingFakeHLT', + '--filein':'file:step4_inDQM.root', + '--mc':'', + '--era' : 'Run3_pp_on_PbPb', + '--filetype':'DQM'}]) + steps['HARVESTHI2018PPRECO']=merge([hiDefaults2018_ppReco,{'-s':'HARVESTING:validationHarvestingNoHLT+dqmHarvestingFakeHLT', '--filein':'file:step3_inDQM.root', '--mc':'', diff --git a/Configuration/StandardSequences/python/DigiToRaw_Repack_cff.py b/Configuration/StandardSequences/python/DigiToRaw_Repack_cff.py index f0fc531db37a0..bd8f482ddd007 100644 --- a/Configuration/StandardSequences/python/DigiToRaw_Repack_cff.py +++ b/Configuration/StandardSequences/python/DigiToRaw_Repack_cff.py @@ -56,3 +56,23 @@ DigiToHybridRawRepack = cms.Sequence( DigiToHybridRawRepackTask ) DigiToVirginRawRepack = cms.Sequence( DigiToVirginRawRepackTask ) DigiToSplitRawRepack = cms.Sequence( DigiToRawRepackTask, DigiToVirginRawRepackTask ) + +from EventFilter.SiStripRawToDigi.SiStripDigis_cfi import siStripDigis +siStripDigisHLT = siStripDigis.clone(ProductLabel = "rawDataRepacker") + +from RecoLocalTracker.Configuration.RecoLocalTracker_cff import siStripZeroSuppressionHLT + +from RecoLocalTracker.SiStripClusterizer.DefaultClusterizer_cff import * +siStripClustersHLT = cms.EDProducer("SiStripClusterizer", + Clusterizer = DefaultClusterizer, + DigiProducersList = cms.VInputTag( + cms.InputTag('siStripDigisHLT','ZeroSuppressed'), + cms.InputTag('siStripZeroSuppressionHLT','VirginRaw'), + cms.InputTag('siStripZeroSuppressionHLT','ProcessedRaw'), + cms.InputTag('siStripZeroSuppressionHLT','ScopeMode')), + ) + +from RecoLocalTracker.SiStripClusterizer.SiStripClusters2ApproxClusters_cff import SiStripClusters2ApproxClustersHLT + +DigiToApproxClusterRawTask = cms.Task(siStripDigisHLT,siStripZeroSuppressionHLT,siStripClustersHLT,SiStripClusters2ApproxClustersHLT) +DigiToApproxClusterRaw = cms.Sequence(DigiToApproxClusterRawTask) diff --git a/DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h b/DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h index 3079f0d59be83..825551016e0c5 100644 --- a/DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h +++ b/DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h @@ -8,6 +8,7 @@ #include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +class SiStripCluster; class SiStripApproximateCluster { public: SiStripApproximateCluster() {} @@ -18,11 +19,7 @@ class SiStripApproximateCluster { avgCharge_ = avgCharge; } - explicit SiStripApproximateCluster(const SiStripCluster& cluster) { - barycenter_ = cluster.barycenter(); - width_ = cluster.size(); - avgCharge_ = cluster.charge() / cluster.size(); - } + explicit SiStripApproximateCluster(const SiStripCluster& cluster); float barycenter() const { return barycenter_; } uint8_t width() const { return width_; } diff --git a/DataFormats/SiStripCluster/interface/SiStripCluster.h b/DataFormats/SiStripCluster/interface/SiStripCluster.h index 8d0fb2d211f40..23f523f2c3b8f 100644 --- a/DataFormats/SiStripCluster/interface/SiStripCluster.h +++ b/DataFormats/SiStripCluster/interface/SiStripCluster.h @@ -2,8 +2,12 @@ #define DATAFORMATS_SISTRIPCLUSTER_H #include "DataFormats/SiStripDigi/interface/SiStripDigi.h" +#include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" #include #include +#include + +class SiStripApproximateCluster; class SiStripCluster { public: @@ -34,6 +38,8 @@ class SiStripCluster { firstStrip_ |= mergedValueMask; // if this is a candidate merged cluster } + SiStripCluster(const SiStripApproximateCluster cluster); + // extend the cluster template void extend(Iter begin, Iter end) { @@ -74,7 +80,7 @@ class SiStripCluster { /** total charge * */ - int charge() const { return std::accumulate(begin(), end(), int(0)); } + int charge() const; /** Test (set) the merged status of the cluster * @@ -90,6 +96,10 @@ class SiStripCluster { uint16_t firstStrip_ = 0; + //these are used if amplitude information is not available (using approximate cluster constructor) + float barycenter_ = 0; + int charge_ = 0; + // ggiurgiu@fnal.gov, 01/05/12 // Add cluster errors to be used by rechits from split clusters. // A rechit from a split cluster has larger errors than rechits from normal clusters. diff --git a/DataFormats/SiStripCluster/src/SiStripApproximateCluster.cc b/DataFormats/SiStripCluster/src/SiStripApproximateCluster.cc new file mode 100644 index 0000000000000..2b70fe270f783 --- /dev/null +++ b/DataFormats/SiStripCluster/src/SiStripApproximateCluster.cc @@ -0,0 +1,7 @@ +#include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" + +SiStripApproximateCluster::SiStripApproximateCluster(const SiStripCluster& cluster) { + barycenter_ = cluster.barycenter(); + width_ = cluster.size(); + avgCharge_ = cluster.charge() / cluster.size(); +} diff --git a/DataFormats/SiStripCluster/src/SiStripCluster.cc b/DataFormats/SiStripCluster/src/SiStripCluster.cc index 644783f73c1f3..b03ebb025a937 100644 --- a/DataFormats/SiStripCluster/src/SiStripCluster.cc +++ b/DataFormats/SiStripCluster/src/SiStripCluster.cc @@ -22,7 +22,25 @@ SiStripCluster::SiStripCluster(const SiStripDigiRange& range) : firstStrip_(rang amplitudes_ = v; } +SiStripCluster::SiStripCluster(const SiStripApproximateCluster cluster) : error_x(-99999.9) { + barycenter_ = cluster.barycenter(); + charge_ = cluster.width() * cluster.avgCharge(); + amplitudes_.resize(cluster.width(), cluster.avgCharge()); + + //initialize firstStrip_ + firstStrip_ = cluster.barycenter() - cluster.width() / 2; +} + +int SiStripCluster::charge() const { + if (barycenter_ > 0) + return charge_; + return std::accumulate(begin(), end(), int(0)); +} + float SiStripCluster::barycenter() const { + if (barycenter_ > 0) + return barycenter_; + int sumx = 0; int suma = 0; auto asize = size(); diff --git a/DataFormats/SiStripCluster/src/classes_def.xml b/DataFormats/SiStripCluster/src/classes_def.xml index 7a280391ec737..fd5bb58c09e56 100755 --- a/DataFormats/SiStripCluster/src/classes_def.xml +++ b/DataFormats/SiStripCluster/src/classes_def.xml @@ -1,6 +1,7 @@ - + + diff --git a/RecoLocalTracker/Configuration/python/RecoLocalTracker_cff.py b/RecoLocalTracker/Configuration/python/RecoLocalTracker_cff.py index 476c76c2f3a3f..b6620c4c12dc8 100644 --- a/RecoLocalTracker/Configuration/python/RecoLocalTracker_cff.py +++ b/RecoLocalTracker/Configuration/python/RecoLocalTracker_cff.py @@ -24,6 +24,12 @@ siStripClusters, siStripMatchedRecHits) +_approxSiStripClustersTask = striptrackerlocalrecoTask.copy() +_approxSiStripClustersTask.remove(siStripZeroSuppression) + +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +approxSiStripClusters.toReplaceWith(striptrackerlocalrecoTask, _approxSiStripClustersTask) + trackerlocalrecoTask = cms.Task( pixeltrackerlocalrecoTask, striptrackerlocalrecoTask, diff --git a/RecoLocalTracker/SiStripClusterizer/plugins/SiStripApprox2Clusters.cc b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripApprox2Clusters.cc new file mode 100644 index 0000000000000..a1bd8d382cb2c --- /dev/null +++ b/RecoLocalTracker/SiStripClusterizer/plugins/SiStripApprox2Clusters.cc @@ -0,0 +1,55 @@ +#include "FWCore/Framework/interface/MakerMacros.h" +#include "FWCore/Framework/interface/Frameworkfwd.h" +#include "FWCore/Framework/interface/global/EDProducer.h" +#include "FWCore/Framework/interface/Event.h" +#include "FWCore/ParameterSet/interface/ParameterSet.h" +#include "FWCore/ParameterSet/interface/ConfigurationDescriptions.h" +#include "FWCore/ParameterSet/interface/ParameterSetDescription.h" +#include "FWCore/Utilities/interface/InputTag.h" +#include "DataFormats/SiStripCluster/interface/SiStripApproximateCluster.h" +#include "DataFormats/SiStripCluster/interface/SiStripCluster.h" +#include "DataFormats/Common/interface/DetSetVectorNew.h" +#include "DataFormats/Common/interface/DetSetVector.h" + +#include +#include + +class SiStripApprox2Clusters : public edm::global::EDProducer<> { +public: + explicit SiStripApprox2Clusters(const edm::ParameterSet& conf); + + void produce(edm::StreamID, edm::Event&, const edm::EventSetup&) const override; + static void fillDescriptions(edm::ConfigurationDescriptions& descriptions); + +private: + edm::EDGetTokenT> clusterToken_; +}; + +SiStripApprox2Clusters::SiStripApprox2Clusters(const edm::ParameterSet& conf) { + clusterToken_ = consumes>( + conf.getParameter("inputApproxClusters")); + produces>(); +} + +void SiStripApprox2Clusters::produce(edm::StreamID id, edm::Event& event, const edm::EventSetup& iSetup) const { + auto result = std::make_unique>(); + const auto& clusterCollection = event.get(clusterToken_); + + for (const auto& detClusters : clusterCollection) { + edmNew::DetSetVector::FastFiller ff{*result, detClusters.id()}; + + for (const auto& cluster : detClusters) { + ff.push_back(SiStripCluster(cluster)); + } + } + + event.put(std::move(result)); +} + +void SiStripApprox2Clusters::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { + edm::ParameterSetDescription desc; + desc.add("inputApproxClusters", edm::InputTag("siStripClusters")); + descriptions.add("SiStripApprox2Clusters", desc); +} + +DEFINE_FWK_MODULE(SiStripApprox2Clusters); diff --git a/RecoLocalTracker/SiStripClusterizer/python/SiStripClusterizer_RealData_cfi.py b/RecoLocalTracker/SiStripClusterizer/python/SiStripClusterizer_RealData_cfi.py index 40d66f03c5179..5fd2163d3baee 100644 --- a/RecoLocalTracker/SiStripClusterizer/python/SiStripClusterizer_RealData_cfi.py +++ b/RecoLocalTracker/SiStripClusterizer/python/SiStripClusterizer_RealData_cfi.py @@ -11,6 +11,12 @@ cms.InputTag('siStripZeroSuppression','ScopeMode')), ) +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +from RecoLocalTracker.SiStripClusterizer.SiStripApprox2Clusters_cfi import SiStripApprox2Clusters +SiStripApprox2Clusters.inputApproxClusters = 'SiStripClusters2ApproxClusters' +approxSiStripClusters.toModify(SiStripApprox2Clusters, inputApproxClusters = 'SiStripClusters2ApproxClustersHLT') +approxSiStripClusters.toReplaceWith(siStripClusters,SiStripApprox2Clusters) + # The SiStripClusters are not used anymore in phase2 tracking # This part has to be clean up when they will be officially removed from the entire flow from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker diff --git a/RecoLocalTracker/SiStripClusterizer/python/SiStripClusters2ApproxClusters_cff.py b/RecoLocalTracker/SiStripClusterizer/python/SiStripClusters2ApproxClusters_cff.py new file mode 100644 index 0000000000000..51d22544ee4a4 --- /dev/null +++ b/RecoLocalTracker/SiStripClusterizer/python/SiStripClusters2ApproxClusters_cff.py @@ -0,0 +1,5 @@ +from RecoLocalTracker.SiStripClusterizer.SiStripClusters2ApproxClusters_cfi import * + +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +SiStripClusters2ApproxClustersHLT = SiStripClusters2ApproxClusters.clone() +approxSiStripClusters.toModify(SiStripClusters2ApproxClustersHLT, inputClusters = "siStripClustersHLT") diff --git a/RecoLocalTracker/SiStripClusterizer/test/SiStripApproximatedClustersDump.cc b/RecoLocalTracker/SiStripClusterizer/test/SiStripApproximatedClustersDump.cc index e182bc7b0dc64..455dad68dff6c 100644 --- a/RecoLocalTracker/SiStripClusterizer/test/SiStripApproximatedClustersDump.cc +++ b/RecoLocalTracker/SiStripClusterizer/test/SiStripApproximatedClustersDump.cc @@ -55,7 +55,7 @@ class SiStripApproximatedClustersDump : public edm::one::EDAnalyzer("approximatedClustersTag"); + inputTagClusters = conf.getParameter("approxSiStripClustersTag"); clusterToken = consumes>(inputTagClusters); usesResource("TFileService"); @@ -88,7 +88,7 @@ void SiStripApproximatedClustersDump::analyze(const edm::Event& event, const edm void SiStripApproximatedClustersDump::fillDescriptions(edm::ConfigurationDescriptions& descriptions) { edm::ParameterSetDescription desc; - desc.add("approximatedClustersTag", edm::InputTag("SiStripClusters2ApproxClusters")); + desc.add("approxSiStripClustersTag", edm::InputTag("SiStripClusters2ApproxClusters")); descriptions.add("SiStripApproximatedClustersDump", desc); } diff --git a/RecoLocalTracker/SiStripZeroSuppression/python/SiStripZeroSuppression_cfi.py b/RecoLocalTracker/SiStripZeroSuppression/python/SiStripZeroSuppression_cfi.py index 365e7dc7dace3..4bbc6e15648d2 100644 --- a/RecoLocalTracker/SiStripZeroSuppression/python/SiStripZeroSuppression_cfi.py +++ b/RecoLocalTracker/SiStripZeroSuppression/python/SiStripZeroSuppression_cfi.py @@ -28,3 +28,8 @@ 'simSiStripDigis:ProcessedRaw', 'simSiStripDigis:ScopeMode' ] ) + +siStripZeroSuppressionHLT = siStripZeroSuppression.clone( + RawDigiProducersList =[("siStripDigisHLT","VirginRaw"), ("siStripDigisHLT","ProcessedRaw"), ("siStripDigisHLT","ScopeMode")] +) + diff --git a/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py b/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py index 5c823144d0264..2aae60e0e4d1d 100644 --- a/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py +++ b/RecoTracker/IterativeTracking/python/PixelLessStep_cff.py @@ -201,11 +201,15 @@ FilterStripHits = cms.bool(True), ClusterShapeHitFilterName = cms.string('pixelLessStepClusterShapeHitFilter'), ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False - ), - _StripSubClusterShapeSeedFilter.clone() + ) ) ) ) + +from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +(~approxSiStripClusters).toModify(pixelLessStepSeeds.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) ) + trackingLowPU.toModify(pixelLessStepHitDoublets, produceSeedingHitSets=True, produceIntermediateHitDoublets=False) trackingLowPU.toModify(pixelLessStepSeeds, seedingHitSets = 'pixelLessStepHitDoublets', diff --git a/RecoTracker/IterativeTracking/python/TobTecStep_cff.py b/RecoTracker/IterativeTracking/python/TobTecStep_cff.py index cfdf57de90906..b8de2629fe05e 100644 --- a/RecoTracker/IterativeTracking/python/TobTecStep_cff.py +++ b/RecoTracker/IterativeTracking/python/TobTecStep_cff.py @@ -93,7 +93,6 @@ extraPhiKDBox = 0.01, ) from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer -from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter _tobTecStepSeedComparitorPSet = dict( ComponentName = 'CombinedSeedComparitor', mode = cms.string('and'), @@ -105,14 +104,19 @@ FilterStripHits = cms.bool(True), ClusterShapeHitFilterName = cms.string('tobTecStepClusterShapeHitFilter'), ClusterShapeCacheSrc = cms.InputTag('siPixelClusterShapeCache') # not really needed here since FilterPixelHits=False - ), - _StripSubClusterShapeSeedFilter.clone() + ) ) ) + tobTecStepSeedsTripl = _seedCreatorFromRegionConsecutiveHitsTripletOnlyEDProducer.clone(#empirically better than 'SeedFromConsecutiveHitsTripletOnlyCreator' seedingHitSets = 'tobTecStepHitTripletsTripl', SeedComparitorPSet = _tobTecStepSeedComparitorPSet, ) + +from RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeSeedFilter_cfi import StripSubClusterShapeSeedFilter as _StripSubClusterShapeSeedFilter +from Configuration.ProcessModifiers.approxSiStripClusters_cff import approxSiStripClusters +(~approxSiStripClusters).toModify(tobTecStepSeedsTripl.SeedComparitorPSet.comparitors, func = lambda list: list.append(_StripSubClusterShapeSeedFilter.clone()) ) + #fastsim import FastSimulation.Tracking.TrajectorySeedProducer_cfi from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet