Fork me on GitHub

source: git/cards/delphes_card_LHCb.tcl@ e2d3977

ImprovedOutputFile Timing dual_readout llp
Last change on this file since e2d3977 was a2983ec, checked in by Pavel Demin <pavel.demin@…>, 10 years ago

add parameter SmearTowerCenter to all cards

  • Property mode set to 100644
File size: 10.9 KB
Line 
1#set MaxEvents 1000
2#set RandomSeed 123
3
4
5#######################################
6# Order of execution of various modules
7#######################################
8
9set ExecutionPath {
10
11 ParticlePropagator
12
13 ChargedHadronMomentumSmearing
14 ElectronEnergySmearing
15 MuonMomentumSmearing
16
17 TrackMerger
18 ImpactParameterSmearing
19
20 IdentificationMap
21
22 ECal
23 HCal
24
25 TreeWriter
26}
27
28
29
30#################################
31# Propagate particles in cylinder
32#################################
33
34module ParticlePropagator ParticlePropagator {
35 set InputArray Delphes/stableParticles
36
37 set OutputArray stableParticles
38 set ChargedHadronOutputArray chargedHadrons
39 set ElectronOutputArray electrons
40 set MuonOutputArray muons
41
42 # radius of the magnetic field coverage, in m
43
44 set Radius 3.31
45
46
47 # half-length of the magnetic field coverage, in m
48 set HalfLength 12.0
49
50 # magnetic field
51 set Bz 1.1
52
53 # Need to veto anything with theta > 0.269 rad -> eta = 2
54 # theta < 0.0135 rad -> eta = 5
55
56 # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269)
57
58}
59
60
61########################################
62# Momentum resolution for charged tracks
63########################################
64
65module MomentumSmearing ChargedHadronMomentumSmearing {
66 set InputArray ParticlePropagator/chargedHadrons
67 set OutputArray chargedHadrons
68
69 # set ResolutionFormula {resolution formula as a function of eta and pt}
70
71 # resolution formula for charged hadrons
72 set ResolutionFormula {(eta > 2.0 && eta <= 5.0) * (pt > 0.5) * (0.005)}
73}
74
75#################################
76# Energy resolution for electrons
77#################################
78
79module EnergySmearing ElectronEnergySmearing {
80 set InputArray ParticlePropagator/electrons
81 set OutputArray electrons
82
83 # set ResolutionFormula {resolution formula as a function of eta and energy}
84
85 # resolution formula for electrons
86 set ResolutionFormula { (eta > 2.0 && eta <= 5.0) * (energy > 0.1 && energy <= 8.0) * (energy*0.05) +
87 (eta > 2.0 && eta <= 5.0) * (energy > 8.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
88 }
89
90###############################
91# Momentum resolution for muons
92###############################
93
94module MomentumSmearing MuonMomentumSmearing {
95 set InputArray ParticlePropagator/muons
96 set OutputArray muons
97
98 # resolution formula for muons
99 set ResolutionFormula {(eta > 2.0 && eta <= 5.0) * (pt > 0.5)* (0.005)}
100}
101
102
103##############
104# Track merger
105##############
106
107module Merger TrackMerger {
108# add InputArray InputArray
109 add InputArray ChargedHadronMomentumSmearing/chargedHadrons
110 add InputArray ElectronEnergySmearing/electrons
111 add InputArray MuonMomentumSmearing/muons
112 set OutputArray tracks
113}
114
115
116
117################################
118# Track impact parameter smearing
119################################
120
121module ImpactParameterSmearing ImpactParameterSmearing {
122 set InputArray TrackMerger/tracks
123 set OutputArray tracks
124
125
126# absolute impact parameter smearing formula (in mm) as a function of pt and eta
127set ResolutionFormula {0.0116 + 0.0234/pt}
128
129}
130
131###### ref. JINST 9 C01065 #############
132
133
134####################################
135# Charged hadron PID
136####################################
137
138module IdentificationMap IdentificationMap {
139 set InputArray ImpactParameterSmearing/tracks
140 set OutputArray tracks
141
142 # {PID in} {PID out} {formula}
143 # make sure "PID in" and "PID out" have the same charge (e.g {-13} {211} or {-321} {211})
144 # {211} {-13} is equivalent to {-211} {13} (and needs to be written once only...)
145
146
147
148
149
150
151 # --- pions ---
152
153 add EfficiencyFormula {211} {211} { (eta <= 2.0) * (0.00) +
154 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
155 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) +
156 (eta > 5.0) * (0.00)}
157
158 add EfficiencyFormula {211} {-13} { (eta <= 2.0) * (0.00) +
159 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
160 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.0663*exp(-0.13*pt*cosh(eta))) +
161 (eta > 5.0) * (0.00)}
162
163
164 # --- kaons ---
165
166
167 add EfficiencyFormula {321} {321} { (eta <= 2.0) * (0.00) +
168 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
169 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) +
170 (eta > 5.0) * (0.00)}
171
172 add EfficiencyFormula {321} {-13} { (eta <= 2.0) * (0.00) +
173 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
174 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.005 + 0.086*exp(-0.11*pt*cosh(eta))) +
175 (eta > 5.0) * (0.00)}
176
177
178 # --- protons ---
179
180
181 add EfficiencyFormula {2212} {2212} { (eta <= 2.0) * (0.00) +
182 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
183 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.95) +
184 (eta > 5.0) * (0.00)}
185
186 add EfficiencyFormula {2212} {-13} { (eta <= 2.0) * (0.00) +
187 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
188 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.002) +
189 (eta > 5.0) * (0.00)}
190
191
192
193 # --- muons ---
194
195
196
197 add EfficiencyFormula {-13} {-13} { (eta <= 2.0) * (0.00) +
198 (eta > 2.0 && eta <= 5.0) * (pt < 0.8)* (0.00) +
199 (eta > 2.0 && eta <= 5.0) * (pt >= 0.8)* (0.97) +
200 (eta > 5.0) * (0.00)}
201
202
203 # efficiency for other charged particles (should be always {0} {0} {formula})
204
205 add EfficiencyFormula {0} {0} { (eta <= 2.0) * (0.00) +
206 (eta > 2.0 && eta <= 5.0) * (pt < 0.8) * (0.00) +
207 (eta > 2.0 && eta <= 5.0) * (pt > 0.8) * (0.95) +
208 (eta > 5.0) * (0.00)}
209
210}
211
212###### ref. JINST 8 P10020 #############
213
214
215#############
216# ECAL
217#############
218
219module SimpleCalorimeter ECal {
220 set ParticleInputArray ParticlePropagator/stableParticles
221 set TrackInputArray IdentificationMap/tracks
222
223 set TowerOutputArray ecalTowers
224 set EFlowTowerOutputArray eflowPhotons
225
226 set EnergyMin 0.0
227 set EnergySignificanceMin 0.0
228
229 set SmearTowerCenter true
230
231 set pi [expr {acos(-1)}]
232
233 # lists of the edges of each tower in eta and phi
234 # each list starts with the lower edge of the first tower
235 # the list ends with the higher edged of the last tower
236
237 # 1 degree towers
238 set PhiBins {}
239 for {set i -180} {$i <= 180} {incr i} {
240 add PhiBins [expr {$i * $pi/180.0}]
241 }
242
243 # 0.02 unit in eta from eta = 3.2 to eta = 5.0
244 for {set i 1} {$i <= 90} {incr i} {
245 set eta [expr {3.2 + $i * 0.02}]
246 add EtaPhiBins $eta $PhiBins
247 }
248
249 # 1.25 degree towers
250 set PhiBins {}
251 for {set i -135} {$i <= 135} {incr i} {
252 add PhiBins [expr {$i * $pi/135.0}]
253 }
254
255 # 0.025 unit in eta from eta = 2.6 to eta = 3.2
256 for {set i 1} {$i <= 24} {incr i} {
257 set eta [expr {2.6 + $i * 0.025}]
258 add EtaPhiBins $eta $PhiBins
259 }
260
261 # 1.25 degree towers
262 set PhiBins {}
263 for {set i -100} {$i <= 100} {incr i} {
264 add PhiBins [expr {$i * $pi/100.0}]
265 }
266
267 # 0.04 unit in eta from eta = 2.0 to eta = 2.6
268 for {set i 0} {$i <= 24} {incr i} {
269 set eta [expr {2.0 + $i * 0.04}]
270 add EtaPhiBins $eta $PhiBins
271 }
272
273 add EnergyFraction {0} {0.0}
274 # energy fractions for e, gamma and pi0
275 add EnergyFraction {11} {1.0}
276 add EnergyFraction {22} {1.0}
277 add EnergyFraction {111} {1.0}
278 # energy fractions for muon, neutrinos and neutralinos
279 add EnergyFraction {12} {0.0}
280 add EnergyFraction {13} {0.0}
281 add EnergyFraction {14} {0.0}
282 add EnergyFraction {16} {0.0}
283 add EnergyFraction {1000022} {0.0}
284 add EnergyFraction {1000023} {0.0}
285 add EnergyFraction {1000025} {0.0}
286 add EnergyFraction {1000035} {0.0}
287 add EnergyFraction {1000045} {0.0}
288 # energy fractions for K0short and Lambda
289 add EnergyFraction {310} {0.3}
290 add EnergyFraction {3122} {0.3}
291
292 set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
293}
294
295#############
296# HCAL
297#############
298
299module SimpleCalorimeter HCal {
300 set ParticleInputArray ParticlePropagator/stableParticles
301 set TrackInputArray IdentificationMap/tracks
302
303 set TowerOutputArray hcalTowers
304 set EFlowTowerOutputArray eflowNeutralHadrons
305
306 set EnergyMin 0.0
307 set EnergySignificanceMin 0.0
308
309 set SmearTowerCenter true
310
311 set pi [expr {acos(-1)}]
312
313 # lists of the edges of each tower in eta and phi
314 # each list starts with the lower edge of the first tower
315 # the list ends with the higher edged of the last tower
316
317 # 1 degree towers
318 set PhiBins {}
319 for {set i -16} {$i <= 16} {incr i} {
320 add PhiBins [expr {$i * $pi/16.0}]
321 }
322
323 # 0.20 unit in eta from eta = 2.6 to eta = 5.0
324 for {set i 1} {$i <= 12} {incr i} {
325 set eta [expr {2.6 + $i * 0.2}]
326 add EtaPhiBins $eta $PhiBins
327 }
328
329 # 1 degree towers
330 set PhiBins {}
331 for {set i -32} {$i <= 32} {incr i} {
332 add PhiBins [expr {$i * $pi/32.0}]
333 }
334
335 # 0.1 unit in eta from eta = 2 to eta = 2.6
336 for {set i 0} {$i <= 6} {incr i} {
337 set eta [expr {2.0 + $i * 0.1}]
338 add EtaPhiBins $eta $PhiBins
339 }
340
341
342
343 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
344 add EnergyFraction {0} {1.0}
345 # energy fractions for e, gamma and pi0
346 add EnergyFraction {11} {0.0}
347 add EnergyFraction {22} {0.0}
348 add EnergyFraction {111} {0.0}
349 # energy fractions for muon, neutrinos and neutralinos
350 add EnergyFraction {12} {0.0}
351 add EnergyFraction {13} {0.0}
352 add EnergyFraction {14} {0.0}
353 add EnergyFraction {16} {0.0}
354 add EnergyFraction {1000022} {0.0}
355 add EnergyFraction {1000023} {0.0}
356 add EnergyFraction {1000025} {0.0}
357 add EnergyFraction {1000035} {0.0}
358 add EnergyFraction {1000045} {0.0}
359 # energy fractions for K0short and Lambda
360 add EnergyFraction {310} {0.7}
361 add EnergyFraction {3122} {0.7}
362
363 set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)}
364}
365
366
367##################
368# ROOT tree writer
369##################
370
371# tracks, towers and eflow objects are not stored by default in the output.
372# if needed (for jet constituent or other studies), uncomment the relevant
373# "add Branch ..." lines.
374
375module TreeWriter TreeWriter {
376# add Branch InputArray BranchName BranchClass
377
378 add Branch Delphes/allParticles Particle GenParticle
379
380 add Branch IdentificationMap/tracks Track Track
381 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
382 add Branch ECal/eflowPhotons Photon Photon
383
384}
385
Note: See TracBrowser for help on using the repository browser.