Beispiel #1
0
                            pixelSimLinkSrc = cms.InputTag("simSiPixelDigis","Pixel"),
                            stripSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker")
                            )

phase2_hgcal.toModify( tpClusterProducer,
                            pixelSimLinkSrc = cms.InputTag("simSiPixelDigis", "Pixel"),
                            phase2OTSimLinkSrc = cms.InputTag("simSiPixelDigis","Tracker")
                            )

phase2_hgcal.toReplaceWith( particleFlowTmp, _phase2_hgcal_particleFlowTmp )
phase2_hgcal.toReplaceWith( particleFlowReco, _phase2_hgcal_particleFlowReco )

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

pp_on_XeXe_2017.toModify(particleFlowDisplacedVertexCandidate,
                         tracksSelectorParameters = dict(pt_min = 999999.0,
                                                         nChi2_max = 0.0,
                                                         pt_min_prim = 999999.0,
                                                         dxy = 999999.0)
                         )

pp_on_XeXe_2017.toModify(particleFlowBlock, useNuclear = cms.bool(False))

pp_on_XeXe_2017.toModify(pfNoPileUpIso, enable = cms.bool(False))
pp_on_XeXe_2017.toModify(pfPileUpIso, enable = cms.bool(False))
pp_on_XeXe_2017.toModify(pfNoPileUp, enable = cms.bool(False))
pp_on_XeXe_2017.toModify(pfPileUp, enable = cms.bool(False))



    topCollection=cms.InputTag('pfPileUpForBoostedTaus'),
    bottomCollection=cms.InputTag('particleFlow'))

import RecoJets.JetProducers.ak4PFJets_cfi as boostedTaus2
import RecoJets.JetProducers.CMSBoostedTauSeedingParameters_cfi as boostedTaus3
ca8PFJetsCHSprunedForBoostedTaus = boostedTaus2.ak4PFJets.clone(
    boostedTaus3.CMSBoostedTauSeedingParameters,
    #src = cms.InputTag('pfNoPileUpForBoostedTaus'),
    jetPtMin=cms.double(100.0),
    doAreaFastjet=cms.bool(True),
    nFilt=cms.int32(100),
    rParam=cms.double(0.8),
    jetAlgorithm=cms.string("CambridgeAachen"),
    writeCompound=cms.bool(True),
    jetCollInstanceName=cms.string('subJetsForSeedingBoostedTaus'))

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(ca8PFJetsCHSprunedForBoostedTaus, inputEtMin=999999.0)

boostedTauSeeds = cms.EDProducer("BoostedTauSeedsProducer",
                                 subjetSrc=cms.InputTag(
                                     'ca8PFJetsCHSprunedForBoostedTaus',
                                     'subJetsForSeedingBoostedTaus'),
                                 pfCandidateSrc=cms.InputTag('particleFlow'),
                                 verbosity=cms.int32(0))

boostedHPSPFTausTask = cms.Task(pfPileUpForBoostedTaus,
                                pfNoPileUpForBoostedTaus,
                                ca8PFJetsCHSprunedForBoostedTaus,
                                boostedTauSeeds)
Beispiel #3
0
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
_lowPtTripletStepStandardTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 3,
    minPt = 0.075,
)
lowPtTripletStepStandardTrajectoryFilter = _lowPtTripletStepStandardTrajectoryFilterBase.clone(
    maxCCCLostHits = 0,
    minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
)
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
_tracker_apv_vfp30_2016.toModify(lowPtTripletStepStandardTrajectoryFilter, maxCCCLostHits = 1)
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toReplaceWith(lowPtTripletStepStandardTrajectoryFilter, _lowPtTripletStepStandardTrajectoryFilterBase)
trackingPhase2PU140.toReplaceWith(lowPtTripletStepStandardTrajectoryFilter, _lowPtTripletStepStandardTrajectoryFilterBase)

pp_on_XeXe_2017.toModify(lowPtTripletStepStandardTrajectoryFilter, minPt=0.3)

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import *
# Composite filter
lowPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters   = [cms.PSet(refToPSet_ = cms.string('lowPtTripletStepStandardTrajectoryFilter')),
                 # cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))
                ]
    )
trackingPhase2PU140.toModify(lowPtTripletStepTrajectoryFilter,
    filters = lowPtTripletStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
)

lowPtTripletStepTrajectoryFilterInOut = lowPtTripletStepStandardTrajectoryFilter.clone(
    minimumNumberOfHits = 4,
    seedExtension = 1,
from RecoTracker.TkSeedGenerator.trackerClusterCheckDefault_cfi import trackerClusterCheckDefault as _trackerClusterCheckDefault
trackerClusterCheck = _trackerClusterCheckDefault.clone()

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
# Disable too many clusters check until we have an updated cut string for phase1 and phase2
phase1Pixel.toModify(trackerClusterCheck, doClusterCheck=False) # FIXME
phase2_tracker.toModify(trackerClusterCheck, doClusterCheck=False) # FIXME

from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
peripheralPbPb.toModify(trackerClusterCheck,
                        doClusterCheck=True,  #FIXMETOO
                        cut = "strip < 400000 && pixel < 40000 && (strip < 60000 + 7.0*pixel) && (pixel < 8000 + 0.14*strip)"
                        )
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(trackerClusterCheck,
               doClusterCheck=True, #FIXMETOO
               cut = "strip < 1000000 && pixel < 100000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)",
               MaxNumberOfPixelClusters = 100000
               )

from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify(trackerClusterCheck,
               doClusterCheck=True, 
               cut = "strip < 1000000 && pixel < 150000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)",
               MaxNumberOfPixelClusters = 150000,
               MaxNumberOfCosmicClusters = 500000
               )
Beispiel #5
0
    minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
)
trackingPhase2PU140.toReplaceWith(detachedQuadStepTrajectoryFilterBase,
    _detachedQuadStepTrajectoryFilterBase.clone(
        maxLostHitsFraction = 1./10.,
        constantValueForLostHitsFractionFilter = 0.301,
    )
)
detachedQuadStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters = [cms.PSet(refToPSet_ = cms.string('detachedQuadStepTrajectoryFilterBase'))]
)
trackingPhase2PU140.toModify(detachedQuadStepTrajectoryFilter,
    filters = detachedQuadStepTrajectoryFilter.filters.value()+[cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
)

pp_on_XeXe_2017.toModify(detachedQuadStepTrajectoryFilterBase, minPt=0.9)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
detachedQuadStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName = 'detachedQuadStepChi2Est',
    nSigma = 3.0,
    MaxChi2 = 9.0,
    clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTight'),
)
trackingPhase2PU140.toModify(detachedQuadStepChi2Est,
    MaxChi2 = 12.0,
    clusterChargeCut = dict(refToPSet_ = "SiStripClusterChargeCutNone")
)


# TRACK BUILDING
                                        

                                        
)

# This customization is needed in the trackingLowPU era to be able to
# produce vertices also in the cases in which the pixel detector is
# not included in data-taking, like it was the case for "Quiet Beam"
# collisions on 2016 with run 269207.

from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(offlinePrimaryVertices,
                            TkFilterParameters = dict(minPixelLayersWithHits = 0))


# higher eta cut for the phase 2 tracker
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker 
phase2_tracker.toModify(offlinePrimaryVertices, 
                        TkFilterParameters = dict(maxEta = 4.0))

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(offlinePrimaryVertices,
    TkFilterParameters = dict(maxD0Significance = 3.0),
    TkClusParameters = cms.PSet(
        algorithm = cms.string("gap"),
        TkGapClusParameters = cms.PSet(
            zSeparation = cms.double(1.0)        
        )
    )
)
Beispiel #7
0
# least one constituent with pt > 5.  This cut should be 100% efficient w.r.t a
# lead pion selection.
#
# After the basic preselection has been applied to the jets, the pizeros inside
# the jet are reconstructed.
#-------------------------------------------------------------------------------

# Collection PFCandidates from a DR=0.8 cone about the jet axis and make new
# faux jets with this collection
from RecoTauTag.RecoTau.RecoTauJetRegionProducer_cfi import RecoTauJetRegionProducer
recoTauAK4PFJets08Region = RecoTauJetRegionProducer.clone(
    src = PFRecoTauPFJetInputs.inputJetCollection
)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(recoTauAK4PFJets08Region, minJetPt = 999999.0)

# Reconstruct the pi zeros in our pre-selected jets.
from RecoTauTag.RecoTau.RecoTauPiZeroProducer_cfi import ak4PFJetsLegacyHPSPiZeros
ak4PFJetsLegacyHPSPiZeros = ak4PFJetsLegacyHPSPiZeros.clone()
ak4PFJetsLegacyHPSPiZeros.jetSrc = PFRecoTauPFJetInputs.inputJetCollection

# import charged hadrons
from RecoTauTag.RecoTau.PFRecoTauChargedHadronProducer_cfi import ak4PFJetsRecoTauChargedHadrons
ak4PFJetsRecoTauChargedHadrons = ak4PFJetsRecoTauChargedHadrons.clone()

#-------------------------------------------------------------------------------
#------------------ Produce combinatoric base taus------------------------------
#-------------------------------------------------------------------------------
# These jets form the basis of the HPS & TaNC taus.  There are many taus
# produced for each jet, which are cleaned by the respective algorithms.
Beispiel #8
0
# building
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_initialStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 3,
    minPt = 0.2,
)
initialStepTrajectoryFilterBase = _initialStepTrajectoryFilterBase.clone(
    maxCCCLostHits = 0,
    minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
)
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
_tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBase, maxCCCLostHits = 2)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(initialStepTrajectoryFilterBase, minPt=0.6)

initialStepTrajectoryFilterInOut = initialStepTrajectoryFilterBase.clone(
    minimumNumberOfHits = 4,
    seedExtension = 1,
    strictSeedExtension = True, # don't allow inactive
    pixelSeedExtension = True,
)
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase)
trackingPhase2PU140.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase)

import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
initialStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
initialStepTrajectoryFilter = cms.PSet(
    ComponentType = cms.string('CompositeTrajectoryFilter'),
Beispiel #9
0
# QUALITY CUTS DURING TRACK BUILDING (for inwardss and outwards track building steps)
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_tobTecStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    maxLostHits = 0,
    minimumNumberOfHits = 5,
    minPt = 0.1,
    minHitsMinPt = 3
    )
tobTecStepTrajectoryFilter = _tobTecStepTrajectoryFilterBase.clone(
    seedPairPenalty = 1,
)
trackingLowPU.toReplaceWith(tobTecStepTrajectoryFilter, _tobTecStepTrajectoryFilterBase.clone(
    minimumNumberOfHits = 6,
))
pp_on_XeXe_2017.toModify(tobTecStepTrajectoryFilter, minPt=2.0)

tobTecStepInOutTrajectoryFilter = tobTecStepTrajectoryFilter.clone(
    minimumNumberOfHits = 4,
)


