Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:59:32

0001 import FWCore.ParameterSet.Config as cms
0002 
0003 from RecoLocalCalo.HGCalRecProducers.HGCalUncalibRecHit_cfi import *
0004 from RecoLocalCalo.HGCalRecProducers.HGCalRecHit_cfi import *
0005 
0006 # patch particle flow clusters for HGC into local reco sequence
0007 # (for now until global reco is going with some sort of clustering)
0008 from RecoParticleFlow.PFClusterProducer.particleFlowRecHitHGC_cff import *
0009 from RecoParticleFlow.PFClusterProducer.particleFlowClusterHGC_cfi import *
0010 from RecoLocalCalo.HGCalRecProducers.hgcalMergeLayerClusters_cff import hgcalMergeLayerClusters
0011 from RecoLocalCalo.HGCalRecProducers.hgcalMultiClusters_cfi import hgcalMultiClusters
0012 
0013 from RecoHGCal.TICL.ticlSeedingRegionProducer_cfi import ticlSeedingRegionProducer
0014 from RecoHGCal.TICL.ticlLayerTileProducer_cfi import ticlLayerTileProducer
0015 from RecoHGCal.TICL.trackstersProducer_cfi import trackstersProducer
0016 from RecoHGCal.TICL.filteredLayerClustersProducer_cfi import filteredLayerClustersProducer
0017 from RecoHGCal.TICL.ticlCandidateFromTrackstersProducer_cfi import ticlCandidateFromTrackstersProducer
0018 from RecoHGCal.TICL.pfTICLProducer_cfi import pfTICLProducer
0019 from Validation.HGCalValidation.ticlPFValidationDefault_cfi import ticlPFValidationDefault as ticlPFValidation
0020 
0021 ## withReco: requires full reco of the event to run this part
0022 ## i.e. collections of generalTracks can be accessed
0023 def TICL_iterations_withReco(process):
0024   process.FEVTDEBUGHLTEventContent.outputCommands.extend([
0025     'keep *_ticlCandidateFromTrackstersProducer*_*_*',
0026     'keep *_pfTICLProducer*_*_*'])
0027 
0028   process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
0029 
0030   process.ticlSeedingTrk = ticlSeedingRegionProducer.clone(
0031     algoId = 1
0032   )
0033 
0034   process.filteredLayerClustersTrk = filteredLayerClustersProducer.clone(
0035     clusterFilter = "ClusterFilterByAlgo",
0036     iteration_label = "Trk"
0037   )
0038 
0039   process.trackstersTrk = trackstersProducer.clone(
0040     filtered_mask = "filteredLayerClustersTrk:Trk",
0041     seeding_regions = "ticlSeedingTrk",
0042     skip_layers = 3,
0043     min_layers_per_trackster = 5,
0044     min_cos_theta = 0.99, # ~10 degrees                                              
0045     min_cos_pointing = 0.9
0046   )
0047 
0048   process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
0049     algoId = 2
0050   )
0051 
0052   process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
0053       clusterFilter = "ClusterFilterBySize",
0054       max_cluster_size = 2, # inclusive
0055       iteration_label = "MIP"
0056   )
0057 
0058   process.trackstersMIP = trackstersProducer.clone(
0059       filtered_mask = "filteredLayerClustersMIP:MIP",
0060       seeding_regions = "ticlSeedingGlobal",
0061       skip_layers = 3,
0062       min_layers_per_trackster = 15,
0063       min_cos_theta = 0.99, # ~10 degrees
0064       min_cos_pointing = 0.9,
0065       out_in_dfs = False,
0066   )
0067 
0068   process.filteredLayerClusters = filteredLayerClustersProducer.clone(
0069       clusterFilter = "ClusterFilterByAlgoAndSize",
0070       min_cluster_size = 2,
0071       iteration_label = "algo8",
0072       LayerClustersInputMask = "trackstersMIP"
0073   )
0074 
0075   process.trackstersEM = trackstersProducer.clone(
0076       max_out_in_hops = 4,
0077       original_mask = "trackstersMIP",
0078       filtered_mask = "filteredLayerClusters:algo8",
0079       seeding_regions = "ticlSeedingGlobal",
0080       skip_layers = 1,
0081       min_layers_per_trackster = 10,
0082       min_cos_theta = 0.984, # ~10 degrees
0083       min_cos_pointing = 0.9 # ~26 degrees
0084   )
0085 
0086   process.trackstersHAD = trackstersProducer.clone(
0087       filtered_mask = "filteredLayerClusters:algo8",
0088       seeding_regions = "ticlSeedingGlobal",
0089       skip_layers = 2,
0090       min_layers_per_trackster = 10,
0091       min_cos_theta = 0.8, 
0092       min_cos_pointing = 0.7
0093   )
0094 
0095   process.ticlCandidateFromTrackstersProducer = ticlCandidateFromTrackstersProducer.clone()
0096 
0097   process.pfTICLProducer = pfTICLProducer.clone()
0098 
0099   process.hgcalMultiClusters = hgcalMultiClusters
0100   process.TICL_Task = cms.Task(
0101       process.ticlLayerTileProducer,
0102       process.ticlSeedingTrk,
0103       process.filteredLayerClustersTrk,
0104       process.trackstersTrk,
0105       process.ticlSeedingGlobal,
0106       process.filteredLayerClustersMIP,
0107       process.trackstersMIP,
0108       process.filteredLayerClusters,
0109       process.trackstersEM,
0110       process.trackstersHAD,
0111       process.ticlCandidateFromTrackstersProducer,
0112       process.pfTICLProducer)
0113 
0114   process.schedule.associate(process.TICL_Task)
0115 
0116   process.ticlPFValidation = ticlPFValidation
0117   process.hgcalValidation.insert(-1, process.ticlPFValidation)
0118   
0119   if getattr(process,'hgcalValidator'):
0120     process.hgcalValidator.label_lcl = "hgcalMergeLayerClusters"
0121     process.hgcalValidator.label_mcl = ["multiClustersFromTrackstersEM:MultiClustersFromTracksterByCA", "multiClustersFromTrackstersHAD:MultiClustersFromTracksterByCA"]
0122     process.hgcalValidator.domulticlustersPlots = True
0123     
0124   return process
0125 
0126 
0127 ## TICL_iterations: to be run with local HGCAL reco only
0128 ## i.e. collections of generalTracks (track-seeded iteration) NOT available
0129 def TICL_iterations(process):
0130   process.ticlLayerTileProducer = ticlLayerTileProducer.clone()
0131 
0132   process.ticlSeedingGlobal = ticlSeedingRegionProducer.clone(
0133     algoId = 2
0134   )
0135 
0136   process.filteredLayerClustersMIP = filteredLayerClustersProducer.clone(
0137       clusterFilter = "ClusterFilterBySize",
0138       max_cluster_size = 2, # inclusive
0139       iteration_label = "MIP"
0140   )
0141 
0142   process.trackstersMIP = trackstersProducer.clone(
0143       filtered_mask = "filteredLayerClustersMIP:MIP",
0144       seeding_regions = "ticlSeedingGlobal",
0145       skip_layers = 3,
0146       min_layers_per_trackster = 15,
0147       min_cos_theta = 0.99, # ~10 degrees
0148   )
0149 
0150   process.filteredLayerClusters = filteredLayerClustersProducer.clone(
0151       clusterFilter = "ClusterFilterByAlgoAndSize",
0152       min_cluster_size = 2,
0153       iteration_label = "algo8"
0154   )
0155 
0156   process.tracksters = trackstersProducer.clone(
0157       original_mask = "trackstersMIP",
0158       filtered_mask = "filteredLayerClusters:algo8",
0159       seeding_regions = "ticlSeedingGlobal",
0160       skip_layers = 2,
0161       min_layers_per_trackster = 15,
0162       min_cos_theta = 0.94, # ~20 degrees
0163       min_cos_pointing = 0.7
0164   )
0165 
0166   process.HGCalUncalibRecHit = HGCalUncalibRecHit
0167   process.HGCalRecHit = HGCalRecHit
0168   process.hgcalMergeLayerClusters = hgcalMergeLayerClusters
0169   process.hgcalMultiClusters = hgcalMultiClusters
0170   process.TICL_Task = cms.Task(process.HGCalUncalibRecHit,
0171       process.HGCalRecHit,
0172       process.hgcalMergeLayerClusters,
0173       process.filteredLayerClustersMIP,
0174       process.ticlLayerTileProducer,
0175       process.ticlSeedingGlobal,
0176       process.trackstersMIP,
0177       process.filteredLayerClusters,
0178       process.tracksters,
0179       process.hgcalMultiClusters)
0180   process.schedule = cms.Schedule(process.raw2digi_step,process.FEVTDEBUGHLToutput_step)
0181   process.schedule.associate(process.TICL_Task)
0182   return process
0183