CMS 3D CMS Logo

calotowermaker_cfi.py
Go to the documentation of this file.
1 import FWCore.ParameterSet.Config as cms
2 
3 calotowermaker = cms.EDProducer("CaloTowersCreator",
4  # Energy threshold for EB 5x5 crystal inclusion [GeV]
5  EBSumThreshold = cms.double(0.2),
6  # Weighting factor for HF short-fiber readouts
7  HF2Weight = cms.double(1.0),
8  # Weighting factor for EB
9  EBWeight = cms.double(1.0),
10  # Label of HFRecHitCollection to use
11  hfInput = cms.InputTag("hfreco"),
12  # Energy threshold for EE crystals-in-tower inclusion [GeV]
13  EESumThreshold = cms.double(0.45),
14  # Energy threshold for HO cell inclusion [GeV]
15  HOThreshold0 = cms.double(1.1),
16  HOThresholdPlus1 = cms.double(3.5),
17  HOThresholdMinus1 = cms.double(3.5),
18  HOThresholdPlus2 = cms.double(3.5),
19  HOThresholdMinus2 = cms.double(3.5),
20  HBGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
21  # Energy threshold for HB cell inclusion [GeV]
22  HBThreshold = cms.double(0.7),
23  EEWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
24  # Energy threshold for long-fiber HF readout inclusion [GeV]
25  HF1Threshold = cms.double(0.5),
26  HF2Weights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
27  HOWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
28  EEGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
29  # Weighting factor for HE 10-degree cells
30  HEDWeight = cms.double(1.0),
31  # Weighting factor for EE
32  EEWeight = cms.double(1.0),
33  # HO on/off flag for tower energy reconstruction
34  UseHO = cms.bool(True),
35  HBWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
36  # Weighting factor for HE 5-degree cells
37  HESWeight = cms.double(1.0),
38  # Weighting factor for HF long-fiber readouts
39  HF1Weight = cms.double(1.0),
40  HF2Grid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
41  HEDWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
42  HF1Grid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
43  EBWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
44  # Weighting factor for HO
45  HOWeight = cms.double(1.0),
46 
47  # Energy threshold for EB crystal inclusion [GeV]
48  EBThreshold = cms.double(0.07),
49  # Energy threshold for EE crystal inclusion [GeV]
50  EEThreshold = cms.double(0.3),
51  # Flags specifying if the above thresholds
52  # should be applied to Et (UseEtEXTreshold='True') or E ('False')
53  # Flags for use of symmetric thresholds: |e|>threshold
54  UseEtEBTreshold = cms.bool(False),
55  UseSymEBTreshold = cms.bool(True),
56  UseEtEETreshold = cms.bool(False),
57  UseSymEETreshold = cms.bool(True),
58 
59 
60  # Label of HBHERecHitCollection to use
61  hbheInput = cms.InputTag("hbhereco"),
62  # Global energy threshold on Hcal [GeV]
63  HcalThreshold = cms.double(-1000.0),
64  # Energy threshold for short-fiber HF readout inclusion [GeV]
65  HF2Threshold = cms.double(0.85),
66 
67  # Energy threshold for 5-degree (phi) HE cell inclusion [GeV]
68  HESThreshold1 = cms.double(0.8), # depth 1
69  HESThreshold = cms.double(0.8), # depths 2-7
70  HF1Weights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
71  # Label of HORecHitCollection to use
72  hoInput = cms.InputTag("horeco"),
73  HESGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
74  #
75  HESWeights = cms.vdouble(1.0, 1.0, 1.0, 1.0, 1.0),
76  # Energy threshold for 10-degree (phi) HE cel inclusion [GeV]
77  HEDThreshold1 = cms.double(0.8), # depth 1
78  HEDThreshold = cms.double(0.8), # depths 2-7
79  # Global energy threshold on tower [GeV]
80  EcutTower = cms.double(-1000.0),
81  HEDGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
82  # Label of EcalRecHitCollections to use
83  ecalInputs = cms.VInputTag(cms.InputTag("ecalRecHit","EcalRecHitsEB"), cms.InputTag("ecalRecHit","EcalRecHitsEE")),
84  # Weighting factor for HB
85  HBWeight = cms.double(1.0),
86  HOGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
87  # Energy dependent weights and energy scale to be used
88  EBGrid = cms.vdouble(-1.0, 1.0, 10.0, 100.0, 1000.0),
89  #
90  #
91  # momentum assignment
92  # Method for momentum reconstruction
93  MomConstrMethod = cms.int32(1),
94  # Depth, fraction of the respective calorimeter [0,1]
95  MomHBDepth = cms.double(0.2),
96  MomHEDepth = cms.double(0.4),
97  MomEBDepth = cms.double(0.3),
98  MomEEDepth = cms.double(0.0),
99 
100 # parameters for handling of anomalous cells
101 #
102  # acceptable severity level
103  HcalAcceptSeverityLevel = cms.uint32(9),
104  #EcalAcceptSeverityLevel = cms.uint32(1),
105  EcalRecHitSeveritiesToBeExcluded = cms.vstring('kTime','kWeird','kBad'),
106 
107  # use of recovered hits
108  UseHcalRecoveredHits = cms.bool(True),
109  # The CaloTower code treats recovered cells as a separate category.
110  # The flag to use (or not use) them should be explicitly set
111  # regardless of the specified severity level in EcalAcceptSeverityLevel.
112  UseEcalRecoveredHits = cms.bool(False),
113 
114 
115 # NOTE: The following controls the creation of towers from
116 # rejected rechits.
117 # Always make sure that UseRejectedHitsOnly=false for
118 # normal reconstructions!!!
119 
120  UseRejectedHitsOnly = cms.bool(False),
121 
122 # Controls for hits to be included in the "bad" tower collection.
123 # They have no effect unless UseRejectedHitsOnly=true
124 # Hits passing the HcalAcceptSeverityLevel
125 # will be skipped as they are already in the default towers
126  HcalAcceptSeverityLevelForRejectedHit = cms.uint32(9999),
127 # List of ECAL problems that should be used in bad tower construction
128 # Note that these can only be of type already rejected in default
129 # reconstruction as specified in "EcalRecHitSeveritiesToBeExcluded"
130  EcalSeveritiesToBeUsedInBadTowers = cms.vstring(),
131 
132 
133 # The code also checks the settings of the flags for the default
134 # collection - if the recovered hits were used there, they
135 # will be skipped for the "bad" tower collection regardless of these settings
136  UseRejectedRecoveredHcalHits = cms.bool(True),
137  UseRejectedRecoveredEcalHits = cms.bool(False),
138 
139 
140 # flag to allow/disallow missing inputs
141  AllowMissingInputs = cms.bool(False),
142 
143 # specify hcal upgrade phase - 0, 1, 2
144  HcalPhase = cms.int32(0)
145 
146 )
147 
148 from Configuration.Eras.Modifier_run2_HE_2018_cff import run2_HE_2018
149 run2_HE_2018.toModify(calotowermaker,
150  HcalPhase = cms.int32(1),
151  HESThreshold1 = cms.double(0.1),
152  HESThreshold = cms.double(0.2),
153  HEDThreshold1 = cms.double(0.1),
154  HEDThreshold = cms.double(0.2)
155 )
156 
157 # needed to handle inner/outer assignment
158 from Configuration.ProcessModifiers.run2_HECollapse_2018_cff import run2_HECollapse_2018
159 run2_HECollapse_2018.toModify(calotowermaker,
160  HcalPhase = cms.int32(0),
161  HESThreshold1 = cms.double(0.8),
162  HESThreshold = cms.double(0.8),
163  HEDThreshold1 = cms.double(0.8),
164  HEDThreshold = cms.double(0.8)
165 )