import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
tobTecStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName = cms.string('tobTecStepChi2Est'),
    nSigma = cms.double(3.0),
    MaxChi2 = cms.double(16.0),
    clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
)
trackingLowPU.toModify(tobTecStepChi2Est,
    clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
Beispiel #10
0
import RecoJets.JetProducers.ak4PFJets_cfi as boostedTaus2
import RecoJets.JetProducers.CMSBoostedTauSeedingParameters_cfi as boostedTaus3
ca8PFJetsCHSprunedForBoostedTaus = boostedTaus2.ak4PFJets.clone(
    boostedTaus3.CMSBoostedTauSeedingParameters,
    #src = cms.InputTag('pfNoPileUpForBoostedTaus'),
    jetPtMin = cms.double(100.0),
    doAreaFastjet = cms.bool(True),
    nFilt = cms.int32(100),
    rParam = cms.double(0.8),
    jetAlgorithm = cms.string("CambridgeAachen"),
    writeCompound = cms.bool(True),
    jetCollInstanceName = cms.string('subJetsForSeedingBoostedTaus')
)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(ca8PFJetsCHSprunedForBoostedTaus, inputEtMin = 999999.0)

boostedTauSeeds = cms.EDProducer("BoostedTauSeedsProducer",
    subjetSrc = cms.InputTag('ca8PFJetsCHSprunedForBoostedTaus', 'subJetsForSeedingBoostedTaus'),
    pfCandidateSrc = cms.InputTag('particleFlow'),
    verbosity = cms.int32(0)
)

boostedHPSPFTausTask = cms.Task(
    pfPileUpForBoostedTaus,
    pfNoPileUpForBoostedTaus,
    ca8PFJetsCHSprunedForBoostedTaus,
    boostedTauSeeds
)
from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import *
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(globalTrackingRegionWithVertices,
                       RegionPSet=dict(VertexCollection="pixelVertices"))
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

pp_on_XeXe_2017.toModify(globalTrackingRegionWithVertices,
                         RegionPSet=dict(
                             VertexCollection="firstStepPrimaryVertices",
                             beamSpot="offlineBeamSpot",
                             maxNVertices=-1,
                             nSigmaZ=4.,
                             precise=True,
                             sigmaZVertex=4.,
                             useFakeVertices=False,
                             useFixedError=True,
                             useFoundVertices=True,
                             useMultipleScattering=False))
        MaxNumberOfPixelClusters=cms.uint32(40000),
        PixelClusterCollectionLabel=cms.InputTag("siPixelClusters"),
        cut=cms.string(
            "strip < 400000 && pixel < 40000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + 0.1*strip)"
        )),
)

# Disable too many clusters check until we have an updated cut string for phase1
from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
phase1Pixel.toModify(
    seedGeneratorFromRegionHitsEDProducer,  # FIXME
    ClusterCheckPSet=dict(doClusterCheck=False))

from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
peripheralPbPb.toModify(
    seedGeneratorFromRegionHitsEDProducer,
    ClusterCheckPSet=dict(
        doClusterCheck=True,  # FIXMETOO
        cut=
        "strip < 400000 && pixel < 40000 && (strip < 60000 + 7.0*pixel) && (pixel < 8000 + 0.14*strip)"
    ))

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(
    seedGeneratorFromRegionHitsEDProducer,
    ClusterCheckPSet=dict(
        doClusterCheck=True,  # FIXMETOO
        cut=
        "strip < 1000000 && pixel < 100000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)",
        MaxNumberOfPixelClusters=100000))
                                           'keep int_*_bunchSpacing_*',
                                           'keep *_genPUProtons_*_*') 
)
#AOD content
SimGeneralAOD = cms.PSet(
    outputCommands = cms.untracked.vstring('keep PileupSummaryInfos_*_*_*',
                                           'keep int_*_bunchSpacing_*',
                                           'keep *_genPUProtons_*_*') 
)

# mods for HGCAL
_phase2_hgc_extraCommands = [ 'keep *_mix_HGCDigisEE_*', 'keep *_mix_HGCDigisHEfront_*', 'keep *_mix_HGCDigisHEback_*', 
                              'keep *_mix_MergedCaloTruth_*' ]
from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toModify( SimGeneralRAW, outputCommands = SimGeneralRAW.outputCommands + _phase2_hgc_extraCommands )
phase2_hgcal.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _phase2_hgc_extraCommands )
phase2_hgcal.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _phase2_hgc_extraCommands )

_phase2_timing_extraCommands = [ 'keep *_mix_FTLBarrel_*','keep *_mix_FTLEndcap_*','keep *_mix_InitialVertices_*' ]
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
phase2_timing.toModify( SimGeneralRAW, outputCommands = SimGeneralRAW.outputCommands + _phase2_timing_extraCommands )
phase2_timing.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _phase2_timing_extraCommands )
phase2_timing.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _phase2_timing_extraCommands )

_pp_on_XeXe_extraCommands = ['keep CrossingFramePlaybackInfoNew_mix_*_*','keep *_heavyIon_*_*']
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify( SimGeneralRAW, outputCommands = SimGeneralRAW.outputCommands + _pp_on_XeXe_extraCommands )
pp_on_XeXe_2017.toModify( SimGeneralFEVTDEBUG, outputCommands = SimGeneralFEVTDEBUG.outputCommands + _pp_on_XeXe_extraCommands )
pp_on_XeXe_2017.toModify( SimGeneralRECO, outputCommands = SimGeneralRECO.outputCommands + _pp_on_XeXe_extraCommands )
pp_on_XeXe_2017.toModify( SimGeneralAOD, outputCommands = SimGeneralAOD.outputCommands + _pp_on_XeXe_extraCommands )
Beispiel #14
0
# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_mixedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
#    maxLostHits = 0,
    minimumNumberOfHits = 3,
    minPt = 0.1
)

mixedTripletStepTrajectoryFilter = _mixedTripletStepTrajectoryFilterBase.clone(
    constantValueForLostHitsFractionFilter = 1.4,
)
trackingLowPU.toReplaceWith(mixedTripletStepTrajectoryFilter, _mixedTripletStepTrajectoryFilterBase.clone(
    maxLostHits = 0,
))

pp_on_XeXe_2017.toModify(mixedTripletStepTrajectoryFilter, minPt=0.4)

# Propagator taking into account momentum uncertainty in multiple scattering calculation.
import TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff
import TrackingTools.MaterialEffects.MaterialPropagator_cfi
mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagator_cfi.MaterialPropagator.clone(
#mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.MaterialPropagatorParabolicMF.clone(
    ComponentName = 'mixedTripletStepPropagator',
    ptMin = 0.1
    )
pp_on_XeXe_2017.toModify(mixedTripletStepPropagator, ptMin=0.4)

import TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi
mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi.OppositeMaterialPropagator.clone(
#mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.OppositeMaterialPropagatorParabolicMF.clone(
    ComponentName = 'mixedTripletStepPropagatorOpposite',
    HOverPLead_maxValue = cms.double(0.05),
    HcalWindow=cms.double(0.184),                       
    ClusterThreshold = cms.double(0.5),
    UsePreShower =cms.bool(False),
    PreIdLabel = cms.string('preid'),
    ProducePreId = cms.untracked.bool(True),
    PtThresholdSavePreId = cms.untracked.double(1.0),
    Min_dr = cms.double(0.2)
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(trackerDrivenElectronSeeds, TTRHBuilder  = 'WithTrackAngle') # FIXME

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(trackerDrivenElectronSeeds, MinPt = 5.0) 

# tracker driven electron seeds depend on the generalTracks trajectory collection
# However, in FastSim jobs, trajectories are only available for the 'before mixing' track collections
# Therefore we let the seeds depend on the 'before mixing' generalTracks collection
# TODO: investigate whether the dependence on trajectories can be avoided
from Configuration.Eras.Modifier_fastSim_cff import fastSim
trackerDrivenElectronSeedsTmp = trackerDrivenElectronSeeds.clone(TkColList = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")))
import FastSimulation.Tracking.ElectronSeedTrackRefFix_cfi
_fastSim_trackerDrivenElectronSeeds = FastSimulation.Tracking.ElectronSeedTrackRefFix_cfi.fixedTrackerDrivenElectronSeeds.clone()
_fastSim_trackerDrivenElectronSeeds.seedCollection.setModuleLabel("trackerDrivenElectronSeedsTmp"),
_fastSim_trackerDrivenElectronSeeds.idCollection.setModuleLabel("trackerDrivenElectronSeedsTmp")
fastSim.toReplaceWith(trackerDrivenElectronSeeds,_fastSim_trackerDrivenElectronSeeds)

from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
jetCoreRegionalStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
    seedingHitSets = "jetCoreRegionalStepHitDoublets",
    forceKinematicWithRegionDirection = True
)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 4,
    seedPairPenalty = 0,
    minPt = 0.1
)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(jetCoreRegionalStepTrajectoryFilter, minPt=5.0)

import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi
jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
    ComponentName = cms.string('jetCoreRegionalStepChi2Est'),
    nSigma = cms.double(3.0),
    MaxChi2 = cms.double(30.0)
)

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
#need to also load the refToPSet_ used by GroupedCkfTrajectoryBuilder
CkfBaseTrajectoryFilter_block = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.CkfBaseTrajectoryFilter_block
jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
    MeasurementTrackerName = '',
    trajectoryFilter = cms.PSet(refToPSet_ = cms.string('jetCoreRegionalStepTrajectoryFilter')),
from RecoTracker.TkTrackingRegions.globalTrackingRegionWithVertices_cfi import *
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(globalTrackingRegionWithVertices, RegionPSet = dict(VertexCollection = "pixelVertices"))
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

pp_on_XeXe_2017.toModify(globalTrackingRegionWithVertices, RegionPSet = dict(
        VertexCollection = "firstStepPrimaryVertices",
        beamSpot = "offlineBeamSpot",
        maxNVertices = -1,
        nSigmaZ = 4.,
        precise = True,
        sigmaZVertex = 4.,
        useFakeVertices = False,
        useFixedError = True,
        useFoundVertices = True,
        useMultipleScattering = False                                                  
        )
)
    seedingLayers="jetCoreRegionalStepSeedLayers",
    trackingRegions="jetCoreRegionalStepTrackingRegions",
    produceSeedingHitSets=True,
)
from RecoTracker.TkSeedGenerator.seedCreatorFromRegionConsecutiveHitsEDProducer_cff import seedCreatorFromRegionConsecutiveHitsEDProducer as _seedCreatorFromRegionConsecutiveHitsEDProducer
jetCoreRegionalStepSeeds = _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
    seedingHitSets="jetCoreRegionalStepHitDoublets",
    forceKinematicWithRegionDirection=True)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
jetCoreRegionalStepTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits=4, seedPairPenalty=0, minPt=0.1)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(jetCoreRegionalStepTrajectoryFilter, minPt=5.0)

import TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi
jetCoreRegionalStepChi2Est = TrackingTools.KalmanUpdators.Chi2MeasurementEstimator_cfi.Chi2MeasurementEstimator.clone(
    ComponentName=cms.string('jetCoreRegionalStepChi2Est'),
    nSigma=cms.double(3.0),
    MaxChi2=cms.double(30.0))

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
jetCoreRegionalStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
    MeasurementTrackerName='',
    trajectoryFilter=cms.PSet(
        refToPSet_=cms.string('jetCoreRegionalStepTrajectoryFilter')),
    #clustersToSkip = cms.InputTag('jetCoreRegionalStepClusters'),
    maxCand=50,
Beispiel #19
0
    particleFlowTmpSeq, cms.Sequence(particleFlowTmpBarrel * particleFlowTmp))

from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
phase2_hgcal.toModify(quickTrackAssociatorByHits,
                      pixelSimLinkSrc=cms.InputTag("simSiPixelDigis", "Pixel"),
                      stripSimLinkSrc=cms.InputTag("simSiPixelDigis",
                                                   "Tracker"))

phase2_hgcal.toModify(tpClusterProducer,
                      pixelSimLinkSrc=cms.InputTag("simSiPixelDigis", "Pixel"),
                      phase2OTSimLinkSrc=cms.InputTag("simSiPixelDigis",
                                                      "Tracker"))

phase2_hgcal.toReplaceWith(particleFlowTmp, _phase2_hgcal_particleFlowTmp)
phase2_hgcal.toReplaceWith(particleFlowReco, _phase2_hgcal_particleFlowReco)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

pp_on_XeXe_2017.toModify(particleFlowDisplacedVertexCandidate,
                         tracksSelectorParameters=dict(pt_min=999999.0,
                                                       nChi2_max=0.0,
                                                       pt_min_prim=999999.0,
                                                       dxy=999999.0))

pp_on_XeXe_2017.toModify(particleFlowBlock, useNuclear=cms.bool(False))

pp_on_XeXe_2017.toModify(pfNoPileUpIso, enable=cms.bool(False))
pp_on_XeXe_2017.toModify(pfPileUpIso, enable=cms.bool(False))
pp_on_XeXe_2017.toModify(pfNoPileUp, enable=cms.bool(False))
pp_on_XeXe_2017.toModify(pfPileUp, enable=cms.bool(False))
from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140

