Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:38

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 mixSimHits = cms.PSet(
0004     input = cms.VInputTag(  # note that this list needs to be in the same order as the subdets
0005         #cms.InputTag("g4SimHits","BSCHits"), cms.InputTag("g4SimHits","BCM1FHits"), cms.InputTag("g4SimHits","PLTHits"), cms.InputTag("g4SimHits","FP420SI"),
0006         cms.InputTag("g4SimHits","MuonCSCHits"), cms.InputTag("g4SimHits","MuonDTHits"), cms.InputTag("g4SimHits","MuonRPCHits"), 
0007         #cms.InputTag("g4SimHits","TotemHitsRP"), cms.InputTag("g4SimHits","TotemHitsT1"), cms.InputTag("g4SimHits","TotemHitsT2Gem"),
0008         cms.InputTag("g4SimHits","TrackerHitsPixelBarrelHighTof"), cms.InputTag("g4SimHits","TrackerHitsPixelBarrelLowTof"), 
0009         cms.InputTag("g4SimHits","TrackerHitsPixelEndcapHighTof"), cms.InputTag("g4SimHits","TrackerHitsPixelEndcapLowTof"), cms.InputTag("g4SimHits","TrackerHitsTECHighTof"), cms.InputTag("g4SimHits","TrackerHitsTECLowTof"), cms.InputTag("g4SimHits","TrackerHitsTIBHighTof"), 
0010         cms.InputTag("g4SimHits","TrackerHitsTIBLowTof"), cms.InputTag("g4SimHits","TrackerHitsTIDHighTof"), cms.InputTag("g4SimHits","TrackerHitsTIDLowTof"), cms.InputTag("g4SimHits","TrackerHitsTOBHighTof"), cms.InputTag("g4SimHits","TrackerHitsTOBLowTof")),
0011     type = cms.string('PSimHit'),
0012     subdets = cms.vstring(
0013        # 'BSCHits', 
0014        # 'BCM1FHits',
0015        # 'PLTHits',
0016        # 'FP420SI', 
0017         'MuonCSCHits', 
0018         'MuonDTHits', 
0019         'MuonRPCHits', 
0020        # 'TotemHitsRP', 
0021        # 'TotemHitsT1', 
0022        # 'TotemHitsT2Gem', 
0023         'TrackerHitsPixelBarrelHighTof', 
0024         'TrackerHitsPixelBarrelLowTof', 
0025         'TrackerHitsPixelEndcapHighTof', 
0026         'TrackerHitsPixelEndcapLowTof', 
0027         'TrackerHitsTECHighTof', 
0028         'TrackerHitsTECLowTof', 
0029         'TrackerHitsTIBHighTof', 
0030         'TrackerHitsTIBLowTof', 
0031         'TrackerHitsTIDHighTof', 
0032         'TrackerHitsTIDLowTof', 
0033         'TrackerHitsTOBHighTof', 
0034         'TrackerHitsTOBLowTof'),
0035     crossingFrames = cms.untracked.vstring(
0036         'MuonCSCHits', 
0037         'MuonDTHits', 
0038         'MuonRPCHits'), 
0039     #crossingFrames = cms.untracked.vstring(
0040     #    'BSCHits',
0041     #    'BCM1FHits',
0042     #    'PLTHits'
0043     #    'FP420SI',
0044     #    'MuonCSCHits',
0045     #    'MuonDTHits',
0046     #    'MuonRPCHits',
0047     #    'TotemHitsRP',
0048     #    'TotemHitsT1',
0049     #    'TotemHitsT2Gem')
0050     pcrossingFrames = cms.untracked.vstring()
0051 )
0052 from Configuration.ProcessModifiers.premix_stage1_cff import premix_stage1
0053 premix_stage1.toModify(mixSimHits,
0054     pcrossingFrames = [
0055         'MuonCSCHits',
0056         'MuonDTHits',
0057         'MuonRPCHits',
0058     ]
0059 )
0060 
0061 # fastsim customs
0062 from Configuration.Eras.Modifier_fastSim_cff import fastSim
0063 fastSim.toModify(mixSimHits,
0064     input = ["MuonSimHits:MuonCSCHits", 
0065              "MuonSimHits:MuonDTHits", 
0066              "MuonSimHits:MuonRPCHits", 
0067              "fastSimProducer:TrackerHits"],
0068     subdets = ['MuonCSCHits', 
0069                'MuonDTHits', 
0070                'MuonRPCHits', 
0071                'TrackerHits']
0072 )
0073 
0074 mixCaloHits = cms.PSet(
0075     input = cms.VInputTag(  # note that this list needs to be in the same order as the subdets
0076         #cms.InputTag("g4SimHits","CaloHitsTk"), cms.InputTag("g4SimHits","CastorBU"), cms.InputTag("g4SimHits","CastorPL"), cms.InputTag("g4SimHits","CastorTU"), 
0077         cms.InputTag("g4SimHits","CastorFI"),
0078         cms.InputTag("g4SimHits","EcalHitsEB"), cms.InputTag("g4SimHits","EcalHitsEE"), cms.InputTag("g4SimHits","EcalHitsES"),
0079         #cms.InputTag("g4SimHits","EcalTBH4BeamHits"), cms.InputTag("g4SimHits","HcalTB06BeamHits"),
0080         cms.InputTag("g4SimHits","HcalHits"), 
0081         cms.InputTag("g4SimHits","ZDCHITS")),
0082     type = cms.string('PCaloHit'),
0083     subdets = cms.vstring(
0084         #'CaloHitsTk', 
0085         #'CastorBU', 
0086         'CastorFI', 
0087         #'CastorPL', 
0088         #'CastorTU', 
0089         'EcalHitsEB', 
0090         'EcalHitsEE', 
0091         'EcalHitsES', 
0092         #'EcalTBH4BeamHits', 
0093         'HcalHits', 
0094         #'HcalTB06BeamHits', 
0095         'ZDCHITS'),
0096     crossingFrames = cms.untracked.vstring()
0097 )
0098 
0099 # fastsim customs
0100 fastSim.toModify(mixCaloHits,
0101     input = ["fastSimProducer:EcalHitsEB",
0102              "fastSimProducer:EcalHitsEE",
0103              "fastSimProducer:EcalHitsES",
0104              "fastSimProducer:HcalHits"],
0105     subdets = ['EcalHitsEB',
0106                'EcalHitsEE',
0107                'EcalHitsES',
0108                'HcalHits']
0109 )
0110 
0111 
0112 mixSimTracks = cms.PSet(
0113     makeCrossingFrame = cms.untracked.bool(False),
0114     input = cms.VInputTag(cms.InputTag("g4SimHits")),
0115     type = cms.string('SimTrack')
0116 )
0117 mixSimVertices = cms.PSet(
0118     makeCrossingFrame = cms.untracked.bool(False),
0119     input = cms.VInputTag(cms.InputTag("g4SimHits")),
0120     type = cms.string('SimVertex')
0121 )
0122 
0123 # fastsim customs
0124 fastSim.toModify(mixSimTracks, input = ["fastSimProducer"])
0125 fastSim.toModify(mixSimVertices, input = ["fastSimProducer"])
0126     
0127 mixHepMCProducts = cms.PSet(
0128     makeCrossingFrame = cms.untracked.bool(True),
0129     input = cms.VInputTag(cms.InputTag("generatorSmeared"),cms.InputTag("generator")),
0130     type = cms.string('HepMCProduct')
0131 )
0132 
0133 # reconstructed tracks for fastsim
0134 mixReconstructedTracks = cms.PSet(
0135      input = cms.VInputTag(cms.InputTag("generalTracksBeforeMixing")),
0136      type = cms.string('RecoTrack')
0137      )
0138 
0139 theMixObjects = cms.PSet(
0140     mixCH = cms.PSet(
0141         mixCaloHits
0142     ),
0143     mixTracks = cms.PSet(
0144         mixSimTracks
0145     ),
0146     mixVertices = cms.PSet(
0147         mixSimVertices
0148     ),
0149     mixSH = cms.PSet(
0150         mixSimHits
0151     ),
0152     mixHepMC = cms.PSet(
0153         mixHepMCProducts
0154     )
0155 )
0156 
0157 # fastsim customs
0158 fastSim.toModify(theMixObjects, mixRecoTracks = cms.PSet(mixReconstructedTracks))
0159     
0160 mixPCFSimHits = cms.PSet(
0161     input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHitsBSCHits"), cms.InputTag("CFWriter","g4SimHitsBCM1FHits"), cms.InputTag("CFWriter","g4SimHitsPLTHits"), cms.InputTag("CFWriter","g4SimHitsFP420SI"), cms.InputTag("CFWriter","g4SimHitsMuonCSCHits"), cms.InputTag("CFWriter","g4SimHitsMuonDTHits"), cms.InputTag("CFWriter","g4SimHitsMuonRPCHits"), 
0162         cms.InputTag("CFWriter","g4SimHitsTotemHitsRP"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT1"), cms.InputTag("CFWriter","g4SimHitsTotemHitsT2Gem"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelBarrelLowTof"), 
0163         cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsPixelEndcapLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTECLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBHighTof"), 
0164         cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIBLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTIDLowTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBHighTof"), cms.InputTag("CFWriter","g4SimHitsTrackerHitsTOBLowTof")),
0165     type = cms.string('PSimHitPCrossingFrame'),
0166     subdets = cms.vstring('BSCHits', 
0167         'BCM1FHits',
0168         'PLTHits',
0169         'FP420SI', 
0170         'MuonCSCHits', 
0171         'MuonDTHits', 
0172         'MuonRPCHits', 
0173         'TotemHitsRP', 
0174         'TotemHitsT1', 
0175         'TotemHitsT2Gem', 
0176         'TrackerHitsPixelBarrelHighTof', 
0177         'TrackerHitsPixelBarrelLowTof', 
0178         'TrackerHitsPixelEndcapHighTof', 
0179         'TrackerHitsPixelEndcapLowTof', 
0180         'TrackerHitsTECHighTof', 
0181         'TrackerHitsTECLowTof', 
0182         'TrackerHitsTIBHighTof', 
0183         'TrackerHitsTIBLowTof', 
0184         'TrackerHitsTIDHighTof', 
0185         'TrackerHitsTIDLowTof', 
0186         'TrackerHitsTOBHighTof', 
0187         'TrackerHitsTOBLowTof')
0188 )
0189 
0190 mixPCFCaloHits = cms.PSet(
0191     input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHitsCaloHitsTk"), cms.InputTag("CFWriter","g4SimHitsCastorBU"), cms.InputTag("CFWriter","g4SimHitsCastorFI"), cms.InputTag("CFWriter","g4SimHitsCastorPL"), cms.InputTag("CFWriter","g4SimHitsCastorTU"), 
0192         cms.InputTag("CFWriter","g4SimHitsEcalHitsEB"), cms.InputTag("CFWriter","g4SimHitsEcalHitsEE"), cms.InputTag("CFWriter","g4SimHitsEcalHitsES"), cms.InputTag("CFWriter","g4SimHitsEcalTBH4BeamHits"), cms.InputTag("CFWriter","g4SimHitsHcalHits"), 
0193         cms.InputTag("CFWriter","g4SimHitsHcalTB06BeamHits"), cms.InputTag("CFWriter","g4SimHitsZDCHITS")),
0194     type = cms.string('PCaloHitPCrossingFrame'),
0195     subdets = cms.vstring('CaloHitsTk', 
0196         'CastorBU', 
0197         'CastorFI', 
0198         'CastorPL', 
0199         'CastorTU', 
0200         'EcalHitsEB', 
0201         'EcalHitsEE', 
0202         'EcalHitsES', 
0203         'EcalTBH4BeamHits', 
0204         'HcalHits', 
0205         'HcalTB06BeamHits', 
0206         'ZDCHITS')
0207 )
0208 
0209 mixPCFSimTracks = cms.PSet(
0210     input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
0211     type = cms.string('SimTrackPCrossingFrame')
0212 )
0213 
0214 mixPCFSimVertices = cms.PSet(
0215     input = cms.VInputTag(cms.InputTag("CFWriter","g4SimHits")),
0216     type = cms.string('SimVertexPCrossingFrame')
0217 )
0218 
0219 mixPCFHepMCProducts = cms.PSet(
0220     input = cms.VInputTag(cms.InputTag("CFWriter","generator")),
0221     type = cms.string('HepMCProductPCrossingFrame')
0222 )
0223 
0224 from SimCalorimetry.HGCalSimProducers.hgcalDigitizer_cfi import hgceeDigitizer, hgchefrontDigitizer, hgchebackDigitizer, hfnoseDigitizer
0225 
0226 from Configuration.Eras.Modifier_run2_GEM_2017_cff import run2_GEM_2017
0227 run2_GEM_2017.toModify( theMixObjects,
0228     mixSH = dict(
0229         input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonGEMHits") ],
0230         subdets = theMixObjects.mixSH.subdets + [ 'MuonGEMHits' ],
0231         crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonGEMHits' ]
0232     )
0233 )
0234 (premix_stage1 & run2_GEM_2017).toModify(theMixObjects,
0235     mixSH = dict(
0236         pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonGEMHits' ]
0237     )
0238 )
0239 from Configuration.Eras.Modifier_run3_GEM_cff import run3_GEM
0240 run3_GEM.toModify( theMixObjects,
0241     mixSH = dict(
0242         input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonGEMHits") ],
0243         subdets = theMixObjects.mixSH.subdets + [ 'MuonGEMHits' ],
0244         crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonGEMHits' ]
0245     )
0246 )
0247 (premix_stage1 & run3_GEM).toModify(theMixObjects,
0248     mixSH = dict(
0249         pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonGEMHits' ]
0250     )
0251 )
0252 from Configuration.Eras.Modifier_phase2_muon_cff import phase2_muon
0253 phase2_muon.toModify( theMixObjects,
0254     mixSH = dict(
0255         input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","MuonME0Hits") ],
0256         subdets = theMixObjects.mixSH.subdets + [ 'MuonME0Hits' ],
0257         crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'MuonME0Hits' ]
0258     )
0259 )
0260 (premix_stage1 & phase2_muon).toModify(theMixObjects,
0261     mixSH = dict(
0262         pcrossingFrames = theMixObjects.mixSH.pcrossingFrames + [ 'MuonME0Hits' ]
0263     )
0264 )
0265 
0266 from Configuration.Eras.Modifier_phase2_GE0_cff import phase2_GE0
0267 phase2_GE0.toModify( theMixObjects,
0268     mixSH = dict(
0269         input = list(filter(lambda x: type(x) == type(cms.InputTag("","")) and x != cms.InputTag("g4SimHits","MuonME0Hits"), theMixObjects.mixSH.input)),
0270         subdets = list(filter(lambda x: x != 'MuonME0Hits', theMixObjects.mixSH.subdets)),
0271         crossingFrames = list(filter(lambda x: x != 'MuonME0Hits', theMixObjects.mixSH.crossingFrames))
0272     )
0273 )
0274 (premix_stage1 & phase2_GE0).toModify(theMixObjects,
0275     mixSH = dict(
0276         pcrossingFrames = list(filter(lambda x: x != 'MuonME0Hits', theMixObjects.mixSH.pcrossingFrames))
0277     )
0278 )
0279 
0280 from Configuration.Eras.Modifier_phase2_hgcal_cff import phase2_hgcal
0281 phase2_hgcal.toModify( theMixObjects,
0282     mixCH = dict(
0283         input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hgceeDigitizer.hitCollection.value()),
0284                                               cms.InputTag("g4SimHits",hgchefrontDigitizer.hitCollection.value()),
0285                                               cms.InputTag("g4SimHits",hgchebackDigitizer.hitCollection.value()) ],
0286         subdets = theMixObjects.mixCH.subdets + [ hgceeDigitizer.hitCollection.value(),
0287                                                   hgchefrontDigitizer.hitCollection.value(),
0288                                                   hgchebackDigitizer.hitCollection.value() ],
0289     )
0290 )
0291 from Configuration.Eras.Modifier_phase2_hfnose_cff import phase2_hfnose
0292 phase2_hfnose.toModify( theMixObjects,
0293     mixCH = dict(
0294         input = theMixObjects.mixCH.input + [ cms.InputTag("g4SimHits",hfnoseDigitizer.hitCollection.value()) ],
0295         subdets = theMixObjects.mixCH.subdets + [ hfnoseDigitizer.hitCollection.value() ],
0296     )
0297 )
0298 
0299 from Configuration.Eras.Modifier_phase2_timing_layer_cff import phase2_timing_layer
0300 phase2_timing_layer.toModify( theMixObjects,
0301     mixSH = dict(
0302         input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","FastTimerHitsBarrel"), cms.InputTag("g4SimHits","FastTimerHitsEndcap") ],
0303         subdets = theMixObjects.mixSH.subdets + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ],
0304         crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'FastTimerHitsBarrel','FastTimerHitsEndcap' ]
0305     )
0306 )
0307 
0308 from Configuration.Eras.Modifier_ctpps_2022_cff import ctpps_2022
0309 ctpps_2022.toModify( theMixObjects,
0310     mixSH = dict(
0311         input = theMixObjects.mixSH.input + [ cms.InputTag("g4SimHits","TotemHitsRP"),cms.InputTag("g4SimHits","CTPPSPixelHits") ],
0312         subdets = theMixObjects.mixSH.subdets + [ 'TotemHitsRP', 'CTPPSPixelHits' ],
0313         crossingFrames = theMixObjects.mixSH.crossingFrames + [ 'TotemHitsRP' , 'CTPPSPixelHits']
0314     )
0315 )