CMS 3D CMS Logo

hgcalSimValid_cff.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 from SimCalorimetry.HGCalSimProducers.hgcHitAssociation_cfi import lcAssocByEnergyScoreProducer, scAssocByEnergyScoreProducer
4 from SimCalorimetry.HGCalAssociatorProducers.simTracksterAssociatorByEnergyScore_cfi import simTracksterAssociatorByEnergyScore as simTsAssocByEnergyScoreProducer
5 from SimCalorimetry.HGCalAssociatorProducers.layerClusterSimTracksterAssociatorByEnergyScore_cfi import layerClusterSimTracksterAssociatorByEnergyScore as lcSimTSAssocByEnergyScoreProducer
6 from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import layerClusterCaloParticleAssociation as layerClusterCaloParticleAssociationProducer
7 from SimCalorimetry.HGCalAssociatorProducers.simTracksterHitLCAssociatorByEnergyScore_cfi import simTracksterHitLCAssociatorByEnergyScore as simTracksterHitLCAssociatorByEnergyScoreProducer
8 from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import layerClusterSimClusterAssociation as layerClusterSimClusterAssociationProducer
9 from SimCalorimetry.HGCalAssociatorProducers.LCToSimTSAssociation_cfi import layerClusterSimTracksterAssociation as layerClusterSimTracksterAssociationProducer
10 from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import layerClusterCaloParticleAssociationHFNose as layerClusterCaloParticleAssociationProducerHFNose
11 from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import layerClusterSimClusterAssociationHFNose as layerClusterSimClusterAssociationProducerHFNose
12 from SimCalorimetry.HGCalAssociatorProducers.TSToSimTSAssociation_cfi import tracksterSimTracksterAssociationLinking, tracksterSimTracksterAssociationPR,tracksterSimTracksterAssociationLinkingbyCLUE3D, tracksterSimTracksterAssociationPRbyCLUE3D, tracksterSimTracksterAssociationLinkingSuperclustering, tracksterSimTracksterAssociationPRSuperclustering, tracksterSimTracksterAssociationLinkingPU, tracksterSimTracksterAssociationPRPU #, tracksterSimTracksterAssociationLinkingbyCLUE3DEM, tracksterSimTracksterAssociationLinkingbyCLUE3DHAD, tracksterSimTracksterAssociationPRbyCLUE3DEM, tracksterSimTracksterAssociationPRbyCLUE3DHAD
13 from RecoHGCal.TICL.mergedTrackstersProducer_cfi import mergedTrackstersProducer as _mergedTrackstersProducer
15 
21 
22 
23 from Validation.HGCalValidation.HGCalValidator_cfi import hgcalValidator
24 from Validation.RecoParticleFlow.PFJetValidation_cff import pfJetValidation1 as _hgcalPFJetValidation
25 
26 from Validation.HGCalValidation.ticlPFValidation_cfi import ticlPFValidation
27 hgcalTiclPFValidation = cms.Sequence(ticlPFValidation)
28 
29 from Validation.HGCalValidation.ticlTrackstersEdgesValidation_cfi import ticlTrackstersEdgesValidation
30 hgcalTiclTrackstersEdgesValidationSequence = cms.Sequence(ticlTrackstersEdgesValidation)
31 
32 hgcalValidatorSequence = cms.Sequence(hgcalValidator)
33 hgcalPFJetValidation = _hgcalPFJetValidation.clone(BenchmarkLabel = 'PFJetValidation/HGCAlCompWithGenJet',
34  VariablePtBins=[10., 30., 80., 120., 250., 600.],
35  DeltaPtOvPtHistoParameter = dict(EROn=True,EREtaMax=3.0, EREtaMin=1.6, slicingOn=True))
36 
37 hgcalAssociators = cms.Task(lcAssocByEnergyScoreProducer, layerClusterCaloParticleAssociationProducer,
38  scAssocByEnergyScoreProducer, layerClusterSimClusterAssociationProducer,
39  lcSimTSAssocByEnergyScoreProducer, layerClusterSimTracksterAssociationProducer,
40  simTsAssocByEnergyScoreProducer, simTracksterHitLCAssociatorByEnergyScoreProducer,
41  tracksterSimTracksterAssociationLinking, tracksterSimTracksterAssociationPR,
42  tracksterSimTracksterAssociationLinkingbyCLUE3D, tracksterSimTracksterAssociationPRbyCLUE3D,
43  tracksterSimTracksterAssociationLinkingPU, tracksterSimTracksterAssociationPRPU,
44  SimTauProducer
45  )
46 
47 from Configuration.ProcessModifiers.ticl_v5_cff import ticl_v5
48 from Configuration.ProcessModifiers.ticl_superclustering_mustache_pf_cff import ticl_superclustering_mustache_pf
49 # Mustache-PF does not produce tracksters, therefore we cannot use the tracksterSimTracksterAssociation on superclusters
50 (ticl_v5 & ~ticl_superclustering_mustache_pf).toModify(hgcalAssociators, lambda x: x.add(tracksterSimTracksterAssociationLinkingSuperclustering, tracksterSimTracksterAssociationPRSuperclustering))
51 ''' For future separate iterations
52 mergedTrackstersProducer = _mergedTrackstersProducer.clone()
53 ticl_v5.toModify(hgcalAssociators, lambda x: x.add(mergedTrackstersProducer, tracksterSimTracksterAssociationLinkingbyCLUE3DEM, tracksterSimTracksterAssociationLinkingbyCLUE3DHAD, tracksterSimTracksterAssociationPRbyCLUE3DEM, tracksterSimTracksterAssociationPRbyCLUE3DHAD))
54 '''
55 
56 hgcalValidation = cms.Sequence(hgcalSimHitValidationEE
57  + hgcalSimHitValidationHEF
58  + hgcalSimHitValidationHEB
59  + hgcalDigiValidationEE
60  + hgcalDigiValidationHEF
61  + hgcalDigiValidationHEB
62  + hgcalRecHitValidationEE
63  + hgcalRecHitValidationHEF
64  + hgcalRecHitValidationHEB
65  + hgcalHitValidationSequence
66  + hgcalValidatorSequence
67  + hgcalTiclPFValidation
68  #Currently commented out until trackster edges are saved
69 # + hgcalTiclTrackstersEdgesValidationSequence
70  + hgcalPFJetValidation)
71 
72 _hfnose_hgcalAssociatorsTask = hgcalAssociators.copy()
73 _hfnose_hgcalAssociatorsTask.add(layerClusterCaloParticleAssociationProducerHFNose, layerClusterSimClusterAssociationProducerHFNose)