trackingPhase2PU140.toModify(
    photonConvTrajSeedFromSingleLeg,
    ClusterCheckPSet=dict(MaxNumberOfCosmicClusters=1000000,
                          MaxNumberOfPixelClusters=100000,
                          cut=None),
    OrderedHitsFactoryPSet=dict(maxElement=100000),
    RegionFactoryPSet=dict(RegionPSet=dict(ptMin=0.3)),
)

from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb

peripheralPbPb.toModify(
    photonConvTrajSeedFromSingleLeg,
    ClusterCheckPSet=dict(
        cut=
        "strip < 400000 && pixel < 40000 && (strip < 60000 + 7.0*pixel) && (pixel < 8000 + 0.14*strip)"
    ))
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017

pp_on_XeXe_2017.toModify(
    photonConvTrajSeedFromSingleLeg,
    ClusterCheckPSet=dict(
        MaxNumberOfPixelClusters=100000,
        cut=
        "strip < 1000000 && pixel < 100000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)"
    ),
    OrderedHitsFactoryPSet=dict(maxElement=100000))
                                           'keep *_genParticle_*_*'
                                           )
    )

from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
#products from regular pp which does not fit the normal AOD
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
    e.toModify( RecoJetsAOD.outputCommands, 
                func=lambda outputCommands: outputCommands.extend(['keep *_towerMaker_*_*'])
                )
for ec in [RecoJetsAOD.outputCommands, RecoJetsRECO.outputCommands, RecoJetsFEVT.outputCommands]:
    pp_on_XeXe_2017.toModify( ec,
                              func=lambda outputCommands: outputCommands.extend(['keep recoCentrality*_hiCentrality_*_*',
                                                                                 'keep recoClusterCompatibility*_hiClusterCompatibility_*_*'
                                                                                 ])
                              )

#HI-specific products: needed in AOD, propagate to more inclusive tiers as well
for ec in [RecoJetsAOD.outputCommands, RecoJetsRECO.outputCommands, RecoJetsFEVT.outputCommands]:
    pA_2016.toModify( ec, 
                      func=lambda outputCommands: outputCommands.extend(['keep recoCentrality*_pACentrality_*_*',
                                                                         'keep *_hiFJGridEmptyAreaCalculator_*_*',
                                                                         'keep *_hiFJRhoProducer_*_*'
                                                                         ])
                      )

#HI-specific products: needed in AOD, propagate to more inclusive tiers as well
for ec in [RecoJetsAOD.outputCommands, RecoJetsRECO.outputCommands, RecoJetsFEVT.outputCommands]:
    peripheralPbPb.toModify( ec, 
    'keep *_mix_FTLBarrel_*', 'keep *_mix_FTLEndcap_*',
    'keep *_mix_InitialVertices_*'
]
from Configuration.Eras.Modifier_phase2_timing_cff import phase2_timing
phase2_timing.toModify(SimGeneralRAW,
                       outputCommands=SimGeneralRAW.outputCommands +
                       _phase2_timing_extraCommands)
phase2_timing.toModify(SimGeneralFEVTDEBUG,
                       outputCommands=SimGeneralFEVTDEBUG.outputCommands +
                       _phase2_timing_extraCommands)
phase2_timing.toModify(SimGeneralRECO,
                       outputCommands=SimGeneralRECO.outputCommands +
                       _phase2_timing_extraCommands)

_pp_on_XeXe_extraCommands = [
    'keep CrossingFramePlaybackInfoNew_mix_*_*', 'keep *_heavyIon_*_*'
]
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(SimGeneralRAW,
                         outputCommands=SimGeneralRAW.outputCommands +
                         _pp_on_XeXe_extraCommands)
pp_on_XeXe_2017.toModify(SimGeneralFEVTDEBUG,
                         outputCommands=SimGeneralFEVTDEBUG.outputCommands +
                         _pp_on_XeXe_extraCommands)
pp_on_XeXe_2017.toModify(SimGeneralRECO,
                         outputCommands=SimGeneralRECO.outputCommands +
                         _pp_on_XeXe_extraCommands)
pp_on_XeXe_2017.toModify(SimGeneralAOD,
                         outputCommands=SimGeneralAOD.outputCommands +
                         _pp_on_XeXe_extraCommands)
