-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrun_offset.py
85 lines (69 loc) · 3.2 KB
/
run_offset.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
# PYTHON configuration file for class: OffsetTreeMaker
# Author: C. Harrington
# Date: 19 - January - 2015
import FWCore.ParameterSet.Config as cms
process = cms.Process("Ana")
process.load("FWCore.MessageService.MessageLogger_cfi")
process.MessageLogger.cerr.FwkReport.reportEvery = 1000
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )
process.options = cms.untracked.PSet( wantSummary = cms.untracked.bool(True) )
process.options.allowUnscheduled = cms.untracked.bool(True)
readFiles = cms.untracked.vstring()
process.source = cms.Source ("PoolSource", fileNames = readFiles)
readFiles.extend( [
'/store/data/Run2017B/ZeroBias/AOD/17Nov2017-v1/20000/00D69F39-6BD3-E711-8F55-44A842CF05E6.root'
] );
isMC = cms.bool(False)
if isMC:
OutputName = "_MC"
#process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff" )
#from Configuration.AlCa.GlobalTag import GlobalTag
#process.GlobalTag = GlobalTag( process.GlobalTag, '76X_mcRun2_asymptotic_v12' )
else:
OutputName = "_Data"
process.load( "Configuration.Geometry.GeometryIdeal_cff" )
process.load( "Configuration.StandardSequences.MagneticField_AutoFromDBCurrent_cff" )
process.load( "Configuration.StandardSequences.FrontierConditions_GlobalTag_condDBv2_cff" )
from Configuration.AlCa.GlobalTag import GlobalTag
process.GlobalTag = GlobalTag( process.GlobalTag, '94X_dataRun2_ReReco17_forValidation' )
# ZeroBias Trigger
process.HLTZeroBias =cms.EDFilter("HLTHighLevel",
TriggerResultsTag = cms.InputTag("TriggerResults","","HLT"),
HLTPaths = cms.vstring('HLT_ZeroBias_part*','HLT_ZeroBias_v*'),
eventSetupPathsKey = cms.string(''),
andOr = cms.bool(True), #----- True = OR, False = AND between the HLTPaths
throw = cms.bool(False)
)
#Beam Halo
process.load('RecoMET.METFilters.CSCTightHaloFilter_cfi')
#HCAL HBHE
process.load('CommonTools.RecoAlgos.HBHENoiseFilterResultProducer_cfi')
process.HBHENoiseFilterResultProducer.minZeros = cms.int32(99999)
process.ApplyBaselineHBHENoiseFilter = cms.EDFilter('BooleanFlagFilter',
inputLabel = cms.InputTag('HBHENoiseFilterResultProducer','HBHENoiseFilterResultRun2Tight'),
reverseDecision = cms.bool(False)
)
process.pf = cms.EDAnalyzer("OffsetTreeMaker",
numSkip = cms.int32(101),
RootFileName = cms.string("Offset" + OutputName + ".root"),
puFileName = cms.string("lumi-per-bx.root"),
isMC = isMC,
writeCands = cms.bool(True),
trackTag = cms.InputTag("generalTracks"),
pfTag = cms.InputTag("particleFlow"),
pvTag = cms.InputTag("offlinePrimaryVertices"),
muTag = cms.InputTag("addPileupInfo"),
rhoTag = cms.InputTag("fixedGridRhoFastjetAll"),
rhoC0Tag = cms.InputTag("fixedGridRhoFastjetCentralNeutral"),
rhoCCTag = cms.InputTag("fixedGridRhoFastjetCentralChargedPileUp"),
pfJetTag = cms.InputTag("ak4PFJetsCHS")
)
process.myseq = cms.Sequence( process.pf )
if isMC :
process.p = cms.Path( process.myseq )
else:
process.p = cms.Path( process.HLTZeroBias *
process.CSCTightHaloFilter *
process.HBHENoiseFilterResultProducer *
process.ApplyBaselineHBHENoiseFilter *
process.myseq )