Skip to content
Open
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
2 changes: 1 addition & 1 deletion PWGDQ/Tasks/dqEfficiency_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>

Check failure on line 62 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[include-iostream]

Do not include iostream. Use O2 logging instead.
#include <iterator>
#include <map>
#include <memory>
Expand Down Expand Up @@ -279,7 +279,7 @@
void PrintBitMap(TMap map, int nbits)
{
for (int i = 0; i < nbits; i++) {
cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");

Check failure on line 282 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}

Expand Down Expand Up @@ -1186,6 +1186,7 @@
if (context.mOptions.get<bool>("processDummy")) {
return;
}
VarManager::SetDefaultVarNames();

bool runPrefilter = true;
// get the list of track cuts to be prefiltered
Expand Down Expand Up @@ -1253,7 +1254,6 @@
}

VarManager::SetUseVars(AnalysisCut::fgUsedVars); // provide the list of required variables so that VarManager knows what to fill
VarManager::SetDefaultVarNames();

VarManager::SetupTwoProngDCAFitter(5.0f, true, 200.0f, 4.0f, 1.0e-3f, 0.9f, true); // TODO: get these parameters from Configurables
VarManager::SetupTwoProngFwdDCAFitter(5.0f, true, 200.0f, 1.0e-3f, 0.9f, true);
Expand Down Expand Up @@ -4567,7 +4567,7 @@
}
// dilepton rap cut
float rap = dilepton.rap();
if (fConfigUseMCRapcut && abs(rap) > fConfigDileptonRapCutAbs)

Check failure on line 4570 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;