def applySubstructure(process, postfix=""):

    task = getPatAlgosToolsTask(process)

    from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection

    from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import _patJets as patJetsDefault

    # Configure the RECO jets
    from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJetsPuppi
    from RecoJets.JetProducers.ak8PFJets_cfi import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents, ak8PFJetsCHSConstituents
    from RecoJets.JetProducers.ak8GenJets_cfi import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents
    addToProcessAndTask('ak4PFJetsPuppi' + postfix, ak4PFJetsPuppi.clone(),
                        process, task)
    addToProcessAndTask('ak8PFJetsPuppi' + postfix, ak8PFJetsPuppi.clone(),
                        process, task)
    addToProcessAndTask(
        'ak8PFJetsPuppiConstituents',
        ak8PFJetsPuppiConstituents.clone(
            cut=cms.string('pt > 170.0 && abs(rapidity()) < 2.4')), process,
        task)
    addToProcessAndTask('ak8PFJetsCHSConstituents',
                        ak8PFJetsCHSConstituents.clone(), process, task)
    addToProcessAndTask(
        'ak8PFJetsPuppiSoftDrop' + postfix,
        ak8PFJetsPuppiSoftDrop.clone(
            src=cms.InputTag('ak8PFJetsPuppiConstituents', 'constituents')),
        process, task)
    addToProcessAndTask('ak8GenJetsNoNuConstituents' + postfix,
                        ak8GenJetsConstituents.clone(src='ak8GenJetsNoNu'),
                        process, task)
    addToProcessAndTask(
        'ak8GenJetsNoNuSoftDrop' + postfix,
        ak8GenJetsSoftDrop.clone(
            src=cms.InputTag('ak8GenJetsNoNuConstituents' +
                             postfix, 'constituents')), process, task)
    addToProcessAndTask(
        'slimmedGenJetsAK8SoftDropSubJets' + postfix,
        cms.EDProducer(
            "PATGenJetSlimmer",
            src=cms.InputTag("ak8GenJetsNoNuSoftDrop" + postfix, "SubJets"),
            packedGenParticles=cms.InputTag("packedGenParticles"),
            cut=cms.string(""),
            cutLoose=cms.string(""),
            nLoose=cms.uint32(0),
            clearDaughters=cms.bool(False),  #False means rekeying
            dropSpecific=cms.bool(True),  # Save space
        ),
        process,
        task)

    #add AK8 CHS
    addJetCollection(
        process,
        postfix=postfix,
        labelName='AK8',
        jetSource=cms.InputTag('ak8PFJetsCHS' + postfix),
        algo='AK',
        rParam=0.8,
        btagDiscriminators=['None'],
        jetCorrections=('AK8PFchs',
                        cms.vstring(['L1FastJet', 'L2Relative',
                                     'L3Absolute']), 'None'),
        genJetCollection=cms.InputTag('slimmedGenJetsAK8'))
    getattr(process, "patJetsAK8" + postfix).userData.userFloats.src = [
    ]  # start with empty list of user floats
    getattr(process, "selectedPatJetsAK8").cut = cms.string("pt > 170")

    ## add AK8 groomed masses with CHS
    from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsCHSPruned, ak8PFJetsCHSSoftDrop
    addToProcessAndTask('ak8PFJetsCHSPruned' + postfix,
                        ak8PFJetsCHSPruned.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSSoftDrop' + postfix,
                        ak8PFJetsCHSSoftDrop.clone(), process, task)
    from RecoJets.JetProducers.ak8PFJetsCHS_groomingValueMaps_cfi import ak8PFJetsCHSPrunedMass, ak8PFJetsCHSTrimmedMass, ak8PFJetsCHSFilteredMass, ak8PFJetsCHSSoftDropMass
    addToProcessAndTask('ak8PFJetsCHSPrunedMass' + postfix,
                        ak8PFJetsCHSPrunedMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSTrimmedMass' + postfix,
                        ak8PFJetsCHSTrimmedMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSFilteredMass' + postfix,
                        ak8PFJetsCHSFilteredMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSSoftDropMass' + postfix,
                        ak8PFJetsCHSSoftDropMass.clone(), process, task)

    getattr(process, "patJetsAK8").userData.userFloats.src += [
        'ak8PFJetsCHSPrunedMass' + postfix,
        'ak8PFJetsCHSSoftDropMass' + postfix
    ]
    getattr(process, "patJetsAK8").addTagInfos = cms.bool(False)

    # add Njetiness for CHS
    process.load('RecoJets.JetProducers.nJettinessAdder_cfi')
    task.add(process.Njettiness)
    addToProcessAndTask('NjettinessAK8' + postfix, process.Njettiness.clone(),
                        process, task)
    getattr(process,
            "NjettinessAK8").src = cms.InputTag("ak8PFJetsCHS" + postfix)
    getattr(process, "NjettinessAK8").cone = cms.double(0.8)
    getattr(process, "patJetsAK8").userData.userFloats.src += [
        'NjettinessAK8' + postfix + ':tau1',
        'NjettinessAK8' + postfix + ':tau2',
        'NjettinessAK8' + postfix + ':tau3',
        'NjettinessAK8' + postfix + ':tau4'
    ]

    # add Njetiness from CHS
    addToProcessAndTask('NjettinessAK8Subjets' + postfix,
                        process.Njettiness.clone(), process, task)
    getattr(process, "NjettinessAK8Subjets" + postfix).src = cms.InputTag(
        "ak8PFJetsPuppiSoftDrop" + postfix, "SubJets")
    getattr(process, "NjettinessAK8Subjets").cone = cms.double(0.8)

    ## PATify CHS soft drop fat jets
    addJetCollection(
        process,
        postfix=postfix,
        labelName='AK8PFCHSSoftDrop',
        jetSource=cms.InputTag('ak8PFJetsCHSSoftDrop' + postfix),
        btagDiscriminators=['None'],
        jetCorrections=('AK8PFchs', ['L1FastJet', 'L2Relative',
                                     'L3Absolute'], 'None'),
        getJetMCFlavour=False  # jet flavor disabled
    )

    #add RECO AK8 from PUPPI and RECO AK8 PUPPI with soft drop... will be needed by ungroomed AK8 jets later
    ## PATify puppi soft drop fat jets
    addJetCollection(
        process,
        postfix=postfix,
        labelName='AK8PFPuppiSoftDrop' + postfix,
        jetSource=cms.InputTag('ak8PFJetsPuppiSoftDrop' + postfix),
        btagDiscriminators=['None'],
        genJetCollection=cms.InputTag('slimmedGenJetsAK8'),
        jetCorrections=('AK8PFPuppi', ['L2Relative', 'L3Absolute'], 'None'),
        getJetMCFlavour=False  # jet flavor disabled
    )
    ## PATify soft drop subjets
    addJetCollection(
        process,
        postfix=postfix,
        labelName='AK8PFPuppiSoftDropSubjets',
        jetSource=cms.InputTag('ak8PFJetsPuppiSoftDrop' + postfix, 'SubJets'),
        algo='ak',  # needed for subjet flavor clustering
        rParam=0.8,  # needed for subjet flavor clustering
        btagDiscriminators=[
            'pfDeepCSVJetTags:probb', 'pfDeepCSVJetTags:probbb',
            'pfCombinedInclusiveSecondaryVertexV2BJetTags',
            'pfCombinedMVAV2BJetTags'
        ],
        jetCorrections=('AK4PFPuppi', ['L2Relative', 'L3Absolute'], 'None'),
        explicitJTA=True,  # needed for subjet b tagging
        svClustering=True,  # needed for subjet b tagging
        genJetCollection=cms.InputTag('slimmedGenJetsAK8SoftDropSubJets'),
        fatJets=cms.InputTag(
            'ak8PFJetsPuppi'),  # needed for subjet flavor clustering
        groomedFatJets=cms.InputTag(
            'ak8PFJetsPuppiSoftDrop')  # needed for subjet flavor clustering
    )

    # add groomed ECFs and N-subjettiness to soft dropped pat::Jets for fat jets and subjets
    process.load('RecoJets.JetProducers.ECF_cff')
    addToProcessAndTask(
        'nb1AK8PuppiSoftDrop' + postfix,
        process.ecfNbeta1.clone(
            src=cms.InputTag("ak8PFJetsPuppiSoftDrop" + postfix),
            cuts=cms.vstring('', '', 'pt > 250')), process, task)
    addToProcessAndTask(
        'nb2AK8PuppiSoftDrop' + postfix,
        process.ecfNbeta2.clone(
            src=cms.InputTag("ak8PFJetsPuppiSoftDrop" + postfix),
            cuts=cms.vstring('', '', 'pt > 250')), process, task)

    #too slow now ==> disable
    from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
    pp_on_XeXe_2017.toModify(
        getattr(process, 'nb1AK8PuppiSoftDrop' + postfix),
        cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    pp_on_XeXe_2017.toModify(
        getattr(process, 'nb2AK8PuppiSoftDrop' + postfix),
        cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
    phase2_common.toModify(getattr(process, 'nb1AK8PuppiSoftDrop' + postfix),
                           cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    phase2_common.toModify(getattr(process, 'nb2AK8PuppiSoftDrop' + postfix),
                           cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])

    getattr(process, "patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
        'nb1AK8PuppiSoftDrop' + postfix + ':ecfN2',
        'nb1AK8PuppiSoftDrop' + postfix + ':ecfN3'
    ]
    getattr(process, "patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += [
        'nb2AK8PuppiSoftDrop' + postfix + ':ecfN2',
        'nb2AK8PuppiSoftDrop' + postfix + ':ecfN3'
    ]
    addToProcessAndTask(
        'nb1AK8PuppiSoftDropSubjets' + postfix,
        process.ecfNbeta1.clone(
            src=cms.InputTag("ak8PFJetsPuppiSoftDrop" + postfix, "SubJets")),
        process, task)
    addToProcessAndTask(
        'nb2AK8PuppiSoftDropSubjets' + postfix,
        process.ecfNbeta2.clone(
            src=cms.InputTag("ak8PFJetsPuppiSoftDrop" + postfix, "SubJets")),
        process, task)
    getattr(process, "patJetsAK8PFPuppiSoftDropSubjets" +
            postfix).userData.userFloats.src += [
                'nb1AK8PuppiSoftDropSubjets' + postfix + ':ecfN2',
                'nb1AK8PuppiSoftDropSubjets' + postfix + ':ecfN3'
            ]
    getattr(process, "patJetsAK8PFPuppiSoftDropSubjets" +
            postfix).userData.userFloats.src += [
                'nb2AK8PuppiSoftDropSubjets' + postfix + ':ecfN2',
                'nb2AK8PuppiSoftDropSubjets' + postfix + ':ecfN3'
            ]
    getattr(process, "patJetsAK8PFPuppiSoftDropSubjets" +
            postfix).userData.userFloats.src += [
                'NjettinessAK8Subjets' + postfix + ':tau1',
                'NjettinessAK8Subjets' + postfix + ':tau2',
                'NjettinessAK8Subjets' + postfix + ':tau3',
                'NjettinessAK8Subjets' + postfix + ':tau4'
            ]

    pp_on_XeXe_2017.toModify(
        getattr(process, 'nb1AK8PuppiSoftDropSubjets' + postfix),
        cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    pp_on_XeXe_2017.toModify(
        getattr(process, 'nb2AK8PuppiSoftDropSubjets' + postfix),
        cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    phase2_common.toModify(getattr(process,
                                   'nb1AK8PuppiSoftDropSubjets' + postfix),
                           cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])
    phase2_common.toModify(getattr(process,
                                   'nb2AK8PuppiSoftDropSubjets' + postfix),
                           cuts=['pt > 999999', 'pt > 999999', 'pt > 999999'])

    # rekey the groomed ECF value maps to the ungroomed reco jets, which will then be picked
    # up by PAT in the user floats.
    addToProcessAndTask(
        "ak8PFJetsPuppiSoftDropValueMap" + postfix,
        cms.EDProducer(
            "RecoJetToPatJetDeltaRValueMapProducer",
            src=cms.InputTag("ak8PFJetsPuppi" + postfix),
            matched=cms.InputTag("patJetsAK8PFPuppiSoftDrop" + postfix),
            distMax=cms.double(0.8),
            values=cms.vstring([
                'userFloat("nb1AK8PuppiSoftDrop' + postfix + ':ecfN2")',
                'userFloat("nb1AK8PuppiSoftDrop' + postfix + ':ecfN3")',
                'userFloat("nb2AK8PuppiSoftDrop' + postfix + ':ecfN2")',
                'userFloat("nb2AK8PuppiSoftDrop' + postfix + ':ecfN3")',
            ]),
            valueLabels=cms.vstring([
                'nb1AK8PuppiSoftDropN2',
                'nb1AK8PuppiSoftDropN3',
                'nb2AK8PuppiSoftDropN2',
                'nb2AK8PuppiSoftDropN3',
            ])), process, task)

    # Patify AK8 PF PUPPI
    addJetCollection(process,
                     postfix=postfix,
                     labelName='AK8Puppi',
                     jetSource=cms.InputTag('ak8PFJetsPuppi' + postfix),
                     algo='AK',
                     rParam=0.8,
                     jetCorrections=('AK8PFPuppi',
                                     cms.vstring(['L2Relative',
                                                  'L3Absolute']), 'None'),
                     btagDiscriminators=([
                         'pfCombinedSecondaryVertexV2BJetTags',
                         'pfCombinedInclusiveSecondaryVertexV2BJetTags',
                         'pfCombinedMVAV2BJetTags', 'pfDeepCSVJetTags:probb',
                         'pfDeepCSVJetTags:probc', 'pfDeepCSVJetTags:probudsg',
                         'pfDeepCSVJetTags:probbb',
                         'pfBoostedDoubleSecondaryVertexAK8BJetTags'
                     ]),
                     genJetCollection=cms.InputTag('slimmedGenJetsAK8'))
    getattr(process, "patJetsAK8Puppi" + postfix).userData.userFloats.src = [
    ]  # start with empty list of user floats
    getattr(process,
            "selectedPatJetsAK8Puppi" + postfix).cut = cms.string("pt > 100")
    getattr(process, "selectedPatJetsAK8Puppi" +
            postfix).cutLoose = cms.string("pt > 30")
    getattr(process,
            "selectedPatJetsAK8Puppi" + postfix).nLoose = cms.uint32(3)

    from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX
    addToProcessAndTask(
        'ak8PFJetsPuppiTracksAssociatorAtVertex' + postfix,
        cms.EDProducer("JetTracksAssociatorAtVertex",
                       j2tParametersVX.clone(coneSize=cms.double(0.8)),
                       jets=cms.InputTag("ak8PFJetsPuppi")), process, task)
    addToProcessAndTask(
        'patJetAK8PuppiCharge' + postfix,
        cms.EDProducer(
            "JetChargeProducer",
            src=cms.InputTag("ak8PFJetsPuppiTracksAssociatorAtVertex"),
            var=cms.string('Pt'),
            exp=cms.double(1.0)), process, task)

    ## now add AK8 groomed masses and ECF
    from RecoJets.JetProducers.ak8PFJetsPuppi_groomingValueMaps_cfi import ak8PFJetsPuppiSoftDropMass
    addToProcessAndTask('ak8PFJetsPuppiSoftDropMass' + postfix,
                        ak8PFJetsPuppiSoftDropMass.clone(), process, task)
    getattr(process, "patJetsAK8Puppi" + postfix).userData.userFloats.src += [
        'ak8PFJetsPuppiSoftDropMass' + postfix
    ]
    getattr(process, "patJetsAK8Puppi" + postfix).addTagInfos = cms.bool(False)
    getattr(process, "patJetsAK8Puppi" + postfix).userData.userFloats.src += [
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap' + postfix,
                     'nb1AK8PuppiSoftDropN2'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap' + postfix,
                     'nb1AK8PuppiSoftDropN3'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap' + postfix,
                     'nb2AK8PuppiSoftDropN2'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap' + postfix,
                     'nb2AK8PuppiSoftDropN3'),
    ]

    # add PUPPI Njetiness
    addToProcessAndTask('NjettinessAK8Puppi' + postfix,
                        process.Njettiness.clone(), process, task)
    getattr(process, "NjettinessAK8Puppi" +
            postfix).src = cms.InputTag("ak8PFJetsPuppi" + postfix)
    getattr(process, "NjettinessAK8Puppi").cone = cms.double(0.8)
    getattr(process, "patJetsAK8Puppi").userData.userFloats.src += [
        'NjettinessAK8Puppi' + postfix + ':tau1',
        'NjettinessAK8Puppi' + postfix + ':tau2',
        'NjettinessAK8Puppi' + postfix + ':tau3',
        'NjettinessAK8Puppi' + postfix + ':tau4'
    ]

    # Now combine the CHS and PUPPI information into the PUPPI jets via delta R value maps
    addToProcessAndTask(
        "ak8PFJetsCHSValueMap" + postfix,
        cms.EDProducer(
            "RecoJetToPatJetDeltaRValueMapProducer",
            src=cms.InputTag("ak8PFJetsPuppi" + postfix),
            matched=cms.InputTag("patJetsAK8" + postfix),
            distMax=cms.double(0.8),
            values=cms.vstring([
                'userFloat("ak8PFJetsCHSPrunedMass"' + postfix + ')',
                'userFloat("ak8PFJetsCHSSoftDropMass"' + postfix + ')',
                'userFloat("NjettinessAK8' + postfix + ':tau1")',
                'userFloat("NjettinessAK8' + postfix + ':tau2")',
                'userFloat("NjettinessAK8' + postfix + ':tau3")',
                'userFloat("NjettinessAK8' + postfix + ':tau4")', 'pt', 'eta',
                'phi', 'mass'
            ]),
            valueLabels=cms.vstring([
                'ak8PFJetsCHSPrunedMass', 'ak8PFJetsCHSSoftDropMass',
                'NjettinessAK8CHSTau1', 'NjettinessAK8CHSTau2',
                'NjettinessAK8CHSTau3', 'NjettinessAK8CHSTau4', 'pt', 'eta',
                'phi', 'mass'
            ])), process, task)

    # Now set up the user floats
    getattr(process, "patJetsAK8Puppi" + postfix).userData.userFloats.src += [
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix,
                     'ak8PFJetsCHSPrunedMass'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix,
                     'ak8PFJetsCHSSoftDropMass'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'NjettinessAK8CHSTau1'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'NjettinessAK8CHSTau2'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'NjettinessAK8CHSTau3'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'NjettinessAK8CHSTau4'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'pt'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'eta'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'phi'),
        cms.InputTag('ak8PFJetsCHSValueMap' + postfix, 'mass'),
    ]

    addToProcessAndTask(
        "slimmedJetsAK8PFPuppiSoftDropSubjets" + postfix,
        cms.EDProducer(
            "PATJetSlimmer",
            src=cms.InputTag("selectedPatJetsAK8PFPuppiSoftDropSubjets"),
            packedPFCandidates=cms.InputTag("packedPFCandidates"),
            dropJetVars=cms.string("1"),
            dropDaughters=cms.string("0"),
            rekeyDaughters=cms.string("1"),
            dropTrackRefs=cms.string("1"),
            dropSpecific=cms.string("1"),
            dropTagInfos=cms.string("1"),
            modifyJets=cms.bool(True),
            mixedDaughters=cms.bool(False),
            modifierConfig=cms.PSet(modifications=cms.VPSet())), process, task)

    ## Establish references between PATified fat jets and subjets using the BoostedJetMerger
    addToProcessAndTask(
        "slimmedJetsAK8PFPuppiSoftDropPacked" + postfix,
        cms.EDProducer(
            "BoostedJetMerger",
            jetSrc=cms.InputTag("selectedPatJetsAK8PFPuppiSoftDrop"),
            subjetSrc=cms.InputTag("slimmedJetsAK8PFPuppiSoftDropSubjets")),
        process, task)

    addToProcessAndTask(
        "packedPatJetsAK8" + postfix,
        cms.EDProducer(
            "JetSubstructurePacker",
            jetSrc=cms.InputTag("selectedPatJetsAK8Puppi" + postfix),
            distMax=cms.double(0.8),
            algoTags=cms.VInputTag(
                cms.InputTag("slimmedJetsAK8PFPuppiSoftDropPacked" + postfix)),
            algoLabels=cms.vstring('SoftDropPuppi'),
            fixDaughters=cms.bool(True),
            packedPFCandidates=cms.InputTag("packedPFCandidates" + postfix),
        ), process, task)

    # switch off daughter re-keying since it's done in the JetSubstructurePacker (and can't be done afterwards)
    process.slimmedJetsAK8.rekeyDaughters = "0"
    # Reconfigure the slimmedAK8 jet information to keep
    process.slimmedJetsAK8.dropDaughters = cms.string("pt < 170")
    process.slimmedJetsAK8.dropSpecific = cms.string("pt < 170")
    process.slimmedJetsAK8.dropTagInfos = cms.string("pt < 170")
Beispiel #24
0
                            reUseCentrality = cms.bool(False),
                            
                            srcHFhits = cms.InputTag("hfreco"),
                            srcTowers = cms.InputTag("towerMaker"),
                            srcEBhits = cms.InputTag("ecalRecHit","EcalRecHitsEB"),
                            srcEEhits = cms.InputTag("ecalRecHit","EcalRecHitsEE"),
                            srcZDChits = cms.InputTag("zdcreco"),
                            srcPixelhits = cms.InputTag("siPixelRecHits"),
                            srcTracks = cms.InputTag("hiGeneralTracks"),
                            srcVertex= cms.InputTag("hiSelectedVertex"),
                            srcReUse = cms.InputTag("hiCentrality"),
                            srcPixelTracks = cms.InputTag("hiPixel3PrimTracks"),

                            doPixelCut = cms.bool(True),
                            UseQuality = cms.bool(True),
                            TrackQuality = cms.string('highPurity'),
                            trackEtaCut = cms.double(2),
                            trackPtCut = cms.double(1),
                            hfEtaCut = cms.double(4), #hf above the absolute value of this cut is used
                            midRapidityRange = cms.double(1),
                           lowGainZDC = cms.bool(True),

                            )

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(hiCentrality,
                         producePixelTracks = False,
                         srcTracks = cms.InputTag("generalTracks"),
                         srcVertex = cms.InputTag("offlinePrimaryVertices")
                         )
