Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:09:14

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.4 $'),
0007     name = cms.untracked.string('$Source: /cvs/CMSSW/CMSSW/DPGAnalysis/Skims/python/CommPDSkim_cfg.py,v $'),
0008     annotation = cms.untracked.string('Combined Commissioning skim')
0009 )
0010 
0011 # efficiency on 1000 input events

0012 # file:/tmp/malgeri/COMM_MuonDPGSkim.root

0013 # /tmp/azzi/COMM_MuonDPGSkim.root ( 271 events, 118916076 bytes )

0014 
0015 #

0016 #

0017 # This is for testing purposes.

0018 #

0019 #

0020 process.source = cms.Source("PoolSource",
0021                             fileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RECO/v1/000/136/066/244E5A07-9466-DF11-9091-000423D95220.root'),
0022                            secondaryFileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RAW/v1/000/136/066/28D89EF5-3C66-DF11-9AAA-0019B9F705A3.root')
0023 )
0024 
0025 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
0026 
0027 process.maxEvents = cms.untracked.PSet(
0028     input = cms.untracked.int32(500)
0029 )
0030 
0031 
0032 #------------------------------------------

0033 # Load standard sequences.

0034 #------------------------------------------

0035 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
0036 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
0037 
0038 
0039 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
0040 process.GlobalTag.globaltag = 'GR10_P_V8::All' 
0041 
0042 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
0043 process.load("Configuration/StandardSequences/Reconstruction_cff")
0044 process.load('Configuration/EventContent/EventContent_cff')
0045 
0046 #drop collections created on the fly

0047 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
0048 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
0049 
0050 #

0051 #  Load common sequences

0052 #

0053 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
0054 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
0055 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
0056 
0057 
0058 ###################### DT Activity Filter ######################

0059 
0060 from EventFilter.DTRawToDigi.dtunpackerDDUGlobal_cfi import dtunpacker
0061 
0062 process.muonDTDigis = dtunpacker.clone()
0063 
0064 process.hltDTActivityFilter = cms.EDFilter( "HLTDTActivityFilter",
0065     inputDCC         = cms.InputTag( "dttfDigis" ),
0066     inputDDU         = cms.InputTag( "muonDTDigis" ),
0067     inputRPC         = cms.InputTag( "hltGtDigis" ),
0068     inputDigis       = cms.InputTag( "muonDTDigis" ),
0069     processDCC       = cms.bool( False ),
0070     processDDU       = cms.bool( False ),
0071     processRPC       = cms.bool( False ),
0072     processDigis     = cms.bool( True ),
0073 
0074     maxDeltaPhi = cms.double( 1.0 ),
0075     maxDeltaEta = cms.double( 0.3 ),
0076 
0077     orTPG         = cms.bool( True ),
0078     orRPC         = cms.bool( True ),
0079     orDigi        = cms.bool( True ),
0080 
0081     minChamberLayers = cms.int32( 5 ),
0082     maxStation       = cms.int32( 3 ),
0083     minTPGQual       = cms.int32( 2 ),   # 0-1=L 2-3=H 4=LL 5=HL 6=HH

0084     minDDUBX         = cms.int32( 8 ),
0085     maxDDUBX         = cms.int32( 13 ),
0086     minDCCBX         = cms.int32( -1 ),
0087     maxDCCBX         = cms.int32( 1 ),
0088     minRPCBX         = cms.int32( -1 ),
0089     maxRPCBX         = cms.int32( 1 ),
0090     minActiveChambs  = cms.int32( 1 ),
0091     activeSectors    = cms.vint32(1,2,3,4,5,6,7,8,9,10,11,12),
0092     saveTags = cms.bool(False)
0093                                      )
0094 
0095 # this is for filtering on HLT path

0096 process.HLTDT =cms.EDFilter("HLTHighLevel",
0097      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0098      HLTPaths = cms.vstring('HLT_L1MuOpen','HLT_Activity_DT', 'HLT_Activity_DT_Tuned'),           # provide list of HLT paths (or patterns) you want

0099      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key

0100      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true

0101      throw = cms.bool(False),    # throw exception on unknown path names

0102      saveTags = cms.bool(False)
0103 )
0104 
0105 process.dtHLTSkim = cms.Path(process.HLTDT)
0106 
0107 process.dtSkim=cms.Path(process.muonDTDigis+process.hltDTActivityFilter)
0108 
0109 
0110 ############################ L1 Muon bits #################################

0111 
0112 process.l1RequestPhAlgos = process.hltLevel1GTSeed.clone()
0113 # False allows to read directly from L1 instead fo candidate ObjectMap

