Skip to content
Merged
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
20 changes: 5 additions & 15 deletions PWGLF/TableProducer/QC/flowQC.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 PWGLF/TableProducer/QC/flowQC.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.)

Check failure on line 1 in PWGLF/TableProducer/QC/flowQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// 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 @@ -113,7 +113,7 @@

// CCDB options
Configurable<double> cfgBz{"cfgBz", -999, "bz field, -999 is automatic"};
Configurable<std::string> cfgCCDBurl{"ccdb-url", "http://alice-ccdb.cern.ch", "url of the ccdb repository"};

Check failure on line 116 in PWGLF/TableProducer/QC/flowQC.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> cfgGRPpath{"cfgGRPpath", "GLO/GRP/GRP", "Path of the grp file"};
Configurable<std::string> cfgGRPmagPath{"cfgGRPmagPath", "GLO/Config/GRPMagField", "CCDB path of the GRPMagField object"};
int mRunNumber = 0;
Expand Down Expand Up @@ -150,7 +150,7 @@
auto run3grp_timestamp = bc.timestamp();
mRunNumber = bc.runNumber();

if (cfgBz > -990) {

Check failure on line 153 in PWGLF/TableProducer/QC/flowQC.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.
mBz = cfgBz;
} else {
o2::parameters::GRPObject* grpo{ccdb->getForTimeStamp<o2::parameters::GRPObject>(cfgGRPpath, run3grp_timestamp)};
Expand Down Expand Up @@ -289,37 +289,27 @@
float QxFT0A_Qvec_raw = collision.qvecFT0AReVec()[qvecHarmonicIndex];
float QyFT0A_Qvec_raw = collision.qvecFT0AImVec()[qvecHarmonicIndex];
float psiFT0A_Qvec = computeEventPlane(QyFT0A_Qvec_raw, QxFT0A_Qvec_raw, qvecHarmonic);
float QxFT0A_Qvec = maybeSquare(QxFT0A_Qvec_raw);
float QyFT0A_Qvec = maybeSquare(QyFT0A_Qvec_raw);
float QmodFT0A_Qvec = std::hypot(QxFT0A_Qvec, QyFT0A_Qvec);
float QmodFT0A_Qvec = maybeSquare(std::hypot(QxFT0A_Qvec_raw, QyFT0A_Qvec_raw));

float QxFT0C_Qvec_raw = collision.qvecFT0CReVec()[qvecHarmonicIndex];
float QyFT0C_Qvec_raw = collision.qvecFT0CImVec()[qvecHarmonicIndex];
float psiFT0C_Qvec = computeEventPlane(QyFT0C_Qvec_raw, QxFT0C_Qvec_raw, qvecHarmonic);
float QxFT0C_Qvec = maybeSquare(QxFT0C_Qvec_raw);
float QyFT0C_Qvec = maybeSquare(QyFT0C_Qvec_raw);
float QmodFT0C_Qvec = std::hypot(QxFT0C_Qvec, QyFT0C_Qvec);
float QmodFT0C_Qvec = maybeSquare(std::hypot(QxFT0C_Qvec_raw, QyFT0C_Qvec_raw));

float QxTPCl_Qvec_raw = collision.qvecTPCnegReVec()[qvecHarmonicIndex];
float QyTPCl_Qvec_raw = collision.qvecTPCnegImVec()[qvecHarmonicIndex];
float psiTPCl_Qvec = computeEventPlane(QyTPCl_Qvec_raw, QxTPCl_Qvec_raw, qvecHarmonic);
float QxTPCl_Qvec = maybeSquare(QxTPCl_Qvec_raw);
float QyTPCl_Qvec = maybeSquare(QyTPCl_Qvec_raw);
float QmodTPCl_Qvec = std::hypot(QxTPCl_Qvec, QyTPCl_Qvec);
float QmodTPCl_Qvec = maybeSquare(std::hypot(QxTPCl_Qvec_raw, QyTPCl_Qvec_raw));

float QxTPCr_Qvec_raw = collision.qvecTPCposReVec()[qvecHarmonicIndex];
float QyTPCr_Qvec_raw = collision.qvecTPCposImVec()[qvecHarmonicIndex];
float psiTPCr_Qvec = computeEventPlane(QyTPCr_Qvec_raw, QxTPCr_Qvec_raw, qvecHarmonic);
float QxTPCr_Qvec = maybeSquare(QxTPCr_Qvec_raw);
float QyTPCr_Qvec = maybeSquare(QyTPCr_Qvec_raw);
float QmodTPCr_Qvec = std::hypot(QxTPCr_Qvec, QyTPCr_Qvec);
float QmodTPCr_Qvec = maybeSquare(std::hypot(QxTPCr_Qvec_raw, QyTPCr_Qvec_raw));

float QxTPC_Qvec_raw = collision.qvecTPCallReVec()[qvecHarmonicIndex];
float QyTPC_Qvec_raw = collision.qvecTPCallImVec()[qvecHarmonicIndex];
float psiTPC_Qvec = computeEventPlane(QyTPC_Qvec_raw, QxTPC_Qvec_raw, qvecHarmonic);
float QxTPC_Qvec = maybeSquare(QxTPC_Qvec_raw);
float QyTPC_Qvec = maybeSquare(QyTPC_Qvec_raw);
float QmodTPC_Qvec = std::hypot(QxTPC_Qvec, QyTPC_Qvec);
float QmodTPC_Qvec = maybeSquare(std::hypot(QxTPC_Qvec_raw, QyTPC_Qvec_raw));

std::array<float, qVecDetectors::kNqVecDetectors> vec_Qmod[2] = {{QmodFT0C_EP, QmodFT0A_EP, QmodTPCl_EP, QmodTPCr_EP, QmodTPC_EP}, {QmodFT0C_Qvec, QmodFT0A_Qvec, QmodTPCl_Qvec, QmodTPCr_Qvec, QmodTPC_Qvec}};
std::array<float, qVecDetectors::kNqVecDetectors> vec_Qpsi[2] = {{psiFT0C_EP, psiFT0A_EP, psiTPCl_EP, psiTPCr_EP, psiTPC_EP}, {psiFT0C_Qvec, psiFT0A_Qvec, psiTPCl_Qvec, psiTPCr_Qvec, psiTPC_Qvec}};
Expand Down Expand Up @@ -353,5 +343,5 @@
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{
adaptAnalysisTask<flowQC>(cfgc, TaskName{"flow-qc"})};

Check failure on line 346 in PWGLF/TableProducer/QC/flowQC.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names flow-qc and flow-q-c generated from the specified task name flow-qc and from the struct name flowQC, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to FlowQc and removing TaskName.
}
Loading