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
16 changes: 15 additions & 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 @@ -267,7 +267,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 270 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 @@ -275,6 +275,7 @@
struct AnalysisEventSelection {
Produces<aod::EventCuts> eventSel;
Produces<aod::MixingHashes> hash;
Produces<aod::StoredReducedEvents> JetEvents;

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

View workflow job for this annotation

GitHub Actions / PR formatting / whitespace

Trailing spaces

Remove the trailing spaces at the end of the line.
OutputObj<THashList> fOutputList{"output"};
Configurable<std::string> fConfigMixingVariables{"cfgMixingVars", "", "Mixing configs separated by a comma, default no mixing"};
Configurable<std::string> fConfigEventCuts{"cfgEventCuts", "eventStandard", "Event selection"};
Expand Down Expand Up @@ -496,13 +497,26 @@
runEventSelection<gkEventFillMap>(events, mcEvents);
publishSelections<gkEventFillMap>(events);
}

void processFillEvents(MyEvents const& events)
{
for (auto& event : events) {
JetEvents(event.tag_raw(),
event.runNumber(),
event.posX(),
event.posY(),
event.posZ(),
event.numContrib(),
event.collisionTime(),
event.collisionTimeRes());
}
}
void processDummy(MyEvents&)
{
// do nothing
}

PROCESS_SWITCH(AnalysisEventSelection, processSkimmed, "Run event selection on DQ skimmed events", false);
PROCESS_SWITCH(AnalysisEventSelection, processFillEvents, "Fill storedReducedEvents table for use in JE framework", false);
PROCESS_SWITCH(AnalysisEventSelection, processDummy, "Dummy function", true);
};

Expand Down Expand Up @@ -4045,7 +4059,7 @@
}
// dilepton rap cut
float rap = dilepton.rap();
if (fConfigUseMCRapcut && abs(rap) > fConfigDileptonRapCutAbs)

Check failure on line 4062 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 @@ -4370,12 +4384,12 @@
mctrack.mcReducedFlags() > 0) {
/*cout << ">>>>>>>>>>>>>>>>>>>>>>> track idx / pdg / selections: " << mctrack.globalIndex() << " / " << mctrack.pdgCode() << " / ";
PrintBitMap(mctrack.mcReducedFlags(), 16);
cout << endl;

Check failure on line 4387 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 4392 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 @@ -4384,7 +4398,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 4401 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 @@ -4486,12 +4500,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 4503 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 4508 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 @@ -4554,12 +4568,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 4571 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 4576 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
15 changes: 15 additions & 0 deletions PWGDQ/Tasks/tableReader_withAssoc.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,7 @@ struct AnalysisEventSelection {

Produces<aod::EventCuts> eventSel;
Produces<aod::MixingHashes> hash;
Produces<aod::StoredReducedEvents> JetEvents;
OutputObj<THashList> fOutputList{"output"};

// TODO: Provide the mixing variables and binning directly via configurables (e.g. vectors of float)
Expand Down Expand Up @@ -577,6 +578,19 @@ struct AnalysisEventSelection {
runEventSelection<gkEventFillMapWithQvectorCentr>(events);
publishSelections<gkEventFillMapWithQvectorCentr>(events);
}
void processFillEvents(MyEventsBasic const& events)
{
for (auto& event : events) {
JetEvents(event.tag_raw(),
event.runNumber(),
event.posX(),
event.posY(),
event.posZ(),
event.numContrib(),
event.collisionTime(),
event.collisionTimeRes());
}
}
void processDummy(MyEventsBasic&)
{
// do nothing
Expand All @@ -589,6 +603,7 @@ struct AnalysisEventSelection {
PROCESS_SWITCH(AnalysisEventSelection, processSkimmedWithMultExtraZdc, "Run event selection on DQ skimmed events, with mult extra and ZDC", false);
PROCESS_SWITCH(AnalysisEventSelection, processSkimmedWithMultExtraZdcFit, "Run event selection on DQ skimmed events, with mult extra, ZDC and FIT", false);
PROCESS_SWITCH(AnalysisEventSelection, processSkimmedWithQvectorCentr, "Run event selection on DQ skimmed events, with Q-vector", false);
PROCESS_SWITCH(AnalysisEventSelection, processFillEvents, "Fill storedReducedEvents table for use in JE framework", false);
PROCESS_SWITCH(AnalysisEventSelection, processDummy, "Dummy function", true);
};

Expand Down
Loading