Skip to content

Commit 8c7d5f4

Browse files
committed
Merge branch 'dev' into devel
2 parents f7cdc0b + 7277814 commit 8c7d5f4

File tree

96 files changed

+2030
-653
lines changed

Some content is hidden

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

96 files changed

+2030
-653
lines changed

Common/SimConfig/src/SimConfig.cxx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,8 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
9898
activeModules[i] != "TF3" &&
9999
activeModules[i] != "RCH" &&
100100
activeModules[i] != "MI3" &&
101-
activeModules[i] != "ECL") {
101+
activeModules[i] != "ECL" &&
102+
activeModules[i] != "FD3") {
102103
LOGP(fatal, "List of active modules contains {}, which is not a module from the upgrades.", activeModules[i]);
103104
}
104105
}
@@ -112,7 +113,8 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
112113
activeModules[i] == "TF3" ||
113114
activeModules[i] == "RCH" ||
114115
activeModules[i] == "MI3" ||
115-
activeModules[i] == "ECL") {
116+
activeModules[i] == "ECL" ||
117+
activeModules[i] == "FD3") {
116118
LOGP(fatal, "List of active modules contains {}, which is not a run 3 module", activeModules[i]);
117119
}
118120
}
@@ -130,6 +132,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
130132
d == DetID::TF3 ||
131133
d == DetID::RCH ||
132134
d == DetID::ECL ||
135+
d == DetID::FD3 ||
133136
d == DetID::MI3) {
134137
activeModules.emplace_back(DetID::getName(d));
135138
}
@@ -149,7 +152,7 @@ void SimConfig::determineActiveModules(std::vector<std::string> const& inputargs
149152
activeModules.emplace_back("SHIL");
150153
for (int d = DetID::First; d <= DetID::Last; ++d) {
151154
#ifdef ENABLE_UPGRADES
152-
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT && d != DetID::TF3 && d != DetID::RCH && d != DetID::ECL && d != DetID::MI3) {
155+
if (d != DetID::IT3 && d != DetID::TRK && d != DetID::FT3 && d != DetID::FCT && d != DetID::TF3 && d != DetID::RCH && d != DetID::ECL && d != DetID::FD3 && d != DetID::MI3) {
153156
activeModules.emplace_back(DetID::getName(d));
154157
}
155158
}

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/DetID.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,8 @@ class DetID
8787
static constexpr ID RCH = 23;
8888
static constexpr ID MI3 = 24;
8989
static constexpr ID ECL = 25;
90-
static constexpr ID Last = ECL;
90+
static constexpr ID FD3 = 26;
91+
static constexpr ID Last = FD3;
9192
#else
9293
static constexpr ID Last = FOC; ///< if extra detectors added, update this !!!
9394
#endif
@@ -181,7 +182,7 @@ class DetID
181182
// detector names, will be defined in DataSources
182183
static constexpr const char* sDetNames[nDetectors + 1] = ///< defined detector names
183184
#ifdef ENABLE_UPGRADES
184-
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", "TF3", "RCH", "MI3", "ECL", nullptr};
185+
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", "IT3", "TRK", "FT3", "FCT", "TF3", "RCH", "MI3", "ECL", "FD3", nullptr};
185186
#else
186187
{"ITS", "TPC", "TRD", "TOF", "PHS", "CPV", "EMC", "HMP", "MFT", "MCH", "MID", "ZDC", "FT0", "FV0", "FDD", "TST", "CTP", "FOC", nullptr};
187188
#endif
@@ -195,7 +196,7 @@ class DetID
195196
#ifdef ENABLE_UPGRADES
196197
,
197198
o2h::gDataOriginIT3, o2h::gDataOriginTRK, o2h::gDataOriginFT3, o2h::gDataOriginFCT, o2h::gDataOriginTF3,
198-
o2h::gDataOriginRCH, o2h::gDataOriginMI3, o2h::gDataOriginECL
199+
o2h::gDataOriginRCH, o2h::gDataOriginMI3, o2h::gDataOriginECL, o2h::gDataOriginFD3
199200
#endif
200201
};
201202
#endif // GPUCA_GPUCODE_DEVICE
@@ -211,10 +212,11 @@ GPUconstexpr() DetID::mask_t sMasks[DetID::nDetectors] = ///< detectot masks
211212
DetID::mask_t(math_utils::bit2Mask(DetID::CPV)), DetID::mask_t(math_utils::bit2Mask(DetID::EMC)), DetID::mask_t(math_utils::bit2Mask(DetID::HMP)), DetID::mask_t(math_utils::bit2Mask(DetID::MFT)), DetID::mask_t(math_utils::bit2Mask(DetID::MCH)),
212213
DetID::mask_t(math_utils::bit2Mask(DetID::MID)), DetID::mask_t(math_utils::bit2Mask(DetID::ZDC)), DetID::mask_t(math_utils::bit2Mask(DetID::FT0)), DetID::mask_t(math_utils::bit2Mask(DetID::FV0)), DetID::mask_t(math_utils::bit2Mask(DetID::FDD)),
213214
DetID::mask_t(math_utils::bit2Mask(DetID::TST)), DetID::mask_t(math_utils::bit2Mask(DetID::CTP)), DetID::mask_t(math_utils::bit2Mask(DetID::FOC))
215+
214216
#ifdef ENABLE_UPGRADES
215217
,
216218
DetID::mask_t(math_utils::bit2Mask(DetID::IT3)), DetID::mask_t(math_utils::bit2Mask(DetID::TRK)), DetID::mask_t(math_utils::bit2Mask(DetID::FT3)), DetID::mask_t(math_utils::bit2Mask(DetID::FCT)), DetID::mask_t(math_utils::bit2Mask(DetID::TF3)),
217-
DetID::mask_t(math_utils::bit2Mask(DetID::RCH)), DetID::mask_t(math_utils::bit2Mask(DetID::MI3)), DetID::mask_t(math_utils::bit2Mask(DetID::ECL))
219+
DetID::mask_t(math_utils::bit2Mask(DetID::RCH)), DetID::mask_t(math_utils::bit2Mask(DetID::MI3)), DetID::mask_t(math_utils::bit2Mask(DetID::ECL)), DetID::mask_t(math_utils::bit2Mask(DetID::FD3))
218220
#endif
219221
};
220222
} // namespace detid_internal

