Fork me on GitHub

source: git/cards/delphes_card_LHCb.tcl@ 29f8a06

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 29f8a06 was ff37d75, checked in by Michele Selvaggi <michele.selvaggi@…>, 9 years ago

added photon conversions to LHCb card

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