Skip to content
Merged
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
16 changes: 8 additions & 8 deletions Tools/KFparticle/KFUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ o2::track::TrackParCov getTrackParCovFromKFP(const KFParticle& kfParticle, const
/// @param kfp KFParticle
/// @param PV KFParticle primary vertex
/// @return cpa
float cpaFromKF(KFParticle kfp, KFParticle PV)
float cpaFromKF(const KFParticle& kfp, const KFParticle& PV)
{
float xVtxP{}, yVtxP{}, zVtxP{}, xVtxS{}, yVtxS{}, zVtxS{}, px{}, py{}, pz{};

Expand All @@ -216,7 +216,7 @@ float cpaFromKF(KFParticle kfp, KFParticle PV)
/// @param kfp KFParticle
/// @param PV KFParticle primary vertex
/// @return cpa in xy
float cpaXYFromKF(KFParticle kfp, KFParticle PV)
float cpaXYFromKF(const KFParticle& kfp, const KFParticle& PV)
{
float xVtxP{}, yVtxP{}, xVtxS{}, yVtxS{}, px{}, py{};

Expand All @@ -243,7 +243,7 @@ float cpaXYFromKF(KFParticle kfp, KFParticle PV)
/// @param kfpprong1 KFParticele Prong 1
/// @param pdgdb Service PDG data base
/// @return cos theta star
float cosThetaStarFromKF(int iProng, int pdgvtx, int pdgprong0, int pdgprong1, KFParticle kfpprong0, KFParticle kfpprong1, const o2::framework::Service<o2::framework::O2DatabasePDG>& pdgdb)
float cosThetaStarFromKF(int iProng, int pdgvtx, int pdgprong0, int pdgprong1, const KFParticle& kfpprong0, const KFParticle& kfpprong1, const o2::framework::Service<o2::framework::O2DatabasePDG>& pdgdb)
{
float px0{}, py0{}, pz0{}, px1{}, py1{}, pz1{};

Expand All @@ -269,7 +269,7 @@ float cosThetaStarFromKF(int iProng, int pdgvtx, int pdgprong0, int pdgprong1, K
/// @param kfpParticle KFParticle
/// @param Vertex KFParticle vertex
/// @return impact parameter
float impParXYFromKF(KFParticle kfpParticle, KFParticle Vertex)
float impParXYFromKF(const KFParticle& kfpParticle, const KFParticle& Vertex)
{
float xVtxP{}, yVtxP{}, zVtxP{}, xVtxS{}, yVtxS{}, zVtxS{}, px{}, py{}, pz{};

Expand All @@ -293,7 +293,7 @@ float impParXYFromKF(KFParticle kfpParticle, KFParticle Vertex)
/// @param kfpParticle KFParticle
/// @param PV KFParticle primary vertex
/// @return l/delta l
float ldlFromKF(KFParticle kfpParticle, KFParticle PV)
float ldlFromKF(const KFParticle& kfpParticle, const KFParticle& PV)
{
const float dxParticle = PV.GetX() - kfpParticle.GetX();
const float dyParticle = PV.GetY() - kfpParticle.GetY();
Expand All @@ -312,7 +312,7 @@ float ldlFromKF(KFParticle kfpParticle, KFParticle PV)
/// @param kfpParticle KFParticle
/// @param PV KFParticle primary vertex
/// @return l/delta l in xy plane
float ldlXYFromKF(KFParticle kfpParticle, KFParticle PV)
float ldlXYFromKF(const KFParticle& kfpParticle, const KFParticle& PV)
{
const float dxParticle = PV.GetX() - kfpParticle.GetX();
const float dyParticle = PV.GetY() - kfpParticle.GetY();
Expand Down Expand Up @@ -354,7 +354,7 @@ std::array<float, 3> kfCalculateProngMomentumInSecondaryVertex(KFParticle track,
/// @param track1 KFParticle first track (must be passed as a copy)
/// @param track2 KFParticle second track (must be passed as a copy)
/// @return DCA [cm] in the PCA
float kfCalculateDistanceBetweenParticles(KFParticle track1, KFParticle track2)
float kfCalculateDistanceBetweenParticles(const KFParticle& track1, const KFParticle& track2)
{
float dS[2];
float dsdr[4][6];
Expand All @@ -373,7 +373,7 @@ float kfCalculateDistanceBetweenParticles(KFParticle track1, KFParticle track2)
/// @param track1 KFParticle first track (must be passed as a copy)
/// @param track2 KFParticle second track (must be passed as a copy)
/// @return chi2 in PCA
float kfCalculateChi2geoBetweenParticles(KFParticle track1, KFParticle track2)
float kfCalculateChi2geoBetweenParticles(const KFParticle& track1, const KFParticle& track2)
{
KFParticle kfPair;
const KFParticle* kfDaughters[2] = {&track1, &track2};
Expand Down
4 changes: 2 additions & 2 deletions Tools/KFparticle/qaKFEventTrack.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -60,7 +60,7 @@

/// general steering settings
Configurable<bool> isRun3{"isRun3", true, "Is Run3 dataset"};
Configurable<std::string> ccdbUrl{"ccdburl", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 63 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/configurable]

Use lowerCamelCase for names of configurables and use the same name for the struct member as for the JSON string. (Declare the type and names on the same line.)
Configurable<std::string> ccdbPathLut{"ccdbPathLut", "GLO/Param/MatLUT", "Path for LUT parametrization"};
Configurable<std::string> ccdbPathGrp{"ccdbPathGrp", "GLO/GRP/GRP", "Path of the grp file (Run 2)"};
Configurable<std::string> ccdbPathGrpMag{"ccdbPathGrpMag", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object (Run 3)"};
Expand Down Expand Up @@ -98,10 +98,10 @@
// 5 kInAcceptanceTracks
Filter trackFilter = (trackSelection.node() == 0) ||
((trackSelection.node() == 1) && requireGlobalTrackInFilter()) ||
((trackSelection.node() == 2) && requireGlobalTrackWoPtEtaInFilter()) ||

Check failure on line 101 in Tools/KFparticle/qaKFEventTrack.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.
((trackSelection.node() == 3) && requireGlobalTrackWoDCAInFilter()) ||

Check failure on line 102 in Tools/KFparticle/qaKFEventTrack.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.
((trackSelection.node() == 4) && requireQualityTracksInFilter()) ||

Check failure on line 103 in Tools/KFparticle/qaKFEventTrack.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.
((trackSelection.node() == 5) && requireTrackCutInFilter(TrackSelectionFlags::kInAcceptanceTracks));

Check failure on line 104 in Tools/KFparticle/qaKFEventTrack.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.

Filter eventFilter = (o2::aod::evsel::sel8 == true);

Expand All @@ -116,7 +116,7 @@
int pVContrib = 0;

void initMagneticFieldCCDB(o2::aod::BCsWithTimestamps::iterator const& bc, int& mRunNumber,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, std::string ccdbPathGrp, o2::base::MatLayerCylSet* lut,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, const std::string& ccdbPathGrp, o2::base::MatLayerCylSet* lut,
bool isRun3)
{

Expand Down Expand Up @@ -219,7 +219,7 @@
return false;
}
/// Eta range
if (abs(track1.eta()) > d_etaRange) {

Check failure on line 222 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
return false;
}
return true;
Expand Down Expand Up @@ -316,7 +316,7 @@

int ntracks = 0;

for (auto& track : tracks) {

Check failure on line 319 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
source = 0;
pVContrib = 0;

Expand Down Expand Up @@ -408,7 +408,7 @@

int ntracks = 0;

for (auto& track : tracks) {

Check failure on line 411 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.

source = 0;
pVContrib = 0;
Expand Down Expand Up @@ -536,7 +536,7 @@
Produces<o2::aod::TreeCollisions> rowKFCollisions;

void initMagneticFieldCCDB(o2::aod::BCsWithTimestamps::iterator const& bc, int& mRunNumber,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, std::string ccdbPathGrp, o2::base::MatLayerCylSet* lut,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, const std::string& ccdbPathGrp, o2::base::MatLayerCylSet* lut,
bool isRun3)
{

Expand Down Expand Up @@ -615,7 +615,7 @@
LOGP(info, "processing TF {}", tfID);

int bc0 = 0;
for (auto& collisionIndex : collisions) {

Check failure on line 618 in Tools/KFparticle/qaKFEventTrack.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[const-ref-in-for-loop]

Use constant references for non-modified iterators in range-based for loops.
auto bc = collisionIndex.bc_as<aod::BCsWithTimestamps>();
if (bc0 == 0) {
bc0 = bc.globalBC();
Expand Down
2 changes: 1 addition & 1 deletion Tools/KFparticle/qaKFParticle.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ struct qaKFParticle {
Produces<o2::aod::TreeKF> rowKF;

void initMagneticFieldCCDB(o2::aod::BCsWithTimestamps::iterator const& bc, int& mRunNumber,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, std::string ccdbPathGrp, o2::base::MatLayerCylSet* lut,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, const std::string& ccdbPathGrp, o2::base::MatLayerCylSet* lut,
bool isRun3)
{

Expand Down
2 changes: 1 addition & 1 deletion Tools/KFparticle/qaKFParticleLc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ struct qaKFParticleLc {
Produces<o2::aod::TreeKFLc> rowKFLc;

void initMagneticFieldCCDB(o2::aod::BCsWithTimestamps::iterator const& bc, int& mRunNumber,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, std::string ccdbPathGrp, o2::base::MatLayerCylSet* lut,
o2::framework::Service<o2::ccdb::BasicCCDBManager> const& ccdb, const std::string& ccdbPathGrp, o2::base::MatLayerCylSet* lut,
bool isRun3)
{

Expand Down
Loading