DataFormats/Detectors/Common/include/DetectorsCommonDataFormats/SimTraits.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,8 @@ class SimTraits
9999
/*TF3*/ VS{ "TF3Hit" },
100100
/*RCH*/ VS{ "RCHHit" },
101101
/*MI3*/ VS{ "MI3Hit" },
102-
/*ECL*/ VS{ "ECLHit" }
102+
/*ECL*/ VS{ "ECLHit" },
103+
/*FD */ VS{ "FDHit" }
103104
#endif
104105
};
105106
// clang-format on

DataFormats/Detectors/TOF/CMakeLists.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@
99
# granted to it by virtue of its status as an Intergovernmental Organization
1010
# or submit itself to any jurisdiction.
1111

12+
o2_add_library(DataFormatsParamTOF
13+
SOURCES src/ParameterContainers.cxx
14+
PUBLIC_LINK_LIBRARIES O2::FrameworkLogger)
15+
16+
17+
o2_target_root_dictionary(DataFormatsParamTOF
18+
HEADERS include/DataFormatsTOF/ParameterContainers.h)
19+
1220
o2_add_library(DataFormatsTOF
1321
SOURCES src/Cluster.cxx
1422
src/CalibInfoTOFshort.cxx
@@ -22,6 +30,7 @@ o2_add_library(DataFormatsTOF
2230
src/TOFFEElightInfo.cxx
2331
PUBLIC_LINK_LIBRARIES O2::ReconstructionDataFormats
2432
O2::GPUCommon
33+
O2::DataFormatsParamTOF
2534
Boost::serialization)
2635

2736
o2_target_root_dictionary(DataFormatsTOF
@@ -33,7 +42,6 @@ o2_target_root_dictionary(DataFormatsTOF
3342
include/DataFormatsTOF/RawDataFormat.h
3443
include/DataFormatsTOF/CompressedDataFormat.h
3544
include/DataFormatsTOF/CTF.h
36-
include/DataFormatsTOF/ParameterContainers.h
3745
include/DataFormatsTOF/CalibInfoCluster.h
3846
include/DataFormatsTOF/CosmicInfo.h
3947
include/DataFormatsTOF/TOFFEElightInfo.h

DataFormats/Detectors/TOF/include/DataFormatsTOF/Cluster.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,17 @@ class Cluster : public o2::BaseCluster<float>
4949
kDownRight = 4, // 2^4, 5th bit
5050
kDown = 5, // 2^5, 6th bit
5151
kDownLeft = 6, // 2^6, 7th bit
52-
kLeft = 7, // 2^7, 8th bit
53-
//
54-
FrameBit = 6 }; // this bit set means that the cluster is in the nominal (alpha=20*sector+10 deg.) sector frame rather than aligned
52+
kLeft = 7 // 2^7, 8th bit
53+
};
5554

5655
Cluster() = default;
5756

5857
Cluster(std::int16_t sensid, float x, float y, float z, float sy2, float sz2, float syz, double timeRaw, double time, float tot, int L0L1latency, int deltaBC, float geanttime = 0.0, double t0 = 0.0);
5958

6059
~Cluster() = default;
6160

62-
bool isInNominalSector() const { return isBitSet(FrameBit); }
63-
void setInNominalSector() { setBit(FrameBit); }
61+
bool isInNominalSector() const { return mInNominalSector; }
62+
void setInNominalSector(bool v = true) { mInNominalSector = v; }
6463

6564
std::int8_t getSector() const { return getCount(); }
6665
void setSector(std::int8_t value) { setCount(value); }
@@ -163,9 +162,10 @@ class Cluster : public o2::BaseCluster<float>
163162
double mDigitInfoT[6] = {0., 0., 0., 0., 0., 0.};
164163
float mDigitInfoTOT[6] = {0., 0., 0., 0., 0., 0.};
165164
float mTgeant = 0.0;
165+
bool mInNominalSector = false;
166166
double mT0true = 0.0;
167167

168-
ClassDefNV(Cluster, 5);
168+
ClassDefNV(Cluster, 6);
169169
};
170170

