Skip to content

Commit 9cd93d6

Browse files
dsekihatalibuild
andauthored
[PWGEM/Dilepton] update muon analyses (#15207)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent f69ba9b commit 9cd93d6

File tree

5 files changed

+157
-62
lines changed

5 files changed

+157
-62
lines changed

PWGEM/Dilepton/DataModel/dileptonTables.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,7 @@ DECLARE_SOA_COLUMN(CollisionId, collisionId, int);
982982
DECLARE_SOA_COLUMN(FwdTrackId, fwdtrackId, int); //!
983983
DECLARE_SOA_COLUMN(MFTTrackId, mfttrackId, int); //!
984984
DECLARE_SOA_COLUMN(MCHTrackId, mchtrackId, int); //!
985+
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(GlobalMuonsWithSameMCHMID, globalMuonsWithSameMCHMID); //! self indices to global muons that have the same MCHTrackId
985986
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(GlobalMuonsWithSameMFT, globalMuonsWithSameMFT); //! self indices to global muons that have the same MFTTrackId
986987
DECLARE_SOA_SELF_ARRAY_INDEX_COLUMN(AmbiguousMuons, ambiguousMuons);
987988
DECLARE_SOA_COLUMN(CXXatDCA, cXXatDCA, float); //! DCAx resolution squared at DCA
@@ -1130,7 +1131,9 @@ DECLARE_SOA_TABLE(EMAmbiguousMuonSelfIds, "AOD", "EMAMBMUSELFID", emprimarymuon:
11301131
// iterators
11311132
using EMAmbiguousMuonSelfId = EMAmbiguousMuonSelfIds::iterator;
11321133

1133-
DECLARE_SOA_TABLE(EMGlobalMuonSelfIds, "AOD", "EMGLMUSELFID", emprimarymuon::GlobalMuonsWithSameMFTIds); // To be joined with EMPrimaryMuons table at analysis level.
1134+
DECLARE_SOA_TABLE(EMGlobalMuonSelfIds_000, "AOD", "EMGLMUSELFID", emprimarymuon::GlobalMuonsWithSameMFTIds); // To be joined with EMPrimaryMuons table at analysis level.
1135+
DECLARE_SOA_TABLE_VERSIONED(EMGlobalMuonSelfIds_001, "AOD", "EMGLMUSELFID", 1, emprimarymuon::GlobalMuonsWithSameMCHMIDIds, emprimarymuon::GlobalMuonsWithSameMFTIds); // To be joined with EMPrimaryMuons table at analysis level.
1136+
using EMGlobalMuonSelfIds = EMGlobalMuonSelfIds_001;
11341137
// iterators
11351138
using EMGlobalMuonSelfId = EMGlobalMuonSelfIds::iterator;
11361139

PWGEM/Dilepton/TableProducer/Converters/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ o2physics_add_dpl_workflow(muon-converter2
6565
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
6666
COMPONENT_NAME Analysis)
6767

68+
o2physics_add_dpl_workflow(muon-selfid-converter1
69+
SOURCES muonSelfIdConverter1.cxx
70+
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
71+
COMPONENT_NAME Analysis)
72+
6873
o2physics_add_dpl_workflow(mcparticle-converter1
6974
SOURCES mcParticleConverter1.cxx
7075
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2+
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+
// All rights not expressly granted are reserved.
4+
//
5+
// This software is distributed under the terms of the GNU General Public
6+
// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7+
//
8+
// In applying this license CERN does not waive the privileges and immunities
9+
// granted to it by virtue of its status as an Intergovernmental Organization
10+
// or submit itself to any jurisdiction.
11+
//
12+
// ========================
13+
//
14+
// This code produces muon table 001 from 000.
15+
// Please write to: daiki.sekihata@cern.ch
16+
17+
#include "PWGEM/Dilepton/DataModel/dileptonTables.h"
18+
19+
#include "Framework/ASoAHelpers.h"
20+
#include "Framework/AnalysisTask.h"
21+
#include "Framework/runDataProcessing.h"
22+
23+
using namespace o2;
24+
using namespace o2::aod;
25+
using namespace o2::framework;
26+
using namespace o2::framework::expressions;
27+
using namespace o2::soa;
28+
29+
struct muonSelfIdConverter1 {
30+
Produces<aod::EMGlobalMuonSelfIds_001> muon_001;
31+
32+
void process(aod::EMGlobalMuonSelfIds_000 const& muons)
33+
{
34+
for (const auto& muon : muons) {
35+
muon_001(std::vector<int>{}, muon.globalMuonsWithSameMFTIds());
36+
} // end of muon loop
37+
}
38+
};
39+
40+
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
41+
{
42+
return WorkflowSpec{adaptAnalysisTask<muonSelfIdConverter1>(cfgc, TaskName{"muon-selfif-converter1"})};
43+
}

0 commit comments

Comments
 (0)