Beispiel #25
0
from RecoTracker.TkSeedGenerator.trackerClusterCheckDefault_cfi import trackerClusterCheckDefault as _trackerClusterCheckDefault
trackerClusterCheck = _trackerClusterCheckDefault.clone()

from Configuration.Eras.Modifier_phase1Pixel_cff import phase1Pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
# Disable too many clusters check until we have an updated cut string for phase1 and phase2
phase1Pixel.toModify(trackerClusterCheck, doClusterCheck=False)  # FIXME
phase2_tracker.toModify(trackerClusterCheck, doClusterCheck=False)  # FIXME

from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
peripheralPbPb.toModify(
    trackerClusterCheck,
    doClusterCheck=True,  #FIXMETOO
    cut=
    "strip < 400000 && pixel < 40000 && (strip < 60000 + 7.0*pixel) && (pixel < 8000 + 0.14*strip)"
)
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(
    trackerClusterCheck,
    doClusterCheck=True,  #FIXMETOO
    cut=
    "strip < 1000000 && pixel < 100000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)",
    MaxNumberOfPixelClusters=100000)
candidateVertexMergerCvsL = candidateVertexMerger.clone(
   secondaryVertices = "inclusiveCandidateVertexFinderCvsL"
)

candidateVertexArbitratorCvsL = candidateVertexArbitrator.clone(
   secondaryVertices = cms.InputTag("candidateVertexMergerCvsL")
)

inclusiveCandidateSecondaryVerticesCvsL = candidateVertexMerger.clone(
   secondaryVertices = "candidateVertexArbitratorCvsL",
   maxFraction = 0.2,
   minSignificance = 10.
)

inclusiveCandidateVertexingCvsLTask = cms.Task(inclusiveCandidateVertexFinderCvsL,
                                               candidateVertexMergerCvsL,
                                               candidateVertexArbitratorCvsL,
                                               inclusiveCandidateSecondaryVerticesCvsL)
inclusiveCandidateVertexingCvsL = cms.Sequence(inclusiveCandidateVertexingCvsLTask)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(inclusiveVertexFinder, minHits = 10, minPt = 1.0)
pp_on_XeXe_2017.toModify(inclusiveCandidateVertexFinder, minHits = 10, minPt = 1.0)
pp_on_XeXe_2017.toModify(inclusiveCandidateVertexFinderCvsL, minHits = 10, minPt = 1.0)
from Configuration.Eras.Modifier_pp_on_AA_2018_cff import pp_on_AA_2018
pp_on_AA_2018.toModify(inclusiveVertexFinder, minHits = 999, minPt = 999.0)
pp_on_AA_2018.toModify(inclusiveCandidateVertexFinder, minHits = 999, minPt = 999.0)
pp_on_AA_2018.toModify(inclusiveCandidateVertexFinderCvsL, minHits = 999, minPt = 999.0)


Beispiel #27
0
            useErrorsFromParam=cms.bool(True),
            skipClusters=cms.InputTag('convClusters'),
        )))

photonConvTrajSeedFromSingleLeg.TrackRefitter = cms.InputTag('generalTracks')
photonConvTrajSeedFromSingleLeg.primaryVerticesTag = cms.InputTag(
    'firstStepPrimaryVertices')
#photonConvTrajSeedFromQuadruplets.TrackRefitter = cms.InputTag('generalTracks')
#photonConvTrajSeedFromQuadruplets.primaryVerticesTag = cms.InputTag('pixelVertices')
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg,
                       primaryVerticesTag="pixelVertices")

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(
    photonConvTrajSeedFromSingleLeg,
    RegionFactoryPSet=dict(
        RegionPSet=dict(ptMin=999999.0, originRadius=0, originHalfLength=0)))

# TRACKER DATA CONTROL

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    maxLostHits=1, minimumNumberOfHits=3, minPt=0.1)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
convStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName=cms.string('convStepChi2Est'),
    nSigma=cms.double(3.0),
    MaxChi2=cms.double(30.0),
    MaxDisplacement=cms.double(100),
Beispiel #28
0
)


# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
_lowPtQuadStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 3,
    minPt = 0.075,
)
lowPtQuadStepTrajectoryFilterBase = _lowPtQuadStepTrajectoryFilterBase.clone(
    maxCCCLostHits = 0,
    minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
)
trackingPhase2PU140.toReplaceWith(lowPtQuadStepTrajectoryFilterBase, _lowPtQuadStepTrajectoryFilterBase)

pp_on_XeXe_2017.toModify(lowPtQuadStepTrajectoryFilterBase, minPt=0.3)

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import *
# Composite filter
lowPtQuadStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters = [cms.PSet(refToPSet_ = cms.string('lowPtQuadStepTrajectoryFilterBase'))]
)
trackingPhase2PU140.toModify(lowPtQuadStepTrajectoryFilter,
    filters = lowPtQuadStepTrajectoryFilter.filters.value() + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
lowPtQuadStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName = 'lowPtQuadStepChi2Est',
    nSigma = 3.0,
    MaxChi2 = 9.0,
Beispiel #29
0
_fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(pixelLessStepHitTriplets)
_fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory.refitHits = False
fastSim.toReplaceWith(pixelLessStepSeeds,_fastSim_pixelLessStepSeeds)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_pixelLessStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    maxLostHits = 0,
    minimumNumberOfHits = 4,
    minPt = 0.1
    )
pixelLessStepTrajectoryFilter = _pixelLessStepTrajectoryFilterBase.clone(
    seedPairPenalty = 1,
)
trackingLowPU.toReplaceWith(pixelLessStepTrajectoryFilter, _pixelLessStepTrajectoryFilterBase)
pp_on_XeXe_2017.toModify(pixelLessStepTrajectoryFilter, minPt=2.0)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
pixelLessStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName = cms.string('pixelLessStepChi2Est'),
    nSigma = cms.double(3.0),
    MaxChi2 = cms.double(16.0),
    clusterChargeCut = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutTight'))
)
trackingLowPU.toModify(pixelLessStepChi2Est,
    clusterChargeCut = dict(refToPSet_ = 'SiStripClusterChargeCutTiny')
)

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
pixelLessStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
Beispiel #30
0
trackingLowPU.toReplaceWith(
    tobTecStepSeeds,
    _seedCreatorFromRegionConsecutiveHitsEDProducer.clone(
        seedingHitSets="tobTecStepHitDoubletsPair", ))

# QUALITY CUTS DURING TRACK BUILDING (for inwardss and outwards track building steps)
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff

_tobTecStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    maxLostHits=0, minimumNumberOfHits=5, minPt=0.1, minHitsMinPt=3)
tobTecStepTrajectoryFilter = _tobTecStepTrajectoryFilterBase.clone(
    seedPairPenalty=1, )
trackingLowPU.toReplaceWith(
    tobTecStepTrajectoryFilter,
    _tobTecStepTrajectoryFilterBase.clone(minimumNumberOfHits=6, ))
pp_on_XeXe_2017.toModify(tobTecStepTrajectoryFilter, minPt=2.0)

tobTecStepInOutTrajectoryFilter = tobTecStepTrajectoryFilter.clone(
    minimumNumberOfHits=4, )

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi

tobTecStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName=cms.string('tobTecStepChi2Est'),
    nSigma=cms.double(3.0),
    MaxChi2=cms.double(16.0),
    clusterChargeCut=cms.PSet(
        refToPSet_=cms.string('SiStripClusterChargeCutTight')))
trackingLowPU.toModify(
    tobTecStepChi2Est,
    clusterChargeCut=dict(refToPSet_='SiStripClusterChargeCutTiny'))
