Skip to content

Commit 15567ac

Browse files
committed
clang and linter
1 parent 27e9d4b commit 15567ac

File tree

1 file changed

+19
-17
lines changed

1 file changed

+19
-17
lines changed

PWGCF/TwoParticleCorrelations/Tasks/longRangeDihadronCor.cxx

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -149,22 +149,22 @@ struct LongRangeDihadronCor {
149149
ConfigurableAxis axisPtEfficiency{"axisPtEfficiency", {VARIABLE_WIDTH, 0.2, 0.5, 1, 1.5, 2, 3, 4, 6, 10}, "pt axis for efficiency histograms"};
150150
ConfigurableAxis axisAmplitudeFt0a{"axisAmplitudeFt0a", {5000, 0, 1000}, "FT0A amplitude"};
151151
ConfigurableAxis axisChannelFt0aAxis{"axisChannelFt0aAxis", {96, 0.0, 96.0}, "FT0A channel"};
152-
152+
153153
Configurable<std::string> cfgGainEqPath{"cfgGainEqPath", "Analysis/EventPlane/GainEq", "CCDB path for gain equalization constants"};
154154
Configurable<int> cfgCorrLevel{"cfgCorrLevel", 1, "calibration step: 0 = no corr, 1 = gain corr"};
155155
ConfigurableAxis cfgaxisFITamp{"cfgaxisFITamp", {1000, 0, 5000}, ""};
156156
AxisSpec axisFit{cfgaxisFITamp, "fit amplitude"};
157157
AxisSpec axisChID = {220, 0, 220};
158158
// make the filters and cuts.
159159
Filter collisionFilter = (nabs(aod::collision::posZ) < cfgCutVtxZ);
160-
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t) true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
160+
Filter trackFilter = (nabs(aod::track::eta) < cfgCutEta) && (aod::track::pt > cfgCutPtMin) && (aod::track::pt < cfgCutPtMax) && ((requireGlobalTrackInFilter()) || (aod::track::isGlobalTrackSDD == (uint8_t)true)) && (aod::track::tpcChi2NCl < cfgCutChi2prTPCcls) && (nabs(aod::track::dcaZ) < cfgCutDCAz);
161161
using FilteredCollisions = soa::Filtered<soa::Join<aod::Collisions, aod::EvSel, aod::CentFT0Cs, aod::CentFT0CVariant1s, aod::CentFT0Ms, aod::CentFV0As, aod::Mults>>;
162162
using FilteredTracks = soa::Filtered<soa::Join<aod::Tracks, aod::TrackSelection, aod::TracksExtra, aod::TracksDCA>>;
163163

164164
// FT0 geometry
165165
o2::ft0::Geometry ft0Det;
166166
std::vector<o2::detectors::AlignParam>* offsetFT0;
167-
std::vector<float> FT0RelGainConst{};
167+
std::vector<float> cstFT0RelGain{};
168168

169169
// Corrections
170170
TH3D* mEfficiency = nullptr;
@@ -278,8 +278,8 @@ struct LongRangeDihadronCor {
278278
registry.add("Trig_hist", "", {HistType::kTHnSparseF, {{axisSample, axisVertex, axisPtTrigger}}});
279279
registry.add("Assoc_amp_same", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}});
280280
registry.add("Assoc_amp_mixed", "", {HistType::kTH2D, {axisChannelFt0aAxis, axisAmplitudeFt0a}});
281-
registry.add("FT0Amp","", {HistType::kTH2F, {axisChID, axisFit}});
282-
registry.add("FT0AmpCorr","", {HistType::kTH2F, {axisChID, axisFit}});
281+
registry.add("FT0Amp", "", {HistType::kTH2F, {axisChID, axisFit}});
282+
registry.add("FT0AmpCorr", "", {HistType::kTH2F, {axisChID, axisFit}});
283283
}
284284

285285
registry.add("eventcount", "bin", {HistType::kTH1F, {{4, 0, 4, "bin"}}}); // histogram to see how many events are in the same and mixed event
@@ -362,28 +362,30 @@ struct LongRangeDihadronCor {
362362
}
363363
}
364364

365-
void loadGain(aod::BCsWithTimestamps::iterator const& bc) {
366-
FT0RelGainConst.clear();
367-
FT0RelGainConst = {};
365+
void loadGain(aod::BCsWithTimestamps::iterator const& bc)
366+
{
367+
cstFT0RelGain.clear();
368+
cstFT0RelGain = {};
368369
std::string fullPath;
369370

370371
auto timestamp = bc.timestamp();
371-
if (cfgCorrLevel==0) {
372-
for (auto i{0u}; i < 208; i++) {
373-
FT0RelGainConst.push_back(1.);
372+
constexpr int ChannelsFT0 = 208;
373+
if (cfgCorrLevel == 0) {
374+
for (auto i{0u}; i < ChannelsFT0; i++) {
375+
cstFT0RelGain.push_back(1.);
374376
}
375377
} else {
376378
fullPath = cfgGainEqPath;
377379
fullPath += "/FT0";
378-
const auto objft0Gain = ccdb->getForTimeStamp<std::vector<float>>(fullPath, timestamp);
380+
const auto objft0Gain = ccdb->getForTimeStamp<std::vector<float>>(fullPath, timestamp);
379381
if (!objft0Gain) {
380-
for (auto i{0u}; i < 208; i++) {
381-
FT0RelGainConst.push_back(1.);
382+
for (auto i{0u}; i < ChannelsFT0; i++) {
383+
cstFT0RelGain.push_back(1.);
382384
}
383385
} else {
384-
FT0RelGainConst = *(objft0Gain);
386+
cstFT0RelGain = *(objft0Gain);
385387
}
386-
}
388+
}
387389
}
388390

389391
void loadCorrection(uint64_t timestamp)
@@ -479,7 +481,7 @@ struct LongRangeDihadronCor {
479481
LOGF(fatal, "Cor Index %d out of range", switchCor);
480482
}
481483
registry.fill(HIST("FT0Amp"), rID, ampl);
482-
ampl = ampl / FT0RelGainConst[iCh];
484+
ampl = ampl / cstFT0RelGain[iCh];
483485
registry.fill(HIST("FT0AmpCorr"), rID, ampl);
484486
}
485487

0 commit comments

Comments
 (0)