0114 process.l1RequestPhAlgos.L1UseL1TriggerObjectMaps = cms.bool(False)
0115     #

0116     # option used forL1UseL1TriggerObjectMaps = False only

0117     # number of BxInEvent: 1: L1A=0; 3: -1, L1A=0, 1; 5: -2, -1, L1A=0, 1, 

0118 # online is used 5

0119 process.l1RequestPhAlgos.L1NrBxInEvent = cms.int32(5)
0120 
0121 # Request the or of the following bits: from 54 to 62 and 106-107

0122 
0123 process.l1RequestPhAlgos.L1SeedsLogicalExpression = cms.string(
0124     'L1_SingleMuBeamHalo OR L1_SingleMuOpen OR L1_SingleMu0 OR L1_SingleMu3 OR L1_SingleMu5 OR L1_SingleMu7 OR L1_SingleMu10 OR L1_SingleMu14 OR L1_SingleMu20 OR L1_DoubleMuOpen OR L1_DoubleMu3')
0125 
0126 process.l1MuBitsSkim = cms.Path(process.l1RequestPhAlgos)
0127 
0128 ###########################################################################

0129 
0130 
0131 ########################## RPC Filters ############################

0132 
0133 process.l1RequestTecAlgos = process.hltLevel1GTSeed.clone()
0134 
0135 process.l1RequestTecAlgos.L1TechTriggerSeeding = cms.bool(True)
0136 process.l1RequestTecAlgos.L1SeedsLogicalExpression = cms.string('31')
0137 
0138 process.rpcTecSkim = cms.Path(process.l1RequestTecAlgos)
0139 
0140 ###########################################################################

0141 ########################## CSC Filter ############################

0142 
0143 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
0144 #set to minimum activity

0145 process.cscSkim.minimumSegments = 1
0146 process.cscSkim.minimumHitChambers = 1
0147 
0148 # this is for filtering on HLT path

0149 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
0150      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
0151      HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want

0152      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key

0153      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true

0154      throw = cms.bool(False)    # throw exception on unknown path names

0155  )
0156 
0157 # path already defined above

0158 #### the paths (single paths wrt combined paths above)

0159 process.cscHLTSkim = cms.Path(process.hltBeamHalo)
0160 process.cscSkimAlone = cms.Path(process.cscSkim)
0161 ###########################################################################

0162 
0163 ########################## Muon tracks Filter ############################

0164 process.muonSkim=cms.EDFilter("CandViewCountFilter", 
0165                  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
0166 process.muonTracksSkim = cms.Path(process.muonSkim)
0167 
0168 
0169 ###########################################################################

0170 
0171 
0172 
0173 process.outputMuonDPGSkim = cms.OutputModule("PoolOutputModule",
0174     fileName = cms.untracked.string('/tmp/azzi/COMM_MuonDPGSkim.root'),
0175     outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
0176     dataset = cms.untracked.PSet(
0177               dataTier = cms.untracked.string('RAW-RECO'),
0178               filterName = cms.untracked.string('MuonDPG_skim')),
0179     SelectEvents = cms.untracked.PSet(
0180         SelectEvents = cms.vstring("l1MuBitsSkim","dtHLTSkim","dtSkim","cscHLTSkim","cscSkimAlone","rpcTecSkim","muonTracksSkim")
0181     )
0182 )
0183 ####################################################################################

0184 
0185 #################################logerrorharvester############################################

0186 process.load("FWCore.Modules.logErrorFilter_cfi")
0187 from Configuration.StandardSequences.RawToDigi_Data_cff import gtEvmDigis
0188 
0189 process.gtEvmDigis = gtEvmDigis.clone()
0190 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
0191                                   L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
0192                                   AllowedBeamMode = cms.vuint32(11),
0193                                   saveTags = cms.bool(False)
0194                                   )
0195 
0196 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
0197 
0198 process.outlogerr = cms.OutputModule("PoolOutputModule",
0199                                outputCommands =  process.FEVTEventContent.outputCommands,
0200                                fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
0201                                dataset = cms.untracked.PSet(
0202                                   dataTier = cms.untracked.string('RAW-RECO'),
0203                                   filterName = cms.untracked.string('Skim_logerror')),
0204                                
0205                                SelectEvents = cms.untracked.PSet(
0206     SelectEvents = cms.vstring("logerrorpath")
0207     ))
0208 
0209 #===========================================================

0210 
0211 
0212 process.options = cms.untracked.PSet(
0213  wantSummary = cms.untracked.bool(True)
0214 )
0215 
0216 process.outpath = cms.EndPath(process.outputMuonDPGSkim+process.outlogerr)
0217 
0218 
0219 
0220