Skip to content

Commit b58dfe8

Browse files
authored
Merge branch 'AliceO2Group:master' into master
2 parents 12fc86a + be70ebf commit b58dfe8

File tree

83 files changed

+5031
-1848
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

83 files changed

+5031
-1848
lines changed

ALICE3/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ add_subdirectory(Core)
1414
# add_subdirectory(DataModel)
1515
add_subdirectory(Tasks)
1616
add_subdirectory(TableProducer)
17-
add_subdirectory(Tools)
17+
# add_subdirectory(Tools)

ALICE3/Core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111

1212
o2physics_add_library(ALICE3Core
1313
SOURCES TOFResoALICE3.cxx
14+
TrackUtilities.cxx
1415
DelphesO2TrackSmearer.cxx
1516
PUBLIC_LINK_LIBRARIES O2::Framework
1617
O2Physics::AnalysisCore)

ALICE3/Core/FastTracker.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,9 @@ int FastTracker::FastTrack(o2::track::TrackParCov inputTrack, o2::track::TrackPa
368368
}
369369

370370
if (layers[il].isInert()) {
371-
LOG(info) << "Skipping inert layer: " << layers[il].getName() << " at radius " << layers[il].getRadius() << " cm";
371+
if (mVerboseLevel > 0) {
372+
LOG(info) << "Skipping inert layer: " << layers[il].getName() << " at radius " << layers[il].getRadius() << " cm";
373+
}
372374
continue; // inert layer, skip
373375
}
374376

ALICE3/Core/TrackUtilities.cxx

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
///
12+
/// \file TrackUtilities.cxx
13+
/// \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
14+
/// \brief Set of utilities for the ALICE3 track handling
15+
/// \since May 21, 2025
16+
///
17+
18+
#include "TrackUtilities.h"
19+
20+
#include <vector>
21+
22+
void o2::upgrade::convertTLorentzVectorToO2Track(const int charge,
23+
const TLorentzVector particle,
24+
const std::vector<double> productionVertex,
25+
o2::track::TrackParCov& o2track)
26+
{
27+
std::array<float, 5> params;
28+
std::array<float, 15> covm = {0.};
29+
float s, c, x;
30+
o2::math_utils::sincos(static_cast<float>(particle.Phi()), s, c);
31+
o2::math_utils::rotateZInv(static_cast<float>(productionVertex[0]), static_cast<float>(productionVertex[1]), x, params[0], s, c);
32+
params[1] = static_cast<float>(productionVertex[2]);
33+
params[2] = 0.; // since alpha = phi
34+
const auto theta = 2. * std::atan(std::exp(-particle.PseudoRapidity()));
35+
params[3] = 1. / std::tan(theta);
36+
params[4] = charge / particle.Pt();
37+
38+
// Initialize TrackParCov in-place
39+
new (&o2track)(o2::track::TrackParCov)(x, particle.Phi(), params, covm);
40+
}

ALICE3/Core/TrackUtilities.h

Lines changed: 13 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,21 @@
99
// granted to it by virtue of its status as an Intergovernmental Organization
1010
// or submit itself to any jurisdiction.
1111
///
12-
/// \file TrackUtilities.h
13-
///
14-
/// \brief Set of utilities for the ALICE3 track handling
15-
///
12+
/// \file TrackUtilities.h
13+
/// \author Nicolò Jacazio, Universita del Piemonte Orientale (IT)
14+
/// \brief Set of utilities for the ALICE3 track handling
1615
/// \since May 21, 2025
1716
///
1817

1918
#ifndef ALICE3_CORE_TRACKUTILITIES_H_
2019
#define ALICE3_CORE_TRACKUTILITIES_H_
2120

22-
#include <vector>
23-
2421
#include "ReconstructionDataFormats/Track.h"
25-
#include "Framework/O2DatabasePDGPlugin.h"
26-
#include "Framework/AnalysisHelpers.h"
22+
2723
#include "TLorentzVector.h"
2824

25+
#include <vector>
26+
2927
namespace o2::upgrade
3028
{
3129

@@ -37,34 +35,20 @@ namespace o2::upgrade
3735
void convertTLorentzVectorToO2Track(const int charge,
3836
const TLorentzVector particle,
3937
const std::vector<double> productionVertex,
40-
o2::track::TrackParCov& o2track)
41-
{
42-
std::array<float, 5> params;
43-
std::array<float, 15> covm = {0.};
44-
float s, c, x;
45-
o2::math_utils::sincos(static_cast<float>(particle.Phi()), s, c);
46-
o2::math_utils::rotateZInv(static_cast<float>(productionVertex[0]), static_cast<float>(productionVertex[1]), x, params[0], s, c);
47-
params[1] = static_cast<float>(productionVertex[2]);
48-
params[2] = 0.; // since alpha = phi
49-
const auto theta = 2. * std::atan(std::exp(-particle.PseudoRapidity()));
50-
params[3] = 1. / std::tan(theta);
51-
params[4] = charge / particle.Pt();
52-
53-
// Initialize TrackParCov in-place
54-
new (&o2track)(o2::track::TrackParCov)(x, particle.Phi(), params, covm);
55-
}
38+
o2::track::TrackParCov& o2track);
5639

