-
Notifications
You must be signed in to change notification settings - Fork 4
/
RECO.py
57 lines (45 loc) · 2.52 KB
/
RECO.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
# coding: utf-8
import FWCore.ParameterSet.Config as cms
from FWCore.ParameterSet.VarParsing import VarParsing
from reco_prodtools.templates.RECO_fragment import process
# option parsing
options = VarParsing('python')
options.setDefault('outputFile', 'file:partGun_PDGid22_x96_Pt1.0To100.0_RECO_1.root')
options.setDefault('inputFiles', "file://partGun_PDGid22_x96_Pt1.0To100.0_GSD_1.root")
options.setDefault('maxEvents', -1)
options.register('outputFileDQM', 'file:partGun_PDGid22_x96_Pt1.0To100.0_DQM_1.root',
VarParsing.multiplicity.singleton, VarParsing.varType.string, 'path to the DQM output file')
options.parseArguments()
process.maxEvents.input = cms.untracked.int32(options.maxEvents)
process.load("SimTracker.TrackAssociation.trackingParticleRecoTrackAsssociation_cfi")
# append the HGCTruthProducer to the recosim step
process.hgcSimTruth = cms.EDProducer("HGCTruthProducer",
)
process.trackingParticleMergedSCAssociation = cms.EDProducer("TrackingParticleSimClusterAssociationProducer",
simClusters = cms.InputTag("mix:MergedCaloTruth"),
trackingParticles= cms.InputTag("mix:MergedTrackTruth")
)
process.trackingParticleSimClusterAssociation = cms.EDProducer("TrackingParticleSimClusterAssociationProducer",
#simClusters = cms.InputTag("mix:MergedCaloTruth"),
simClusters = cms.InputTag("hgcSimTruth"),
trackingParticles= cms.InputTag("mix:MergedTrackTruth")
)
process.recosim_step *= process.hgcSimTruth
process.recosim_step *= process.trackingParticleRecoTrackAsssociation
process.recosim_step *= process.trackingParticleSimClusterAssociation
process.recosim_step *= process.trackingParticleMergedSCAssociation
#process.dump=cms.EDAnalyzer('EventContentAnalyzer')
#process.recosim_step += process.dump
# Input source
process.source.fileNames = cms.untracked.vstring(options.inputFiles)
# Output definition
process.FEVTDEBUGoutput.fileName = cms.untracked.string(
options.__getattr__("outputFile", noTags=True))
process.FEVTDEBUGoutput.outputCommands.append("keep *_*G4*_*_*")
process.FEVTDEBUGoutput.outputCommands.append("keep *_trackingParticleRecoTrackAsssociation_*_*")
process.FEVTDEBUGoutput.outputCommands.append("keep *_MergedTrackTruth_*_*")
process.FEVTDEBUGoutput.outputCommands.append("keep *_hgcSimTruth_*_*")
process.FEVTDEBUGoutput.outputCommands.append("keep *_trackingParticleSimClusterAssociation_*_*")
process.FEVTDEBUGoutput.outputCommands.append("keep *_trackingParticleMergedSCAssociation_*_*")
if hasattr(process, "DQMoutput"):
process.DQMoutput.fileName = cms.untracked.string(options.outputFileDQM)