CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CommPDSkim_cfg.py
Go to the documentation of this file.
2 
3 process = cms.Process("SKIM")
4 
5 process.configurationMetadata = cms.untracked.PSet(
6  version = cms.untracked.string('$Revision: 1.5 $'),
7  name = cms.untracked.string('$Source: /local/reps/CMSSW/CMSSW/DPGAnalysis/Skims/python/CommPDSkim_cfg.py,v $'),
8  annotation = cms.untracked.string('Combined Commissioning skim')
9 )
10 
11 # efficiency on 1000 input events
12 # file:/tmp/malgeri/COMM_MuonDPGSkim.root
13 # /tmp/azzi/COMM_MuonDPGSkim.root ( 271 events, 118916076 bytes )
14 
15 #
16 #
17 # This is for testing purposes.
18 #
19 #
20 process.source = cms.Source("PoolSource",
21  fileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RECO/v1/000/136/066/244E5A07-9466-DF11-9091-000423D95220.root'),
22  secondaryFileNames = cms.untracked.vstring('/store/data/Run2010A/Commissioning/RAW/v1/000/136/066/28D89EF5-3C66-DF11-9AAA-0019B9F705A3.root')
23 )
24 
25 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*")
26 
27 process.maxEvents = cms.untracked.PSet(
28  input = cms.untracked.int32(500)
29 )
30 
31 
32 #------------------------------------------
33 # Load standard sequences.
34 #------------------------------------------
35 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
36 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
37 
38 
39 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
40 process.GlobalTag.globaltag = 'GR10_P_V8::All'
41 
42 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
43 process.load("Configuration/StandardSequences/Reconstruction_cff")
44 process.load('Configuration/EventContent/EventContent_cff')
45 
46 #drop collections created on the fly
47 process.FEVTEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
48 process.FEVTEventContent.outputCommands.append("drop *_*_*_SKIM")
49 
50 #
51 # Load common sequences
52 #
53 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
54 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
55 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
56 
57 
58 ###################### DT Activity Filter ######################
59 
61 
62 process.muonDTDigis = dtunpacker.clone()
63 
64 process.hltDTActivityFilter = cms.EDFilter( "HLTDTActivityFilter",
65  inputDCC = cms.InputTag( "dttfDigis" ),
66  inputDDU = cms.InputTag( "muonDTDigis" ),
67  inputRPC = cms.InputTag( "hltGtDigis" ),
68  inputDigis = cms.InputTag( "muonDTDigis" ),
69  processDCC = cms.bool( False ),
70  processDDU = cms.bool( False ),
71  processRPC = cms.bool( False ),
72  processDigis = cms.bool( True ),
73 
74  maxDeltaPhi = cms.double( 1.0 ),
75  maxDeltaEta = cms.double( 0.3 ),
76 
77  orTPG = cms.bool( True ),
78  orRPC = cms.bool( True ),
79  orDigi = cms.bool( True ),
80 
81  minChamberLayers = cms.int32( 5 ),
82  maxStation = cms.int32( 3 ),
83  minTPGQual = cms.int32( 2 ), # 0-1=L 2-3=H 4=LL 5=HL 6=HH
84  minDDUBX = cms.int32( 8 ),
85  maxDDUBX = cms.int32( 13 ),
86  minDCCBX = cms.int32( -1 ),
87  maxDCCBX = cms.int32( 1 ),
88  minRPCBX = cms.int32( -1 ),
89  maxRPCBX = cms.int32( 1 ),
90  minActiveChambs = cms.int32( 1 ),
91  activeSectors = cms.vint32(1,2,3,4,5,6,7,8,9,10,11,12),
92  saveTags = cms.bool(False)
93  )
94 
95 # this is for filtering on HLT path
96 process.HLTDT =cms.EDFilter("HLTHighLevel",
97  TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
98  HLTPaths = cms.vstring('HLT_L1MuOpen','HLT_Activity_DT', 'HLT_Activity_DT_Tuned'), # provide list of HLT paths (or patterns) you want
99  eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
100  andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
101  throw = cms.bool(False), # throw exception on unknown path names
102  saveTags = cms.bool(False)
103 )
104 
105 process.dtHLTSkim = cms.Path(process.HLTDT)
106 
107 process.dtSkim=cms.Path(process.muonDTDigis+process.hltDTActivityFilter)
108 
109 
110 ############################ L1 Muon bits #################################
111 
112 process.l1RequestPhAlgos = process.hltLevel1GTSeed.clone()
113 # False allows to read directly from L1 instead fo candidate ObjectMap
114 process.l1RequestPhAlgos.L1UseL1TriggerObjectMaps = cms.bool(False)
115  #
116  # option used forL1UseL1TriggerObjectMaps = False only
117  # number of BxInEvent: 1: L1A=0; 3: -1, L1A=0, 1; 5: -2, -1, L1A=0, 1,
118 # online is used 5
119 process.l1RequestPhAlgos.L1NrBxInEvent = cms.int32(5)
120 
121 # Request the or of the following bits: from 54 to 62 and 106-107
122 
123 process.l1RequestPhAlgos.L1SeedsLogicalExpression = cms.string(
124  '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')
125 
126 process.l1MuBitsSkim = cms.Path(process.l1RequestPhAlgos)
127 
128 ###########################################################################
129 
130 
131 ########################## RPC Filters ############################
132 
133 process.l1RequestTecAlgos = process.hltLevel1GTSeed.clone()
134 
135 process.l1RequestTecAlgos.L1TechTriggerSeeding = cms.bool(True)
136 process.l1RequestTecAlgos.L1SeedsLogicalExpression = cms.string('31')
137 
138 process.rpcTecSkim = cms.Path(process.l1RequestTecAlgos)
139 
140 ###########################################################################
141 ########################## CSC Filter ############################
142 
143 process.load("DPGAnalysis/Skims/CSCSkim_cfi")
144 #set to minimum activity
145 process.cscSkim.minimumSegments = 1
146 process.cscSkim.minimumHitChambers = 1
147 
148 # this is for filtering on HLT path
149 process.hltBeamHalo = cms.EDFilter("HLTHighLevel",
150  TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
151  HLTPaths = cms.vstring('HLT_CSCBeamHalo','HLT_CSCBeamHaloOverlapRing1','HLT_CSCBeamHaloOverlapRing','HLT_CSCBeamHaloRing2or3'), # provide list of HLT paths (or patterns) you want
152  eventSetupPathsKey = cms.string(''), # not empty => use read paths from AlCaRecoTriggerBitsRcd via this key
153  andOr = cms.bool(True), # how to deal with multiple triggers: True (OR) accept if ANY is true, False (AND) accept if ALL are true
154  throw = cms.bool(False) # throw exception on unknown path names
155  )
156 
157 # path already defined above
158 #### the paths (single paths wrt combined paths above)
159 process.cscHLTSkim = cms.Path(process.hltBeamHalo)
160 process.cscSkimAlone = cms.Path(process.cscSkim)
161 ###########################################################################
162 
163 ########################## Muon tracks Filter ############################
164 process.muonSkim=cms.EDFilter("CandViewCountFilter",
165  src =cms.InputTag("muons"), minNumber = cms.uint32(1))
166 process.muonTracksSkim = cms.Path(process.muonSkim)
167 
168 
169 ###########################################################################
170 
171 
172 
173 process.outputMuonDPGSkim = cms.OutputModule("PoolOutputModule",
174  fileName = cms.untracked.string('/tmp/azzi/COMM_MuonDPGSkim.root'),
175  outputCommands = cms.untracked.vstring('keep *','drop *_MEtoEDMConverter_*_*'),
176  dataset = cms.untracked.PSet(
177  dataTier = cms.untracked.string('RAW-RECO'),
178  filterName = cms.untracked.string('MuonDPG_skim')),
179  SelectEvents = cms.untracked.PSet(
180  SelectEvents = cms.vstring("l1MuBitsSkim","dtHLTSkim","dtSkim","cscHLTSkim","cscSkimAlone","rpcTecSkim","muonTracksSkim")
181  )
182 )
183 ####################################################################################
184 
185 #################################logerrorharvester############################################
186 process.load("FWCore.Modules.logErrorFilter_cfi")
188 
189 process.gtEvmDigis = gtEvmDigis.clone()
190 process.stableBeam = cms.EDFilter("HLTBeamModeFilter",
191  L1GtEvmReadoutRecordTag = cms.InputTag("gtEvmDigis"),
192  AllowedBeamMode = cms.vuint32(11),
193  saveTags = cms.bool(False)
194  )
195 
196 process.logerrorpath=cms.Path(process.gtEvmDigis+process.stableBeam+process.logErrorFilter)
197 
198 process.outlogerr = cms.OutputModule("PoolOutputModule",
199  outputCommands = process.FEVTEventContent.outputCommands,
200  fileName = cms.untracked.string('/tmp/azzi/logerror_filter.root'),
201  dataset = cms.untracked.PSet(
202  dataTier = cms.untracked.string('RAW-RECO'),
203  filterName = cms.untracked.string('Skim_logerror')),
204 
205  SelectEvents = cms.untracked.PSet(
206  SelectEvents = cms.vstring("logerrorpath")
207  ))
208 
209 #===========================================================
210 
211 
212 process.options = cms.untracked.PSet(
213  wantSummary = cms.untracked.bool(True)
214 )
215 
216 process.outpath = cms.EndPath(process.outputMuonDPGSkim+process.outlogerr)
217 
218 
219 
220