CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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(["ticlSimTracksters"])
15 lcInputMask = [cms.InputTag("ticlTracksters"+iteration) for iteration in ticlIterLabels]
16 lcInputMask.extend(["ticlSimTracksters"])
17 hgcalValidator = DQMEDAnalyzer(
18  "HGCalValidator",
19 
20  ### general settings ###
21  # selection of CP for evaluation of efficiency #
22  CaloParticleSelectionForEfficiency,
23 
24  ### reco input configuration ###
25  #2DLayerClusters, PFClusters, Tracksters
26  label_lcl = layerClusterCaloParticleAssociation.label_lc,
27  label_tst = cms.VInputTag(labelTst),
28  label_simTSFromCP = cms.InputTag("ticlSimTracksters", "fromCPs"),
29 
30  associator = cms.untracked.InputTag("layerClusterCaloParticleAssociationProducer"),
31 
32  associatorSim = cms.untracked.InputTag("layerClusterSimClusterAssociationProducer"),
33 
34  #General info on layers etc.
35  SaveGeneralInfo = cms.untracked.bool(True),
36  #CaloParticle related plots
37  doCaloParticlePlots = cms.untracked.bool(True),
38  #Select caloParticles for efficiency or pass through
39  doCaloParticleSelection = cms.untracked.bool(True),
40  #SimCluster related plots
41  doSimClustersPlots = cms.untracked.bool(True),
42  label_SimClusters = cms.InputTag("SimClusters"),
43  label_SimClustersLevel = cms.InputTag("ClusterLevel"),
44  #Layer Cluster related plots
45  doLayerClustersPlots = cms.untracked.bool(True),
46  label_layerClusterPlots = cms.InputTag("hgcalLayerClusters"),
47  label_LCToCPLinking = cms.InputTag("LCToCP_association"),
48  #Trackster related plots
49  doTrackstersPlots = cms.untracked.bool(True),
50  label_TSToCPLinking = cms.InputTag("TSToCP_linking"),
51 
52  #The cumulative material budget in front of each layer. To be more specific, it
53  #is the material budget just in front of the active material (not including it).
54  #This file is created using the official material budget code.
55  cummatbudinxo = cms.FileInPath('Validation/HGCalValidation/data/D41.cumulative.xo'),
56 
57  ### sim input configuration ###
58  label_cp_effic = layerClusterCaloParticleAssociation.label_cp,
59  label_cp_fake = cms.InputTag("mix","MergedCaloTruth"),
60  #simClusters
61  label_scl = layerClusterSimClusterAssociation.label_scl,
62 
63  simVertices = cms.InputTag("g4SimHits"),
64 
65  LayerClustersInputMask = cms.VInputTag(lcInputMask),
66 
67  #Total number of layers of HGCal that we want to monitor
68  #Could get this also from HGCalImagingAlgo::maxlayer but better to get it from here
69  totallayers_to_monitor = cms.int32(52),
70  #Thicknesses we want to monitor. -1 is for scintillator
71  thicknesses_to_monitor = cms.vint32(120,200,300,-1),
72 
73  # HistoProducerAlgo. Defines the set of plots to be booked and filled
74  histoProducerAlgoBlock = HGVHistoProducerAlgoBlock,
75 
76  ### output configuration
77  dirName = cms.string('HGCAL/HGCalValidator/')
78 
79 )
80 
81 from Configuration.ProcessModifiers.premix_stage2_cff import premix_stage2
82 premix_stage2.toModify(hgcalValidator,
83  label_cp_fake = "mixData:MergedCaloTruth"
84 )
85 
86 from Configuration.Eras.Modifier_phase2_hgcalV10_cff import phase2_hgcalV10
87 phase2_hgcalV10.toModify(hgcalValidator, totallayers_to_monitor = cms.int32(50))