Skip to content

Commit 713a34d

Browse files
committed
Histogram creation code is redundant: removed
1 parent 2012320 commit 713a34d

File tree

1 file changed

+1
-31
lines changed

1 file changed

+1
-31
lines changed

PWGCF/JCorran/Tasks/flowJSPCAnalysis.cxx

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
// Standard headers.
1717
#include <TFormula.h>
18-
#include <THnSparse.h>
1918
#include <TRandom3.h>
2019

2120
#include <chrono>
@@ -70,8 +69,6 @@ struct flowJSPCAnalysis {
7069
using HasWeightEff = decltype(std::declval<T&>().weightEff());
7170
template <class T>
7271
using HasTrackType = decltype(std::declval<T&>().trackType());
73-
template <class T>
74-
using HasMultSet = decltype(std::declval<T&>().multiplicities());
7572

7673
HistogramRegistry qaHistRegistry{"qaHistRegistry", {}, OutputObjHandlingPolicy::AnalysisObject, true, true};
7774
FlowJHistManager histManager;
@@ -99,10 +96,6 @@ struct flowJSPCAnalysis {
9996
O2_DEFINE_CONFIGURABLE(cfgMultCorrelationsMask, uint16_t, 0, "Selection bitmask for the multiplicity correlations. This should match the filter selection cfgEstimatorBitMask.")
10097
O2_DEFINE_CONFIGURABLE(cfgMultCutFormula, std::string, "", "Multiplicity correlations cut formula. A result greater than zero results in accepted event. Parameters: [cFT0C] FT0C centrality, [mFV0A] V0A multiplicity, [mGlob] global track multiplicity, [mPV] PV track multiplicity, [cFT0M] FT0M centrality")
10198

102-
ConfigurableAxis axisMultCorrCent{"axisMultCorrCent", {100, 0, 100}, "multiplicity correlation axis for centralities"};
103-
ConfigurableAxis axisMultCorrV0{"axisMultCorrV0", {1000, 0, 100000}, "multiplicity correlation axis for V0 multiplicities"};
104-
ConfigurableAxis axisMultCorrMult{"axisMultCorrMult", {1000, 0, 1000}, "multiplicity correlation axis for track multiplicities"};
105-
10699
// // Filters to be applied to the received data.
107100
// // The analysis assumes the data has been subjected to a QA of its selection,
108101
// // and thus only the final distributions of the data for analysis are saved.
@@ -127,22 +120,6 @@ struct flowJSPCAnalysis {
127120
histManager.setDebugLog(false);
128121
histManager.createHistQA();
129122

130-
if (doprocessCFDerivedMultSetCorrected) {
131-
if (cfgMultCorrelationsMask == 0)
132-
LOGF(fatal, "cfgMultCorrelationsMask can not be 0 when MultSet process functions are in use.");
133-
std::vector<AxisSpec> multAxes;
134-
if (cfgMultCorrelationsMask & aod::cfmultset::CentFT0C)
135-
multAxes.emplace_back(axisMultCorrCent, "FT0C centrality");
136-
if (cfgMultCorrelationsMask & aod::cfmultset::MultFV0A)
137-
multAxes.emplace_back(axisMultCorrV0, "V0A multiplicity");
138-
if (cfgMultCorrelationsMask & aod::cfmultset::MultNTracksPV)
139-
multAxes.emplace_back(axisMultCorrMult, "Nch PV");
140-
if (cfgMultCorrelationsMask & aod::cfmultset::MultNTracksGlobal)
141-
multAxes.emplace_back(axisMultCorrMult, "Nch Global");
142-
if (cfgMultCorrelationsMask & aod::cfmultset::CentFT0M)
143-
multAxes.emplace_back(axisMultCorrCent, "FT0M centrality");
144-
qaHistRegistry.add("multCorrelations", "Multiplicity correlations", {HistType::kTHnSparseF, multAxes});
145-
}
146123

147124
if (!cfgMultCutFormula.value.empty()) {
148125
multCutFormula = std::make_unique<TFormula>("multCutFormula", cfgMultCutFormula.value.c_str());
@@ -180,13 +157,6 @@ struct flowJSPCAnalysis {
180157
spcHistograms.fill(HIST("FullCentrality"), cent);
181158
int nTracks = tracks.size();
182159

183-
if (cfgFillQA) {
184-
if constexpr (std::experimental::is_detected<HasMultSet, CollisionT>::value) {
185-
std::vector<double> v(collision.multiplicities().begin(), collision.multiplicities().end());
186-
qaHistRegistry.get<THnSparse>(HIST("multCorrelations")).get()->Fill(v.data());
187-
}
188-
}
189-
190160
double wNUA = 1.0;
191161
double wEff = 1.0;
192162
for (const auto& track : tracks) {
@@ -260,7 +230,7 @@ struct flowJSPCAnalysis {
260230
void processCFDerivedMultSetCorrected(soa::Filtered<soa::Join<aod::CFCollisions, aod::CFMultSets>>::iterator const& collision, soa::Filtered<soa::Join<aod::CFTracks, aod::JWeights>> const& tracks)
261231
{
262232
if (std::popcount(static_cast<uint32_t>(cfgMultCorrelationsMask.value)) != static_cast<int>(collision.multiplicities().size()))
263-
LOGF(fatal, "Multiplicity selections (cfgMultCorrelationsMask = 0x%x) do not match the size of the table column (%ld). The histogram filling relies on the preservation of order.", cfgMultCorrelationsMask.value, collision.multiplicities().size());
233+
LOGF(fatal, "Multiplicity selections (cfgMultCorrelationsMask = 0x%x) do not match the size of the table column (%ld).", cfgMultCorrelationsMask.value, collision.multiplicities().size());
264234
if (!passOutlier(collision))
265235
return;
266236
analyze(collision, tracks);

0 commit comments

Comments
 (0)