CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GOODCOLL_filter_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.4 $'),
7  name = cms.untracked.string('$Source: /local/reps/CMSSW/CMSSW/DPGAnalysis/Skims/python/GOODCOLL_filter_cfg.py,v $'),
8  annotation = cms.untracked.string('Combined MinBias skim')
9 )
10 
11 #
12 #
13 # This is for testing purposes.
14 #
15 #
16 process.source = cms.Source("PoolSource",
17  fileNames = cms.untracked.vstring(
18 # run 136066 lumi~500
19 '/store/data/Run2010A/MinimumBias/RECO/v1/000/136/066/18F6DB82-5566-DF11-B289-0030487CAF0E.root'),
20 )
21 
22 process.source.inputCommands = cms.untracked.vstring("keep *", "drop *_MEtoEDMConverter_*_*", "drop L1GlobalTriggerObjectMapRecord_hltL1GtObjectMap__HLT")
23 
24 process.maxEvents = cms.untracked.PSet(
25  input = cms.untracked.int32(1000)
26 )
27 
28 
29 #------------------------------------------
30 # Load standard sequences.
31 #------------------------------------------
32 process.load('Configuration/StandardSequences/MagneticField_AutoFromDBCurrent_cff')
33 process.load('Configuration/StandardSequences/GeometryIdeal_cff')
34 
35 
36 process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
37 process.GlobalTag.globaltag = 'GR10_P_V6::All'
38 
39 process.load("Configuration/StandardSequences/RawToDigi_Data_cff")
40 process.load("Configuration/StandardSequences/Reconstruction_cff")
41 process.load('Configuration/EventContent/EventContent_cff')
42 
43 #drop collections created on the fly
44 process.RECOEventContent.outputCommands.append("drop *_MEtoEDMConverter_*_*")
45 process.RECOEventContent.outputCommands.append("drop *_*_*_SKIM")
46 
47 #
48 # Load common sequences
49 #
50 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskAlgoTrigConfig_cff')
51 process.load('L1TriggerConfig.L1GtConfigProducers.L1GtTriggerMaskTechTrigConfig_cff')
52 process.load('HLTrigger/HLTfilters/hltLevel1GTSeed_cfi')
53 
54 ##################################good collisions############################################
55 # This filter select ~73% of events in MinBias PD
56 
57 process.L1T1coll=process.hltLevel1GTSeed.clone()
58 process.L1T1coll.L1TechTriggerSeeding = cms.bool(True)
59 process.L1T1coll.L1SeedsLogicalExpression = cms.string('0 AND (40 OR 41) AND NOT (36 OR 37 OR 38 OR 39) AND NOT ((42 AND NOT 43) OR (43 AND NOT 42))')
60 
61 process.l1tcollpath = cms.Path(process.L1T1coll)
62 
63 process.primaryVertexFilter = cms.EDFilter("VertexSelector",
64  src = cms.InputTag("offlinePrimaryVertices"),
65  cut = cms.string("!isFake && ndof > 4 && abs(z) <= 15 && position.Rho <= 2"), # tracksSize() > 3 for the older cut
66  filter = cms.bool(True), # otherwise it won't filter the events, just produce an empty vertex collection.
67 )
68 
69 
70 process.noscraping = cms.EDFilter("FilterOutScraping",
71 applyfilter = cms.untracked.bool(True),
72 debugOn = cms.untracked.bool(False),
73 numtrack = cms.untracked.uint32(10),
74 thresh = cms.untracked.double(0.25)
75 )
76 
77 process.selectHF = cms.EDFilter("SelectHFMinBias",
78 applyfilter = cms.untracked.bool(True)
79 )
80 
81 process.goodvertex=cms.Path(process.primaryVertexFilter+process.noscraping)
82 process.selecthf = cms.Path(process.selectHF)
83 
84 process.collout = cms.OutputModule("PoolOutputModule",
85  fileName = cms.untracked.string('good_coll_reco.root'),
86  outputCommands = process.RECOEventContent.outputCommands,
87  dataset = cms.untracked.PSet(
88  dataTier = cms.untracked.string('RECO'),
89  filterName = cms.untracked.string('GOODCOLL')),
90  SelectEvents = cms.untracked.PSet(
91  SelectEvents = cms.vstring('goodvertex','l1tcollpath','selecthf')
92  )
93 )
94 
95 
96 ###########################################################################
97 process.options = cms.untracked.PSet(
98  wantSummary = cms.untracked.bool(True)
99 )
100 
101 process.outpath = cms.EndPath(process.collout)
102 
103