Skip to content
Merged
Show file tree
Hide file tree
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
11 changes: 2 additions & 9 deletions PWGEM/Dilepton/Core/DileptonHadronMPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@
#include <utility>
#include <vector>

using namespace o2;

Check failure on line 65 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod;

Check failure on line 66 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework;

Check failure on line 67 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::framework::expressions;

Check failure on line 68 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::soa;

Check failure on line 69 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod::pwgem::dilepton::utils;

Check failure on line 70 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod::pwgem::dilepton::utils::emtrackutil;

Check failure on line 71 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.
using namespace o2::aod::pwgem::dilepton::utils::pairutil;

Check failure on line 72 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[using-directive]

Do not put using directives at global scope in headers.

using MyCollisions = soa::Join<aod::EMEvents, aod::EMEventsMult, aod::EMEventsCent>;
using MyCollision = MyCollisions::iterator;
Expand Down Expand Up @@ -453,8 +453,6 @@

used_trackIds.clear();
used_trackIds.shrink_to_fit();
used_refTrackIds.clear();
used_refTrackIds.shrink_to_fit();
}

void addhistograms()
Expand Down Expand Up @@ -507,7 +505,7 @@

const AxisSpec axis_pt_trg{ConfPtHadronBins, "p_{T,h} (GeV/c)"};
const AxisSpec axis_eta_trg{40, -2, +2, "#eta_{h}"};
const AxisSpec axis_phi_trg{36, 0, 2 * M_PI, "#varphi_{h} (rad.)"};

Check failure on line 508 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
fRegistry.add("Hadron/hs", "hadron", kTHnSparseD, {axis_pt_trg, axis_eta_trg, axis_phi_trg}, false);
fRegistry.add("Hadron/hTrackBit", "track bit", kTH1D, {{65536, -0.5, 65535.5}}, false);

Expand All @@ -517,7 +515,7 @@
fRegistry.addClone("Dilepton/same/", "Dilepton/mix/");

if (cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonHadronAnalysisType::kAzimuthalCorrelation)) {
const AxisSpec axis_dphi{cfgNbinsDPhi, -M_PI / 2, 3 * M_PI / 2, dphi_axis_title};

Check failure on line 518 in PWGEM/Dilepton/Core/DileptonHadronMPC.h

View workflow job for this annotation

GitHub Actions / O2 linter

[external-pi]

Use the PI constant (and its multiples and fractions) defined in o2::constants::math.
// dilepton-hadron
fRegistry.add("DileptonHadron/same/uls/hs", "dilepton-hadron 2PC", kTHnSparseD, {axis_mass, axis_pt, axis_dca, axis_y, axis_deta, axis_dphi}, true);
fRegistry.addClone("DileptonHadron/same/uls/", "DileptonHadron/same/lspp/");
Expand Down Expand Up @@ -1063,7 +1061,6 @@
std::map<std::pair<int, int>, uint64_t> map_mixed_eventId_to_globalBC;

std::vector<std::pair<int, int>> used_trackIds;
std::vector<std::pair<int, int>> used_refTrackIds;
int ndf = 0;

template <bool isTriggerAnalysis, typename TCollisions, typename TLeptons, typename TPresilce, typename TCut, typename TAllTracks, typename TRefTracks>
Expand Down Expand Up @@ -1142,12 +1139,8 @@

// store ref tracks for mixed event in case of kAzimuthalCorrelation
if (cfgDoMix && cfgAnalysisType == static_cast<int>(o2::aod::pwgem::dilepton::utils::pairutil::DileptonHadronAnalysisType::kAzimuthalCorrelation)) {
std::pair<int, int> pair_tmp_refTrack = std::make_pair(ndf, track.globalIndex());
if (std::find(used_refTrackIds.begin(), used_refTrackIds.end(), pair_tmp_refTrack) == used_refTrackIds.end()) {
used_refTrackIds.emplace_back(pair_tmp_refTrack);
emh_ref->AddTrackToEventPool(key_df_collision, EMTrack(ndf, track.globalIndex(), collision.globalIndex(), track.trackId(), track.pt(), track.eta(), track.phi(), 0.139));
} // store ref tracks
}
emh_ref->AddTrackToEventPool(key_df_collision, EMTrack(ndf, track.globalIndex(), collision.globalIndex(), track.trackId(), track.pt(), track.eta(), track.phi(), 0.139));
} // store ref tracks
}
}
for (const auto& [ref1, ref2] : combinations(CombinationsStrictlyUpperIndexPolicy(refTracks_per_coll, refTracks_per_coll))) {
Expand Down
10 changes: 1 addition & 9 deletions PWGEM/PhotonMeson/Core/DiphotonHadronMPC.h
Original file line number Diff line number Diff line change
Expand Up @@ -325,8 +325,6 @@ struct DiphotonHadronMPC {
used_photonIds.shrink_to_fit();
used_dileptonIds.clear();
used_dileptonIds.shrink_to_fit();
used_refTrackIds.clear();
used_refTrackIds.shrink_to_fit();

map_mixed_eventId_to_globalBC.clear();
}
Expand Down Expand Up @@ -486,7 +484,6 @@ struct DiphotonHadronMPC {

std::vector<std::pair<int, int>> used_photonIds; // <ndf, trackId>
std::vector<std::tuple<int, int, int, int>> used_dileptonIds; // <ndf, trackId>
std::vector<std::pair<int, int>> used_refTrackIds; // <ndf, trackId>
std::vector<std::tuple<int, int, int, int>> used_diphotonIds; // <ndf, trackId>
std::map<std::pair<int, int>, uint64_t> map_mixed_eventId_to_globalBC;

Expand Down Expand Up @@ -708,12 +705,7 @@ struct DiphotonHadronMPC {
if (fEMTrackCut.IsSelected(track)) {
fRegistry.fill(HIST("Hadron/hs"), track.pt(), track.eta(), track.phi());
fRegistry.fill(HIST("Hadron/hTrackBit"), track.trackBit());

std::pair<int, int> pair_tmp_ref = std::make_pair(ndf, track.globalIndex());
if (std::find(used_refTrackIds.begin(), used_refTrackIds.end(), pair_tmp_ref) == used_refTrackIds.end()) { // add a ref track in mixing pool
emh_ref->AddTrackToEventPool(key_df_collision, EMTrack(ndf, track.globalIndex(), collision.globalIndex(), track.globalIndex(), track.pt(), track.eta(), track.phi(), 0.139));
used_refTrackIds.emplace_back(pair_tmp_ref);
}
emh_ref->AddTrackToEventPool(key_df_collision, EMTrack(ndf, track.globalIndex(), collision.globalIndex(), track.globalIndex(), track.pt(), track.eta(), track.phi(), 0.139));
}
}

Expand Down
Loading