CMS 3D CMS Logo

customiseTICLFromReco.py
Go to the documentation of this file.
1 # Reconstruction
3 from RecoLocalCalo.HGCalRecProducers.hgcalLayerClusters_cff import hgcalLayerClustersEE, hgcalLayerClustersHSi, hgcalLayerClustersHSci
4 from RecoLocalCalo.HGCalRecProducers.hgcalMergeLayerClusters_cfi import hgcalMergeLayerClusters
5 from RecoHGCal.TICL.ticlDumper_cfi import ticlDumper
6 # Validation
8 from RecoLocalCalo.HGCalRecProducers.hgcalRecHitMapProducer_cfi import hgcalRecHitMapProducer
9 
10 # Load DNN ESSource
11 from RecoTracker.IterativeTracking.iterativeTk_cff import trackdnn_source
12 
13 # Automatic addition of the customisation function from RecoHGCal.Configuration.RecoHGCal_EventContent_cff
14 from RecoHGCal.Configuration.RecoHGCal_EventContent_cff import customiseHGCalOnlyEventContent
15 from SimCalorimetry.HGCalAssociatorProducers.simTracksterAssociatorByEnergyScore_cfi import simTracksterAssociatorByEnergyScore as simTsAssocByEnergyScoreProducer
16 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociation_cfi import tracksterSimTracksterAssociationLinking, tracksterSimTracksterAssociationPR, tracksterSimTracksterAssociationLinkingbyCLUE3D, tracksterSimTracksterAssociationPRbyCLUE3D, tracksterSimTracksterAssociationLinkingPU, tracksterSimTracksterAssociationPRPU
17 
18 
19 def customiseTICLFromReco(process):
20  # TensorFlow ESSource
21  process.TFESSource = cms.Task(process.trackdnn_source)
22 
23  process.hgcalLayerClustersTask = cms.Task(process.hgcalLayerClustersEE,
24  process.hgcalLayerClustersHSi,
25  process.hgcalLayerClustersHSci,
26  process.hgcalMergeLayerClusters)
27 
28 # Reconstruction
29  process.TICL = cms.Path(process.hgcalLayerClustersTask,
30  process.TFESSource,
31  process.ticlLayerTileTask,
32  process.ticlIterationsTask,
33  process.ticlTracksterMergeTask)
34 # Validation
35  process.TICL_ValidationProducers = cms.Task(process.hgcalRecHitMapProducer,
36  process.lcAssocByEnergyScoreProducer,
37  process.layerClusterCaloParticleAssociationProducer,
38  process.scAssocByEnergyScoreProducer,
39  process.layerClusterSimClusterAssociationProducer,
40  process.simTsAssocByEnergyScoreProducer,
41  process.simTracksterHitLCAssociatorByEnergyScoreProducer,
42  process.tracksterSimTracksterAssociationLinking,
43  process.tracksterSimTracksterAssociationPR,
44  process.tracksterSimTracksterAssociationLinkingbyCLUE3D,
45  process.tracksterSimTracksterAssociationPRbyCLUE3D,
46  process.tracksterSimTracksterAssociationLinkingPU,
47  process.tracksterSimTracksterAssociationPRPU
48  )
49 
50  process.TICL_Validator = cms.Task(process.hgcalValidator)
51  process.TICL_Validation = cms.Path(process.TICL_ValidationProducers,
52  process.TICL_Validator
53  )
54 # Path and EndPath definitions
55  process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
56  process.DQMoutput_step = cms.EndPath(process.DQMoutput)
57 
58 # Schedule definition
59  process.schedule = cms.Schedule(process.TICL,
60  process.TICL_Validation,
61  process.FEVTDEBUGHLToutput_step,
62  process.DQMoutput_step)
63 # call to customisation function customiseHGCalOnlyEventContent imported from RecoHGCal.Configuration.RecoHGCal_EventContent_cff
64  process = customiseHGCalOnlyEventContent(process)
65 
66  return process
67 
68 
70 
71  process.ticlDumper = ticlDumper.clone(
72  saveLCs=True,
73  saveCLUE3DTracksters=True,
74  saveTrackstersMerged=True,
75  saveSimTrackstersSC=True,
76  saveSimTrackstersCP=True,
77  saveTICLCandidate=True,
78  saveSimTICLCandidate=True,
79  saveTracks=True,
80  saveAssociations=True,
81  )
82  process.TFileService = cms.Service("TFileService",
83  fileName=cms.string("histo.root")
84  )
85  process.FEVTDEBUGHLToutput_step = cms.EndPath(
86  process.FEVTDEBUGHLToutput + process.ticlDumper)
87  return process