Beispiel #31
0
def applySubstructure( process, postfix="" ) :

    task = getPatAlgosToolsTask(process)

    from PhysicsTools.PatAlgos.tools.jetTools import addJetCollection


    from PhysicsTools.PatAlgos.producersLayer1.jetProducer_cfi import _patJets as patJetsDefault


    # Configure the RECO jets
    from RecoJets.JetProducers.ak4PFJets_cfi import ak4PFJetsPuppi
    from RecoJets.JetProducers.ak8PFJets_cfi import ak8PFJetsPuppi, ak8PFJetsPuppiSoftDrop, ak8PFJetsPuppiConstituents, ak8PFJetsCHSConstituents
    from RecoJets.JetProducers.ak8GenJets_cfi import ak8GenJets, ak8GenJetsSoftDrop, ak8GenJetsConstituents
    addToProcessAndTask('ak4PFJetsPuppi'+postfix,ak4PFJetsPuppi.clone(), process, task)
    addToProcessAndTask('ak8PFJetsPuppi'+postfix,ak8PFJetsPuppi.clone(), process, task)
    addToProcessAndTask('ak8PFJetsPuppiConstituents', ak8PFJetsPuppiConstituents.clone(cut = cms.string('pt > 170.0 && abs(rapidity()) < 2.4') ), process, task )
    addToProcessAndTask('ak8PFJetsCHSConstituents', ak8PFJetsCHSConstituents.clone(), process, task )
    addToProcessAndTask('ak8PFJetsPuppiSoftDrop'+postfix, ak8PFJetsPuppiSoftDrop.clone( src = cms.InputTag('ak8PFJetsPuppiConstituents', 'constituents') ), process, task)
    addToProcessAndTask('ak8GenJetsNoNuConstituents'+postfix, ak8GenJetsConstituents.clone(src='ak8GenJetsNoNu'), process, task )
    addToProcessAndTask('ak8GenJetsNoNuSoftDrop'+postfix,ak8GenJetsSoftDrop.clone(src=cms.InputTag('ak8GenJetsNoNuConstituents'+postfix, 'constituents')),process,task)
    addToProcessAndTask('slimmedGenJetsAK8SoftDropSubJets'+postfix,
                            cms.EDProducer("PATGenJetSlimmer",
                                               src = cms.InputTag("ak8GenJetsNoNuSoftDrop"+postfix, "SubJets"),
                                               packedGenParticles = cms.InputTag("packedGenParticles"),
                                               cut = cms.string(""),
                                               cutLoose = cms.string(""),
                                               nLoose = cms.uint32(0),
                                               clearDaughters = cms.bool(False), #False means rekeying
                                               dropSpecific = cms.bool(True),  # Save space
                                               ), process, task )
    
    
    #add AK8 CHS
    addJetCollection(process, postfix=postfix, labelName = 'AK8',
                     jetSource = cms.InputTag('ak8PFJetsCHS'+postfix),
                     algo= 'AK', rParam = 0.8,
                     btagDiscriminators = ['None'],
                     jetCorrections = ('AK8PFchs', cms.vstring(['L1FastJet', 'L2Relative', 'L3Absolute']), 'None'),
                     genJetCollection = cms.InputTag('slimmedGenJetsAK8')
                     )
    getattr(process,"patJetsAK8"+postfix).userData.userFloats.src = [] # start with empty list of user floats
    getattr(process,"selectedPatJetsAK8").cut = cms.string("pt > 170")


    ## add AK8 groomed masses with CHS
    from RecoJets.Configuration.RecoPFJets_cff import ak8PFJetsCHSPruned, ak8PFJetsCHSSoftDrop
    addToProcessAndTask('ak8PFJetsCHSPruned'+postfix, ak8PFJetsCHSPruned.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSSoftDrop'+postfix, ak8PFJetsCHSSoftDrop.clone(), process, task)
    from RecoJets.JetProducers.ak8PFJetsCHS_groomingValueMaps_cfi import ak8PFJetsCHSPrunedMass, ak8PFJetsCHSTrimmedMass, ak8PFJetsCHSFilteredMass, ak8PFJetsCHSSoftDropMass
    addToProcessAndTask('ak8PFJetsCHSPrunedMass'+postfix, ak8PFJetsCHSPrunedMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSTrimmedMass'+postfix, ak8PFJetsCHSTrimmedMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSFilteredMass'+postfix, ak8PFJetsCHSFilteredMass.clone(), process, task)
    addToProcessAndTask('ak8PFJetsCHSSoftDropMass'+postfix, ak8PFJetsCHSSoftDropMass.clone(), process, task)

    getattr(process,"patJetsAK8").userData.userFloats.src += ['ak8PFJetsCHSPrunedMass'+postfix,'ak8PFJetsCHSSoftDropMass'+postfix]  
    getattr(process,"patJetsAK8").addTagInfos = cms.bool(False)

    # add Njetiness for CHS
    process.load('RecoJets.JetProducers.nJettinessAdder_cfi')
    task.add(process.Njettiness)
    addToProcessAndTask('NjettinessAK8'+postfix, process.Njettiness.clone(), process, task)
    getattr(process,"NjettinessAK8").src = cms.InputTag("ak8PFJetsCHS"+postfix)
    getattr(process,"NjettinessAK8").cone = cms.double(0.8)
    getattr(process,"patJetsAK8").userData.userFloats.src += ['NjettinessAK8'+postfix+':tau1','NjettinessAK8'+postfix+':tau2','NjettinessAK8'+postfix+':tau3','NjettinessAK8'+postfix+':tau4']

    # add Njetiness from CHS
    addToProcessAndTask('NjettinessAK8Subjets'+postfix, process.Njettiness.clone(), process, task)
    getattr(process,"NjettinessAK8Subjets"+postfix).src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets")
    getattr(process,"NjettinessAK8Subjets").cone = cms.double(0.8)
        
    ## PATify CHS soft drop fat jets
    addJetCollection(
        process,
        postfix=postfix,
        labelName = 'AK8PFCHSSoftDrop',
        jetSource = cms.InputTag('ak8PFJetsCHSSoftDrop'+postfix),
        btagDiscriminators = ['None'],
        jetCorrections = ('AK8PFchs', ['L1FastJet', 'L2Relative', 'L3Absolute'], 'None'),
        getJetMCFlavour = False # jet flavor disabled
    )





    #add RECO AK8 from PUPPI and RECO AK8 PUPPI with soft drop... will be needed by ungroomed AK8 jets later
    ## PATify puppi soft drop fat jets
    addJetCollection(
        process,
        postfix=postfix,
        labelName = 'AK8PFPuppiSoftDrop' + postfix,
        jetSource = cms.InputTag('ak8PFJetsPuppiSoftDrop'+postfix),
        btagDiscriminators = ['None'],
        genJetCollection = cms.InputTag('slimmedGenJetsAK8'), 
        jetCorrections = ('AK8PFPuppi', ['L2Relative', 'L3Absolute'], 'None'),
        getJetMCFlavour = False # jet flavor disabled
    )
    ## PATify soft drop subjets
    addJetCollection(
        process,
        postfix=postfix,
        labelName = 'AK8PFPuppiSoftDropSubjets',
        jetSource = cms.InputTag('ak8PFJetsPuppiSoftDrop'+postfix,'SubJets'),
        algo = 'ak',  # needed for subjet flavor clustering
        rParam = 0.8, # needed for subjet flavor clustering
        btagDiscriminators = ['pfDeepCSVJetTags:probb', 'pfDeepCSVJetTags:probbb', 'pfCombinedInclusiveSecondaryVertexV2BJetTags','pfCombinedMVAV2BJetTags'],
        jetCorrections = ('AK4PFPuppi', ['L2Relative', 'L3Absolute'], 'None'),
        explicitJTA = True,  # needed for subjet b tagging
        svClustering = True, # needed for subjet b tagging
        genJetCollection = cms.InputTag('slimmedGenJetsAK8SoftDropSubJets'), 
        fatJets=cms.InputTag('ak8PFJetsPuppi'),             # needed for subjet flavor clustering
        groomedFatJets=cms.InputTag('ak8PFJetsPuppiSoftDrop') # needed for subjet flavor clustering
    )


    # add groomed ECFs and N-subjettiness to soft dropped pat::Jets for fat jets and subjets
    process.load('RecoJets.JetProducers.ECF_cff')
    addToProcessAndTask('nb1AK8PuppiSoftDrop'+postfix, process.ecfNbeta1.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring('', '', 'pt > 250')), process, task)
    addToProcessAndTask('nb2AK8PuppiSoftDrop'+postfix, process.ecfNbeta2.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix), cuts = cms.vstring('', '', 'pt > 250')), process, task)

    #too slow now ==> disable
    from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
    pp_on_XeXe_2017.toModify(getattr(process,'nb1AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    pp_on_XeXe_2017.toModify(getattr(process,'nb2AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    from Configuration.Eras.Modifier_phase2_common_cff import phase2_common
    phase2_common.toModify(getattr(process,'nb1AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    phase2_common.toModify(getattr(process,'nb2AK8PuppiSoftDrop'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )

    getattr(process,"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += ['nb1AK8PuppiSoftDrop'+postfix+':ecfN2','nb1AK8PuppiSoftDrop'+postfix+':ecfN3']
    getattr(process,"patJetsAK8PFPuppiSoftDrop").userData.userFloats.src += ['nb2AK8PuppiSoftDrop'+postfix+':ecfN2','nb2AK8PuppiSoftDrop'+postfix+':ecfN3']
    addToProcessAndTask('nb1AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta1.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets")), process, task)
    addToProcessAndTask('nb2AK8PuppiSoftDropSubjets'+postfix, process.ecfNbeta2.clone(src = cms.InputTag("ak8PFJetsPuppiSoftDrop"+postfix, "SubJets")), process, task)
    getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['nb1AK8PuppiSoftDropSubjets'+postfix+':ecfN2','nb1AK8PuppiSoftDropSubjets'+postfix+':ecfN3']
    getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['nb2AK8PuppiSoftDropSubjets'+postfix+':ecfN2','nb2AK8PuppiSoftDropSubjets'+postfix+':ecfN3']
    getattr(process,"patJetsAK8PFPuppiSoftDropSubjets"+postfix).userData.userFloats.src += ['NjettinessAK8Subjets'+postfix+':tau1','NjettinessAK8Subjets'+postfix+':tau2','NjettinessAK8Subjets'+postfix+':tau3','NjettinessAK8Subjets'+postfix+':tau4']

    pp_on_XeXe_2017.toModify(getattr(process,'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    pp_on_XeXe_2017.toModify(getattr(process,'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    phase2_common.toModify(getattr(process,'nb1AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )
    phase2_common.toModify(getattr(process,'nb2AK8PuppiSoftDropSubjets'+postfix), cuts = ['pt > 999999', 'pt > 999999', 'pt > 999999'] )

    # rekey the groomed ECF value maps to the ungroomed reco jets, which will then be picked
    # up by PAT in the user floats. 
    addToProcessAndTask("ak8PFJetsPuppiSoftDropValueMap"+postfix, 
                        cms.EDProducer("RecoJetToPatJetDeltaRValueMapProducer",
                                       src = cms.InputTag("ak8PFJetsPuppi"+postfix),
                                       matched = cms.InputTag("patJetsAK8PFPuppiSoftDrop"+postfix),
                                       distMax = cms.double(0.8),
                                       values = cms.vstring([
                    'userFloat("nb1AK8PuppiSoftDrop'+postfix+':ecfN2")',
                    'userFloat("nb1AK8PuppiSoftDrop'+postfix+':ecfN3")',
                    'userFloat("nb2AK8PuppiSoftDrop'+postfix+':ecfN2")',
                    'userFloat("nb2AK8PuppiSoftDrop'+postfix+':ecfN3")',
                    ]),
                                       valueLabels = cms.vstring( [
                    'nb1AK8PuppiSoftDropN2',
                    'nb1AK8PuppiSoftDropN3',
                    'nb2AK8PuppiSoftDropN2',
                    'nb2AK8PuppiSoftDropN3',
                    ]) ),
                    process, task)

        
    # Patify AK8 PF PUPPI
    addJetCollection(process, postfix=postfix, labelName = 'AK8Puppi',
                     jetSource = cms.InputTag('ak8PFJetsPuppi'+postfix),
                     algo= 'AK', rParam = 0.8,
                     jetCorrections = ('AK8PFPuppi', cms.vstring(['L2Relative', 'L3Absolute']), 'None'),
                     btagDiscriminators = ([
                         'pfCombinedSecondaryVertexV2BJetTags',
                         'pfCombinedInclusiveSecondaryVertexV2BJetTags',
                         'pfCombinedMVAV2BJetTags',
                         'pfDeepCSVJetTags:probb',
                         'pfDeepCSVJetTags:probc',
                         'pfDeepCSVJetTags:probudsg',
                         'pfDeepCSVJetTags:probbb',
                         'pfBoostedDoubleSecondaryVertexAK8BJetTags']),
                     genJetCollection = cms.InputTag('slimmedGenJetsAK8')
                     )
    getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src = [] # start with empty list of user floats
    getattr(process,"selectedPatJetsAK8Puppi"+postfix).cut = cms.string("pt > 100")
    getattr(process,"selectedPatJetsAK8Puppi"+postfix).cutLoose = cms.string("pt > 30")
    getattr(process,"selectedPatJetsAK8Puppi"+postfix).nLoose = cms.uint32(3)

    from RecoJets.JetAssociationProducers.j2tParametersVX_cfi import j2tParametersVX
    addToProcessAndTask('ak8PFJetsPuppiTracksAssociatorAtVertex'+postfix, cms.EDProducer("JetTracksAssociatorAtVertex",
                                      j2tParametersVX.clone( coneSize = cms.double(0.8) ),
                                      jets = cms.InputTag("ak8PFJetsPuppi") ),
                        process, task)
    addToProcessAndTask('patJetAK8PuppiCharge'+postfix, cms.EDProducer("JetChargeProducer",
                                     src = cms.InputTag("ak8PFJetsPuppiTracksAssociatorAtVertex"),
                                     var = cms.string('Pt'),
                                     exp = cms.double(1.0) ), 
                        process, task)

    ## now add AK8 groomed masses and ECF
    from RecoJets.JetProducers.ak8PFJetsPuppi_groomingValueMaps_cfi import ak8PFJetsPuppiSoftDropMass
    addToProcessAndTask('ak8PFJetsPuppiSoftDropMass'+postfix, ak8PFJetsPuppiSoftDropMass.clone(), process, task)
    getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src += ['ak8PFJetsPuppiSoftDropMass'+postfix]
    getattr(process,"patJetsAK8Puppi"+postfix).addTagInfos = cms.bool(False)
    getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap'+postfix,'nb1AK8PuppiSoftDropN2'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap'+postfix,'nb1AK8PuppiSoftDropN3'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap'+postfix,'nb2AK8PuppiSoftDropN2'),
        cms.InputTag('ak8PFJetsPuppiSoftDropValueMap'+postfix,'nb2AK8PuppiSoftDropN3'),
        ]


    # add PUPPI Njetiness
    addToProcessAndTask('NjettinessAK8Puppi'+postfix, process.Njettiness.clone(), process, task)
    getattr(process,"NjettinessAK8Puppi"+postfix).src = cms.InputTag("ak8PFJetsPuppi"+postfix)
    getattr(process,"NjettinessAK8Puppi").cone = cms.double(0.8)
    getattr(process,"patJetsAK8Puppi").userData.userFloats.src += ['NjettinessAK8Puppi'+postfix+':tau1','NjettinessAK8Puppi'+postfix+':tau2','NjettinessAK8Puppi'+postfix+':tau3','NjettinessAK8Puppi'+postfix+':tau4']

    # Now combine the CHS and PUPPI information into the PUPPI jets via delta R value maps
    addToProcessAndTask("ak8PFJetsCHSValueMap"+postfix, cms.EDProducer("RecoJetToPatJetDeltaRValueMapProducer",
                                            src = cms.InputTag("ak8PFJetsPuppi"+postfix),
                                            matched = cms.InputTag("patJetsAK8"+postfix),
                                            distMax = cms.double(0.8),
                                            values = cms.vstring([
                                                'userFloat("ak8PFJetsCHSPrunedMass"'+postfix+')',
                                                'userFloat("ak8PFJetsCHSSoftDropMass"'+postfix+')',
                                                'userFloat("NjettinessAK8'+postfix+':tau1")',
                                                'userFloat("NjettinessAK8'+postfix+':tau2")',
                                                'userFloat("NjettinessAK8'+postfix+':tau3")',
                                                'userFloat("NjettinessAK8'+postfix+':tau4")',
                                                'pt','eta','phi','mass'
                                            ]),
                                            valueLabels = cms.vstring( [
                                                'ak8PFJetsCHSPrunedMass',
                                                'ak8PFJetsCHSSoftDropMass',
                                                'NjettinessAK8CHSTau1',
                                                'NjettinessAK8CHSTau2',
                                                'NjettinessAK8CHSTau3',
                                                'NjettinessAK8CHSTau4',
                                                'pt','eta','phi','mass'
                                            ]) ),
                        process, task)


    # Now set up the user floats
    getattr(process,"patJetsAK8Puppi"+postfix).userData.userFloats.src += [
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'ak8PFJetsCHSPrunedMass'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'ak8PFJetsCHSSoftDropMass'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'NjettinessAK8CHSTau1'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'NjettinessAK8CHSTau2'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'NjettinessAK8CHSTau3'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'NjettinessAK8CHSTau4'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'pt'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'eta'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'phi'),
                                                   cms.InputTag('ak8PFJetsCHSValueMap'+postfix,'mass'),
                                                   ]

    

    
    addToProcessAndTask("slimmedJetsAK8PFPuppiSoftDropSubjets"+postfix,
                        cms.EDProducer("PATJetSlimmer",
                             src = cms.InputTag("selectedPatJetsAK8PFPuppiSoftDropSubjets"),
                             packedPFCandidates = cms.InputTag("packedPFCandidates"),
                             dropJetVars = cms.string("1"),
                             dropDaughters = cms.string("0"),
                             rekeyDaughters = cms.string("1"),
                             dropTrackRefs = cms.string("1"),
                             dropSpecific = cms.string("1"),
                             dropTagInfos = cms.string("1"),
                             modifyJets = cms.bool(True),
                             mixedDaughters = cms.bool(False),
                             modifierConfig = cms.PSet( modifications = cms.VPSet() )
                                       ),
                        process, task)

    
    ## Establish references between PATified fat jets and subjets using the BoostedJetMerger
    addToProcessAndTask("slimmedJetsAK8PFPuppiSoftDropPacked"+postfix,
                        cms.EDProducer("BoostedJetMerger",
                               jetSrc=cms.InputTag("selectedPatJetsAK8PFPuppiSoftDrop"),
                               subjetSrc=cms.InputTag("slimmedJetsAK8PFPuppiSoftDropSubjets")
                                       ),
                        process, task )

    
    addToProcessAndTask("packedPatJetsAK8"+postfix, cms.EDProducer("JetSubstructurePacker",
                                           jetSrc = cms.InputTag("selectedPatJetsAK8Puppi"+postfix),
                                           distMax = cms.double(0.8),
                                           algoTags = cms.VInputTag(
                                               cms.InputTag("slimmedJetsAK8PFPuppiSoftDropPacked"+postfix)
                                           ),
                                           algoLabels = cms.vstring(
                                               'SoftDropPuppi'
                                           ),
                                          fixDaughters = cms.bool(True),
                                          packedPFCandidates = cms.InputTag("packedPFCandidates"+postfix),
                                                                   ),
                        process, task)

    # switch off daughter re-keying since it's done in the JetSubstructurePacker (and can't be done afterwards)
    process.slimmedJetsAK8.rekeyDaughters = "0"
    # Reconfigure the slimmedAK8 jet information to keep 
    process.slimmedJetsAK8.dropDaughters = cms.string("pt < 170")
    process.slimmedJetsAK8.dropSpecific = cms.string("pt < 170")
    process.slimmedJetsAK8.dropTagInfos = cms.string("pt < 170")
Beispiel #32
0
    produceETmidRapidity=cms.bool(True),
    producePixelhits=cms.bool(True),
    produceTracks=cms.bool(True),
    producePixelTracks=cms.bool(True),
    reUseCentrality=cms.bool(False),
    srcHFhits=cms.InputTag("hfreco"),
    srcTowers=cms.InputTag("towerMaker"),
    srcEBhits=cms.InputTag("ecalRecHit", "EcalRecHitsEB"),
    srcEEhits=cms.InputTag("ecalRecHit", "EcalRecHitsEE"),
    srcZDChits=cms.InputTag("zdcreco"),
    srcPixelhits=cms.InputTag("siPixelRecHits"),
    srcTracks=cms.InputTag("hiGeneralTracks"),
    srcVertex=cms.InputTag("hiSelectedVertex"),
    srcReUse=cms.InputTag("hiCentrality"),
    srcPixelTracks=cms.InputTag("hiPixel3PrimTracks"),
    doPixelCut=cms.bool(True),
    UseQuality=cms.bool(True),
    TrackQuality=cms.string('highPurity'),
    trackEtaCut=cms.double(2),
    trackPtCut=cms.double(1),
    hfEtaCut=cms.double(4),  #hf above the absolute value of this cut is used
    midRapidityRange=cms.double(1),
    lowGainZDC=cms.bool(True),
)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(hiCentrality,
                         producePixelTracks=False,
                         srcTracks=cms.InputTag("generalTracks"),
                         srcVertex=cms.InputTag("offlinePrimaryVertices"))
from Configuration.Eras.Modifier_pA_2016_cff import pA_2016
from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
#products from regular pp which does not fit the normal AOD
for e in [pA_2016, peripheralPbPb, pp_on_XeXe_2017]:
    e.toModify(RecoJetsAOD.outputCommands,
               func=lambda outputCommands: outputCommands.extend(
                   ['keep *_towerMaker_*_*']))
for ec in [
        RecoJetsAOD.outputCommands, RecoJetsRECO.outputCommands,
        RecoJetsFEVT.outputCommands
]:
    pp_on_XeXe_2017.toModify(
        ec,
        func=lambda outputCommands: outputCommands.extend([
            'keep recoCentrality*_hiCentrality_*_*',
            'keep recoClusterCompatibility*_hiClusterCompatibility_*_*'
        ]))

#HI-specific products: needed in AOD, propagate to more inclusive tiers as well
for ec in [
        RecoJetsAOD.outputCommands, RecoJetsRECO.outputCommands,
        RecoJetsFEVT.outputCommands
]:
    pA_2016.toModify(ec,
                     func=lambda outputCommands: outputCommands.extend([
                         'keep recoCentrality*_pACentrality_*_*',
                         'keep *_hiFJGridEmptyAreaCalculator_*_*',
                         'keep *_hiFJRhoProducer_*_*'
                     ]))
Beispiel #34
0
trackingPhase1QuadProp.toReplaceWith(
    highPtTripletStepHitTriplets, _highPtTripletStepHitTriplets_propagation)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
_highPtTripletStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits=3,
    minPt=0.2,
)
highPtTripletStepTrajectoryFilterBase = _highPtTripletStepTrajectoryFilterBase.clone(
    maxCCCLostHits=0,
    minGoodStripCharge=dict(refToPSet_='SiStripClusterChargeCutLoose'))
trackingPhase2PU140.toReplaceWith(highPtTripletStepTrajectoryFilterBase,
                                  _highPtTripletStepTrajectoryFilterBase)

pp_on_XeXe_2017.toModify(highPtTripletStepTrajectoryFilterBase, minPt=0.7)

highPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters=[
        cms.PSet(
            refToPSet_=cms.string('highPtTripletStepTrajectoryFilterBase'))
    ])

trackingPhase2PU140.toModify(
    highPtTripletStepTrajectoryFilter,
    filters=highPtTripletStepTrajectoryFilter.filters +
    [cms.PSet(refToPSet_=cms.string('ClusterShapeTrajectoryFilter'))])

highPtTripletStepTrajectoryFilterInOut = highPtTripletStepTrajectoryFilterBase.clone(
    minPt=0.4,
    minimumNumberOfHits=4,
Beispiel #35
0
# building
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_initialStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 3,
    minPt = 0.2,
)
initialStepTrajectoryFilterBase = _initialStepTrajectoryFilterBase.clone(
    maxCCCLostHits = 0,
    minGoodStripCharge = cms.PSet(refToPSet_ = cms.string('SiStripClusterChargeCutLoose'))
)
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
_tracker_apv_vfp30_2016.toModify(initialStepTrajectoryFilterBase, maxCCCLostHits = 2)

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(initialStepTrajectoryFilterBase, minPt=0.6)

initialStepTrajectoryFilterInOut = initialStepTrajectoryFilterBase.clone(
    minimumNumberOfHits = 4,
    seedExtension = 1,
    strictSeedExtension = True, # don't allow inactive
    pixelSeedExtension = True,
)
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase)
trackingPhase2PU140.toReplaceWith(initialStepTrajectoryFilterBase, _initialStepTrajectoryFilterBase)

import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
initialStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone()
initialStepTrajectoryFilter = cms.PSet(
    ComponentType = cms.string('CompositeTrajectoryFilter'),
Beispiel #36
0
    maxCCCLostHits=0,
    minGoodStripCharge=cms.PSet(
        refToPSet_=cms.string('SiStripClusterChargeCutLoose')))
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016

_tracker_apv_vfp30_2016.toModify(lowPtTripletStepStandardTrajectoryFilter,
                                 maxCCCLostHits=1)
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU

trackingLowPU.toReplaceWith(lowPtTripletStepStandardTrajectoryFilter,
                            _lowPtTripletStepStandardTrajectoryFilterBase)
trackingPhase2PU140.toReplaceWith(
    lowPtTripletStepStandardTrajectoryFilter,
    _lowPtTripletStepStandardTrajectoryFilterBase)

pp_on_XeXe_2017.toModify(lowPtTripletStepStandardTrajectoryFilter, minPt=0.3)

from RecoPixelVertexing.PixelLowPtUtilities.ClusterShapeTrajectoryFilter_cfi import *
# Composite filter
lowPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters=[
        cms.PSet(
            refToPSet_=cms.string('lowPtTripletStepStandardTrajectoryFilter')),
        # cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))
    ])
trackingPhase2PU140.toModify(
    lowPtTripletStepTrajectoryFilter,
    filters=lowPtTripletStepTrajectoryFilter.filters +
    [cms.PSet(refToPSet_=cms.string('ClusterShapeTrajectoryFilter'))])

lowPtTripletStepTrajectoryFilterInOut = lowPtTripletStepStandardTrajectoryFilter.clone(
Beispiel #37
0
                                    skipClusters = cms.InputTag('convClusters'),
                                    )
    )
)

photonConvTrajSeedFromSingleLeg.TrackRefitter = cms.InputTag('generalTracks')
photonConvTrajSeedFromSingleLeg.primaryVerticesTag = cms.InputTag('firstStepPrimaryVertices')
#photonConvTrajSeedFromQuadruplets.TrackRefitter = cms.InputTag('generalTracks')
#photonConvTrajSeedFromQuadruplets.primaryVerticesTag = cms.InputTag('pixelVertices')
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toModify(photonConvTrajSeedFromSingleLeg, primaryVerticesTag   = "pixelVertices")

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(photonConvTrajSeedFromSingleLeg,
                         RegionFactoryPSet = dict(RegionPSet = dict(ptMin = 999999.0,
                                                                    originRadius = 0,
                                                                    originHalfLength = 0
                                                                    ))
                         )

# TRACKER DATA CONTROL

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
convCkfTrajectoryFilter = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
        maxLostHits = 1,
        minimumNumberOfHits = 3,
        minPt = 0.1
    )


