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
14 changes: 12 additions & 2 deletions Common/TableProducer/qVectorsTable.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,15 +184,25 @@
{"QvectorFV0As", cfgUseFV0A},
{"QvectorFT0Ms", cfgUseFT0M},
{"QvectorFT0As", cfgUseFT0A},
{"QvectorFT0Cs", cfgUseFT0C}};
{"QvectorFT0Cs", cfgUseFT0C},
{"QvectorShiftedBTots", cfgUseBTot},
{"QvectorShiftedBNegs", cfgUseBNeg},
{"QvectorShiftedBPoss", cfgUseBPos},
{"QvectorShiftedTPCalls", cfgUseTPCall},
{"QvectorShiftedTPCnegs", cfgUseTPCneg},
{"QvectorShiftedTPCposs", cfgUseTPCpos},
{"QvectorShiftedFV0As", cfgUseFV0A},
{"QvectorShiftedFT0Ms", cfgUseFT0M},
{"QvectorShiftedFT0As", cfgUseFT0A},
{"QvectorShiftedFT0Cs", cfgUseFT0C}};

void init(InitContext& initContext)
{
// Check the sub-detector used
const auto& workflows = initContext.services().get<RunningWorkflowInfo const>();
for (DeviceSpec const& device : workflows.devices) {
for (auto const& input : device.inputs) {
if (input.matcher.binding == "Qvectors") {
if (input.matcher.binding == "Qvectors" || input.matcher.binding == "QvectorsShifteds") {
for (auto const& det : useDetector) {
useDetector[det.first.data()] = true;
}
Expand Down Expand Up @@ -295,7 +305,7 @@
fullPath += "/FT0";
const auto objft0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
if (!objft0Gain || cfgCorrLevel == 0) {
for (auto i{0u}; i < 208; i++) {

Check failure on line 308 in Common/TableProducer/qVectorsTable.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.
FT0RelGainConst.push_back(1.);
}
} else {
Expand All @@ -306,7 +316,7 @@
fullPath += "/FV0";
const auto objfv0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
if (!objfv0Gain || cfgCorrLevel == 0) {
for (auto i{0u}; i < 48; i++) {

Check failure on line 319 in Common/TableProducer/qVectorsTable.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.
FV0RelGainConst.push_back(1.);
}
} else {
Expand Down Expand Up @@ -386,7 +396,7 @@
helperEP.SumQvectors(0, FT0AchId, ampl / FT0RelGainConst[FT0AchId], nmode, QvecDet, sumAmplFT0A, ft0geom, fv0geom);
helperEP.SumQvectors(0, FT0AchId, ampl / FT0RelGainConst[FT0AchId], nmode, QvecFT0M, sumAmplFT0M, ft0geom, fv0geom);
}
if (sumAmplFT0A > 1e-8) {

Check failure on line 399 in Common/TableProducer/qVectorsTable.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.
QvecDet /= sumAmplFT0A;
qVectFT0A[0] = QvecDet.Re();
qVectFT0A[1] = QvecDet.Im();
Expand All @@ -409,7 +419,7 @@
helperEP.SumQvectors(0, FT0CchId, ampl / FT0RelGainConst[FT0CchId], nmode, QvecFT0M, sumAmplFT0M, ft0geom, fv0geom);
}

if (sumAmplFT0C > 1e-8) {

Check failure on line 422 in Common/TableProducer/qVectorsTable.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.
QvecDet /= sumAmplFT0C;
qVectFT0C[0] = QvecDet.Re();
qVectFT0C[1] = QvecDet.Im();
Expand All @@ -422,7 +432,7 @@
qVectFT0C[1] = -999.;
}

if (sumAmplFT0M > 1e-8 && useDetector["QvectorFT0Ms"]) {

Check failure on line 435 in Common/TableProducer/qVectorsTable.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.
QvecFT0M /= sumAmplFT0M;
qVectFT0M[0] = QvecFT0M.Re();
qVectFT0M[1] = QvecFT0M.Im();
Expand Down Expand Up @@ -453,7 +463,7 @@
helperEP.SumQvectors(1, FV0AchId, ampl / FV0RelGainConst[FV0AchId], nmode, QvecDet, sumAmplFV0A, ft0geom, fv0geom);
}

if (sumAmplFV0A > 1e-8) {

Check failure on line 466 in Common/TableProducer/qVectorsTable.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.
QvecDet /= sumAmplFV0A;
qVectFV0A[0] = QvecDet.Re();
qVectFV0A[1] = QvecDet.Im();
Expand Down Expand Up @@ -485,7 +495,7 @@
qVectTPCall[1] += trk.pt() * std::sin(trk.phi() * nmode);
TrkTPCallLabel.push_back(trk.globalIndex());
nTrkTPCall++;
if (std::abs(trk.eta()) < 0.1) {

Check failure on line 498 in Common/TableProducer/qVectorsTable.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.
continue;
}
if (trk.eta() > 0 && (useDetector["QvectorTPCposs"] || useDetector["QvectorBPoss"])) {
Expand Down Expand Up @@ -524,15 +534,15 @@
qVectTPCall[1] = 999.;
}

for (auto i{0u}; i < 4; i++) {

Check failure on line 537 in Common/TableProducer/qVectorsTable.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.
QvecRe.push_back(qVectFT0C[0]);
QvecIm.push_back(qVectFT0C[1]);
}
for (auto i{0u}; i < 4; i++) {

Check failure on line 541 in Common/TableProducer/qVectorsTable.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.
QvecRe.push_back(qVectFT0A[0]);
QvecIm.push_back(qVectFT0A[1]);
}
for (auto i{0u}; i < 4; i++) {

Check failure on line 545 in Common/TableProducer/qVectorsTable.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.
QvecRe.push_back(qVectFT0M[0]);
QvecIm.push_back(qVectFT0M[1]);
}
Expand Down
Loading