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
3 changes: 1 addition & 2 deletions PWGEM/Dilepton/Core/Dilepton.h
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@ struct Dilepton {
if (cfgApplyWeightTTCA) {
weight = map_weight[std::make_pair(t1.globalIndex(), t2.globalIndex())];
}
// LOGF(info, "ev_id = %d, t1.sign() = %d, t2.sign() = %d, map_weight[std::make_pair(%d, %d)] = %f", ev_id, t1.sign(), t2.sign(), t1.globalIndex(), t2.globalIndex(), weight);
}
// LOGF(info, "ev_id = %d, t1.sign() = %d, t2.sign() = %d, map_weight[std::make_pair(%d, %d)] = %f", ev_id, t1.sign(), t2.sign(), t1.globalIndex(), t2.globalIndex(), weight);

ROOT::Math::PtEtaPhiMVector v1(t1.pt(), t1.eta(), t1.phi(), leptonM1);
ROOT::Math::PtEtaPhiMVector v2(t2.pt(), t2.eta(), t2.phi(), leptonM2);
Expand Down Expand Up @@ -1527,7 +1527,6 @@ struct Dilepton {
for (const auto& pairId : passed_pairIds) {
auto t1 = tracks.rawIteratorAt(std::get<0>(pairId));
auto t2 = tracks.rawIteratorAt(std::get<1>(pairId));
// LOGF(info, "std::get<0>(pairId) = %d, std::get<1>(pairId) = %d, t1.globalIndex() = %d, t2.globalIndex() = %d", std::get<0>(pairId), std::get<1>(pairId), t1.globalIndex(), t2.globalIndex());

float n = 1.f; // include myself.
for (const auto& ambId1 : t1.ambiguousElectronsIds()) {
Expand Down
13 changes: 8 additions & 5 deletions PWGEM/Dilepton/Utils/EMTrackUtilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,21 @@ bool checkMFTHitMap(T const& track)
template <bool is_wo_acc = false, typename TTrack, typename TCut, typename TTracks>
bool isBestMatch(TTrack const& track, TCut const& cut, TTracks const& tracks)
{
// this is only for muon at forward rapidity
// this is only for global muons at forward rapidity
// Be careful! tracks are fwdtracks per DF.
if (track.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack) {
std::map<int64_t, float> map_chi2MCHMFT;
map_chi2MCHMFT[track.globalIndex()] = track.chi2MatchMCHMFT(); // add myself
for (const auto& glmuonId : track.globalMuonsWithSameMFTIds()) {
const auto& candidate = tracks.rawIteratorAt(glmuonId);
if (candidate.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack) {
if (cut.template IsSelectedTrack<is_wo_acc>(candidate)) {
map_chi2MCHMFT[candidate.globalIndex()] = candidate.chi2MatchMCHMFT();
if (track.mchtrackId() != candidate.mchtrackId() && track.mfttrackId() == candidate.mfttrackId()) {
if (candidate.trackType() == o2::aod::fwdtrack::ForwardTrackTypeEnum::GlobalMuonTrack) {
if (cut.template IsSelectedTrack<is_wo_acc>(candidate)) {
map_chi2MCHMFT[candidate.globalIndex()] = candidate.chi2MatchMCHMFT();
}
}
}
}
} // end of glmuonId

auto it = std::min_element(map_chi2MCHMFT.begin(), map_chi2MCHMFT.end(), [](decltype(map_chi2MCHMFT)::value_type& l, decltype(map_chi2MCHMFT)::value_type& r) -> bool { return l.second < r.second; }); // search for minimum matching-chi2

Expand Down
Loading