Fork me on GitHub

source: git/cards/delphes_card_LHCb.tcl@ 2b3ef28

ImprovedOutputFile Timing dual_readout llp
Last change on this file since 2b3ef28 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
RevLine 
[57e42c6]1#set MaxEvents 1000
2#set RandomSeed 123
[e2a76ae]3
4
5#######################################
6# Order of execution of various modules
7#######################################
8
9set ExecutionPath {
[a2983ec]10
[e2a76ae]11 ParticlePropagator
[a2983ec]12
[e2a76ae]13 ChargedHadronMomentumSmearing
14 ElectronEnergySmearing
15 MuonMomentumSmearing
16
17 TrackMerger
[66b590f]18 ImpactParameterSmearing
[a2983ec]19
[e2a76ae]20 IdentificationMap
[a2983ec]21
[8624f58]22 ECal
23 HCal
[e2a76ae]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
[a2983ec]43
[e2a76ae]44 set Radius 3.31
[a2983ec]45
46
[e2a76ae]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
[a2983ec]55
56 # tracker and calos are at approx 0.269 rad, R = 12*tan(0.269)
[e2a76ae]57
58}
59
[a2983ec]60
[e2a76ae]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
[a2983ec]86 set ResolutionFormula { (eta > 2.0 && eta <= 5.0) * (energy > 0.1 && energy <= 8.0) * (energy*0.05) +
[e2a76ae]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
[66b590f]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
[e2a76ae]134####################################
135# Charged hadron PID
136####################################
137
138module IdentificationMap IdentificationMap {
[66b590f]139 set InputArray ImpactParameterSmearing/tracks
[e2a76ae]140 set OutputArray tracks
[a2983ec]141
[e2a76ae]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...)
[a2983ec]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) +
[e2a76ae]156 (eta > 5.0) * (0.00)}
[a2983ec]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))) +
[e2a76ae]161 (eta > 5.0) * (0.00)}
162
[a2983ec]163
[e2a76ae]164 # --- kaons ---
[a2983ec]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) +
[e2a76ae]170 (eta > 5.0) * (0.00)}
[a2983ec]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))) +
[e2a76ae]175 (eta > 5.0) * (0.00)}
176
177
178 # --- protons ---
[a2983ec]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) +
[e2a76ae]184 (eta > 5.0) * (0.00)}
[a2983ec]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) +
[e2a76ae]189 (eta > 5.0) * (0.00)}
190
191
192
193 # --- muons ---
194
195
196
[a2983ec]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) +
[e2a76ae]200 (eta > 5.0) * (0.00)}
201
[a2983ec]202
[e2a76ae]203 # efficiency for other charged particles (should be always {0} {0} {formula})
[a2983ec]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) +
[e2a76ae]208 (eta > 5.0) * (0.00)}
209
210}
211
212###### ref. JINST 8 P10020 #############
213
214
215#############
216# ECAL
217#############
218
[8624f58]219module SimpleCalorimeter ECal {
[e2a76ae]220 set ParticleInputArray ParticlePropagator/stableParticles
221 set TrackInputArray IdentificationMap/tracks
222
223 set TowerOutputArray ecalTowers
224 set EFlowTowerOutputArray eflowPhotons
[a2983ec]225
226 set EnergyMin 0.0
227 set EnergySignificanceMin 0.0
228
229 set SmearTowerCenter true
230
[e2a76ae]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 }
[a2983ec]248
[e2a76ae]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
[a2983ec]292 set ResolutionFormula {(eta <= 5.0 && eta > 2.0) * sqrt(energy^2*0.015^2 + energy*0.10^2)}
[e2a76ae]293}
294
295#############
296# HCAL
297#############
298
[8624f58]299module SimpleCalorimeter HCal {
[e2a76ae]300 set ParticleInputArray ParticlePropagator/stableParticles
301 set TrackInputArray IdentificationMap/tracks
302
303 set TowerOutputArray hcalTowers
304 set EFlowTowerOutputArray eflowNeutralHadrons
[a2983ec]305
306 set EnergyMin 0.0
307 set EnergySignificanceMin 0.0
308
309 set SmearTowerCenter true
310
[e2a76ae]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
[a2983ec]342
[e2a76ae]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)}
[a2983ec]364}
[e2a76ae]365
366
367##################
368# ROOT tree writer
369##################
370
371# tracks, towers and eflow objects are not stored by default in the output.
[a2983ec]372# if needed (for jet constituent or other studies), uncomment the relevant
373# "add Branch ..." lines.
[e2a76ae]374
375module TreeWriter TreeWriter {
376# add Branch InputArray BranchName BranchClass
[a2983ec]377
[e2a76ae]378 add Branch Delphes/allParticles Particle GenParticle
379
380 add Branch IdentificationMap/tracks Track Track
[8624f58]381 add Branch HCal/eflowNeutralHadrons NeutralHadron Tower
382 add Branch ECal/eflowPhotons Photon Photon
[a2983ec]383
[e2a76ae]384}
385
Note: See TracBrowser for help on using the repository browser.