Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:06:46

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 process = cms.Process("SKIM")
0004 
0005 process.configurationMetadata = cms.untracked.PSet(
0006     version = cms.untracked.string('$Revision: 1.36 $'),
0007     name = cms.untracked.string('$Source: /cvs/CMSSW/CMSSW/DPGAnalysis/Skims/python/MinBiasPDSkim_cfg.py,v $'),
0008     annotation = cms.untracked.string('Combined MinBias skim')
0009 )
0010 # selection eff. on 1000 events
0011 #file:/tmp/azzi/Background.root
0012 #/tmp/azzi/Background.root ( 0 events, 664191 bytes )
0013 #file:/tmp/azzi/MinBiascscskimEvents.root
0014 #/tmp/azzi/MinBiascscskimEvents.root ( 0 events, 664212 bytes )
0015 #file:/tmp/azzi/MuonDPGSkim.root
0016 #/tmp/azzi/MuonDPGSkim.root ( 95 events, 40887080 bytes )
0017 #file:/tmp/azzi/StoppedHSCP_filter.root
0018 #/tmp/azzi/StoppedHSCP_filter.root ( 124 events, 28507733 bytes )
0019 #file:/tmp/azzi/ValSkim.root
0020 #/tmp/azzi/ValSkim.root ( 22 events, 9588726 bytes )
0021 #file:/tmp/azzi/ecalrechitfilter.root
0022 #/tmp/azzi/ecalrechitfilter.root ( 23 events, 14583758 bytes )
0023 #file:/tmp/azzi/logerror_filter.root
0024 #/tmp/azzi/logerror_filter.root ( 14 events, 9389296 bytes )
0025 #file:/tmp/azzi/TPGSkim.root
0026 #/tmp/azzi/TPGSkim.root ( 46 events, 20271643 bytes )
0027 
0028 #
0029 #
0030 # This is for testing purposes.
0031 #
0032 #
0033 process.source = cms.Source("PoolSource",
0034                             fileNames = cms.untracked.vstring(
0035 # run 136066 lumi~500
0036 '/store/data/Run2010A/MinimumBias/RECO/v1/000/136/066/18F6DB82-5566-DF11-B289-0030487CAF0E.root'),
0037                            secondaryFileNames = cms.untracked.vstring(
0038 '/store/data/Run2010A/MinimumBias/RAW/v1/000/136/066/38D48BED-3C66-DF11-88A5-001D09F27003.root')
0039 )
0040 
0041 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0042 
0043 process.maxEvents = cms.untracked.PSet(
0044     input = cms.untracked.int32(-1)
0045 )
0046 
0047 
0048 #------------------------------------------
0049 # Load standard sequences.
0050 #------------------------------------------
0051 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
0052 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
0053 
0054 
0055 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0056 process.GlobalTag.globaltag = 'GR_R_38X_V13::All' 
0057 
0058 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
0059 process.load("Configuration/StandardSequences/Reconstruction_cff")
0060 process.load('Configuration/EventContent/EventContent_cff')
0061 
0062 #drop collections created on the fly
0063 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
0064 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
0065 
0066 #
0067 #  Load common sequences
0068 #
0069 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
0070 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
0071 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
0072 
0073 ###########################################################################################
0074 #------------------------------------------
0075 # parameters for the CSCSkim module
0076 #------------------------------------------
0077 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
0078 
0079 
0080 #set to minimum activity
0081 process.cscSkim.minimumSegments = 1
0082 process.cscSkim.minimumHitChambers = 1
0083 
0084 # this is for filtering on HLT path
0085 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
0086      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0087      HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want
0088      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
0089      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
0090      throw = cms.bool(False),    # throw exception on unknown path names
0091      saveTags = cms.bool(False)
0092  )
0093 
0094 #### the path
0095 process.cscHaloSkim = cms.Path(process.hltBeamHalo+process.cscSkim)
0096 
0097 
0098 
0099 #### output 
0100 process.outputBeamHaloSkim = cms.OutputModule("PoolOutputModule",
0101     outputCommands = process.FEVTEventContent.outputCommands,
0102     fileName = cms.untracked.string("/tmp/azzi/MinBiascscskimEvents.root"),
0103     dataset = cms.untracked.PSet(
0104       dataTier = cms.untracked.string('RAW-RECO'),
0105       filterName = cms.untracked.string('CSCSkim_BeamHalo_MinBias')
0106     ),
0107     SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('cscHaloSkim'))
0108 )
0109 
0110 
0111 ########################## Muon tracks Filter ############################
0112 process.muonSkim=cms.EDFilter("CandViewCountFilter", 
0113                  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
0114 process.muonTracksSkim = cms.Path(process.muonSkim)
0115 
0116 
0117 ###########################################################################
0118 
0119 process.outputMuonSkim = cms.OutputModule("PoolOutputModule",
0120     fileName = cms.untracked.string('/tmp/azzi/MuonSkim.root'),
0121     outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
0122     dataset = cms.untracked.PSet(
0123               dataTier = cms.untracked.string('RECO'),
0124               filterName = cms.untracked.string('Muon_skim')),
0125     SelectEvents = cms.untracked.PSet(
0126         SelectEvents = cms.vstring("muonTracksSkim")
0127     )
0128 )
0129 ####################################################################################
0130 
0131 ##################################stoppedHSCP############################################
0132 
0133 
0134 # this is for filtering on HLT path
0135 process.hltstoppedhscp = cms.EDFilter("HLTHighLevel",
0136      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0137      HLTPaths = cms.vstring("HLT_StoppedHSCP*"), # provide list of HLT paths (or patterns) you want
0138      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
0139      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
0140      throw = cms.bool(False)    # throw exception on unknown path names
0141  )
0142 
0143 process.HSCP=cms.Path(process.hltstoppedhscp)
0144 
0145 process.outHSCP = cms.OutputModule("PoolOutputModule",
0146                                outputCommands =  process.FEVTEventContent.outputCommands,
0147                                fileName = cms.untracked.string('/tmp/azzi/StoppedHSCP_filter.root'),
0148                                dataset = cms.untracked.PSet(
0149                                   dataTier = cms.untracked.string('RAW-RECO'),
0150                                   filterName = cms.untracked.string('Skim_StoppedHSCP')),
0151                                
0152                                SelectEvents = cms.untracked.PSet(
0153     SelectEvents = cms.vstring("HSCP")
0154     ))
0155 
0156 ###########################################################################################
0157 #------------------------------------------
0158 # parameters for the PFGCollisions skim3
0159 #------------------------------------------
0160 process.load('HLTrigger.special.hltPhysicsDeclared_cfi')
0161 process.hltPhysicsDeclared.L1GtReadoutRecordTag = 'gtDigis'
0162 
0163 process.hltbeamgas = cms.EDFilter("HLTHighLevel",
0164 TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0165   HLTPaths = cms.vstring('HLT_L1_BptxXOR_BscMinBiasOR'), # provide list of HLT paths (or patterns) you want
0166   eventSetupPathsKey = cms.string(''),
0167   andOr              = cms.bool(True),
0168   throw              = cms.bool(False),
0169   saveTags           = cms.bool(False)
0170 
0171 )
0172 
0173 #### the path
0174 process.pfgskim3noncross = cms.Path(process.hltPhysicsDeclared*process.hltbeamgas)
0175 
0176 #### output
0177 process.outputpfgskim3 = cms.OutputModule("PoolOutputModule",
0178  outputCommands = process.FEVTEventContent.outputCommands,
0179  fileName = cms.untracked.string("/tmp/azzi/Background.root"),
0180  dataset = cms.untracked.PSet(
0181    dataTier = cms.untracked.string('RAW-RECO'),
0182    filterName = cms.untracked.string('BEAMBKGV3')
0183  ),
0184  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('pfgskim3noncross'))
0185 )
0186 
0187 ###########################################################################################
0188 ###########################################################################################
0189 
0190 #===========================================================
0191 
0192 #################################logerrorharvester############################################
0193 process.load("FWCore.Modules.logErrorFilter_cfi")
0194 from Configuration.StandardSequences.RawToDigi_Data_cff import gtEvmDigis
0195 
0196 process.gtEvmDigis = gtEvmDigis.clone()
0197 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
0198                                   L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
0199                                   AllowedBeamMode = cms.vuint32(11),
0200                                   saveTags = cms.bool(False)
0201                                   )
0202 
0203 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
0204 
0205 process.outlogerr = cms.OutputModule("PoolOutputModule",
0206                                outputCommands =  process.FEVTEventContent.outputCommands,
0207                                fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
0208                                dataset = cms.untracked.PSet(
0209                                   dataTier = cms.untracked.string('RAW-RECO'),
0210                                   filterName = cms.untracked.string('Skim_logerror')),
0211                                
0212                                SelectEvents = cms.untracked.PSet(
0213     SelectEvents = cms.vstring("logerrorpath")
0214     ))
0215 
0216 #===========================================================
0217 ###########################ngood event per lumi##########################################
0218 process.primaryVertexFilter = cms.EDFilter("VertexSelector",
0219    src = cms.InputTag("offlinePrimaryVertices"),
0220    cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"), # tracksSize() > 3 for the older cut
0221    filter = cms.bool(True),   # otherwise it won't filter the events, just produce an empty vertex collection.
0222 )
0223 
0224 
0225 process.noscraping = cms.EDFilter("FilterOutScraping",
0226 applyfilter = cms.untracked.bool(True),
0227 debugOn = cms.untracked.bool(False),
0228 numtrack = cms.untracked.uint32(10),
0229 thresh = cms.untracked.double(0.25)
0230 )
0231 
0232 ###Tracks selection
0233 process.trackSelector  =cms.EDFilter("TrackSelector",
0234                                     src = cms.InputTag("generalTracks"),
0235                                      cut = cms.string('quality("highPurity")')     
0236                                      )
0237 
0238 #process.trackSelector = cms.EDProducer("QualityFilter",
0239 #                                       TrackQuality = cms.string('highPurity'),
0240 #                                       recTracks = cms.InputTag("generalTracks")
0241 #                                       )
0242 
0243 process.trackFilter = cms.EDFilter("TrackCountFilter",
0244                                    src = cms.InputTag("trackSelector"),
0245                                    minNumber = cms.uint32(10)
0246                                    )
0247 
0248 process.nottoomanytracks = cms.EDFilter("NMaxPerLumi",
0249                                         nMaxPerLumi = cms.uint32(8)
0250                                         )
0251 process.relvaltrackskim = cms.Path(process.primaryVertexFilter+process.noscraping+
0252                                    process.trackSelector + process.trackFilter + process.nottoomanytracks )
0253 
0254 ### muon selection
0255 process.muonSelector = cms.EDFilter("MuonSelector",
0256                                     src = cms.InputTag("muons"),
0257                                     cut = cms.string(" isGlobalMuon && isTrackerMuon && pt > 3")
0258                                     )
0259 process.muonFilter = cms.EDFilter("MuonCountFilter",
0260                                   src = cms.InputTag("muonSelector"),
0261                                   minNumber = cms.uint32(1)
0262                                   )
0263 process.nottoomanymuons = cms.EDFilter("NMaxPerLumi",
0264                                        nMaxPerLumi = cms.uint32(2)
0265                                        )
0266 process.relvalmuonskim = cms.Path(process.primaryVertexFilter+process.noscraping+
0267                                   process.muonSelector + process.muonFilter + process.nottoomanymuons )
0268 
0269 #### output 
0270 process.outputvalskim = cms.OutputModule("PoolOutputModule",
0271                                          outputCommands = process.FEVTEventContent.outputCommands,
0272                                          fileName = cms.untracked.string("/tmp/azzi/ValSkim.root"),
0273                                          dataset = cms.untracked.PSet(
0274     dataTier = cms.untracked.string('RAW-RECO'),
0275     filterName = cms.untracked.string('valskim')
0276     ),
0277                                          SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('relvaltrackskim','relvalmuonskim')
0278                                                                            ))
0279 
0280 
0281 ###########################################################################
0282 ######################################TPG Performance SKIMS#####################################
0283 
0284 process.load('DPGAnalysis/Skims/singleMuonSkim_cff')
0285 process.load('DPGAnalysis/Skims/singleElectronSkim_cff')
0286 process.load('DPGAnalysis/Skims/muonTagProbeFilters_cff')
0287 process.load('DPGAnalysis/Skims/electronTagProbeFilters_cff')
0288 process.load('DPGAnalysis/Skims/singlePhotonSkim_cff')
0289 process.load('DPGAnalysis/Skims/jetSkim_cff')
0290 process.load('DPGAnalysis/Skims/METSkim_cff')
0291 process.load('DPGAnalysis/Skims/singlePfTauSkim_cff')
0292 
0293 #process.singleMuPt20SkimPath=cms.Path(process.singleMuPt20RecoQualitySeq)
0294 #process.singleMuPt15SkimPath=cms.Path(process.singleMuPt15RecoQualitySeq)
0295 #process.singleMuPt10SkimPath=cms.Path(process.singleMuPt10RecoQualitySeq)
0296 process.singleMuPt5SkimPath=cms.Path(process.singleMuPt5RecoQualitySeq)
0297 #process.singleElectronPt20SkimPath=cms.Path(process.singleElectronPt20RecoQualitySeq)
0298 #process.singleElectronPt15SkimPath=cms.Path(process.singleElectronPt15RecoQualitySeq)
0299 #process.singleElectronPt10SkimPath=cms.Path(process.singleElectronPt10RecoQualitySeq)
0300 process.singleElectronPt5SkimPath=cms.Path(process.singleElectronPt5RecoQualitySeq)
0301 #process.singlePhotonPt20SkimPath=cms.Path(process.singlePhotonPt20QualitySeq)
0302 #process.singlePhotonPt15SkimPath=cms.Path(process.singlePhotonPt15QualitySeq)
0303 #process.singlePhotonPt10SkimPath=cms.Path(process.singlePhotonPt10QualitySeq)
0304 process.singlePhotonPt5SkimPath=cms.Path(process.singlePhotonPt5QualitySeq)
0305 #process.muonZMMSkimPath=cms.Path(process.muonZMMRecoQualitySeq)
0306 process.muonJPsiMMSkimPath=cms.Path(process.muonJPsiMMRecoQualitySeq)
0307 #process.electronZEESkimPath=cms.Path(process.electronZEERecoQualitySeq)
0308 process.jetSkimPath=cms.Path(process.jetRecoQualitySeq)
0309 #process.METSkimPath=cms.Path(process.METQualitySeq)
0310 process.singlePfTauPt15SkimPath=cms.Path(process.singlePfTauPt15QualitySeq) 
0311 
0312 process.outTPGSkim = cms.OutputModule("PoolOutputModule",
0313     outputCommands = process.FEVTHLTALLEventContent.outputCommands,
0314     fileName = cms.untracked.string("/tmp/azzi/TPGSkim.root"),
0315     dataset = cms.untracked.PSet(
0316       dataTier = cms.untracked.string('USER'),
0317       filterName = cms.untracked.string('TPGSkim')
0318     ),
0319     SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring(
0320                                                                  #'singleMuPt20SkimPath',
0321                                                                  #'singleMuPt15SkimPath',
0322                                                                  #'singleMuPt10SkimPath',
0323                                                                  'singleMuPt5SkimPath',
0324                                                                  #'singleElectronPt20SkimPath',
0325                                                                  #'singleElectronPt15SkimPath',
0326                                                                  #'singleElectronPt10SkimPath',
0327                                                                  'singleElectronPt5SkimPath',
0328                                                                  #'singlePhotonPt20SkimPath',
0329                                                                  #'singlePhotonPt15SkimPath',
0330                                                                  #'singlePhotonPt10SkimPath',
0331                                                                  'singlePhotonPt5SkimPath',
0332                                                                  #'muonZMMSkimPath',
0333                                                                  'muonJPsiMMSkimPath',
0334                                                                  #'electronZEESkimPath',
0335                                                                  'jetSkimPath',
0336                                                                  #'METSkimPath',
0337                                                                  'singlePfTauPt15SkimPath'))
0338 )
0339 
0340 
0341 ###########################################################################
0342 
0343 
0344 process.options = cms.untracked.PSet(
0345  wantSummary = cms.untracked.bool(True)
0346 )
0347 
0348 #process.outpath = cms.EndPath(process.outputBeamHaloSkim+process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
0349 #BeamHalo removed
0350 process.outpath = cms.EndPath(process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
0351 
0352 
0353