CMS 3D CMS Logo

customiseForTICLv5_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from RecoHGCal.TICL.ticlDumper_cff import ticlDumper
4 from RecoHGCal.Configuration.RecoHGCal_EventContent_cff import customiseForTICLv5EventContent
5 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociation_cfi import tracksterSimTracksterAssociationLinkingbyCLUE3D as _tracksterSimTracksterAssociationLinkingbyCLUE3D
6 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociation_cfi import tracksterSimTracksterAssociationPRbyCLUE3D as _tracksterSimTracksterAssociationPRbyCLUE3D
7 
8 def customiseTICLv5FromReco(process, enableDumper = False):
9  # TensorFlow ESSource
10  process.TFESSource = cms.Task(process.trackdnn_source)
11 
12  # Reconstruction
13  process.hgcalLayerClustersTask = cms.Task(process.hgcalLayerClustersEE,
14  process.hgcalLayerClustersHSi,
15  process.hgcalLayerClustersHSci,
16  process.hgcalMergeLayerClusters)
17 
18  process.ticlIterationsTask = cms.Task(
19  process.ticlCLUE3DHighStepTask,
20  process.ticlTracksterLinksTask,
21  process.ticlPassthroughStepTask
22  )
23 
24  process.mergeTICLTask = cms.Task()
25 
26  process.iterTICLTask = cms.Path(process.hgcalLayerClustersTask,
27  process.TFESSource,
28  process.ticlLayerTileTask,
29  process.mtdSoATask,
30  process.mergeTICLTask,
31  process.ticlIterationsTask,
32  process.ticlCandidateTask,
33  process.ticlPFTask)
34 
35  process.tracksterSimTracksterAssociationLinkingbyCLUE3DHigh = _tracksterSimTracksterAssociationLinkingbyCLUE3D.clone(
36  label_tst = cms.InputTag("ticlTrackstersCLUE3DHigh")
37  )
38  process.tracksterSimTracksterAssociationPRbyCLUE3DHigh = _tracksterSimTracksterAssociationPRbyCLUE3D.clone(
39  label_tst = cms.InputTag("ticlTrackstersCLUE3DHigh")
40  )
41 
42  '''for future CLUE3D separate iterations, merge collections and compute scores
43  process.tracksterSimTracksterAssociationLinkingbyCLUE3DEM = _tracksterSimTracksterAssociationLinkingbyCLUE3D.clone(
44  label_tst = cms.InputTag("ticlTrackstersCLUE3DEM")
45  )
46  process.tracksterSimTracksterAssociationPRbyCLUE3DEM = _tracksterSimTracksterAssociationPRbyCLUE3D.clone(
47  label_tst = cms.InputTag("ticlTrackstersCLUE3DEM")
48  )
49  process.tracksterSimTracksterAssociationLinkingbyCLUE3DHAD = _tracksterSimTracksterAssociationLinkingbyCLUE3D.clone(
50  label_tst = cms.InputTag("ticlTrackstersCLUE3DHAD")
51  )
52  process.tracksterSimTracksterAssociationPRbyCLUE3DHAD = _tracksterSimTracksterAssociationPRbyCLUE3D.clone(
53  label_tst = cms.InputTag("ticlTrackstersCLUE3DHAD")
54  )
55 
56  process.mergedTrackstersProducer = _mergedTrackstersProducer.clone()
57  process.tracksterSimTracksterAssociationLinkingbyCLUE3D = _tracksterSimTracksterAssociationLinkingbyCLUE3D.clone(
58  label_tst = cms.InputTag("mergedTrackstersProducer")
59  )
60  process.tracksterSimTracksterAssociationPRbyCLUE3D = _tracksterSimTracksterAssociationPRbyCLUE3D.clone(
61  label_tst = cms.InputTag("mergedTrackstersProducer")
62  )
63  '''
64 
65  process.hgcalAssociators = cms.Task(process.recHitMapProducer, process.lcAssocByEnergyScoreProducer, process.layerClusterCaloParticleAssociationProducer,
66  process.scAssocByEnergyScoreProducer, process.layerClusterSimClusterAssociationProducer,
67  process.lcSimTSAssocByEnergyScoreProducer, process.layerClusterSimTracksterAssociationProducer,
68  process.simTsAssocByEnergyScoreProducer, process.simTracksterHitLCAssociatorByEnergyScoreProducer,
69  process.tracksterSimTracksterAssociationLinking, process.tracksterSimTracksterAssociationPR,
70  process.tracksterSimTracksterAssociationLinkingbyCLUE3DHigh, process.tracksterSimTracksterAssociationPRbyCLUE3DHigh,
71  process.tracksterSimTracksterAssociationLinkingPU, process.tracksterSimTracksterAssociationPRPU
72  )
73 
74  '''for future CLUE3D separate iterations, merge collections and compute scores
75  process.tracksterSimTracksterAssociationLinkingbyCLUE3D, process.tracksterSimTracksterAssociationPRbyCLUE3D,
76  process.tracksterSimTracksterAssociationLinkingbyCLUE3DEM, process.tracksterSimTracksterAssociationPRbyCLUE3DEM,
77  process.tracksterSimTracksterAssociationLinkingbyCLUE3DHAD, process.tracksterSimTracksterAssociationPRbyCLUE3DHAD,
78  '''
79 
80  if(enableDumper):
81  process.ticlDumper = ticlDumper
82  process.TFileService = cms.Service("TFileService",
83  fileName=cms.string("histo.root")
84  )
85 
86  process.FEVTDEBUGHLToutput_step = cms.EndPath(process.ticlDumper)
87 
88  process.TICL_Validator = cms.Task(process.hgcalValidator)
89  process.TICL_Validation = cms.Path(process.ticlSimTrackstersTask, process.hgcalAssociators, process.TICL_Validator)
90 
91  # Schedule definition
92  process.schedule = cms.Schedule(process.iterTICLTask,
93  process.TICL_Validation,
94  process.FEVTDEBUGHLToutput_step)
95  process = customiseForTICLv5EventContent(process)
96 
97  return process
def customiseTICLv5FromReco(process, enableDumper=False)
if(threadIdxLocalY==0 &&threadIdxLocalX==0)