Skip to content

Commit 502cc26

Browse files
authored
Merge pull request #5 from alibuild/alibot-cleanup-17059
Please consider the following formatting changes to #17059
2 parents 7edda62 + 2f14af7 commit 502cc26

1 file changed

Lines changed: 28 additions & 26 deletions

File tree

PWGDQ/Tasks/taskJPsiMu.cxx

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,13 +53,13 @@ namespace o2::aod
5353

5454
namespace dqanalysisflags
5555
{
56-
DECLARE_SOA_BITMAP_COLUMN(IsEventSelected, isEventSelected, 8); //! Event decision
57-
DECLARE_SOA_BITMAP_COLUMN(IsMuonSelected, isMuonSelected, 32); //! Muon track decisions (joinable to ReducedMuonsAssoc)
58-
}
56+
DECLARE_SOA_BITMAP_COLUMN(IsEventSelected, isEventSelected, 8); //! Event decision
57+
DECLARE_SOA_BITMAP_COLUMN(IsMuonSelected, isMuonSelected, 32); //! Muon track decisions (joinable to ReducedMuonsAssoc)
58+
} // namespace dqanalysisflags
5959

60-
DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTSA", dqanalysisflags::IsEventSelected); //! joinable to ReducedEvents
61-
DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTSA", dqanalysisflags::IsMuonSelected); //! joinable to ReducedMuonsAssoc
62-
}
60+
DECLARE_SOA_TABLE(EventCuts, "AOD", "DQANAEVCUTSA", dqanalysisflags::IsEventSelected); //! joinable to ReducedEvents
61+
DECLARE_SOA_TABLE(MuonTrackCuts, "AOD", "DQANAMUONCUTSA", dqanalysisflags::IsMuonSelected); //! joinable to ReducedMuonsAssoc
62+
} // namespace o2::aod
6363

6464
// Declarations of various short names
6565
using MyEvents = soa::Join<aod::ReducedEvents, aod::ReducedEventsExtended>;
@@ -97,7 +97,7 @@ struct DqJPsiMuonCorrelations {
9797
// Configurables for histograms
9898
ConfigurableAxis axisPt{"axisPt", {VARIABLE_WIDTH, 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, 7.0f, 8.0f, 10.0f, 12.0f, 14.0f, 16.0f, 18.0f, 20.0f}, "p_{T} (GeV/c)"};
9999
ConfigurableAxis axisInvMass{"axisInvMass", {80, 1.0f, 5.0f}, "Invariant Mass (GeV/c^{2})"};
100-
ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {10, -constants::math::PI/2.0f, 3.0f*constants::math::PI/2.0f}, "#Delta#phi (rad)"};
100+
ConfigurableAxis axisDeltaPhi{"axisDeltaPhi", {10, -constants::math::PI / 2.0f, 3.0f * constants::math::PI / 2.0f}, "#Delta#phi (rad)"};
101101
ConfigurableAxis axisDeltaEta{"axisDeltaEta", {10, -2.0f, 2.0f}, "#Delta#eta"};
102102

