|
8 | 8 | // In applying this license CERN does not waive the privileges and immunities |
9 | 9 | // granted to it by virtue of its status as an Intergovernmental Organization |
10 | 10 | // or submit itself to any jurisdiction. |
11 | | - |
12 | | -// |
13 | | -// Task to add a table of track parameters propagated to the primary vertex |
14 | | -// |
| 11 | +/// \file onTheFlyTOFPID.cxx |
| 12 | +/// |
| 13 | +/// \brief This task goes straight from a combination of track table and mcParticles |
| 14 | +/// and a custom TOF configuration to a table of TOF NSigmas for the particles |
| 15 | +/// being analysed. It currently contemplates 5 particle types: |
| 16 | +/// electrons, pions, kaons, protons and muons |
| 17 | +/// |
| 18 | +/// More particles could be added but would have to be added to the LUT |
| 19 | +/// being used in the onTheFly tracker task. |
| 20 | +/// |
| 21 | +/// \author David Dobrigkeit Chinellato, UNICAMP |
| 22 | +/// \author Nicola Nicassio, University and INFN Bari |
15 | 23 |
|
16 | 24 | #include <utility> |
17 | 25 | #include <map> |
|
45 | 53 | #include "TableHelper.h" |
46 | 54 | #include "ALICE3/Core/DelphesO2TrackSmearer.h" |
47 | 55 |
|
48 | | -/// \file onTheFlyTOFPID.cxx |
49 | | -/// |
50 | | -/// \brief This task goes straight from a combination of track table and mcParticles |
51 | | -/// and a custom TOF configuration to a table of TOF NSigmas for the particles |
52 | | -/// being analysed. It currently contemplates 5 particle types: |
53 | | -/// electrons, pions, kaons, protons and muons |
54 | | -/// |
55 | | -/// More particles could be added but would have to be added to the LUT |
56 | | -/// being used in the onTheFly tracker task. |
57 | | -/// |
58 | | -/// \author David Dobrigkeit Chinellato, UNICAMP, Nicola Nicassio, University and INFN Bari |
59 | | - |
60 | 56 | using namespace o2; |
61 | 57 | using namespace o2::framework; |
62 | 58 |
|
@@ -427,7 +423,7 @@ struct OnTheFlyTofPid { |
427 | 423 |
|
428 | 424 | std::array<float, 6> mcPvCov = {0.}; |
429 | 425 | o2::dataformats::VertexBase mcPvVtx({0.0f, 0.0f, 0.0f}, mcPvCov); |
430 | | - const float eventCollisionTimePS = collision.collisionTime() * 1e3; // convert ns to ps |
| 426 | + const float eventCollisionTimePS = (considerEventTime.value ? collision.collisionTime() * 1e3 : 0.f); // convert ns to ps |
431 | 427 | if (collision.has_mcCollision()) { |
432 | 428 | auto mcCollision = collision.mcCollision(); |
433 | 429 | mcPvVtx.setX(mcCollision.posX()); |
@@ -519,9 +515,11 @@ struct OnTheFlyTofPid { |
519 | 515 | // Now we compute the event time for the tracks |
520 | 516 |
|
521 | 517 | std::array<float, 2> tzero = {0.f, 0.f}; |
522 | | - const bool etStatus = eventTime(tracksWithTime, tzero); |
523 | | - if (!etStatus) { |
524 | | - LOG(warning) << "Event time calculation failed with " << tracksWithTime.size() << " tracks"; |
| 518 | + if (considerEventTime.value) { |
| 519 | + const bool etStatus = eventTime(tracksWithTime, tzero); |
| 520 | + if (!etStatus) { |
| 521 | + LOG(warning) << "Event time calculation failed with " << tracksWithTime.size() << " tracks"; |
| 522 | + } |
525 | 523 | } |
526 | 524 |
|
527 | 525 | if (plotsConfig.doQAplots) { |
|
0 commit comments