|
25 | 25 | #include "Framework/O2DatabasePDGPlugin.h" |
26 | 26 | #include "Framework/runDataProcessing.h" |
27 | 27 | #include "ReconstructionDataFormats/TrackFwd.h" |
| 28 | +#include <Framework/ASoA.h> |
28 | 29 | #include <Framework/Configurable.h> |
29 | 30 |
|
30 | 31 | #include <TString.h> |
@@ -257,90 +258,90 @@ struct HfTaskSingleMuonMultMc { |
257 | 258 | } |
258 | 259 |
|
259 | 260 | // particle has an associated MC particle |
260 | | - bool isIdentified(const uint16_t& mask) |
| 261 | + bool isIdentified(const uint16_t mask) |
261 | 262 | { |
262 | 263 | return (TESTBIT(mask, IsIdentified)); |
263 | 264 | } |
264 | 265 | // this particle is muon |
265 | | - bool isMuon(const uint16_t& mask) |
| 266 | + bool isMuon(const uint16_t mask) |
266 | 267 | { |
267 | 268 | return (TESTBIT(mask, IsIdentified) && TESTBIT(mask, IsMuon)); |
268 | 269 | } |
269 | 270 |
|
270 | 271 | // this muon comes from transport |
271 | | - bool isSecondaryMu(const uint16_t& mask) |
| 272 | + bool isSecondaryMu(const uint16_t mask) |
272 | 273 | { |
273 | 274 | return (isMuon(mask) && TESTBIT(mask, IsSecondary)); |
274 | 275 | } |
275 | 276 |
|
276 | 277 | // this muon comes from light flavor quark decay |
277 | | - bool isLightDecayMu(const uint16_t& mask) |
| 278 | + bool isLightDecayMu(const uint16_t mask) |
278 | 279 | { |
279 | 280 | return (isMuon(mask) && TESTBIT(mask, HasLightParent) && (!TESTBIT(mask, IsSecondary))); |
280 | 281 | } |
281 | 282 |
|
282 | 283 | // this muon comes from tau decays |
283 | | - bool isTauDecayMu(const uint16_t& mask) |
| 284 | + bool isTauDecayMu(const uint16_t mask) |
284 | 285 | { |
285 | 286 | return (isMuon(mask) && TESTBIT(mask, HasTauParent) && (!TESTBIT(mask, HasWParent)) && (!TESTBIT(mask, HasZParent)) && (!TESTBIT(mask, HasBeautyParent)) && (!TESTBIT(mask, HasCharmParent))); |
286 | 287 | } |
287 | 288 |
|
288 | 289 | // this muon comes from W+- decay |
289 | | - bool isWBosonDecayMu(const uint16_t& mask) |
| 290 | + bool isWBosonDecayMu(const uint16_t mask) |
290 | 291 | { |
291 | 292 | return (isMuon(mask) && TESTBIT(mask, HasWParent) && (!TESTBIT(mask, HasZParent)) && (!TESTBIT(mask, HasTauParent)) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
292 | 293 | } |
293 | 294 |
|
294 | 295 | // this muon comes from Z decay |
295 | | - bool isZBosonDecayMu(const uint16_t& mask) |
| 296 | + bool isZBosonDecayMu(const uint16_t mask) |
296 | 297 | { |
297 | 298 | return (isMuon(mask) && TESTBIT(mask, HasZParent) && (!TESTBIT(mask, HasWParent)) && (!TESTBIT(mask, HasTauParent)) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
298 | 299 | } |
299 | 300 |
|
300 | 301 | // this muon comes from quarkonium decay |
301 | | - bool isQuarkoniumDecayMu(const uint16_t& mask) |
| 302 | + bool isQuarkoniumDecayMu(const uint16_t mask) |
302 | 303 | { |
303 | 304 | return (isMuon(mask) && TESTBIT(mask, HasQuarkoniumParent) && (!TESTBIT(mask, HasBeautyParent)) && (!TESTBIT(mask, HasCharmParent)) && (!TESTBIT(mask, HasLightParent))); |
304 | 305 | } |
305 | 306 |
|
306 | 307 | // this muon comes from beauty decay and does not have light flavor parent |
307 | | - bool isBeautyMu(const uint16_t& mask) |
| 308 | + bool isBeautyMu(const uint16_t mask) |
308 | 309 | { |
309 | 310 | return (isMuon(mask) && TESTBIT(mask, HasBeautyParent) && (!TESTBIT(mask, HasQuarkoniumParent)) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
310 | 311 | } |
311 | 312 |
|
312 | 313 | // this muon comes directly from beauty decay |
313 | | - bool isBeautyDecayMu(const uint16_t& mask) |
| 314 | + bool isBeautyDecayMu(const uint16_t mask) |
314 | 315 | { |
315 | 316 | return (isBeautyMu(mask) && (!TESTBIT(mask, HasCharmParent) && (!TESTBIT(mask, HasQuarkoniumParent))) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
316 | 317 | } |
317 | 318 |
|
318 | 319 | // this muon comes from non-prompt charm decay and does not have light flavor parent |
319 | | - bool isNonpromptCharmMu(const uint16_t& mask) |
| 320 | + bool isNonpromptCharmMu(const uint16_t mask) |
320 | 321 | { |
321 | 322 | return (isBeautyMu(mask) && TESTBIT(mask, HasCharmParent) && (!TESTBIT(mask, HasQuarkoniumParent)) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
322 | 323 | } |
323 | 324 |
|
324 | 325 | // this muon comes from prompt charm decay and does not have light flavor parent |
325 | | - bool isPromptCharmMu(const uint16_t& mask) |
| 326 | + bool isPromptCharmMu(const uint16_t mask) |
326 | 327 | { |
327 | 328 | return (isMuon(mask) && TESTBIT(mask, HasCharmParent) && (!TESTBIT(mask, HasBeautyParent)) && (!TESTBIT(mask, HasQuarkoniumParent)) && (!TESTBIT(mask, HasLightParent)) && (!TESTBIT(mask, IsSecondary))); |
328 | 329 | } |
329 | 330 |
|
330 | 331 | // this muon comes from other sources which have not classified above. |
331 | | - bool isOtherMu(const uint16_t& mask) |
| 332 | + bool isOtherMu(const uint16_t mask) |
332 | 333 | { |
333 | 334 | return (isMuon(mask) && (!isSecondaryMu(mask)) && (!isLightDecayMu(mask)) && (!isTauDecayMu(mask)) && (!isWBosonDecayMu(mask)) && (!isZBosonDecayMu(mask)) && (!isQuarkoniumDecayMu(mask)) && (!isBeautyMu(mask)) && (!isPromptCharmMu(mask))); |
334 | 335 | } |
335 | 336 |
|
336 | 337 | // this is a hadron |
337 | | - bool isHadron(const uint16_t& mask) |
| 338 | + bool isHadron(const uint16_t mask) |
338 | 339 | { |
339 | 340 | return (TESTBIT(mask, IsIdentified) && (!TESTBIT(mask, IsMuon))); |
340 | 341 | } |
341 | 342 |
|
342 | 343 | // this particle is unidentified |
343 | | - bool isUnidentified(const uint16_t& mask) |
| 344 | + bool isUnidentified(const uint16_t mask) |
344 | 345 | { |
345 | 346 | return ((!TESTBIT(mask, IsIdentified))); |
346 | 347 | } |
@@ -398,7 +399,10 @@ struct HfTaskSingleMuonMultMc { |
398 | 399 | } |
399 | 400 | } |
400 | 401 |
|
401 | | - void process(McGenCollisions::iterator const& mccollision, McMuons const& muons, aod::McParticles const&, McRecCollisions const& collisions) |
| 402 | + void process(McGenCollisions::iterator const& mccollision, |
| 403 | + McMuons const& muons, |
| 404 | + aod::McParticles const&, |
| 405 | + McRecCollisions const& collisions) |
402 | 406 | { |
403 | 407 |
|
404 | 408 | // event selections |
@@ -474,7 +478,10 @@ struct HfTaskSingleMuonMultMc { |
474 | 478 | } |
475 | 479 | } |
476 | 480 |
|
477 | | - void processResTrack(McGenCollisions::iterator const& mccollision, McRecCollisions const& collisions, aod::McParticles const& particles, MyTracks const& tracks) |
| 481 | + void processResTrack(McGenCollisions::iterator const& mccollision, |
| 482 | + McRecCollisions const& collisions, |
| 483 | + aod::McParticles const& particles, |
| 484 | + MyTracks const& tracks) |
478 | 485 | { |
479 | 486 | // event selections |
480 | 487 | if (std::abs(mccollision.posZ()) > zVtxMax) { |
@@ -514,17 +521,19 @@ struct HfTaskSingleMuonMultMc { |
514 | 521 | auto nTrk = 0; |
515 | 522 | auto tracksample = tracks.sliceBy(perCol, collision.globalIndex()); |
516 | 523 | for (const auto& track : tracksample) { |
517 | | - if (!track.isGlobalTrack()) |
| 524 | + if (!track.isGlobalTrack()) { |
518 | 525 | continue; |
| 526 | + } |
519 | 527 | registry.fill(HIST("hParticleRec"), track.pt(), track.eta()); |
520 | 528 | ++nTrk; |
521 | 529 | } |
522 | | - if (nTrk < 1) |
| 530 | + if (nTrk < 1) { |
523 | 531 | continue; |
| 532 | + } |
524 | 533 | registry.fill(HIST("hTrackResponse"), nP, nTrk); |
525 | 534 | } |
526 | 535 | } |
527 | | - PROCESS_SWITCH(HfTaskSingleMuonMultMc, processResTrack, "Process Track Reconstruction/Generation", true); |
| 536 | + PROCESS_SWITCH(HfTaskSingleMuonMultMc, processResTrack, "Process Track Reconstruction/Generation", false); |
528 | 537 | }; |
529 | 538 |
|
530 | 539 | WorkflowSpec defineDataProcessing(ConfigContext const& cfgc) |
|
0 commit comments