5740
/// Function to convert a TLorentzVector into a perfect Track
5841
/// \param pdgCode particle pdg
5942
/// \param particle the particle to convert (TLorentzVector)
6043
/// \param productionVertex where the particle was produced
6144
/// \param o2track the address of the resulting TrackParCov
6245
/// \param pdg the pdg service
46+
template <typename PdgService>
6347
void convertTLorentzVectorToO2Track(int pdgCode,
6448
TLorentzVector particle,
6549
std::vector<double> productionVertex,
6650
o2::track::TrackParCov& o2track,
67-
const o2::framework::Service<o2::framework::O2DatabasePDG>& pdg)
51+
const PdgService& pdg)
6852
{
6953
const auto pdgInfo = pdg->GetParticle(pdgCode);
7054
int charge = 0;
@@ -78,10 +62,10 @@ void convertTLorentzVectorToO2Track(int pdgCode,
7862
/// \param particle the particle to convert (mcParticle)
7963
/// \param o2track the address of the resulting TrackParCov
8064
/// \param pdg the pdg service
81-
template <typename McParticleType>
65+
template <typename McParticleType, typename PdgService>
8266
void convertMCParticleToO2Track(McParticleType& particle,
8367
o2::track::TrackParCov& o2track,
84-
const o2::framework::Service<o2::framework::O2DatabasePDG>& pdg)
68+
const PdgService& pdg)
8569
{
8670
static TLorentzVector tlv;
8771
tlv.SetPxPyPzE(particle.px(), particle.py(), particle.pz(), particle.e());
@@ -92,9 +76,9 @@ void convertMCParticleToO2Track(McParticleType& particle,
9276
/// \param particle the particle to convert (mcParticle)
9377
/// \param o2track the address of the resulting TrackParCov
9478
/// \param pdg the pdg service
95-
template <typename McParticleType>
79+
template <typename McParticleType, typename PdgService>
9680
o2::track::TrackParCov convertMCParticleToO2Track(McParticleType& particle,
97-
const o2::framework::Service<o2::framework::O2DatabasePDG>& pdg)
81+
const PdgService& pdg)
9882
{
9983
o2::track::TrackParCov o2track;
10084
convertMCParticleToO2Track(particle, o2track, pdg);

ALICE3/DataModel/OTFRICH.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@ DECLARE_SOA_DYNAMIC_COLUMN(NSigmaRich, nSigmaRich, //! General f
5555
}
5656
});
5757

58+
DECLARE_SOA_COLUMN(HasSig, hasSig, bool); //! Has signal in the barrel rich (is particle over threshold)
59+
DECLARE_SOA_COLUMN(HasSigEl, hasSigEl, bool); //! Has nSigma electron BarrelRich (is electron over threshold)
60+
DECLARE_SOA_COLUMN(HasSigMu, hasSigMu, bool); //! Has nSigma muon BarrelRich (is muon over threshold)
61+
DECLARE_SOA_COLUMN(HasSigPi, hasSigPi, bool); //! Has nSigma pion BarrelRich (is pion over threshold)
62+
DECLARE_SOA_COLUMN(HasSigKa, hasSigKa, bool); //! Has nSigma kaon BarrelRich (is kaon over threshold)
63+
DECLARE_SOA_COLUMN(HasSigPr, hasSigPr, bool); //! Has nSigma proton BarrelRich (is proton over threshold)
64+
5865
} // namespace upgrade_rich
5966
DECLARE_SOA_TABLE(UpgradeRichs, "AOD", "UPGRADERICH",
6067
upgrade_rich::NSigmaElectronRich,
@@ -70,6 +77,16 @@ DECLARE_SOA_TABLE(UpgradeRichs, "AOD", "UPGRADERICH",
7077

7178
using UpgradeRich = UpgradeRichs::iterator;
7279

80+
DECLARE_SOA_TABLE(UpgradeRichSignals, "AOD", "UPGRADERICHSIG",
81+
upgrade_rich::HasSig,
82+
upgrade_rich::HasSigEl,
83+
upgrade_rich::HasSigMu,
84+
upgrade_rich::HasSigPi,
85+
upgrade_rich::HasSigKa,
86+
upgrade_rich::HasSigPr);
87+
88+
using UpgradeRichSignal = UpgradeRichSignals::iterator;
89+
7390
} // namespace o2::aod
7491

7592
#endif // ALICE3_DATAMODEL_OTFRICH_H_

0 commit comments

Comments
 (0)