Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ALICE3/Tasks/alice3DqEfficiency.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -775,7 +775,7 @@ struct Alice3DqEfficiencyAnalysisSameEventPairing {
std::vector<MCSignal*> fGenMCSignals;

std::vector<AnalysisCompositeCut> fPairCuts;
AnalysisCompositeCut fMCGenAccCut;
AnalysisCompositeCut fMCGenAccCut{};
bool fUseMCGenAccCut = false;

uint32_t fTrackFilterMask = 0; // mask for the track cuts required in this task to be applied on the barrel cuts produced upstream
Expand Down
3 changes: 2 additions & 1 deletion Common/CCDB/TriggerAliases.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@

#include <Framework/Logger.h>

#include <array>
#include <cstdint>
#include <string>

std::string aliasLabels[kNaliases] = {
const std::array<std::string, kNaliases> aliasLabels{
"kINT7",
"kEMC7",
"kINT7inMUON",
Expand Down
3 changes: 2 additions & 1 deletion Common/CCDB/TriggerAliases.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <Rtypes.h>
#include <RtypesCore.h>

#include <array>
#include <cstdint>
#include <map>
#include <string>
Expand Down Expand Up @@ -51,7 +52,7 @@ enum triggerAliases {
kNaliases
};

extern std::string aliasLabels[kNaliases];
extern const std::array<std::string, kNaliases> aliasLabels;

class TriggerAliases
{
Expand Down
15 changes: 8 additions & 7 deletions Common/CCDB/macros/upload_event_selection_params.C
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include <RtypesCore.h>

#include <array>
#include <cstdio>
#include <map>
#include <string>
Expand All @@ -33,12 +34,12 @@ void upload_event_selection_params()
// ccdb.truncate("EventSelection/EventSelectionParams");
ccdb.init("https://alice-ccdb.cern.ch");

const int nPeriodsMax = 100;
EventSelectionParams* par[nPeriodsMax];
string period[nPeriodsMax];
int runFirst[nPeriodsMax];
int runLast[nPeriodsMax];
bool isNew[nPeriodsMax] = {0};
constexpr int NPeriodsMax{100};
std::array<EventSelectionParams*, NPeriodsMax> par{};
std::array<string, NPeriodsMax> period{};
std::array<int, NPeriodsMax> runFirst{};
std::array<int, NPeriodsMax> runLast{};
std::array<bool, NPeriodsMax> isNew{};

int n = 0;
period[n] = "pp2010";
Expand Down Expand Up @@ -256,7 +257,7 @@ void upload_event_selection_params()
auto sor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, runFirst[i]).first;
auto eor = o2::ccdb::BasicCCDBManager::getRunDuration(ccdb, runLast[i]).second;

printf("sor=%llu eor=%llu\n", sor, eor);
printf("sor=%ld eor=%ld\n", sor, eor);
metadata["period"] = period[i];
metadata["run_first"] = Form("%d", runFirst[i]);
metadata["run_last"] = Form("%d", runLast[i]);
Expand Down
13 changes: 7 additions & 6 deletions Common/Core/PID/TPCPIDResponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

#include <array>
#include <cmath>
#include <cstdint>
#include <vector>

namespace o2::pid::tpc
Expand Down Expand Up @@ -77,7 +78,7 @@ class Response
float GetExpectedSigma(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id) const;
/// Gets the expected resolution of the track with multTPC explicitly provided
template <typename TrackType>
float GetExpectedSigmaAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id) const;
float GetExpectedSigmaAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id) const;
/// Gets the number of sigmas with respect the expected value
template <typename CollisionType, typename TrackType>
float GetNumberOfSigma(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id) const;
Expand All @@ -86,7 +87,7 @@ class Response
float GetNumberOfSigmaMCTuned(const CollisionType& collision, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const;
// Number of sigmas with respect to expected for MC, defining a tune-on-data signal value, explicit multTPC
template <typename TrackType>
float GetNumberOfSigmaMCTunedAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const;
float GetNumberOfSigmaMCTunedAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const;
/// Gets the deviation to the expected signal
template <typename TrackType>
float GetSignalDelta(const TrackType& trk, const o2::track::PID::ID id) const;
Expand All @@ -99,7 +100,7 @@ class Response
private:
/// Compute expected sigma given a pre-computed expected signal, avoiding a redundant Bethe-Bloch call.
template <typename TrackType>
float sigmaFromSignal(float expectedSignal, const long multTPC, const TrackType& track, const o2::track::PID::ID id) const;
float sigmaFromSignal(float expectedSignal, const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const;

std::array<float, 5> mBetheBlochParams = {0.03209809958934784, 19.9768009185791, 2.5266601063857674e-16, 2.7212300300598145, 6.080920219421387};
std::array<float, 2> mResolutionParamsDefault = {0.07, 0.0};
Expand Down Expand Up @@ -135,7 +136,7 @@ inline float Response::GetExpectedSigma(const CollisionType& collision, const Tr

/// Gets the expected resolution of the measurement
template <typename TrackType>
inline float Response::GetExpectedSigmaAtMultiplicity(const long multTPC, const TrackType& track, const o2::track::PID::ID id) const
inline float Response::GetExpectedSigmaAtMultiplicity(const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const
{
if (!track.hasTPC()) {
return -999.f;
Expand All @@ -144,7 +145,7 @@ inline float Response::GetExpectedSigmaAtMultiplicity(const long multTPC, const
}

template <typename TrackType>
inline float Response::sigmaFromSignal(float expectedSignal, const long multTPC, const TrackType& track, const o2::track::PID::ID id) const
inline float Response::sigmaFromSignal(float expectedSignal, const int64_t multTPC, const TrackType& track, const o2::track::PID::ID id) const
{
float resolution = 0.f;
if (mUseDefaultResolutionParam) {
Expand Down Expand Up @@ -188,7 +189,7 @@ inline float Response::GetNumberOfSigmaMCTuned(const CollisionType& collision, c
}

template <typename TrackType>
inline float Response::GetNumberOfSigmaMCTunedAtMultiplicity(const long multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const
inline float Response::GetNumberOfSigmaMCTunedAtMultiplicity(const int64_t multTPC, const TrackType& trk, const o2::track::PID::ID id, float mcTunedTPCSignal) const
{
const float signal = GetExpectedSignal(trk, id);
if (signal < 0.f) {
Expand Down
5 changes: 3 additions & 2 deletions Common/Core/TrackSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <Framework/DataTypes.h>
#include <Framework/Logger.h>

#include <array>
#include <cstdint>
#include <functional>
#include <set>
Expand All @@ -37,7 +38,7 @@ bool TrackSelection::FulfillsITSHitRequirements(uint8_t itsClusterMap) const
return true;
}

const std::string TrackSelection::mCutNames[static_cast<int>(TrackSelection::TrackCuts::kNCuts)] = {"TrackType", "PtRange", "EtaRange", "TPCNCls", "TPCCrossedRows", "TPCCrossedRowsOverNCls", "TPCChi2NDF", "TPCRefit", "ITSNCls", "ITSChi2NDF", "ITSRefit", "ITSHits", "GoldenChi2", "DCAxy", "DCAz", "TPCFracSharedCls"};
const std::array<std::string, static_cast<int>(TrackSelection::TrackCuts::kNCuts)> TrackSelection::mCutNames{"TrackType", "PtRange", "EtaRange", "TPCNCls", "TPCCrossedRows", "TPCCrossedRowsOverNCls", "TPCChi2NDF", "TPCRefit", "ITSNCls", "ITSChi2NDF", "ITSRefit", "ITSHits", "GoldenChi2", "DCAxy", "DCAz", "TPCFracSharedCls"};

void TrackSelection::SetTrackType(o2::aod::track::TrackTypeEnum trackType)
{
Expand Down Expand Up @@ -149,7 +150,7 @@ void TrackSelection::print() const
for (int i = 0; i < static_cast<int>(TrackCuts::kNCuts); i++) {
switch (static_cast<TrackCuts>(i)) {
case TrackCuts::kTrackType:
LOG(info) << mCutNames[i].data() << " == " << static_cast<int>(mTrackType);
LOG(info) << mCutNames[i] << " == " << static_cast<int>(mTrackType);
break;
case TrackCuts::kPtRange:
LOG(info) << mCutNames[i] << " in [" << mMinPt << ", " << mMaxPt << "]";
Expand Down
3 changes: 2 additions & 1 deletion Common/Core/TrackSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include <Rtypes.h>

#include <array>
#include <cmath>
#include <cstdint>
#include <functional>
Expand Down Expand Up @@ -68,7 +69,7 @@ class TrackSelection
ppPass3
};

static const std::string mCutNames[static_cast<int>(TrackCuts::kNCuts)];
static const std::array<std::string, static_cast<int>(TrackCuts::kNCuts)> mCutNames;

// True for Run 2 track types. Hoisted out of the per-cut IsSelected() so that
// the trackType() column is dereferenced once per track instead of once per cut.
Expand Down
4 changes: 3 additions & 1 deletion Common/Tasks/flowTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include <TMath.h>
#include <TMathBase.h>

#include <cstdint>

using namespace o2;
using namespace o2::framework;
using namespace o2::framework::expressions;
Expand Down Expand Up @@ -100,7 +102,7 @@ struct flowTest {
if (evPhi < 0)
evPhi += 2. * TMath::Pi();

long nCh = 0;
int64_t nCh = 0;

if (imp > minB && imp < maxB) {
// event within range
Expand Down
4 changes: 2 additions & 2 deletions Common/Tasks/multiplicityQa.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -290,8 +290,8 @@ struct MultiplicityQa {
return;
}

long NcontribsTOF = 0;
long NcontribsTRD = 0;
int64_t NcontribsTOF = 0;
int64_t NcontribsTRD = 0;
for (auto& track : tracks) {
if (track.isPVContributor()) {
if (track.hasTRD())
Expand Down
3 changes: 2 additions & 1 deletion Common/Tools/Multiplicity/MultModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <TProfile.h>
#include <TString.h>

#include <array>
#include <cmath>
#include <cstdint>
#include <cstdlib>
Expand Down Expand Up @@ -480,7 +481,7 @@ class MultModule
LOGF(info, "Metadata information: isMC? %i", metadataInfo.isMC());
const auto& workflows = context.services().template get<o2::framework::RunningWorkflowInfo const>();

TString listOfRequestors[nTablesConst];
std::array<TString, nTablesConst> listOfRequestors{};
for (int i = 0; i < nTablesConst; i++) {
int f = internalOpts.enabledTables->get(tableNames[i].c_str(), "enable");
if (f == 1) {
Expand Down
7 changes: 4 additions & 3 deletions Common/Tools/Multiplicity/multCalibrator.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

#include <cmath>
#include <iostream> // FIXME
#include <vector>

using namespace std;

Expand Down Expand Up @@ -353,8 +354,8 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, const TString& lHis
// place squarely at the middle to ensure it's all fine
lMiddleOfBins[lB - 1] = 0.5 * (lDesiredBoundaries[lB] + lDesiredBoundaries[lB - 1]);
}
Double_t lBounds[lNDesiredBoundaries + 1];
Double_t lPrecision[lNDesiredBoundaries + 1];
std::vector<Double_t> lBounds(lNDesiredBoundaries + 1);
std::vector<Double_t> lPrecision(lNDesiredBoundaries + 1);

if (fAnchorPointValue > 0) {
lBounds[0] = 0;
Expand Down Expand Up @@ -382,7 +383,7 @@ TH1F* multCalibrator::GetCalibrationHistogram(TH1* histoRaw, const TString& lHis
cout << histoRaw->GetName() << " boundaries, percentile: " << lDesiredBoundaries[ii] << "%\t Signal value = " << lBounds[lDisplacedii] << "\tprecision = " << lPrecision[ii] << "% " << lPrecisionString.Data() << endl;
}
}
TH1F* hCalib = new TH1F(lHistoName.Data(), "", fAnchorPointValue < 0 ? lNDesiredBoundaries - 1 : lNDesiredBoundaries, lBounds);
TH1F* hCalib = new TH1F(lHistoName.Data(), "", fAnchorPointValue < 0 ? lNDesiredBoundaries - 1 : lNDesiredBoundaries, lBounds.data());
hCalib->SetDirectory(0);
hCalib->SetBinContent(0, 100.5);
hCalib->SetBinContent(1, 100.5);
Expand Down
2 changes: 1 addition & 1 deletion DPG/Tasks/AOTTrack/qaEventTrackLite.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ DECLARE_SOA_COLUMN(Pt, pt, float);
DECLARE_SOA_COLUMN(Eta, eta, float); //! Eta
DECLARE_SOA_COLUMN(Phi, phi, float); //! Phi
DECLARE_SOA_COLUMN(PtReso, ptReso, float); //! Pt resolution
DECLARE_SOA_COLUMN(Sign, sign, short); //! Sign
DECLARE_SOA_COLUMN(Sign, sign, int16_t); //! Sign
DECLARE_SOA_COLUMN(HasITS, hasITS, bool); //! Track has the ITS
DECLARE_SOA_COLUMN(HasTPC, hasTPC, bool); //! Track has the TPC
DECLARE_SOA_COLUMN(HasTRD, hasTRD, bool); //! Track has the TRD
Expand Down
2 changes: 1 addition & 1 deletion DPG/Tasks/TOF/tofSkimsTableCreator.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ DECLARE_SOA_COLUMN(DeltaTPi, deltaTPi, float); //! Difference betw
DECLARE_SOA_COLUMN(DeltaTKa, deltaTKa, float); //! Difference between the tofSignal and the kaon expected signal
DECLARE_SOA_COLUMN(DeltaTPr, deltaTPr, float); //! Difference between the tofSignal and the proton expected signal
DECLARE_SOA_COLUMN(DoubleDelta, doubleDelta, float); //! Double difference between DeltaT
DECLARE_SOA_COLUMN(RefSign, refSign, short); //! Sign of the reference track
DECLARE_SOA_COLUMN(RefSign, refSign, int16_t); //! Sign of the reference track
DECLARE_SOA_COLUMN(PIDForTracking, pidForTracking, uint8_t); //! Index for mass hypothesis used in tracking see PID.h for definition
DECLARE_SOA_COLUMN(EvTimeT0AC, evTimeT0AC, float); //! Event time of the track computed with the T0AC
DECLARE_SOA_COLUMN(EvTimeT0ACErr, evTimeT0ACErr, float); //! Resolution of the event time of the track computed with the T0AC
Expand Down
3 changes: 2 additions & 1 deletion PWGCF/Core/CorrelationContainer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include <Rtypes.h>
#include <RtypesCore.h>

#include <cstdint>
#include <cstring>
#include <vector>

Expand Down Expand Up @@ -112,7 +113,7 @@ CorrelationContainer::CorrelationContainer(const char* name, const char* objTitl

std::vector<o2::framework::AxisSpec> pairAxis(correlationAxis);
pairAxis.insert(pairAxis.end(), userAxis.begin(), userAxis.end());
long bins = 1;
int64_t bins = 1;
for (const auto& axis : pairAxis) {
bins *= axis.getNbins();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ struct femtoWorldProducerReducedTask {
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();

long now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
ccdb->setCreatedNotAfter(now);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ struct femtoWorldProducerTaskV0Only {
ccdb->setCaching(true);
ccdb->setLocalObjectValidityChecking();

long now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
int64_t now = std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count();
ccdb->setCreatedNotAfter(now);
}

Expand Down
Loading
Loading