171171
#ifndef GPUCA_GPUCODE

DataFormats/Detectors/TOF/include/DataFormatsTOF/ParameterContainers.h

Lines changed: 9 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
#ifndef O2_TOF_PARAMCONTAINER_H
1919
#define O2_TOF_PARAMCONTAINER_H
2020

21-
#include "TNamed.h"
22-
#include "TFile.h"
23-
#include "Framework/Logger.h"
24-
#include "map"
21+
#include <TNamed.h>
22+
#include <TFile.h>
23+
#include <Framework/Logger.h>
24+
#include <map>
2525

2626
namespace o2
2727
{
@@ -37,7 +37,7 @@ class Parameters
3737
Parameters(std::array<std::string, nPar> parNames, std::string name) : mName{name}, mPar{}, mParNames{parNames} {};
3838

3939
/// Default destructor
40-
virtual ~Parameters() = default; // Ensure proper cleanup in derived classes
40+
~Parameters() = default;
4141

4242
/// Setter for the parameter at position iparam
4343
/// \param iparam index in the array of the parameters
@@ -183,27 +183,10 @@ class ParameterCollection : public TNamed
183183
/// @param value parameter to add to the stored information
184184
/// @param pass key to look for in the stored information e.g. pass
185185
/// @return true if found and configured false if not fully configured
186-
bool addParameter(const std::string& pass, const std::string& parName, float value)
187-
{
188-
const bool alreadyPresent = hasKey(pass);
189-
if (alreadyPresent) {
190-
LOG(debug) << "Changing parametrization corresponding to key " << pass << " from size " << mParameters[pass].size() << " to " << parName;
191-
} else {
192-
mParameters[pass] = std::unordered_map<std::string, paramvar_t>{};
193-
LOG(debug) << "Adding new parametrization corresponding to key " << pass << ": " << parName;
194-
}
195-
mParameters[pass][parName] = value;
196-
return true;
197-
}
186+
bool addParameter(const std::string& pass, const std::string& parName, float value);
198187

199188
/// @return the size of the container i.e. the number of stored keys (or passes)
200-
int getSize(const std::string& pass) const
201-
{
202-
if (!hasKey(pass)) {
203-
return -1;
204-
}
205-
return mParameters.at(pass).size();
206-
}
189+
int getSize(const std::string& pass) const;
207190

208191
/// @brief Function to push the parameters from the sub container into the collection and store it under a given key
209192
/// @tparam ParType type of the parameter container
@@ -231,26 +214,10 @@ class ParameterCollection : public TNamed
231214

232215
/// @brief printing function for the content of the pass
233216
/// @param pass pass to print
234-
void print(const std::string& pass) const
235-
{
236-
const auto& size = getSize(pass);
237-
if (size < 0) {
238-
LOG(info) << "empty pass: " << pass;
239-
return;
240-
}
241-
LOG(info) << "Pass \"" << pass << "\" with size " << size;
242-
for (const auto& [par, value] : mParameters.at(pass)) {
243-
LOG(info) << "par name = " << par << ", value = " << value;
244-
}
245-
}
217+
void print(const std::string& pass) const;
246218

247219
/// @brief printing function for the full content of the container
248-
void print() const
249-
{
250-
for (const auto& [pass, pars] : mParameters) {
251-
print(pass);
252-
}
253-
}
220+
void print() const;
254221

255222
/// @brief Getter of the full map of parameters stored in the container
256223
/// @return returns the full map of parameters
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
#ifdef __CLING__
13+
14+
#pragma link C++ class o2::tof::Parameters < 5> + ;
15+
#pragma link C++ class o2::tof::ParameterCollection + ;
16+
17+
#endif

DataFormats/Detectors/TOF/src/DataFormatsTOFLinkDef.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,6 @@
3333

3434
#pragma link C++ class std::vector < o2::dataformats::CalibInfoTOFshort> + ;
3535
#pragma link C++ class std::vector < o2::dataformats::CalibInfoTOF> + ;
36-
#pragma link C++ class o2::tof::Parameters < 5> + ;
37-
#pragma link C++ class o2::tof::ParameterCollection + ;
3836

3937
#pragma link C++ class o2::tof::CTFHeader + ;
4038
#pragma link C++ class o2::tof::CompressedInfos + ;
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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 ParameterContainers.h
13+
/// \author Francesco Noferini
14+
/// \author Nicolò Jacazio nicolo.jacazio@cern.ch
15+
/// @since 2022-11-08
16+
/// \brief Implementation of the containers for the general parameters
17+
18+
#include "DataFormatsTOF/ParameterContainers.h"
19+
20+
// ClassImp(o2::tof::Parameters);
21+
using namespace o2::tof;
22+
23+
bool ParameterCollection::addParameter(const std::string& pass, const std::string& parName, float value)
24+
{
25+
const bool alreadyPresent = hasKey(pass);
26+
if (alreadyPresent) {
27+
LOG(debug) << "Changing parametrization corresponding to key " << pass << " from size " << mParameters[pass].size() << " to " << parName;
28+
} else {
29+
mParameters[pass] = std::unordered_map<std::string, paramvar_t>{};
30+
LOG(debug) << "Adding new parametrization corresponding to key " << pass << ": " << parName;
31+
}
32+
mParameters[pass][parName] = value;
33+
return true;
34+
}
35+
36+
int ParameterCollection::getSize(const std::string& pass) const
37+
{
38+
if (!hasKey(pass)) {
39+
return -1;
40+
}
41+
return mParameters.at(pass).size();
42+
}
43+
44+
void ParameterCollection::print() const
45+
{
46+
for (const auto& [pass, pars] : mParameters) {
47+
print(pass);
48+
}
49+
}
50+
51+
void ParameterCollection::print(const std::string& pass) const
52+
{
53+
const auto& size = getSize(pass);
54+
if (size < 0) {
55+
LOG(info) << "empty pass: " << pass;
56+
return;
57+
}
58+
LOG(info) << "Pass \"" << pass << "\" with size " << size;
59+
for (const auto& [par, value] : mParameters.at(pass)) {
60+
LOG(info) << "par name = " << par << ", value = " << value;
61+
}
62+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2019-2025 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+
add_subdirectory(FD3)

0 commit comments

Comments
 (0)