Skip to content

Commit 7c57fed

Browse files
MaximVirtaMaxim Virta
andauthored
[Common] Q-vector correction fail safety (#17035)
Co-authored-by: Maxim Virta <maximus@Maxims-MacBook-Pro.local>
1 parent 9802a79 commit 7c57fed

1 file changed

Lines changed: 80 additions & 66 deletions

File tree

Common/TableProducer/qVectorsTable.cxx

Lines changed: 80 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ using MyCollisions = soa::Join<aod::Collisions, aod::EvSels, aod::Mults, aod::FT
6464

6565
using MyTracks = soa::Join<aod::Tracks, aod::TracksExtra, aod::TrackSelection, aod::TrackSelectionExtension>;
6666

67-
struct qVectorsTable {
67+
struct QVectorsTable {
6868
enum Detectors {
6969
kFT0C = 0,
7070
kFT0A = 1,
@@ -91,15 +91,11 @@ struct qVectorsTable {
9191

9292
// Configurables.
9393
struct : ConfigurableGroup {
94-
Configurable<std::string> cfgURL{"cfgURL",
95-
"http://alice-ccdb.cern.ch", "Address of the CCDB to browse"};
96-
Configurable<int64_t> nolaterthan{"ccdb-no-later-than",
97-
std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(),
98-
"Latest acceptable timestamp of creation for the object"};
94+
Configurable<std::string> cfgURL{"cfgURL", "http://alice-ccdb.cern.ch", "Address of the CCDB to browse"};
95+
Configurable<int64_t> ccdbNoLaterThan{"ccdb-no-later-than", std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::system_clock::now().time_since_epoch()).count(), "Latest acceptable timestamp of creation for the object"};
9996
} cfgCcdbParam;
10097

101-
Configurable<int> cfgCentEsti{"cfgCentEsti",
102-
2, "Centrality estimator (Run3): 0 = FT0M, 1 = FT0A, 2 = FT0C, 3 = FV0A"};
98+
Configurable<int> cfgCentEsti{"cfgCentEsti", 2, "Centrality estimator (Run3): 0 = FT0M, 1 = FT0A, 2 = FT0C, 3 = FV0A"};
10399

104100
Configurable<float> cfgMinPtOnTPC{"cfgMinPtOnTPC", 0.15, "minimum transverse momentum selection for TPC tracks participating in Q-vector reconstruction"};
105101
Configurable<float> cfgMaxPtOnTPC{"cfgMaxPtOnTPC", 5., "maximum transverse momentum selection for TPC tracks participating in Q-vector reconstruction"};
@@ -164,15 +160,15 @@ struct qVectorsTable {
164160
Produces<aod::EseQvecTPCallVecs> eseQVectorTPCAllVec;
165161
Produces<aod::EseQvecPercs> eseQVectorPerc;
166162

167-
std::vector<float> FT0RelGainConst{};
168-
std::vector<float> FV0RelGainConst{};
163+
std::vector<float> ft0RelGainConst{};
164+
std::vector<float> fv0RelGainConst{};
169165

170166
// Enable access to the CCDB for the offset and correction constants and save them
171167
// in dedicated variables.
172168
Service<o2::ccdb::BasicCCDBManager> ccdb;
173169

174170
// geometry instances for V0 and T0
175-
o2::fv0::Geometry* fv0geom;
171+
o2::fv0::Geometry* fv0geom{nullptr};
176172
o2::ft0::Geometry ft0geom;
177173

178174
// Variables for other classes.
@@ -182,7 +178,9 @@ struct qVectorsTable {
182178

183179
const float minAmplitude = 1.0e-8f;
184180
int runNumber{-1};
185-
float cent;
181+
float cent{-999.f};
182+
const int nShiftIndex = 10;
183+
const float trackEtaMin = 0.1;
186184

187185
std::vector<TH3F*> corrsQvecSp{};
188186
std::vector<TH3F*> corrsQvecEse{};
@@ -244,7 +242,7 @@ struct qVectorsTable {
244242
ccdb->setURL(cfgCcdbParam.cfgURL);
245243
ccdb->setCaching(true);
246244
ccdb->setLocalObjectValidityChecking();
247-
ccdb->setCreatedNotAfter(cfgCcdbParam.nolaterthan.value);
245+
ccdb->setCreatedNotAfter(cfgCcdbParam.ccdbNoLaterThan.value);
248246
ccdb->setFatalWhenNull(false);
249247

250248
AxisSpec axisPt = {40, 0.0, 4.0};
@@ -267,10 +265,10 @@ struct qVectorsTable {
267265

268266
void initCCDB(aod::BCsWithTimestamps::iterator const& bc)
269267
{
270-
FT0RelGainConst.clear();
271-
FV0RelGainConst.clear();
272-
FT0RelGainConst = {};
273-
FV0RelGainConst = {};
268+
ft0RelGainConst.clear();
269+
fv0RelGainConst.clear();
270+
ft0RelGainConst = {};
271+
fv0RelGainConst = {};
274272

275273
std::string fullPath;
276274

@@ -306,6 +304,10 @@ struct qVectorsTable {
306304
fullPath += "/v2";
307305
modeCorrQvecSp = getForTsOrRun<TH3F>(fullPath, timestamp, runnumber);
308306
}
307+
if (!modeCorrQvecSp) {
308+
LOGF(info, "Could not get the correction histograms for Q-vectors for mode %d. Setting to no correction.", ind);
309+
modeCorrQvecSp = new TH3F("modeCorrQvecSp", "modeCorrQvecSp", 1, 0, 1, 1, 0, 1, 1, 0, 1);
310+
}
309311
corrsQvecSp.push_back(modeCorrQvecSp);
310312
}
311313

@@ -322,6 +324,10 @@ struct qVectorsTable {
322324
fullPath += "/eseq2";
323325
modeCorrQvecEse = getForTsOrRun<TH3F>(fullPath, timestamp, runnumber);
324326
}
327+
if (!modeCorrQvecEse) {
328+
LOGF(info, "Could not get the correction histograms for Q-vectors for mode %d. Setting to no correction.", ind);
329+
modeCorrQvecEse = new TH3F("modeCorrQvecEse", "modeCorrQvecEse", 1, 0, 1, 1, 0, 1, 1, 0, 1);
330+
}
325331
corrsQvecEse.push_back(modeCorrQvecEse);
326332
}
327333
}
@@ -334,6 +340,10 @@ struct qVectorsTable {
334340
fullPath += "/v";
335341
fullPath += std::to_string(ind);
336342
auto objshift = getForTsOrRun<TProfile3D>(fullPath, timestamp, runnumber);
343+
if (!objshift) {
344+
LOGF(info, "Could not get the shift profile for Q-vectors for mode %d. Setting to no shift correction.", ind);
345+
objshift = new TProfile3D("shiftProfileSp", "shiftProfileSp", 1, 0, 1, 1, 0, 1, 1, 0, 1);
346+
}
337347
shiftProfileSp.push_back(objshift);
338348
}
339349

@@ -345,6 +355,10 @@ struct qVectorsTable {
345355
fullPath += "/eseq";
346356
fullPath += std::to_string(ind);
347357
auto objshift = getForTsOrRun<TProfile3D>(fullPath, timestamp, runnumber);
358+
if (!objshift) {
359+
LOGF(info, "Could not get the shift profile for Q-vectors for mode %d. Setting to no shift correction.", ind);
360+
objshift = new TProfile3D("shiftProfileEse", "shiftProfileEse", 1, 0, 1, 1, 0, 1, 1, 0, 1);
361+
}
348362
shiftProfileEse.push_back(objshift);
349363
}
350364
}
@@ -353,25 +367,25 @@ struct qVectorsTable {
353367
fullPath = cfgGainEqPath;
354368
fullPath += "/FT0";
355369
const int nPixelsFT0 = 208;
356-
const auto objft0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
370+
auto const* objft0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
357371
if (!objft0Gain || cfgCorrLevel == 0) {
358372
for (auto i{0u}; i < nPixelsFT0; i++) {
359-
FT0RelGainConst.push_back(1.);
373+
ft0RelGainConst.push_back(1.);
360374
}
361375
} else {
362-
FT0RelGainConst = *(objft0Gain);
376+
ft0RelGainConst = *(objft0Gain);
363377
}
364378

365379
fullPath = cfgGainEqPath;
366380
fullPath += "/FV0";
367381
const int nChannelsFV0 = 48;
368-
const auto objfv0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
382+
auto const* objfv0Gain = getForTsOrRun<std::vector<float>>(fullPath, timestamp, runnumber);
369383
if (!objfv0Gain || cfgCorrLevel == 0) {
370384
for (auto i{0u}; i < nChannelsFV0; i++) {
371-
FV0RelGainConst.push_back(1.);
385+
fv0RelGainConst.push_back(1.);
372386
}
373387
} else {
374-
FV0RelGainConst = *(objfv0Gain);
388+
fv0RelGainConst = *(objfv0Gain);
375389
}
376390
}
377391

@@ -403,13 +417,13 @@ struct qVectorsTable {
403417
/// Function to get corrections from CCDB eithr using the timestamp or the runnumber
404418
/// \param fullPath is the path to correction in CCDB
405419
/// \param timestamp is the collision timestamp
406-
/// \param runNumber is the collision run number
420+
/// \param runNb is the collision run number
407421
/// \return CCDB correction
408422
template <typename CorrectionType>
409-
CorrectionType* getForTsOrRun(std::string const& fullPath, int64_t timestamp, int runNumber)
423+
CorrectionType* getForTsOrRun(std::string const& fullPath, int64_t timestamp, int runNb)
410424
{
411425
if (useCorrectionForRun) {
412-
return ccdb->getForRun<CorrectionType>(fullPath, runNumber);
426+
return ccdb->getForRun<CorrectionType>(fullPath, runNb);
413427
} else {
414428
return ccdb->getForTimeStamp<CorrectionType>(fullPath, timestamp);
415429
}
@@ -454,31 +468,31 @@ struct qVectorsTable {
454468
}
455469

456470
/// Function to calculate the un-normalized q-vectors
457-
/// \param cent is the collision centrality
471+
/// \param centrality is the collision centrality
458472
/// \param qVecRe is the vector with the real part of the q-vector for each detector and correction step
459473
/// \param qVecIm is the vector with the imaginary part of the q-vector for each detector and correction step
460474
/// \param histsCorrs is the vector with the histograms with the correction constants for each detector and correction step
461475
/// \param nMode is the modulation of interest
462-
void correctQVec(float cent, std::vector<float>& qVecRe, std::vector<float>& qVecIm, TH3F* histsCorrs, std::vector<TProfile3D*>& shiftProfile, int nMode)
476+
void correctQVec(float centrality, std::vector<float>& qVecRe, std::vector<float>& qVecIm, TH3F* histsCorrs, std::vector<TProfile3D*>& shiftProfile, int nMode)
463477
{
464478
int nCorrections = static_cast<int>(kNCorrections);
465-
if (cent < cfgMaxCentrality) {
479+
if (centrality < cfgMaxCentrality) {
466480
for (auto i{0u}; i < kTPCAll + 1; i++) {
467481
int idxDet = i * kNCorrections;
468482
helperEP.DoRecenter(qVecRe[idxDet + kRecenter], qVecIm[idxDet + kRecenter],
469-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 2, i + 1));
483+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 2, i + 1));
470484

471485
helperEP.DoRecenter(qVecRe[idxDet + kTwist], qVecIm[idxDet + kTwist],
472-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 2, i + 1));
486+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 2, i + 1));
473487
helperEP.DoTwist(qVecRe[idxDet + kTwist], qVecIm[idxDet + kTwist],
474-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 3, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 4, i + 1));
488+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 3, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 4, i + 1));
475489

476490
helperEP.DoRecenter(qVecRe[idxDet + kRescale], qVecIm[idxDet + kRescale],
477-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 2, i + 1));
491+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 1, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 2, i + 1));
478492
helperEP.DoTwist(qVecRe[idxDet + kRescale], qVecIm[idxDet + kRescale],
479-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 3, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 4, i + 1));
493+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 3, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 4, i + 1));
480494
helperEP.DoRescale(qVecRe[idxDet + kRescale], qVecIm[idxDet + kRescale],
481-
histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 5, i + 1), histsCorrs->GetBinContent(static_cast<int>(cent) + 1, 6, i + 1));
495+
histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 5, i + 1), histsCorrs->GetBinContent(static_cast<int>(centrality) + 1, 6, i + 1));
482496
}
483497
if (cfgShiftCorr) {
484498
auto deltaPsiFT0C = 0.0;
@@ -497,21 +511,21 @@ struct qVectorsTable {
497511
auto psiDefTPCNeg = std::atan2(qVecIm[kTPCNeg * nCorrections + kRescale], qVecRe[kTPCNeg * nCorrections + kRescale]) / static_cast<float>(nMode);
498512
auto psiDefTPCAll = std::atan2(qVecIm[kTPCAll * nCorrections + kRescale], qVecRe[kTPCAll * nCorrections + kRescale]) / static_cast<float>(nMode);
499513

500-
for (int iShift = 1; iShift <= 10; iShift++) {
501-
auto coeffShiftXFT0C = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0C, iShift - 0.5));
502-
auto coeffShiftYFT0C = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0C + 1, iShift - 0.5));
503-
auto coeffShiftXFT0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0A, iShift - 0.5));
504-
auto coeffShiftYFT0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0A + 1, iShift - 0.5));
505-
auto coeffShiftXFT0M = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0M, iShift - 0.5));
506-
auto coeffShiftYFT0M = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFT0M + 1, iShift - 0.5));
507-
auto coeffShiftXFV0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFV0A, iShift - 0.5));
508-
auto coeffShiftYFV0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kFV0A + 1, iShift - 0.5));
509-
auto coeffShiftXTPCPos = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCPos, iShift - 0.5));
510-
auto coeffShiftYTPCPos = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCPos + 1, iShift - 0.5));
511-
auto coeffShiftXTPCNeg = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCNeg, iShift - 0.5));
512-
auto coeffShiftYTPCNeg = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCNeg + 1, iShift - 0.5));
513-
auto coeffShiftXTPCAll = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCAll, iShift - 0.5));
514-
auto coeffShiftYTPCAll = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(cent, 2 * kTPCAll + 1, iShift - 0.5));
514+
for (int iShift = 1; iShift <= nShiftIndex; iShift++) {
515+
auto coeffShiftXFT0C = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0C, iShift - 0.5));
516+
auto coeffShiftYFT0C = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0C + 1, iShift - 0.5));
517+
auto coeffShiftXFT0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0A, iShift - 0.5));
518+
auto coeffShiftYFT0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0A + 1, iShift - 0.5));
519+
auto coeffShiftXFT0M = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0M, iShift - 0.5));
520+
auto coeffShiftYFT0M = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFT0M + 1, iShift - 0.5));
521+
auto coeffShiftXFV0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFV0A, iShift - 0.5));
522+
auto coeffShiftYFV0A = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kFV0A + 1, iShift - 0.5));
523+
auto coeffShiftXTPCPos = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCPos, iShift - 0.5));
524+
auto coeffShiftYTPCPos = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCPos + 1, iShift - 0.5));
525+
auto coeffShiftXTPCNeg = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCNeg, iShift - 0.5));
526+
auto coeffShiftYTPCNeg = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCNeg + 1, iShift - 0.5));
527+
auto coeffShiftXTPCAll = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCAll, iShift - 0.5));
528+
auto coeffShiftYTPCAll = shiftProfile.at(nMode - 2)->GetBinContent(shiftProfile.at(nMode - 2)->FindBin(centrality, 2 * kTPCAll + 1, iShift - 0.5));
515529