import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
Beispiel #38
0
)
from FastSimulation.Tracking.SeedingMigration import _hitSetProducerToFactoryPSet
_fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory = _hitSetProducerToFactoryPSet(
    pixelLessStepHitTriplets)
_fastSim_pixelLessStepSeeds.seedFinderSelector.MultiHitGeneratorFactory.refitHits = False
fastSim.toReplaceWith(pixelLessStepSeeds, _fastSim_pixelLessStepSeeds)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_pixelLessStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    maxLostHits=0, minimumNumberOfHits=4, minPt=0.1)
pixelLessStepTrajectoryFilter = _pixelLessStepTrajectoryFilterBase.clone(
    seedPairPenalty=1, )
trackingLowPU.toReplaceWith(pixelLessStepTrajectoryFilter,
                            _pixelLessStepTrajectoryFilterBase)
pp_on_XeXe_2017.toModify(pixelLessStepTrajectoryFilter, minPt=2.0)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
pixelLessStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    ComponentName=cms.string('pixelLessStepChi2Est'),
    nSigma=cms.double(3.0),
    MaxChi2=cms.double(16.0),
    clusterChargeCut=cms.PSet(
        refToPSet_=cms.string('SiStripClusterChargeCutTight')))
trackingLowPU.toModify(
    pixelLessStepChi2Est,
    clusterChargeCut=dict(refToPSet_='SiStripClusterChargeCutTiny'))

