Fork me on GitHub

source: git/examples/delphes_card_prelLHCb.tcl@ e2a76ae

ImprovedOutputFile Timing dual_readout llp
Last change on this file since e2a76ae was e2a76ae, checked in by Michele <michele.selvaggi@…>, 10 years ago

prel. LHCb card and Id Module

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