Skip to content

Commit 644dee9

Browse files
authored
Add derived table in single muon task (#5641)
1 parent e161e4f commit 644dee9

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

PWGHF/HFL/Tasks/taskSingleMuonReader.cxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,20 @@ using namespace o2::framework::expressions;
3232
using MyCollisions = soa::Join<aod::ReducedEvents, aod::ReducedEventsExtended>;
3333
using MyMuons = soa::Join<aod::ReducedMuons, aod::ReducedMuonsExtra>;
3434

35+
namespace o2::aod
36+
{
37+
namespace single_muon
38+
{
39+
DECLARE_SOA_COLUMN(Pt, pt, float);
40+
DECLARE_SOA_COLUMN(DcaXY, dcaXY, float);
41+
DECLARE_SOA_COLUMN(DeltaPt, deltaPt, float);
42+
} // namespace single_muon
43+
DECLARE_SOA_TABLE(HfSingleMuon, "AOD", "SINGLEMUON", single_muon::Pt, single_muon::DcaXY, single_muon::DeltaPt);
44+
} // namespace o2::aod
45+
3546
struct HfTaskSingleMuonReader {
47+
Produces<aod::HfSingleMuon> singleMuon;
48+
3649
Configurable<int> trkType{"trkType", 0, "Muon track type, valid values are 0, 1, 2, 3 and 4"};
3750
Configurable<float> etaMin{"etaMin", -3.6, "eta minimum value"};
3851
Configurable<float> etaMax{"etaMax", -2.5, "eta maximum value"};
@@ -94,6 +107,7 @@ struct HfTaskSingleMuonReader {
94107
if (muon.has_matchMCHTrack()) {
95108
auto muonType3 = muon.matchMCHTrack_as<MyMuons>();
96109
auto Dpt = muonType3.pt() - pt;
110+
singleMuon(pt, dcaXY, Dpt);
97111
registry.fill(HIST("hMuAfterCuts"), pt, eta, dcaXY, charge, chi2, Dpt);
98112
}
99113
}

0 commit comments

Comments
 (0)