# TRACK BUILDING
import RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi
pixelLessStepTrajectoryBuilder = RecoTracker.CkfPattern.GroupedCkfTrajectoryBuilder_cfi.GroupedCkfTrajectoryBuilder.clone(
Beispiel #39
0
)
trackingPhase1QuadProp.toReplaceWith(highPtTripletStepHitTriplets, _highPtTripletStepHitTriplets_propagation)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff as _TrajectoryFilter_cff
_highPtTripletStepTrajectoryFilterBase = _TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    minimumNumberOfHits = 3,
    minPt = 0.2,
)
highPtTripletStepTrajectoryFilterBase = _highPtTripletStepTrajectoryFilterBase.clone(
    maxCCCLostHits = 0,
    minGoodStripCharge = dict(refToPSet_ = 'SiStripClusterChargeCutLoose')
)
trackingPhase2PU140.toReplaceWith(highPtTripletStepTrajectoryFilterBase, _highPtTripletStepTrajectoryFilterBase)

pp_on_XeXe_2017.toModify(highPtTripletStepTrajectoryFilterBase, minPt=0.7)

highPtTripletStepTrajectoryFilter = _TrajectoryFilter_cff.CompositeTrajectoryFilter_block.clone(
    filters = [cms.PSet(refToPSet_ = cms.string('highPtTripletStepTrajectoryFilterBase'))]
)

trackingPhase2PU140.toModify(highPtTripletStepTrajectoryFilter,
    filters = highPtTripletStepTrajectoryFilter.filters + [cms.PSet(refToPSet_ = cms.string('ClusterShapeTrajectoryFilter'))]
)


highPtTripletStepTrajectoryFilterInOut = highPtTripletStepTrajectoryFilterBase.clone(
    minPt = 0.4,
    minimumNumberOfHits = 4,
    seedExtension = 1,
    strictSeedExtension = False, # allow inactive
Beispiel #40
0
)

# QUALITY CUTS DURING TRACK BUILDING
import TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff
_mixedTripletStepTrajectoryFilterBase = TrackingTools.TrajectoryFiltering.TrajectoryFilter_cff.CkfBaseTrajectoryFilter_block.clone(
    #    maxLostHits = 0,
    minimumNumberOfHits=3,
    minPt=0.1)

mixedTripletStepTrajectoryFilter = _mixedTripletStepTrajectoryFilterBase.clone(
    constantValueForLostHitsFractionFilter=1.4, )
trackingLowPU.toReplaceWith(
    mixedTripletStepTrajectoryFilter,
    _mixedTripletStepTrajectoryFilterBase.clone(maxLostHits=0, ))

pp_on_XeXe_2017.toModify(mixedTripletStepTrajectoryFilter, minPt=0.4)

# Propagator taking into account momentum uncertainty in multiple scattering calculation.
import TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff
import TrackingTools.MaterialEffects.MaterialPropagator_cfi
mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagator_cfi.MaterialPropagator.clone(
    #mixedTripletStepPropagator = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.MaterialPropagatorParabolicMF.clone(
    ComponentName='mixedTripletStepPropagator',
    ptMin=0.1)
pp_on_XeXe_2017.toModify(mixedTripletStepPropagator, ptMin=0.4)

import TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi
mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.OppositeMaterialPropagator_cfi.OppositeMaterialPropagator.clone(
    #mixedTripletStepPropagatorOpposite = TrackingTools.MaterialEffects.MaterialPropagatorParabolicMf_cff.OppositeMaterialPropagatorParabolicMF.clone(
    ComponentName='mixedTripletStepPropagatorOpposite',
    ptMin=0.1)
    PFHcalClusterLabel = cms.InputTag("particleFlowClusterHCAL"),
    PSThresholdFile = cms.string('RecoParticleFlow/PFTracking/data/PSThreshold.dat'),
    MinPt = cms.double(2.0),
    TkColList = cms.VInputTag(cms.InputTag("generalTracks")),
    UseTMVA = cms.untracked.bool(True),
    TrackQuality = cms.string('highPurity'),
    MaxPt = cms.double(50.0),
    ApplyIsolation = cms.bool(False),
    EcalStripSumE_deltaPhiOverQ_minValue = cms.double(-0.1),
    EcalStripSumE_minClusEnergy = cms.double(0.1),
    EcalStripSumE_deltaEta = cms.double(0.03),
    EcalStripSumE_deltaPhiOverQ_maxValue = cms.double(0.5),
    EOverPLead_minValue = cms.double(0.95),
    HOverPLead_maxValue = cms.double(0.05),
    HcalWindow=cms.double(0.184),                       
    ClusterThreshold = cms.double(0.5),
    UsePreShower =cms.bool(False),
    PreIdLabel = cms.string('preid'),
    ProducePreId = cms.untracked.bool(True),
    PtThresholdSavePreId = cms.untracked.double(1.0),
    Min_dr = cms.double(0.2)
)

# This customization will be removed once we get the templates for
# phase2 pixel
from Configuration.Eras.Modifier_phase2_tracker_cff import phase2_tracker
phase2_tracker.toModify(trackerDrivenElectronSeeds, TTRHBuilder  = 'WithTrackAngle') # FIXME

from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(trackerDrivenElectronSeeds, MinPt = 5.0) 
detachedTripletStepTrajectoryFilterBase = _detachedTripletStepTrajectoryFilterBase.clone(
    maxCCCLostHits=0,
    minGoodStripCharge=cms.PSet(
        refToPSet_=cms.string('SiStripClusterChargeCutLoose')))
from Configuration.Eras.Modifier_tracker_apv_vfp30_2016_cff import tracker_apv_vfp30_2016
_tracker_apv_vfp30_2016.toModify(detachedTripletStepTrajectoryFilterBase,
                                 maxCCCLostHits=2)
from Configuration.Eras.Modifier_trackingLowPU_cff import trackingLowPU
trackingLowPU.toReplaceWith(
    detachedTripletStepTrajectoryFilterBase,
    _detachedTripletStepTrajectoryFilterBase.clone(
        maxLostHitsFraction=1. / 10.,
        constantValueForLostHitsFractionFilter=0.701,
    ))

pp_on_XeXe_2017.toModify(detachedTripletStepTrajectoryFilterBase, minPt=0.9)

import RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi
detachedTripletStepTrajectoryFilterShape = RecoPixelVertexing.PixelLowPtUtilities.StripSubClusterShapeTrajectoryFilter_cfi.StripSubClusterShapeTrajectoryFilterTIX12.clone(
)
detachedTripletStepTrajectoryFilter = cms.PSet(
    ComponentType=cms.string('CompositeTrajectoryFilter'),
    filters=cms.VPSet(
        cms.PSet(
            refToPSet_=cms.string('detachedTripletStepTrajectoryFilterBase')),
        #        cms.PSet( refToPSet_ = cms.string('detachedTripletStepTrajectoryFilterShape'))
    ),
)

import RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi
detachedTripletStepChi2Est = RecoTracker.MeasurementDet.Chi2ChargeMeasurementEstimator_cfi.Chi2ChargeMeasurementEstimator.clone(
    OrderedHitsFactoryPSet = dict(maxElement = 10000),
    ClusterCheckPSet = dict(
        MaxNumberOfCosmicClusters = 150000,
        MaxNumberOfPixelClusters = 20000,
        cut = "strip < 150000 && pixel < 20000 && (strip < 20000 + 7* pixel)"
    )
)

from Configuration.Eras.Modifier_trackingPhase2PU140_cff import trackingPhase2PU140
trackingPhase2PU140.toModify(photonConvTrajSeedFromSingleLeg,
    ClusterCheckPSet = dict(
        MaxNumberOfCosmicClusters = 1000000,
        MaxNumberOfPixelClusters = 100000,
        cut = None
    ),
    OrderedHitsFactoryPSet = dict(maxElement = 100000),
    RegionFactoryPSet = dict(RegionPSet = dict(ptMin = 0.3)),
)

from Configuration.Eras.Modifier_peripheralPbPb_cff import peripheralPbPb
peripheralPbPb.toModify(photonConvTrajSeedFromSingleLeg,
                        ClusterCheckPSet = dict(cut = "strip < 400000 && pixel < 40000 && (strip < 60000 + 7.0*pixel) && (pixel < 8000 + 0.14*strip)")
                        )
from Configuration.Eras.Modifier_pp_on_XeXe_2017_cff import pp_on_XeXe_2017
pp_on_XeXe_2017.toModify(photonConvTrajSeedFromSingleLeg,
                         ClusterCheckPSet = dict(MaxNumberOfPixelClusters = 100000,
                                                 cut = "strip < 1000000 && pixel < 100000 && (strip < 50000 + 10*pixel) && (pixel < 5000 + strip/2.)"
                                                 ),
                         OrderedHitsFactoryPSet = dict(maxElement = 100000)
                         )