CMS 3D CMS Logo

HGCalValidator_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
5 
6 from SimCalorimetry.HGCalAssociatorProducers.LCToCPAssociation_cfi import layerClusterCaloParticleAssociation
7 from SimCalorimetry.HGCalAssociatorProducers.LCToSCAssociation_cfi import layerClusterSimClusterAssociation
8 
9 from DQMServices.Core.DQMEDAnalyzer import DQMEDAnalyzer
10 
11 from RecoHGCal.TICL.iterativeTICL_cff import ticlIterLabels, ticlIterLabelsMerge
12 
13 labelTst = [cms.InputTag("ticlTracksters"+iteration) for iteration in ticlIterLabelsMerge]
14 labelTst.extend([cms.InputTag("ticlSimTracksters", "fromCPs"), cms.InputTag("ticlSimTracksters")])
15 lcInputMask = [cms.InputTag("ticlTracksters"+iteration) for iteration in ticlIterLabels]
16 lcInputMask.extend([cms.InputTag("ticlSimTracksters", "fromCPs"), cms.InputTag("ticlSimTracksters")])
17 hgcalValidator = DQMEDAnalyzer(
18  "HGCalValidator",
19 
20 
22  CaloParticleSelectionForEfficiency,
23 
24 
26  label_lcl = layerClusterCaloParticleAssociation.label_lc,
27  label_tst = cms.VInputTag(labelTst),
28  label_simTS = cms.InputTag("ticlSimTracksters"),
29  label_simTSFromCP = cms.InputTag("ticlSimTracksters", "fromCPs"),
30 
31  associator = cms.untracked.InputTag("layerClusterCaloParticleAssociationProducer"),
32 
33  associatorSim = cms.untracked.InputTag("layerClusterSimClusterAssociationProducer"),
34 
35  #General info on layers etc.
36  SaveGeneralInfo = cms.untracked.bool(True),
37  #CaloParticle related plots
38  doCaloParticlePlots = cms.untracked.bool(True),
39  #Select caloParticles for efficiency or pass through
40  doCaloParticleSelection = cms.untracked.bool(True),
41  #SimCluster related plots
42  doSimClustersPlots = cms.untracked.bool(True),
43  label_SimClusters = cms.InputTag("SimClusters"),
44  label_SimClustersLevel = cms.InputTag("ClusterLevel"),
45  #Layer Cluster related plots
46  doLayerClustersPlots = cms.untracked.bool(True),
47  label_layerClusterPlots = cms.InputTag("hgcalMergeLayerClusters"),
48  label_LCToCPLinking = cms.InputTag("LCToCP_association"),
49  #Trackster related plots
50  doTrackstersPlots = cms.untracked.bool(True),
51  label_TS = cms.string("Morphology"),
52  label_TSToCPLinking = cms.string("TSToCP_linking"),
53  label_TSToSTSPR = cms.string("TSToSTS_patternRecognition"),
54 
55  #The cumulative material budget in front of each layer. To be more specific, it
56  #is the material budget just in front of the active material (not including it).
57  #This file is created using the official material budget code.
58  cummatbudinxo = cms.FileInPath('Validation/HGCalValidation/data/D41.cumulative.xo'),
59 
60 
61  label_cp_effic = layerClusterCaloParticleAssociation.label_cp,
62  label_cp_fake = cms.InputTag("mix","MergedCaloTruth"),
63  #simClusters
64  label_scl = layerClusterSimClusterAssociation.label_scl,
65 
66  simVertices = cms.InputTag("g4SimHits"),
67 
68  LayerClustersInputMask = cms.VInputTag(lcInputMask),
69 
70  #Total number of layers of HGCal that we want to monitor
71  #Could get this also from HGCalImagingAlgo::maxlayer but better to get it from here
72  totallayers_to_monitor = cms.int32(52),
73  #Thicknesses we want to monitor. -1 is for scintillator
74  thicknesses_to_monitor = cms.vint32(120,200,300,-1),
75 
76  # HistoProducerAlgo. Defines the set of plots to be booked and filled
77  histoProducerAlgoBlock = HGVHistoProducerAlgoBlock,
78 
79 
80  dirName = cms.string('HGCAL/HGCalValidator/')
81 
82 )
83 
84 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
85 premix_stage2.toModify(hgcalValidator,
86  label_cp_fake = "mixData:MergedCaloTruth"
87 )
88 
89 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
90 phase2_hgcalV10.toModify(hgcalValidator, totallayers_to_monitor = cms.int32(50))
91 
92 from Configuration.Eras.Modifier_phase2_hgcalV16_cff import phase2_hgcalV16
93 phase2_hgcalV16.toModify(hgcalValidator, totallayers_to_monitor = cms.int32(47))