// Correct association
Expand Down Expand Up @@ -4892,12 +4892,12 @@
mctrack.mcReducedFlags() > 0) {
/*cout << ">>>>>>>>>>>>>>>>>>>>>>> track idx / pdg / selections: " << mctrack.globalIndex() << " / " << mctrack.pdgCode() << " / ";
PrintBitMap(mctrack.mcReducedFlags(), 16);
cout << endl;

Check failure on line 4895 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (mctrack.has_mothers()) {
for (auto& m : mctrack.mothersIds()) {
if (m < mcTracks.size()) { // protect against bad mother indices
auto aMother = mcTracks.rawIteratorAt(m);
cout << "<<<<<< mother idx / pdg: " << m << " / " << aMother.pdgCode() << endl;

Check failure on line 4900 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}
}
Expand All @@ -4906,7 +4906,7 @@
for (int d = mctrack.daughtersIds()[0]; d <= mctrack.daughtersIds()[1]; ++d) {
if (d < mcTracks.size()) { // protect against bad daughter indices
auto aDaughter = mcTracks.rawIteratorAt(d);
cout << "<<<<<< daughter idx / pdg: " << d << " / " << aDaughter.pdgCode() << endl;

Check failure on line 4909 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}
}
}*/
Expand Down Expand Up @@ -5008,12 +5008,12 @@
// apply kinematic cuts for signal
if ((t1_raw.pt() < fConfigDileptonLowpTCut || t1_raw.pt() > fConfigDileptonHighpTCut))
continue;
if (abs(t1_raw.y()) > fConfigDileptonRapCutAbs)

Check failure on line 5011 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
// for the energy correlators
for (auto& t2 : groupedMCTracks) {
auto t2_raw = groupedMCTracks.rawIteratorAt(t2.globalIndex());
if (TMath::Abs(t2_raw.pdgCode()) == 443 || TMath::Abs(t2_raw.pdgCode()) == 11 || TMath::Abs(t2_raw.pdgCode()) == 22)

Check failure on line 5016 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
if (t2_raw.pt() < fConfigMCGenHadronPtMin.value || std::abs(t2_raw.eta()) > fConfigMCGenHadronEtaAbs.value)
continue;
Expand Down Expand Up @@ -5076,12 +5076,12 @@
// apply kinematic cuts for signal
if ((t1_raw.pt() < fConfigDileptonLowpTCut || t1_raw.pt() > fConfigDileptonHighpTCut))
continue;
if (abs(t1_raw.y()) > fConfigDileptonRapCutAbs)

Check failure on line 5079 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[std-prefix]

Use std:: prefix for names from the std namespace.
continue;
// for the energy correlators
for (auto& t2 : groupedMCTracks2) {
auto t2_raw = groupedMCTracks2.rawIteratorAt(t2.globalIndex());
if (TMath::Abs(t2_raw.pdgCode()) == 443 || TMath::Abs(t2_raw.pdgCode()) == 11 || TMath::Abs(t2_raw.pdgCode()) == 22)

Check failure on line 5084 in PWGDQ/Tasks/dqEfficiency_withAssoc.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[pdg/explicit-code]

Avoid hard-coded PDG codes. Use named values from PDG_t or o2::constants::physics::Pdg instead.
continue;
if (t2_raw.pt() < fConfigMCGenHadronPtMin.value || std::abs(t2_raw.eta()) > fConfigMCGenHadronEtaAbs.value)
continue;
Expand Down
20 changes: 9 additions & 11 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1399,7 +1399,6 @@ struct AnalysisSameEventPairing {
NoBinningPolicy<aod::dqanalysisflags::MixingHash> hashBin;

Preslice<soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts, aod::Prefilter>> trackAssocsPerCollision = aod::reducedtrack_association::reducedeventId;
Preslice<soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts>> trackEmuAssocsPerCollision = aod::reducedtrack_association::reducedeventId;
Preslice<soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts>> muonAssocsPerCollision = aod::reducedtrack_association::reducedeventId;

void init(o2::framework::InitContext& context)
Expand Down Expand Up @@ -2638,9 +2637,8 @@ struct AnalysisSameEventPairing {

// Custom combination policy
for (auto& [a1, a2] : o2::soa::combinations(soa::CombinationsFullIndexPolicy(groupedAssocs1, groupedAssocs2))) {
if (!(a1.isBarrelSelected_raw() & fTrackFilterMask))
if (!(a1.isBarrelSelected_raw() & a1.isBarrelSelectedPrefilter_raw() & fTrackFilterMask))
continue;
// if (!a1.isBarrelSelectedPrefilter_raw()) continue;
if (!(a2.isMuonSelected_raw() & fMuonFilterMask))
continue;

Expand All @@ -2652,7 +2650,7 @@ struct AnalysisSameEventPairing {
twoTrackFilter = 0;
int minCuts = std::min(fNCutsBarrel, fNCutsMuon);
for (int i = 0; i < minCuts; ++i) {
if ((a1.isBarrelSelected_raw() & (1u << i)) && (a2.isMuonSelected_raw() & (1u << i))) {
if ((a1.isBarrelSelected_raw() & a1.isBarrelSelectedPrefilter_raw() & (1u << i)) && (a2.isMuonSelected_raw() & (1u << i))) {
twoTrackFilter |= (1u << i);
}
}
Expand Down Expand Up @@ -2681,7 +2679,7 @@ struct AnalysisSameEventPairing {
t1.sign() + t2.sign(), twoTrackFilter, 0);

for (int iTrack = 0; iTrack < fNCutsBarrel; ++iTrack) {
if (!(a1.isBarrelSelected_raw() & (1u << iTrack)))
if (!(a1.isBarrelSelected_raw() & a1.isBarrelSelectedPrefilter_raw() & (1u << iTrack)))
continue;

for (int iMuon = 0; iMuon < fNCutsMuon; ++iMuon) {
Expand Down Expand Up @@ -2726,7 +2724,7 @@ struct AnalysisSameEventPairing {
constexpr bool eventHasQvectorCentr = ((TEventFillMap & VarManager::ObjTypes::CollisionQvect) > 0);

for (auto& a1 : assocs1) {
if (!(a1.isBarrelSelected_raw() & fTrackFilterMask)) {
if (!(a1.isBarrelSelected_raw() & a1.isBarrelSelectedPrefilter_raw() & fTrackFilterMask)) {
continue;
}
for (auto& a2 : assocs2) {
Expand All @@ -2748,7 +2746,7 @@ struct AnalysisSameEventPairing {
}

for (int iTrack = 0; iTrack < fNCutsBarrel; ++iTrack) {
if (!(a1.isBarrelSelected_raw() & (1u << iTrack))) {
if (!(a1.isBarrelSelected_raw() & a1.isBarrelSelectedPrefilter_raw() & (1u << iTrack))) {
continue;
}
for (int iMuon = 0; iMuon < fNCutsMuon; ++iMuon) {
Expand Down Expand Up @@ -2887,10 +2885,10 @@ struct AnalysisSameEventPairing {
}

void processElectronMuonSkimmed(MyEventsVtxCovSelected const& events,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts> const& barrelAssocs, MyBarrelTracksWithCovWithAmbiguities const& barrelTracks,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts, aod::Prefilter> const& barrelAssocs, MyBarrelTracksWithCovWithAmbiguities const& barrelTracks,
soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts> const& muonAssocs, MyMuonTracksWithCovWithAmbiguities const& muons)
{
runEmuSameEventPairing<true, VarManager::kElectronMuon, gkEventFillMapWithCov, gkTrackFillMapWithCov, gkMuonFillMapWithCov>(events, trackEmuAssocsPerCollision, barrelAssocs, barrelTracks, muonAssocsPerCollision, muonAssocs, muons);
runEmuSameEventPairing<true, VarManager::kElectronMuon, gkEventFillMapWithCov, gkTrackFillMapWithCov, gkMuonFillMapWithCov>(events, trackAssocsPerCollision, barrelAssocs, barrelTracks, muonAssocsPerCollision, muonAssocs, muons);
}

void processMixingAllSkimmed(soa::Filtered<MyEventsHashSelected>& events,
Expand Down Expand Up @@ -2932,10 +2930,10 @@ struct AnalysisSameEventPairing {
}

void processMixingElectronMuonSkimmed(soa::Filtered<MyEventsHashSelected>& events,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts> const& barrelAssocs, aod::ReducedTracks const& barrelTracks,
soa::Join<aod::ReducedTracksAssoc, aod::BarrelTrackCuts, aod::Prefilter> const& barrelAssocs, aod::ReducedTracks const& barrelTracks,
soa::Join<aod::ReducedMuonsAssoc, aod::MuonTrackCuts> const& muonAssocs, MyMuonTracksWithCovWithAmbiguities const& muons)
{
runEmuSameSideMixing<gkEventFillMap>(events, trackEmuAssocsPerCollision, barrelAssocs, barrelTracks, muonAssocsPerCollision, muonAssocs, muons);
runEmuSameSideMixing<gkEventFillMap>(events, trackAssocsPerCollision, barrelAssocs, barrelTracks, muonAssocsPerCollision, muonAssocs, muons);
}

void processDummy(MyEventsBasic&)
Expand Down
Loading