516530
deltaPsiFT0C += ((2. / (1.0 * iShift)) * (-coeffShiftXFT0C * std::cos(iShift * static_cast<float>(nMode) * psiDefFT0C) + coeffShiftYFT0C * std::sin(iShift * static_cast<float>(nMode) * psiDefFT0C))) / static_cast<float>(nMode);
517531
deltaPsiFT0A += ((2. / (1.0 * iShift)) * (-coeffShiftXFT0A * std::cos(iShift * static_cast<float>(nMode) * psiDefFT0A) + coeffShiftYFT0A * std::sin(iShift * static_cast<float>(nMode) * psiDefFT0A))) / static_cast<float>(nMode);
@@ -597,13 +611,13 @@ struct qVectorsTable {
597611
if (useDetector["QvectorFT0As"]) {
598612
for (std::size_t iChA = 0; iChA < ft0.channelA().size(); iChA++) {
599613
float ampl = ft0.amplitudeA()[iChA];
600-
int FT0AchId = ft0.channelA()[iChA];
614+
int ft0AchId = ft0.channelA()[iChA];
601615

602-
histosQA.fill(HIST("FT0Amp"), ampl, FT0AchId);
603-
histosQA.fill(HIST("FT0AmpCor"), ampl / FT0RelGainConst[FT0AchId], FT0AchId);
616+
histosQA.fill(HIST("FT0Amp"), ampl, ft0AchId);
617+
histosQA.fill(HIST("FT0AmpCor"), ampl / ft0RelGainConst[ft0AchId], ft0AchId);
604618

605-
helperEP.SumQvectors(0, FT0AchId, ampl / FT0RelGainConst[FT0AchId], nMode, qVecDet, sumAmplFT0A, ft0geom, fv0geom);
606-
helperEP.SumQvectors(0, FT0AchId, ampl / FT0RelGainConst[FT0AchId], nMode, qVecFT0M, sumAmplFT0M, ft0geom, fv0geom);
619+
helperEP.SumQvectors(0, ft0AchId, ampl / ft0RelGainConst[ft0AchId], nMode, qVecDet, sumAmplFT0A, ft0geom, fv0geom);
620+
helperEP.SumQvectors(0, ft0AchId, ampl / ft0RelGainConst[ft0AchId], nMode, qVecFT0M, sumAmplFT0M, ft0geom, fv0geom);
607621
}
608622
if (sumAmplFT0A > minAmplitude) {
609623
qVectFT0A[0] = qVecDet.Re();
@@ -615,13 +629,13 @@ struct qVectorsTable {
615629
qVecDet = TComplex(0., 0.);
616630
for (std::size_t iChC = 0; iChC < ft0.channelC().size(); iChC++) {
617631
float ampl = ft0.amplitudeC()[iChC];
618-
int FT0CchId = ft0.channelC()[iChC] + 96;
632+
int ft0CchId = ft0.channelC()[iChC] + 96;
619633

620-
histosQA.fill(HIST("FT0Amp"), ampl, FT0CchId);
621-
histosQA.fill(HIST("FT0AmpCor"), ampl / FT0RelGainConst[FT0CchId], FT0CchId);
634+
histosQA.fill(HIST("FT0Amp"), ampl, ft0CchId);
635+
histosQA.fill(HIST("FT0AmpCor"), ampl / ft0RelGainConst[ft0CchId], ft0CchId);
622636

623-
helperEP.SumQvectors(0, FT0CchId, ampl / FT0RelGainConst[FT0CchId], nMode, qVecDet, sumAmplFT0C, ft0geom, fv0geom);
624-
helperEP.SumQvectors(0, FT0CchId, ampl / FT0RelGainConst[FT0CchId], nMode, qVecFT0M, sumAmplFT0M, ft0geom, fv0geom);
637+
helperEP.SumQvectors(0, ft0CchId, ampl / ft0RelGainConst[ft0CchId], nMode, qVecDet, sumAmplFT0C, ft0geom, fv0geom);
638+
helperEP.SumQvectors(0, ft0CchId, ampl / ft0RelGainConst[ft0CchId], nMode, qVecFT0M, sumAmplFT0M, ft0geom, fv0geom);
625639
}
626640

627641
if (sumAmplFT0C > minAmplitude) {
@@ -641,11 +655,11 @@ struct qVectorsTable {
641655

642656
for (std::size_t iCh = 0; iCh < fv0.channel().size(); iCh++) {
643657
float ampl = fv0.amplitude()[iCh];
644-
int FV0AchId = fv0.channel()[iCh];
645-
histosQA.fill(HIST("FV0Amp"), ampl, FV0AchId);
646-
histosQA.fill(HIST("FV0AmpCor"), ampl / FV0RelGainConst[FV0AchId], FV0AchId);
658+
int fv0AchId = fv0.channel()[iCh];
659+
histosQA.fill(HIST("FV0Amp"), ampl, fv0AchId);
660+
histosQA.fill(HIST("FV0AmpCor"), ampl / fv0RelGainConst[fv0AchId], fv0AchId);
647661

648-
helperEP.SumQvectors(1, FV0AchId, ampl / FV0RelGainConst[FV0AchId], nMode, qVecDet, sumAmplFV0A, ft0geom, fv0geom);
662+
helperEP.SumQvectors(1, fv0AchId, ampl / fv0RelGainConst[fv0AchId], nMode, qVecDet, sumAmplFV0A, ft0geom, fv0geom);
649663
}
650664

651665
if (sumAmplFV0A > minAmplitude) {
@@ -674,7 +688,7 @@ struct qVectorsTable {
674688
qVectTPCAll[1] += trk.pt() * std::sin(trk.phi() * nMode);
675689
trkTPCAllLabel.push_back(trk.globalIndex());
676690
nTrkTPCAll++;
677-
if (std::abs(trk.eta()) < 0.1) {
691+
if (std::abs(trk.eta()) < trackEtaMin) {
678692
continue;
679693
}
680694
if (trk.eta() > 0 && (useDetector["QvectorTPCposs"] || useDetector["QvectorBPoss"])) {
@@ -904,5 +918,5 @@ struct qVectorsTable {
904918
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
905919
{
906920
return WorkflowSpec{
907-
adaptAnalysisTask<qVectorsTable>(cfgc)};
921+
adaptAnalysisTask<QVectorsTable>(cfgc)};
908922
}

0 commit comments

Comments
 (0)