CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/DPGAnalysis/Skims/python/MinBiasPDSkim_cfg.py

Go to the documentation of this file.
00001 import FWCore.ParameterSet.Config as cms
00002 
00003 process = cms.Process("SKIM")
00004 
00005 process.configurationMetadata = cms.untracked.PSet(
00006     version = cms.untracked.string('$Revision: 1.37 $'),
00007     name = cms.untracked.string('$Source: /local/reps/CMSSW/CMSSW/DPGAnalysis/Skims/python/MinBiasPDSkim_cfg.py,v $'),
00008     annotation = cms.untracked.string('Combined MinBias skim')
00009 )
00010 # selection eff. on 1000 events
00011 #file:/tmp/azzi/Background.root
00012 #/tmp/azzi/Background.root ( 0 events, 664191 bytes )
00013 #file:/tmp/azzi/MinBiascscskimEvents.root
00014 #/tmp/azzi/MinBiascscskimEvents.root ( 0 events, 664212 bytes )
00015 #file:/tmp/azzi/MuonDPGSkim.root
00016 #/tmp/azzi/MuonDPGSkim.root ( 95 events, 40887080 bytes )
00017 #file:/tmp/azzi/StoppedHSCP_filter.root
00018 #/tmp/azzi/StoppedHSCP_filter.root ( 124 events, 28507733 bytes )
00019 #file:/tmp/azzi/ValSkim.root
00020 #/tmp/azzi/ValSkim.root ( 22 events, 9588726 bytes )
00021 #file:/tmp/azzi/ecalrechitfilter.root
00022 #/tmp/azzi/ecalrechitfilter.root ( 23 events, 14583758 bytes )
00023 #file:/tmp/azzi/logerror_filter.root
00024 #/tmp/azzi/logerror_filter.root ( 14 events, 9389296 bytes )
00025 #file:/tmp/azzi/TPGSkim.root
00026 #/tmp/azzi/TPGSkim.root ( 46 events, 20271643 bytes )
00027 
00028 #
00029 #
00030 # This is for testing purposes.
00031 #
00032 #
00033 process.source = cms.Source("PoolSource",
00034                             fileNames = cms.untracked.vstring(
00035 # run 136066 lumi~500
00036 '/store/data/Run2010A/MinimumBias/RECO/v1/000/136/066/18F6DB82-5566-DF11-B289-0030487CAF0E.root'),
00037                            secondaryFileNames = cms.untracked.vstring(
00038 '/store/data/Run2010A/MinimumBias/RAW/v1/000/136/066/38D48BED-3C66-DF11-88A5-001D09F27003.root')
00039 )
00040 
00041 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
00042 
00043 process.maxEvents = cms.untracked.PSet(
00044     input = cms.untracked.int32(-1)
00045 )
00046 
00047 
00048 #------------------------------------------
00049 # Load standard sequences.
00050 #------------------------------------------
00051 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
00052 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
00053 
00054 
00055 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
00056 process.GlobalTag.globaltag = 'GR_R_38X_V13::All' 
00057 
00058 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
00059 process.load("Configuration/StandardSequences/Reconstruction_cff")
00060 process.load('Configuration/EventContent/EventContent_cff')
00061 
00062 #drop collections created on the fly
00063 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
00064 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
00065 
00066 #
00067 #  Load common sequences
00068 #
00069 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
00070 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
00071 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
00072 
00073 ###########################################################################################
00074 #------------------------------------------
00075 # parameters for the CSCSkim module
00076 #------------------------------------------
00077 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
00078 
00079 
00080 #set to minimum activity
00081 process.cscSkim.minimumSegments = 1
00082 process.cscSkim.minimumHitChambers = 1
00083 
00084 # this is for filtering on HLT path
00085 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
00086      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
00087      HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want
00088      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
00089      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
00090      throw = cms.bool(False),    # throw exception on unknown path names
00091      saveTags = cms.bool(False)
00092  )
00093 
00094 #### the path
00095 process.cscHaloSkim = cms.Path(process.hltBeamHalo+process.cscSkim)
00096 
00097 
00098 
00099 #### output 
00100 process.outputBeamHaloSkim = cms.OutputModule("PoolOutputModule",
00101     outputCommands = process.FEVTEventContent.outputCommands,
00102     fileName = cms.untracked.string("/tmp/azzi/MinBiascscskimEvents.root"),
00103     dataset = cms.untracked.PSet(
00104       dataTier = cms.untracked.string('RAW-RECO'),
00105       filterName = cms.untracked.string('CSCSkim_BeamHalo_MinBias')
00106     ),
00107     SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('cscHaloSkim'))
00108 )
00109 
00110 
00111 ########################## Muon tracks Filter ############################
00112 process.muonSkim=cms.EDFilter("CandViewCountFilter", 
00113                  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
00114 process.muonTracksSkim = cms.Path(process.muonSkim)
00115 
00116 
00117 ###########################################################################
00118 
00119 process.outputMuonSkim = cms.OutputModule("PoolOutputModule",
00120     fileName = cms.untracked.string('/tmp/azzi/MuonSkim.root'),
00121     outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
00122     dataset = cms.untracked.PSet(
00123               dataTier = cms.untracked.string('RECO'),
00124               filterName = cms.untracked.string('Muon_skim')),
00125     SelectEvents = cms.untracked.PSet(
00126         SelectEvents = cms.vstring("muonTracksSkim")
00127     )
00128 )
00129 ####################################################################################
00130 
00131 ##################################stoppedHSCP############################################
00132 
00133 
00134 # this is for filtering on HLT path
00135 process.hltstoppedhscp = cms.EDFilter("HLTHighLevel",
00136      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
00137      HLTPaths = cms.vstring("HLT_StoppedHSCP*"), # provide list of HLT paths (or patterns) you want
00138      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
00139      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
00140      throw = cms.bool(False)    # throw exception on unknown path names
00141  )
00142 
00143 process.HSCP=cms.Path(process.hltstoppedhscp)
00144 
00145 process.outHSCP = cms.OutputModule("PoolOutputModule",
00146                                outputCommands =  process.FEVTEventContent.outputCommands,
00147                                fileName = cms.untracked.string('/tmp/azzi/StoppedHSCP_filter.root'),
00148                                dataset = cms.untracked.PSet(
00149                                   dataTier = cms.untracked.string('RAW-RECO'),
00150                                   filterName = cms.untracked.string('Skim_StoppedHSCP')),
00151                                
00152                                SelectEvents = cms.untracked.PSet(
00153     SelectEvents = cms.vstring("HSCP")
00154     ))
00155 
00156 ###########################################################################################
00157 #------------------------------------------
00158 # parameters for the PFGCollisions skim3
00159 #------------------------------------------
00160 process.load('HLTrigger.special.hltPhysicsDeclared_cfi')
00161 process.hltPhysicsDeclared.L1GtReadoutRecordTag = 'gtDigis'
00162 
00163 process.hltbeamgas = cms.EDFilter("HLTHighLevel",
00164 TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
00165   HLTPaths = cms.vstring('HLT_L1_BptxXOR_BscMinBiasOR'), # provide list of HLT paths (or patterns) you want
00166   eventSetupPathsKey = cms.string(''),
00167   andOr              = cms.bool(True),
00168   throw              = cms.bool(False),
00169   saveTags           = cms.bool(False)
00170 
00171 )
00172 
00173 #### the path
00174 process.pfgskim3noncross = cms.Path(process.hltPhysicsDeclared*process.hltbeamgas)
00175 
00176 #### output
00177 process.outputpfgskim3 = cms.OutputModule("PoolOutputModule",
00178  outputCommands = process.FEVTEventContent.outputCommands,
00179  fileName = cms.untracked.string("/tmp/azzi/Background.root"),
00180  dataset = cms.untracked.PSet(
00181    dataTier = cms.untracked.string('RAW-RECO'),
00182    filterName = cms.untracked.string('BEAMBKGV3')
00183  ),
00184  SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('pfgskim3noncross'))
00185 )
00186 
00187 ###########################################################################################
00188 ###########################################################################################
00189 
00190 #===========================================================
00191 
00192 #################################logerrorharvester############################################
00193 process.load("FWCore.Modules.logErrorFilter_cfi")
00194 from Configuration.StandardSequences.RawToDigi_Data_cff import gtEvmDigis
00195 
00196 process.gtEvmDigis = gtEvmDigis.clone()
00197 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
00198                                   L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
00199                                   AllowedBeamMode = cms.vuint32(11),
00200                                   saveTags = cms.bool(False)
00201                                   )
00202 
00203 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
00204 
00205 process.outlogerr = cms.OutputModule("PoolOutputModule",
00206                                outputCommands =  process.FEVTEventContent.outputCommands,
00207                                fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
00208                                dataset = cms.untracked.PSet(
00209                                   dataTier = cms.untracked.string('RAW-RECO'),
00210                                   filterName = cms.untracked.string('Skim_logerror')),
00211                                
00212                                SelectEvents = cms.untracked.PSet(
00213     SelectEvents = cms.vstring("logerrorpath")
00214     ))
00215 
00216 #===========================================================
00217 ###########################ngood event per lumi##########################################
00218 process.primaryVertexFilter = cms.EDFilter("VertexSelector",
00219    src = cms.InputTag("offlinePrimaryVertices"),
00220    cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"), # tracksSize() > 3 for the older cut
00221    filter = cms.bool(True),   # otherwise it won't filter the events, just produce an empty vertex collection.
00222 )
00223 
00224 
00225 process.noscraping = cms.EDFilter("FilterOutScraping",
00226 applyfilter = cms.untracked.bool(True),
00227 debugOn = cms.untracked.bool(False),
00228 numtrack = cms.untracked.uint32(10),
00229 thresh = cms.untracked.double(0.25)
00230 )
00231 
00232 ###Tracks selection
00233 process.trackSelector  =cms.EDFilter("trackSelector",
00234                                     src = cms.InputTag("generalTracks"),
00235                                      cut = cms.string('quality("highPurity")')     
00236                                      )
00237 
00238 #process.trackSelector = cms.EDProducer("QualityFilter",
00239 #                                       TrackQuality = cms.string('highPurity'),
00240 #                                       recTracks = cms.InputTag("generalTracks")
00241 #                                       )
00242 
00243 process.trackFilter = cms.EDFilter("TrackCountFilter",
00244                                    src = cms.InputTag("trackSelector"),
00245                                    minNumber = cms.uint32(10)
00246                                    )
00247 
00248 process.nottoomanytracks = cms.EDFilter("NMaxPerLumi",
00249                                         NMaxPerLumi = cms.uint32(8)
00250                                         )
00251 process.relvaltrackskim = cms.Path(process.primaryVertexFilter+process.noscraping+
00252                                    process.trackSelector + process.trackFilter + process.nottoomanytracks )
00253 
00254 ### muon selection
00255 process.MuonSelector = cms.EDFilter("MuonSelector",
00256                                     src = cms.InputTag("muons"),
00257                                     cut = cms.string(" isGlobalMuon && isTrackerMuon && pt > 3")
00258                                     )
00259 process.muonFilter = cms.EDFilter("MuonCountFilter",
00260                                   src = cms.InputTag("MuonSelector"),
00261                                   minNumber = cms.uint32(1)
00262                                   )
00263 process.nottoomanymuons = cms.EDFilter("NMaxPerLumi",
00264                                        NMaxPerLumi = cms.uint32(2)
00265                                        )
00266 process.relvalmuonskim = cms.Path(process.primaryVertexFilter+process.noscraping+
00267                                   process.MuonSelector + process.muonFilter + process.nottoomanymuons )
00268 
00269 #### output 
00270 process.outputvalskim = cms.OutputModule("PoolOutputModule",
00271                                          outputCommands = process.FEVTEventContent.outputCommands,
00272                                          fileName = cms.untracked.string("/tmp/azzi/ValSkim.root"),
00273                                          dataset = cms.untracked.PSet(
00274     dataTier = cms.untracked.string('RAW-RECO'),
00275     filterName = cms.untracked.string('valskim')
00276     ),
00277                                          SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring('relvaltrackskim','relvalmuonskim')
00278                                                                            ))
00279 
00280 
00281 ###########################################################################
00282 ######################################TPG Performance SKIMS#####################################
00283 
00284 process.load('DPGAnalysis/Skims/singleMuonSkim_cff')
00285 process.load('DPGAnalysis/Skims/singleElectronSkim_cff')
00286 process.load('DPGAnalysis/Skims/muonTagProbeFilters_cff')
00287 process.load('DPGAnalysis/Skims/electronTagProbeFilters_cff')
00288 process.load('DPGAnalysis/Skims/singlePhotonSkim_cff')
00289 process.load('DPGAnalysis/Skims/jetSkim_cff')
00290 process.load('DPGAnalysis/Skims/METSkim_cff')
00291 process.load('DPGAnalysis/Skims/singlePfTauSkim_cff')
00292 
00293 #process.singleMuPt20SkimPath=cms.Path(process.singleMuPt20RecoQualitySeq)
00294 #process.singleMuPt15SkimPath=cms.Path(process.singleMuPt15RecoQualitySeq)
00295 #process.singleMuPt10SkimPath=cms.Path(process.singleMuPt10RecoQualitySeq)
00296 process.singleMuPt5SkimPath=cms.Path(process.singleMuPt5RecoQualitySeq)
00297 #process.singleElectronPt20SkimPath=cms.Path(process.singleElectronPt20RecoQualitySeq)
00298 #process.singleElectronPt15SkimPath=cms.Path(process.singleElectronPt15RecoQualitySeq)
00299 #process.singleElectronPt10SkimPath=cms.Path(process.singleElectronPt10RecoQualitySeq)
00300 process.singleElectronPt5SkimPath=cms.Path(process.singleElectronPt5RecoQualitySeq)
00301 #process.singlePhotonPt20SkimPath=cms.Path(process.singlePhotonPt20QualitySeq)
00302 #process.singlePhotonPt15SkimPath=cms.Path(process.singlePhotonPt15QualitySeq)
00303 #process.singlePhotonPt10SkimPath=cms.Path(process.singlePhotonPt10QualitySeq)
00304 process.singlePhotonPt5SkimPath=cms.Path(process.singlePhotonPt5QualitySeq)
00305 #process.muonZMMSkimPath=cms.Path(process.muonZMMRecoQualitySeq)
00306 process.muonJPsiMMSkimPath=cms.Path(process.muonJPsiMMRecoQualitySeq)
00307 #process.electronZEESkimPath=cms.Path(process.electronZEERecoQualitySeq)
00308 process.jetSkimPath=cms.Path(process.jetRecoQualitySeq)
00309 #process.METSkimPath=cms.Path(process.METQualitySeq)
00310 process.singlePfTauPt15SkimPath=cms.Path(process.singlePfTauPt15QualitySeq) 
00311 
00312 process.outTPGSkim = cms.OutputModule("PoolOutputModule",
00313     outputCommands = process.FEVTHLTALLEventContent.outputCommands,
00314     fileName = cms.untracked.string("/tmp/azzi/TPGSkim.root"),
00315     dataset = cms.untracked.PSet(
00316       dataTier = cms.untracked.string('USER'),
00317       filterName = cms.untracked.string('TPGSkim')
00318     ),
00319     SelectEvents = cms.untracked.PSet(SelectEvents = cms.vstring(
00320                                                                  #'singleMuPt20SkimPath',
00321                                                                  #'singleMuPt15SkimPath',
00322                                                                  #'singleMuPt10SkimPath',
00323                                                                  'singleMuPt5SkimPath',
00324                                                                  #'singleElectronPt20SkimPath',
00325                                                                  #'singleElectronPt15SkimPath',
00326                                                                  #'singleElectronPt10SkimPath',
00327                                                                  'singleElectronPt5SkimPath',
00328                                                                  #'singlePhotonPt20SkimPath',
00329                                                                  #'singlePhotonPt15SkimPath',
00330                                                                  #'singlePhotonPt10SkimPath',
00331                                                                  'singlePhotonPt5SkimPath',
00332                                                                  #'muonZMMSkimPath',
00333                                                                  'muonJPsiMMSkimPath',
00334                                                                  #'electronZEESkimPath',
00335                                                                  'jetSkimPath',
00336                                                                  #'METSkimPath',
00337                                                                  'singlePfTauPt15SkimPath'))
00338 )
00339 
00340 
00341 ###########################################################################
00342 
00343 
00344 process.options = cms.untracked.PSet(
00345  wantSummary = cms.untracked.bool(True)
00346 )
00347 
00348 #process.outpath = cms.EndPath(process.outputBeamHaloSkim+process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
00349 #BeamHalo removed
00350 process.outpath = cms.EndPath(process.outputMuonSkim+process.outHSCP+process.outputpfgskim3+process.outlogerr+process.outputvalskim+process.outTPGSkim)
00351 
00352 
00353