Fork me on GitHub

source: git/cards/delphes_card_LHCb.tcl@ 9c491e1

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 9c491e1 was fc6300d, checked in by Michele Selvaggi <selvaggi@…>, 9 years ago

added isEcal flag to simple calorimeter and fill Eem and Ehad variables accordingly (answer to #639)

  • Property mode set to 100644
File size: 11.0 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 IsEcal true
227
228 set EnergyMin 0.0
229 set EnergySignificanceMin 0.0
230
231 set SmearTowerCenter true
232
233 set pi [expr {acos(-1)}]
234
235 # lists of the edges of each tower in eta and phi
236 # each list starts with the lower edge of the first tower
237 # the list ends with the higher edged of the last tower
238
239 # 1 degree towers
240 set PhiBins {}
241 for {set i -180} {$i <= 180} {incr i} {
242 add PhiBins [expr {$i * $pi/180.0}]
243 }
244
245 # 0.02 unit in eta from eta = 3.2 to eta = 5.0
246 for {set i 1} {$i <= 90} {incr i} {
247 set eta [expr {3.2 + $i * 0.02}]
248 add EtaPhiBins $eta $PhiBins
249 }
250
251 # 1.25 degree towers
252 set PhiBins {}
253 for {set i -135} {$i <= 135} {incr i} {
254 add PhiBins [expr {$i * $pi/135.0}]
255 }
256
257 # 0.025 unit in eta from eta = 2.6 to eta = 3.2
258 for {set i 1} {$i <= 24} {incr i} {
259 set eta [expr {2.6 + $i * 0.025}]
260 add EtaPhiBins $eta $PhiBins
261 }
262
263 # 1.25 degree towers
264 set PhiBins {}
265 for {set i -100} {$i <= 100} {incr i} {
266 add PhiBins [expr {$i * $pi/100.0}]
267 }
268
269 # 0.04 unit in eta from eta = 2.0 to eta = 2.6
270 for {set i 0} {$i <= 24} {incr i} {
271 set eta [expr {2.0 + $i * 0.04}]
272 add EtaPhiBins $eta $PhiBins
273 }
274
275 add EnergyFraction {0} {0.0}
276 # energy fractions for e, gamma and pi0
277 add EnergyFraction {11} {1.0}
278 add EnergyFraction {22} {1.0}
279 add EnergyFraction {111} {1.0}
280 # energy fractions for muon, neutrinos and neutralinos
281 add EnergyFraction {12} {0.0}
282 add EnergyFraction {13} {0.0}
283 add EnergyFraction {14} {0.0}
284 add EnergyFraction {16} {0.0}
285 add EnergyFraction {1000022} {0.0}
286 add EnergyFraction {1000023} {0.0}
287 add EnergyFraction {1000025} {0.0}
288 add EnergyFraction {1000035} {0.0}
289 add EnergyFraction {1000045} {0.0}
290 # energy fractions for K0short and Lambda
291 add EnergyFraction {310} {0.3}
292 add EnergyFraction {3122} {0.3}
293
294 set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
295}
296
297#############
298# HCAL
299#############
300
301module SimpleCalorimeter HCal {
302 set ParticleInputArray ParticlePropagator/stableParticles
303 set TrackInputArray IdentificationMap/tracks
304
305 set TowerOutputArray hcalTowers
306 set EFlowTowerOutputArray eflowNeutralHadrons
307
308 set IsEcal false
309
310 set EnergyMin 0.0
311 set EnergySignificanceMin 0.0
312
313 set SmearTowerCenter true
314
315 set pi [expr {acos(-1)}]
316
317 # lists of the edges of each tower in eta and phi
318 # each list starts with the lower edge of the first tower
319 # the list ends with the higher edged of the last tower
320
321 # 1 degree towers
322 set PhiBins {}
323 for {set i -16} {$i <= 16} {incr i} {
324 add PhiBins [expr {$i * $pi/16.0}]
325 }
326
327 # 0.20 unit in eta from eta = 2.6 to eta = 5.0
328 for {set i 1} {$i <= 12} {incr i} {
329 set eta [expr {2.6 + $i * 0.2}]
330 add EtaPhiBins $eta $PhiBins
331 }
332
333 # 1 degree towers
334 set PhiBins {}
335 for {set i -32} {$i <= 32} {incr i} {
336 add PhiBins [expr {$i * $pi/32.0}]
337 }
338
339 # 0.1 unit in eta from eta = 2 to eta = 2.6
340 for {set i 0} {$i <= 6} {incr i} {
341 set eta [expr {2.0 + $i * 0.1}]
342 add EtaPhiBins $eta $PhiBins
343 }
344
345
346
347 # default energy fractions {abs(PDG code)} {Fecal Fhcal}
348 add EnergyFraction {0} {1.0}
349 # energy fractions for e, gamma and pi0
350 add EnergyFraction {11} {0.0}
351 add EnergyFraction {22} {0.0}
352 add EnergyFraction {111} {0.0}
353 # energy fractions for muon, neutrinos and neutralinos
354 add EnergyFraction {12} {0.0}
355 add EnergyFraction {13} {0.0}
356 add EnergyFraction {14} {0.0}
357 add EnergyFraction {16} {0.0}
358 add EnergyFraction {1000022} {0.0}
359 add EnergyFraction {1000023} {0.0}
360 add EnergyFraction {1000025} {0.0}
361 add EnergyFraction {1000035} {0.0}
362 add EnergyFraction {1000045} {0.0}
363 # energy fractions for K0short and Lambda
364 add EnergyFraction {310} {0.7}
365 add EnergyFraction {3122} {0.7}
366
367 set ResolutionFormula { (eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.05^2 + energy*0.80^2)}
368}
369
370
371##################
372# ROOT tree writer
373##################
374
375# tracks, towers and eflow objects are not stored by default in the output.
376# if needed (for jet constituent or other studies), uncomment the relevant
377# "add Branch ..." lines.
378
379module TreeWriter TreeWriter {
380# add Branch InputArray BranchName BranchClass
381
382 add Branch Delphes/allParticles Particle GenParticle
383
384 add Branch IdentificationMap/tracks Track Track
385 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
386 add Branch ECal/eflowPhotons Photon Photon
387
388}
389
Note: See TracBrowser for help on using the repository browser.