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
8 changes: 4 additions & 4 deletions Common/CCDB/macros/ctpRateF.C
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@

struct ctpRateFetcher {
ctpRateFetcher() = default;
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName);
double fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, const std::string& sourceName);
void getCTPconfig(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber);
void getCTPscalers(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber);
void getLHCIFdata(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber);
double fetchCTPratesInputs(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, int input);
double fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string className, int inputType = 1);
double fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, const std::string& className, int inputType = 1);
double pileUpCorrection(double rate);

int mRunNumber = -1;
Expand Down Expand Up @@ -97,14 +97,14 @@
getCTPscalers(ccdb, timeStamp, runNumber);
getLHCIFdata(ccdb, timeStamp, runNumber);
std::vector<o2::ctp::CTPScalerRecordO2> recs = mScalers->getScalerRecordO2();
if (recs[0].scalersInps.size() == 48) {

Check failure on line 100 in Common/CCDB/macros/ctpRateF.C

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return pileUpCorrection(mScalers->getRateGivenT(timeStamp * 1.e-3, input, 7).second);
} else {
LOG(error) << "Inputs not available";
return -1.;
}
}
double ctpRateFetcher::fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string className, int inputType)
double ctpRateFetcher::fetchCTPratesClasses(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, const std::string& className, int inputType)
{
getCTPscalers(ccdb, timeStamp, runNumber);
getCTPconfig(ccdb, timeStamp, runNumber);
Expand All @@ -125,10 +125,10 @@
getLHCIFdata(ccdb, timeStamp, runNumber);
return pileUpCorrection(rate.second);
}
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, std::string sourceName)
double ctpRateFetcher::fetch(o2::ccdb::BasicCCDBManager* ccdb, uint64_t timeStamp, int runNumber, const std::string& sourceName)
{
if (sourceName.find("ZNC") != std::string::npos) {
if (runNumber < 544448) {

Check failure on line 131 in Common/CCDB/macros/ctpRateF.C

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return fetchCTPratesInputs(ccdb, timeStamp, runNumber, 25) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
} else {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "C1ZNC-B-NOPF-CRU", 6) / (sourceName.find("hadronic") != std::string::npos ? 28. : 1.);
Expand All @@ -138,7 +138,7 @@
} else if (sourceName == "T0SC") {
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVXTSC-B-NOPF");
} else if (sourceName == "T0VTX") {
if (runNumber < 534202) {

Check failure on line 141 in Common/CCDB/macros/ctpRateF.C

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
return fetchCTPratesClasses(ccdb, timeStamp, runNumber, "minbias_TVX_L0", 3); // 2022
} else {
double_t ret = fetchCTPratesClasses(ccdb, timeStamp, runNumber, "CMTVX-B-NOPF");
Expand Down
6 changes: 3 additions & 3 deletions Common/Core/EventPlaneHelper.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
float offsetX = 0.;
float offsetY = 0.; // No offset for FT0-C (default case).

if (chno < 96) { // Channel in FT0-A, non-zero offset must be applied. // LOKI: make general.

Check failure on line 72 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
offsetX = mOffsetFT0AX;
offsetY = mOffsetFT0AY;
}
Expand All @@ -93,14 +93,14 @@
phi = GetPhiFV0(chno, fv0geom);
break;
default:
printf("'int det' value does not correspond to any accepted case.\n");

Check failure on line 96 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
break;
}

/// printf("Phi: %.3f\n", phi);

if (phi < -900) {

Check failure on line 102 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
printf("Error on phi. Skip\n");

Check failure on line 103 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
return;
} // TODO: ensure proper safety check.
Qvec += TComplex(ampl * TMath::Cos(phi * nmod), ampl * TMath::Sin(phi * nmod));
Expand All @@ -111,7 +111,7 @@
{
const float centClasses[] = {0., 5., 10., 20., 30., 40., 50., 60., 80.};

for (int i = 0; i < 9; i++) {

Check failure on line 114 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
if (cent >= centClasses[i]) {
continue;
} else {
Expand All @@ -136,10 +136,10 @@
qy = (qy - corrections[2] * qx) / (1.0 - corrections[3] * corrections[2]);

// Rescaling of the Qx-Qy into a circle.
if (std::fabs(corrections[4]) > 1e-8) {

Check failure on line 139 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
qx /= corrections[4];
}
if (std::fabs(corrections[5]) > 1e-8) {

Check failure on line 142 in Common/Core/EventPlaneHelper.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
qy /= corrections[5];
}
}
Expand All @@ -164,19 +164,19 @@
qy /= am;
}

void EventPlaneHelper::GetCorrRecentering(const std::shared_ptr<TH2> histQ, float& meanX, float& meanY)
void EventPlaneHelper::GetCorrRecentering(const std::shared_ptr<TH2>& histQ, float& meanX, float& meanY)
{
meanX = histQ->GetMean(1);
meanY = histQ->GetMean(2);
}

void EventPlaneHelper::GetCorrWidth(const std::shared_ptr<TH2> histQ, float& stdX, float& stdY)
void EventPlaneHelper::GetCorrWidth(const std::shared_ptr<TH2>& histQ, float& stdX, float& stdY)
{
stdX = histQ->GetStdDev(1);
stdY = histQ->GetStdDev(2);
}

void EventPlaneHelper::GetCorrTwistRecale(const std::shared_ptr<TH2> histQ,
void EventPlaneHelper::GetCorrTwistRecale(const std::shared_ptr<TH2>& histQ,
float& aPlus, float& aMinus,
float& lambdaPlus, float& lambdaMinus)
{
Expand Down
6 changes: 3 additions & 3 deletions Common/Core/EventPlaneHelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,13 +81,13 @@ class EventPlaneHelper
void DoRescale(float& qx, float& qy, float ap, float am);

// Method to get the recentering correction on the Qx-Qy distribution.
void GetCorrRecentering(const std::shared_ptr<TH2> histQ, float& meanX, float& meanY);
void GetCorrRecentering(const std::shared_ptr<TH2>& histQ, float& meanX, float& meanY);

// Method to get the std. deviation on the Qx-Qy distribution.
void GetCorrWidth(const std::shared_ptr<TH2> histQ, float& stdX, float& stdY);
void GetCorrWidth(const std::shared_ptr<TH2>& histQ, float& stdX, float& stdY);

// Method to get the twist and rescale correction on the Qx-Qy distribution.
void GetCorrTwistRecale(const std::shared_ptr<TH2> histQ,
void GetCorrTwistRecale(const std::shared_ptr<TH2>& histQ,
float& aPlus, float& aMinus,
float& lambdaPlus, float& lambdaMinus);

Expand Down
4 changes: 2 additions & 2 deletions Common/Core/PID/PIDTOFParamService.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ o2::common::core::MetadataHelper o2::pid::tof::TOFResponseImpl::metadataInfo;
bool o2::pid::tof::TOFResponseImpl::mIsInit = false;
int o2::pid::tof::TOFResponseImpl::mLastRunNumber = -1;

void o2::pid::tof::TOFResponseImpl::inheritFromBaseTask(o2::framework::InitContext& initContext, const std::string task)
void o2::pid::tof::TOFResponseImpl::inheritFromBaseTask(o2::framework::InitContext& initContext, const std::string& task)
{
if (mIsInit) {
LOG(fatal) << "TOFResponseImpl already initialized, cannot re-initialize";
Expand All @@ -70,7 +70,7 @@ void o2::pid::tof::TOFResponseImpl::inheritFromBaseTask(o2::framework::InitConte

void o2::pid::tof::TOFResponseImpl::initSetup(o2::ccdb::BasicCCDBManager* ccdb,
o2::framework::InitContext& initContext,
const std::string task)
const std::string& task)
{
if (mIsInit) {
LOG(fatal) << "TOFResponseImpl already initialized, cannot re-initialize";
Expand Down
4 changes: 2 additions & 2 deletions Common/Core/PID/PIDTOFParamService.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ struct TOFResponseImpl {
/// \note This function should be called in the init function of each task that uses the TOF response
/// \note The parameters are loaded from the CCDB and stored in the static variable `parameters`
/// \note The metadata information is also initialized in this function
void initSetup(o2::ccdb::BasicCCDBManager* ccdb, o2::framework::InitContext& initContext, const std::string task = "tof-signal");
void initSetup(o2::ccdb::BasicCCDBManager* ccdb, o2::framework::InitContext& initContext, const std::string& task = "tof-signal");

/// Initialize the TOF response parameters in the init function of each task
/// \param ccdb Service pointer to the CCDB manager
Expand Down Expand Up @@ -163,7 +163,7 @@ struct TOFResponseImpl {
o2::common::core::CollisionSystemType::collType cfgCollisionType() const { return mCollisionSystem; }

private:
void inheritFromBaseTask(o2::framework::InitContext& initContext, const std::string task = "tof-signal");
void inheritFromBaseTask(o2::framework::InitContext& initContext, const std::string& task = "tof-signal");

static bool mIsInit; //! Flag to check if the parameters are initialized
static int mLastRunNumber; //! Last run number for which the calibration was loaded
Expand Down
6 changes: 3 additions & 3 deletions Common/Core/TrackSelection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -119,11 +119,11 @@ void TrackSelection::SetMaxDcaZ(float maxDcaZ)

void TrackSelection::SetMaxDcaXYPtDep(std::function<float(float)> ptDepCut)
{
mMaxDcaXYPtDep = ptDepCut;
mMaxDcaXYPtDep = std::move(ptDepCut);
LOG(info) << "Track selection, set max DCA xy pt dep: " << mMaxDcaXYPtDep(1.0);
}

void TrackSelection::SetRequireHitsInITSLayers(int8_t minNRequiredHits, std::set<uint8_t> requiredLayers)
void TrackSelection::SetRequireHitsInITSLayers(int8_t minNRequiredHits, const std::set<uint8_t>& requiredLayers)
{
// layer 0 corresponds to the the innermost ITS layer
uint8_t mask = 0;
Expand All @@ -133,7 +133,7 @@ void TrackSelection::SetRequireHitsInITSLayers(int8_t minNRequiredHits, std::set
mRequiredITSHits.push_back(std::make_pair(minNRequiredHits, mask));
LOG(info) << "Track selection, set require hits in ITS layers: " << static_cast<int>(minNRequiredHits);
}
void TrackSelection::SetRequireNoHitsInITSLayers(std::set<uint8_t> excludedLayers)
void TrackSelection::SetRequireNoHitsInITSLayers(const std::set<uint8_t>& excludedLayers)
{
uint8_t mask = 0;
for (const auto& layer : excludedLayers) {
Expand Down
4 changes: 2 additions & 2 deletions Common/Core/TrackSelection.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ class TrackSelection
void SetMaxDcaXY(float maxDcaXY);
void SetMaxDcaZ(float maxDcaZ);
void SetMaxDcaXYPtDep(std::function<float(float)> ptDepCut);
void SetRequireHitsInITSLayers(int8_t minNRequiredHits, std::set<uint8_t> requiredLayers);
void SetRequireNoHitsInITSLayers(std::set<uint8_t> excludedLayers);
void SetRequireHitsInITSLayers(int8_t minNRequiredHits, const std::set<uint8_t>& requiredLayers);
void SetRequireNoHitsInITSLayers(const std::set<uint8_t>& excludedLayers);
/// @brief Reset ITS requirements
void ResetITSRequirements() { mRequiredITSHits.clear(); }
void SetMaxTPCFractionSharedCls(float maxTPCFractionSharedCls);
Expand Down
4 changes: 2 additions & 2 deletions Common/Core/Zorro.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ int findBin(TH1* hist, const std::string& label)
}
} // namespace

void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry, int runNumber, std::string folderName)
void Zorro::populateHistRegistry(o2::framework::HistogramRegistry& histRegistry, int runNumber, const std::string& folderName)
{
int runId{-1};
for (size_t i{0}; i < mRunNumberHistos.size(); ++i) {
Expand Down Expand Up @@ -176,7 +176,7 @@ void Zorro::populateExternalHists(int runNumber, TH2* ZorroHisto, TH2* ToiHisto)
mRunNumberHistos.push_back(runNumber);
}

std::vector<int> Zorro::initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber, uint64_t timestamp, std::string tois, int bcRange)
std::vector<int> Zorro::initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber, uint64_t timestamp, const std::string& tois, int bcRange)
{
if (mRunNumber == runNumber) {
return mTOIidx;
Expand Down
4 changes: 2 additions & 2 deletions Common/Core/Zorro.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ class Zorro
{
public:
Zorro() = default;
std::vector<int> initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber, uint64_t timestamp, std::string tois, int bcTolerance = 500);
std::vector<int> initCCDB(o2::ccdb::BasicCCDBManager* ccdb, int runNumber, uint64_t timestamp, const std::string& tois, int bcTolerance = 500);
std::bitset<128> fetch(uint64_t bcGlobalId, uint64_t tolerance = 100);
bool isSelected(uint64_t bcGlobalId, uint64_t tolerance = 100, TH2* toiHisto = nullptr);
bool isNotSelectedByAny(uint64_t bcGlobalId, uint64_t tolerance = 100);

void populateHistRegistry(o2::framework::HistogramRegistry& histRegistry, int runNumber, std::string folderName = "Zorro");
void populateHistRegistry(o2::framework::HistogramRegistry& histRegistry, int runNumber, const std::string& folderName = "Zorro");
void populateExternalHists(int runNumber, TH2* zorroHisto = nullptr, TH2* toiHisto = nullptr);

TH1D* getScalers() const { return mScalers; }
Expand Down
8 changes: 4 additions & 4 deletions Common/Core/macros/testMetadataHelper.C
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ std::map<std::string, bool> buildMapForCommitHash(const std::string& hash)
return results;
}

void populateCCDBWithCommitAvailability(std::map<std::string, bool> hasHashMap,
const std::string commitHash,
const std::string ccdbUrl = "http://ccdb-test.cern.ch:8080/")
void populateCCDBWithCommitAvailability(const std::map<std::string, bool>& hasHashMap,
const std::string& commitHash,
const std::string& ccdbUrl = "http://ccdb-test.cern.ch:8080/")
{
// First, init the CCDB manager to test if the ccdb is already populated
o2::ccdb::CcdbApi api;
Expand All @@ -157,7 +157,7 @@ void populateCCDBWithCommitAvailability(std::map<std::string, bool> hasHashMap,
}
}

void testMetadataHelper(std::string aod = "/tmp/AO2D.root")
void testMetadataHelper(const std::string& aod = "/tmp/AO2D.root")
{
createO2VersionFile();
const std::string commitHash = "63bc2e3893851ef0f849bb4c98c65eae1ba21e47";
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/PID/pidBayes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ struct bayesPidQa {
histos.fill(HIST("event/vertexz"), collision.posZ());
histos.fill(HIST("event/colltime"), collisionTime_ps);

for (auto t : tracks) {
for (const auto& t : tracks) {
//
if (!t.hasTOF()) { // Skipping tracks without TOF
continue;
Expand Down
4 changes: 2 additions & 2 deletions Common/TableProducer/eseTableProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ struct EseTableProducer {
}

template <typename TTrack>
double getEfficiency(TTrack track)
double getEfficiency(const TTrack& track)
{
double eff = 1.;
if (cfg.mEfficiency)
Expand Down Expand Up @@ -453,7 +453,7 @@ struct EseTableProducer {
};

template <typename TCollision>
bool eventSelected(TCollision collision, const int& multTrk, const float& centrality)
bool eventSelected(const TCollision& collision, const int& multTrk, const float& centrality)
{
if (cfgTVXinTRD) {
if (collision.alias_bit(kTVXinTRD)) {
Expand Down
12 changes: 6 additions & 6 deletions Common/TableProducer/match-mft-mch-data-mc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ struct match_mft_mch_data_mc {
};

template <typename MUON>
bool isGoodMuonQuality(MUON muontrack)
bool isGoodMuonQuality(const MUON& muontrack)
{
if (!muontrack.has_collision())
return false;
Expand All @@ -521,15 +521,15 @@ struct match_mft_mch_data_mc {
}

template <typename MUON>
bool isGoodMuonKine(MUON muontrack)
bool isGoodMuonKine(const MUON& muontrack)
{
if (fEtaMchLow > muontrack.getEta() || muontrack.getEta() > fEtaMchUp)
return false;
return true;
}

template <typename MFT>
bool isGoodMFTQuality(MFT mfttrack)
bool isGoodMFTQuality(const MFT& mfttrack)
{
if (!mfttrack.has_collision())
return false;
Expand All @@ -541,7 +541,7 @@ struct match_mft_mch_data_mc {
}

template <typename MFT>
bool isGoodMFTKine(MFT mfttrack)
bool isGoodMFTKine(const MFT& mfttrack)
{
if (fEtaMftLow > mfttrack.getEta() || mfttrack.getEta() > fEtaMftUp)
return false;
Expand All @@ -556,7 +556,7 @@ struct match_mft_mch_data_mc {
template <typename MUONs, typename Collisions>
void setMUONs(MUONs const& muontracks, Collisions const& collisions)
{
for (auto muontrack : muontracks) {
for (const auto& muontrack : muontracks) {
if (!isGoodMuonQuality(muontrack))
continue;
o2::dataformats::GlobalFwdTrack muontrack_at_pv = propagateMUONtoPV(muontrack, collisions);
Expand Down Expand Up @@ -595,7 +595,7 @@ struct match_mft_mch_data_mc {
template <typename MFTs, typename Collisions>
void setMFTs(MFTs const& mfttracks, Collisions const& collisions, o2::field::MagneticField* field)
{
for (auto mfttrack : mfttracks) {
for (const auto& mfttrack : mfttracks) {
if (!isGoodMFTQuality(mfttrack))
continue;

Expand Down
12 changes: 6 additions & 6 deletions Common/TableProducer/match-mft-mch-data.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ struct match_mft_mch_data_mc {
};

template <typename MUON>
bool isGoodMuonQuality(MUON muontrack)
bool isGoodMuonQuality(const MUON& muontrack)
{
if (!muontrack.has_collision())
return false;
Expand All @@ -521,15 +521,15 @@ struct match_mft_mch_data_mc {
}

template <typename MUON>
bool isGoodMuonKine(MUON muontrack)
bool isGoodMuonKine(const MUON& muontrack)
{
if (fEtaMchLow > muontrack.getEta() || muontrack.getEta() > fEtaMchUp)
return false;
return true;
}

template <typename MFT>
bool isGoodMFTQuality(MFT mfttrack)
bool isGoodMFTQuality(const MFT& mfttrack)
{
if (!mfttrack.has_collision())
return false;
Expand All @@ -541,7 +541,7 @@ struct match_mft_mch_data_mc {
}

template <typename MFT>
bool isGoodMFTKine(MFT mfttrack)
bool isGoodMFTKine(const MFT& mfttrack)
{
if (fEtaMftLow > mfttrack.getEta() || mfttrack.getEta() > fEtaMftUp)
return false;
Expand All @@ -556,7 +556,7 @@ struct match_mft_mch_data_mc {
template <typename MUONs, typename Collisions>
void setMUONs(MUONs const& muontracks, Collisions const& collisions)
{
for (auto muontrack : muontracks) {
for (const auto& muontrack : muontracks) {
if (!isGoodMuonQuality(muontrack))
continue;
o2::dataformats::GlobalFwdTrack muontrack_at_pv = propagateMUONtoPV(muontrack, collisions);
Expand Down Expand Up @@ -595,7 +595,7 @@ struct match_mft_mch_data_mc {
template <typename MFTs, typename Collisions>
void setMFTs(MFTs const& mfttracks, Collisions const& collisions, o2::field::MagneticField* field)
{
for (auto mfttrack : mfttracks) {
for (const auto& mfttrack : mfttracks) {
if (!isGoodMFTQuality(mfttrack))
continue;

Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/qVectorsTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ struct QVectorsTable {
}

template <typename TrackType>
bool selTrack(const TrackType track)
bool selTrack(const TrackType& track)
{
if (track.pt() < cfgMinPtOnTPC)
return false;
Expand Down
2 changes: 1 addition & 1 deletion Common/TableProducer/zdcTaskLightIons.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ struct ZdcTaskLightIons {
}

template <typename TCollision>
uint8_t eventSelected(TCollision collision)
uint8_t eventSelected(const TCollision& collision)
{
uint8_t selectionBits = 0;
bool selected;
Expand Down
2 changes: 1 addition & 1 deletion Common/Tasks/centralityStudypp.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ struct centralityStudypp {
hCentralityMFT = dynamic_cast<TH1*>(hCentralityObjects->FindObject("hCalibZeqMFT"));

// won't capture null pointers -> explicitly check for those when attempting to evaluate
auto reportSuccess = [](TH1* a, std::string name) {
auto reportSuccess = [](TH1* a, const std::string& name) {
if (!a) {
LOGF(info, "Calibration missing for %s", name);
} else {
Expand Down
2 changes: 1 addition & 1 deletion Common/Tasks/qVectorsCorrection.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct qVectorsCorrection {
}

template <typename TrackType>
bool SelTrack(const TrackType track)
bool SelTrack(const TrackType& track)
{
if (track.pt() < 0.15)
return false;
Expand Down
8 changes: 4 additions & 4 deletions Common/Tools/EventSelectionModule.h
Original file line number Diff line number Diff line change
Expand Up @@ -1323,7 +1323,7 @@ class EventSelectionModule
float vZ = col.posZ();

// ### in-ROF occupancy
std::vector<int> vAssocCollInSameROF = vCollsInSameITSROF[colIndex];
const std::vector<int>& vAssocCollInSameROF = vCollsInSameITSROF[colIndex];
int nITS567tracksForSameRofVetoStrict = 0; // to veto events with other collisions in the same ITS ROF
int nCollsInRofWithFT0CAboveVetoStandard = 0; // to veto events with other collisions in the same ITS ROF, with per-collision multiplicity above threshold
int nITS567tracksForRofVetoOnCloseVz = 0; // to veto events with nearby collisions with close vZ
Expand All @@ -1341,7 +1341,7 @@ class EventSelectionModule
vNoCollInSameRofWithCloseVz[colIndex] = (nITS567tracksForRofVetoOnCloseVz == 0);

// ### occupancy in previous ROF
std::vector<int> vAssocCollInPrevROF = vCollsInPrevITSROF[colIndex];
const std::vector<int>& vAssocCollInPrevROF = vCollsInPrevITSROF[colIndex];
float totalFT0amplInPrevROF = 0;
for (uint32_t iCol = 0; iCol < vAssocCollInPrevROF.size(); iCol++) {
int thisColIndex = vAssocCollInPrevROF[iCol];
Expand All @@ -1351,8 +1351,8 @@ class EventSelectionModule
vNoHighMultCollInPrevRof[colIndex] = (totalFT0amplInPrevROF < evselOpts.confFT0CamplCutVetoOnCollInROF);

// ### occupancy in time windows
std::vector<int> vAssocToThisCol = vCollsInTimeWin[colIndex];
std::vector<float> vCollsTimeDeltaWrtGivenColl = vTimeDeltaForColls[colIndex];
const std::vector<int>& vAssocToThisCol = vCollsInTimeWin[colIndex];
const std::vector<float>& vCollsTimeDeltaWrtGivenColl = vTimeDeltaForColls[colIndex];
int nITS567tracksInFullTimeWindow = 0;
float sumAmpFT0CInFullTimeWindow = 0;
int nITS567tracksForVetoNarrow = 0; // to veto events with nearby collisions (narrow range) with per-collision multiplicity above threshold
Expand Down
Loading
Loading