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_cff import ticlDumper
6 # Validation
8 from RecoLocalCalo.HGCalRecProducers.recHitMapProducer_cfi import recHitMapProducer
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 allTrackstersToSimTrackstersAssociationsByLCs
17 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociationByHits_cfi import allTrackstersToSimTrackstersAssociationsByHits
18 from SimCalorimetry.HGCalAssociatorProducers.SimClusterToCaloParticleAssociation_cfi import SimClusterToCaloParticleAssociation
19 
20 
21 def customiseTICLFromReco(process):
22  # TensorFlow ESSource
23  process.TFESSource = cms.Task(process.trackdnn_source)
24 
25  process.hgcalLayerClustersTask = cms.Task(process.hgcalLayerClustersEE,
26  process.hgcalLayerClustersHSi,
27  process.hgcalLayerClustersHSci,
28  process.hgcalMergeLayerClusters)
29 
30 # Reconstruction
31  process.TICL = cms.Path(process.hgcalLayerClustersTask,
32  process.TFESSource,
33  process.ticlLayerTileTask,
34  process.ticlIterationsTask,
35  process.ticlTracksterMergeTask)
36 # Validation
37  process.TICL_ValidationProducers = cms.Task(process.recHitMapProducer,
38  process.lcAssocByEnergyScoreProducer,
39  process.layerClusterCaloParticleAssociationProducer,
40  process.scAssocByEnergyScoreProducer,
41  process.layerClusterSimClusterAssociationProducer,
42  process.simTsAssocByEnergyScoreProducer,
43  process.simTracksterHitLCAssociatorByEnergyScoreProducer,
44  process.allTrackstersToSimTrackstersAssociationsByLCs,
45  process.allTrackstersToSimTrackstersAssociationsByHits,
46  process.SimClusterToCaloParticleAssociation,
47  )
48 
49  process.TICL_Validator = cms.Task(process.hgcalValidator)
50  process.TICL_Validation = cms.Path(process.TICL_ValidationProducers,
51  process.TICL_Validator
52  )
53 # Path and EndPath definitions
54  process.FEVTDEBUGHLToutput_step = cms.EndPath(process.FEVTDEBUGHLToutput)
55  process.DQMoutput_step = cms.EndPath(process.DQMoutput)
56 
57 # Schedule definition
58  process.schedule = cms.Schedule(process.TICL,
59  process.TICL_Validation,
60  process.FEVTDEBUGHLToutput_step,
61  process.DQMoutput_step)
62 # call to customisation function customiseHGCalOnlyEventContent imported from RecoHGCal.Configuration.RecoHGCal_EventContent_cff
63  process = customiseHGCalOnlyEventContent(process)
64 
65  return process
66 
67 
69 
70  process.ticlDumper = ticlDumper.clone()
71 
72  process.TFileService = cms.Service("TFileService",
73  fileName=cms.string("histo.root")
74  )
75  process.FEVTDEBUGHLToutput_step = cms.EndPath(
76  process.FEVTDEBUGHLToutput + process.ticlDumper)
77  return process