103103
// Configurable for acceptance efficiency correction
@@ -115,7 +115,7 @@ struct DqJPsiMuonCorrelations {
115115
// Define the filter for the dileptons
116116
Filter dileptonFilter = aod::reducedpair::sign == 0;
117117

118-
constexpr static uint32_t fgDimuonsFillMap = VarManager::ObjTypes::ReducedMuon | VarManager::ObjTypes::Pair; // fill map
118+
constexpr static uint32_t fgDimuonsFillMap = VarManager::ObjTypes::ReducedMuon | VarManager::ObjTypes::Pair; // fill map
119119

120120
// use two values array to avoid mixing up the quantities
121121
float* fValuesDilepton;
@@ -130,9 +130,9 @@ struct DqJPsiMuonCorrelations {
130130
ccdb->setCreatedNotAfter(nolaterthan.value);
131131

132132
// Assert correct size of the efficiency correction vector
133-
if (axisPt.value.size()-2 != fConfigBinEffJPsi.value.size() || axisPt.value.size()-2 != fConfigBinEffMuon.value.size()) {
133+
if (axisPt.value.size() - 2 != fConfigBinEffJPsi.value.size() || axisPt.value.size() - 2 != fConfigBinEffMuon.value.size()) {
134134
LOGF(fatal, "Configurables axisPt: %zu must have one more value than fConfigBinEffJPsi: %zu and fConfigBinEffMuon: %zu (excluding 'VARIABLE_WIDTH' entry)",
135-
axisPt.value.size()-1, fConfigBinEffJPsi.value.size(), fConfigBinEffMuon.value.size());
135+
axisPt.value.size() - 1, fConfigBinEffJPsi.value.size(), fConfigBinEffMuon.value.size());
136136
}
137137

138138
// Set up varmanager variable names
@@ -188,7 +188,7 @@ struct DqJPsiMuonCorrelations {
188188
(dilepton.pt1() < axisPt.value[1] || dilepton.pt1() > axisPt.value.back()) ||
189189
(dilepton.eta2() < fConfigMuonEtaMin || dilepton.eta2() > fConfigMuonEtaMax) ||
190190
(dilepton.pt2() < axisPt.value[1] || dilepton.pt2() > axisPt.value.back())) {
191-
continue;
191+
continue;
192192
}
193193

194194
// Fill invariant mass vs pT histogram for the dileptons and for trigger counting
@@ -198,7 +198,7 @@ struct DqJPsiMuonCorrelations {
198198
registry.fill(HIST("h2dTriggersPtInvVsInvMassRegion"), dilepton.mass(), dilepton.pt(), w_dilepton);
199199

200200
for (auto& assoc : assocs) {
201-
// Check selection bit
201+
// Check selection bit
202202
if (!assoc.isMuonSelected_bit(0)) {
203203
continue;
204204
}
@@ -220,9 +220,9 @@ struct DqJPsiMuonCorrelations {
220220
// Compute deltaEta and deltaPhi between the dilepton and the associated muon
221221
float deltaEta = dilepton.eta() - track.eta();
222222
float deltaPhi = dilepton.phi() - track.phi();
223-
if (deltaPhi < -constants::math::PI/2.0f) {
223+
if (deltaPhi < -constants::math::PI / 2.0f) {
224224
deltaPhi += 2.0f * constants::math::PI;
225-
} else if (deltaPhi > constants::math::PI*3.0f/2.0f) {
225+
} else if (deltaPhi > constants::math::PI * 3.0f / 2.0f) {
226226
deltaPhi -= 2.0f * constants::math::PI;
227227
}
228228

@@ -259,20 +259,22 @@ WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
259259
adaptAnalysisTask<DqJPsiMuonCorrelations>(cfgc)};
260260
}
261261

262-
double getRapidity(const double pT, const double eta) {
263-
double mJPsi = 3.096916; // J/Psi mass in GeV/c^2
264-
return log((sqrt(pow(mJPsi, 2) + (pow(pT, 2) * pow(cosh(eta), 2))) + pT * sinh(eta)) / (sqrt(pow(mJPsi, 2) + pow(pT, 2))));
262+
double getRapidity(const double pT, const double eta)
263+
{
264+
double mJPsi = 3.096916; // J/Psi mass in GeV/c^2
265+
return log((sqrt(pow(mJPsi, 2) + (pow(pT, 2) * pow(cosh(eta), 2))) + pT * sinh(eta)) / (sqrt(pow(mJPsi, 2) + pow(pT, 2))));
265266
}
266267

267-
double getWeight(const double pT, const std::vector<double>& pT_bins, const std::vector<double>& efficiency, const double eta_min, const double eta_max) {
268+
double getWeight(const double pT, const std::vector<double>& pT_bins, const std::vector<double>& efficiency, const double eta_min, const double eta_max)
269+
{
268270

269-
int eff_bin = -1;
270-
for (size_t b = 0; b < pT_bins.size() - 1; ++b) {
271-
// Shift pT index by one to account for the VARIABLE_WIDTH entry in the axis configuration
272-
if (pT >= pT_bins[b + 1] && pT < pT_bins[b + 2]) {
273-
eff_bin = b;
274-
break;
275-
}
271+
int eff_bin = -1;
272+
for (size_t b = 0; b < pT_bins.size() - 1; ++b) {
273+
// Shift pT index by one to account for the VARIABLE_WIDTH entry in the axis configuration
274+
if (pT >= pT_bins[b + 1] && pT < pT_bins[b + 2]) {
275+
eff_bin = b;
276+
break;
276277
}
277-
return 1.0 / (efficiency[eff_bin] * (getRapidity(pT, eta_max) - getRapidity(pT, eta_min)));
278+
}
279+
return 1.0 / (efficiency[eff_bin] * (getRapidity(pT, eta_max) - getRapidity(pT, eta_min)));
278280
}

0 commit comments

Comments
 (0)