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