CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/DPGAnalysis/Skims/python/CommPDSkim_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.4 $'),
00007     name = cms.untracked.string('$Source: /local/reps/CMSSW/CMSSW/DPGAnalysis/Skims/python/CommPDSkim_cfg.py,v $'),
00008     annotation = cms.untracked.string('Combined Commissioning skim')
00009 )
00010 
00011 # efficiency on 1000 input events
00012 # file:/tmp/malgeri/COMM_MuonDPGSkim.root
00013 # /tmp/azzi/COMM_MuonDPGSkim.root ( 271 events, 118916076 bytes )
00014 
00015 #
00016 #
00017 # This is for testing purposes.
00018 #
00019 #
00020 process.source = cms.Source("PoolSource",
00021                             fileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RECO/v1/000/136/066/244E5A07-9466-DF11-9091-000423D95220.root'),
00022                            secondaryFileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RAW/v1/000/136/066/28D89EF5-3C66-DF11-9AAA-0019B9F705A3.root')
00023 )
00024 
00025 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
00026 
00027 process.maxEvents = cms.untracked.PSet(
00028     input = cms.untracked.int32(500)
00029 )
00030 
00031 
00032 #------------------------------------------
00033 # Load standard sequences.
00034 #------------------------------------------
00035 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
00036 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
00037 
00038 
00039 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
00040 process.GlobalTag.globaltag = 'GR10_P_V8::All' 
00041 
00042 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
00043 process.load("Configuration/StandardSequences/Reconstruction_cff")
00044 process.load('Configuration/EventContent/EventContent_cff')
00045 
00046 #drop collections created on the fly
00047 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
00048 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
00049 
00050 #
00051 #  Load common sequences
00052 #
00053 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
00054 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
00055 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
00056 
00057 
00058 ###################### DT Activity Filter ######################
00059 
00060 from EventFilter.DTRawToDigi.dtunpackerDDUGlobal_cfi import dtunpacker
00061 
00062 process.muonDTDigis = dtunpacker.clone()
00063 
00064 process.HLTDTActivityFilter = cms.EDFilter( "HLTDTActivityFilter",
00065     inputDCC         = cms.InputTag( "dttfDigis" ),
00066     inputDDU         = cms.InputTag( "muonDTDigis" ),
00067     inputRPC         = cms.InputTag( "hltGtDigis" ),
00068     inputDigis       = cms.InputTag( "muonDTDigis" ),
00069     processDCC       = cms.bool( False ),
00070     processDDU       = cms.bool( False ),
00071     processRPC       = cms.bool( False ),
00072     processDigis     = cms.bool( True ),
00073 
00074     maxDeltaPhi = cms.double( 1.0 ),
00075     maxDeltaEta = cms.double( 0.3 ),
00076 
00077     orTPG         = cms.bool( True ),
00078     orRPC         = cms.bool( True ),
00079     orDigi        = cms.bool( True ),
00080 
00081     minChamberLayers = cms.int32( 5 ),
00082     maxStation       = cms.int32( 3 ),
00083     minTPGQual       = cms.int32( 2 ),   # 0-1=L 2-3=H 4=LL 5=HL 6=HH
00084     minDDUBX         = cms.int32( 8 ),
00085     maxDDUBX         = cms.int32( 13 ),
00086     minDCCBX         = cms.int32( -1 ),
00087     maxDCCBX         = cms.int32( 1 ),
00088     minRPCBX         = cms.int32( -1 ),
00089     maxRPCBX         = cms.int32( 1 ),
00090     minActiveChambs  = cms.int32( 1 ),
00091     activeSectors    = cms.vint32(1,2,3,4,5,6,7,8,9,10,11,12)
00092                                      )
00093 
00094 # this is for filtering on HLT path
00095 process.HLTDT =cms.EDFilter("HLTHighLevel",
00096      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
00097      HLTPaths = cms.vstring('HLT_L1MuOpen','HLT_Activity_DT', 'HLT_Activity_DT_Tuned'),           # provide list of HLT paths (or patterns) you want
00098      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
00099      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
00100      throw = cms.bool(False)    # throw exception on unknown path names
00101  )
00102 
00103 process.dtHLTSkim = cms.Path(process.HLTDT)
00104 
00105 process.dtSkim=cms.Path(process.muonDTDigis+process.HLTDTActivityFilter)
00106 
00107 
00108 ############################ L1 Muon bits #################################
00109 
00110 process.l1RequestPhAlgos = process.hltLevel1GTSeed.clone()
00111 # False allows to read directly from L1 instead fo candidate ObjectMap
00112 process.l1RequestPhAlgos.L1UseL1TriggerObjectMaps = cms.bool(False)
00113     #
00114     # option used forL1UseL1TriggerObjectMaps = False only
00115     # number of BxInEvent: 1: L1A=0; 3: -1, L1A=0, 1; 5: -2, -1, L1A=0, 1, 
00116 # online is used 5
00117 process.l1RequestPhAlgos.L1NrBxInEvent = cms.int32(5)
00118 
00119 # Request the or of the following bits: from 54 to 62 and 106-107
00120 
00121 process.l1RequestPhAlgos.L1SeedsLogicalExpression = cms.string(
00122     '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')
00123 
00124 process.l1MuBitsSkim = cms.Path(process.l1RequestPhAlgos)
00125 
00126 ###########################################################################
00127 
00128 
00129 ########################## RPC Filters ############################
00130 
00131 process.l1RequestTecAlgos = process.hltLevel1GTSeed.clone()
00132 
00133 process.l1RequestTecAlgos.L1TechTriggerSeeding = cms.bool(True)
00134 process.l1RequestTecAlgos.L1SeedsLogicalExpression = cms.string('31')
00135 
00136 process.rpcTecSkim = cms.Path(process.l1RequestTecAlgos)
00137 
00138 ###########################################################################
00139 ########################## CSC Filter ############################
00140 
00141 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
00142 #set to minimum activity
00143 process.cscSkim.minimumSegments = 1
00144 process.cscSkim.minimumHitChambers = 1
00145 
00146 # this is for filtering on HLT path
00147 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
00148      TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
00149      HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want
00150      eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
00151      andOr = cms.bool(True),             # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
00152      throw = cms.bool(False)    # throw exception on unknown path names
00153  )
00154 
00155 # path already defined above
00156 #### the paths (single paths wrt combined paths above)
00157 process.cscHLTSkim = cms.Path(process.hltBeamHalo)
00158 process.cscSkimAlone = cms.Path(process.cscSkim)
00159 ###########################################################################
00160 
00161 ########################## Muon tracks Filter ############################
00162 process.muonSkim=cms.EDFilter("CandViewCountFilter", 
00163                  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
00164 process.muonTracksSkim = cms.Path(process.muonSkim)
00165 
00166 
00167 ###########################################################################
00168 
00169 
00170 
00171 process.outputMuonDPGSkim = cms.OutputModule("PoolOutputModule",
00172     fileName = cms.untracked.string('/tmp/azzi/COMM_MuonDPGSkim.root'),
00173     outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
00174     dataset = cms.untracked.PSet(
00175               dataTier = cms.untracked.string('RAW-RECO'),
00176               filterName = cms.untracked.string('MuonDPG_skim')),
00177     SelectEvents = cms.untracked.PSet(
00178         SelectEvents = cms.vstring("l1MuBitsSkim","dtHLTSkim","dtSkim","cscHLTSkim","cscSkimAlone","rpcTecSkim","muonTracksSkim")
00179     )
00180 )
00181 ####################################################################################
00182 
00183 #################################logerrorharvester############################################
00184 process.load("FWCore.Modules.logErrorFilter_cfi")
00185 from Configuration.StandardSequences.RawToDigi_Data_cff import gtEvmDigis
00186 
00187 process.gtEvmDigis = gtEvmDigis.clone()
00188 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
00189                                   L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
00190                                   AllowedBeamMode = cms.vuint32(11)
00191                                   )
00192 
00193 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
00194 
00195 process.outlogerr = cms.OutputModule("PoolOutputModule",
00196                                outputCommands =  process.FEVTEventContent.outputCommands,
00197                                fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
00198                                dataset = cms.untracked.PSet(
00199                                   dataTier = cms.untracked.string('RAW-RECO'),
00200                                   filterName = cms.untracked.string('Skim_logerror')),
00201                                
00202                                SelectEvents = cms.untracked.PSet(
00203     SelectEvents = cms.vstring("logerrorpath")
00204     ))
00205 
00206 #===========================================================
00207 
00208 
00209 process.options = cms.untracked.PSet(
00210  wantSummary = cms.untracked.bool(True)
00211 )
00212 
00213 process.outpath = cms.EndPath(process.outputMuonDPGSkim+process.outlogerr)
00214 
00215 
00216 
00217