Skip to content

Commit 9d38580

Browse files
[PWGJE] GammaJetTree MC capabilities & perf improvements (#11776)
Co-authored-by: ALICE Action Bot <alibuild@cern.ch>
1 parent 68d23d8 commit 9d38580

File tree

2 files changed

+1146
-100
lines changed

2 files changed

+1146
-100
lines changed

PWGJE/DataModel/GammaJetAnalysisTree.h

Lines changed: 91 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,45 @@
1717
#ifndef PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_
1818
#define PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_
1919

20-
#include <Framework/ASoA.h>
20+
#include "PWGJE/Core/JetDerivedDataUtilities.h"
21+
#include "PWGJE/DataModel/EMCALClusters.h"
22+
#include "PWGJE/DataModel/Jet.h"
2123

22-
#include <sys/types.h>
23-
24-
#include <cstdint>
24+
#include "Framework/AnalysisDataModel.h"
2525

26+
namespace o2::aod::gjanalysis
27+
{
28+
enum class ClusterOrigin {
29+
kUnknown = 0,
30+
kPhoton, // dominant amount of energy from the cluster is from a photon
31+
kPromptPhoton,
32+
kDirectPromptPhoton,
33+
kFragmentationPhoton,
34+
kDecayPhoton, // the particle that produced the cluster is a decay product
35+
kDecayPhotonPi0, // the cluster was produced by a pi0 decay
36+
kDecayPhotonEta, // the cluster was produced by a eta decay
37+
kMergedPi0, // the cluster was produced by a merged pi0, i.e. two photons contribute to the cluster that both come from pi0 decay
38+
kMergedEta, // the cluster was produced by a merged eta, i.e. two photons contribute to the cluster that both come from eta decay
39+
kConvertedPhoton, // the cluster was produced by a converted photon, i.e. a photon that converted to an electron-positron pair and one of the electrons was detected in the cluster
40+
};
41+
enum class ParticleOrigin {
42+
kUnknown = 0,
43+
kPromptPhoton,
44+
kDirectPromptPhoton,
45+
kFragmentationPhoton,
46+
kDecayPhoton,
47+
kDecayPhotonPi0,
48+
kDecayPhotonEta,
49+
kDecayPhotonOther,
50+
kPi0
51+
};
52+
} // namespace o2::aod::gjanalysis
2653
namespace o2::aod
2754
{
2855

56+
// Collision level information
2957
namespace gjevent
30-
{ // TODO add rho //! event index
58+
{ //! event index
3159
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float);
3260
DECLARE_SOA_COLUMN(Centrality, centrality, float);
3361
DECLARE_SOA_COLUMN(Rho, rho, float);
@@ -39,6 +67,16 @@ DECLARE_SOA_TABLE(GjEvents, "AOD", "GJEVENT", o2::soa::Index<>, gjevent::Multipl
3967

4068
using GjEvent = GjEvents::iterator;
4169

70+
// Information about the MC collision that was matched to the reconstructed collision
71+
namespace gjmcevent
72+
{
73+
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);
74+
DECLARE_SOA_COLUMN(Weight, weight, double);
75+
DECLARE_SOA_COLUMN(Rho, rho, float); // gen level rho
76+
DECLARE_SOA_COLUMN(IsMultipleAssigned, isMultipleAssigned, bool); // if the corresponding MC collision matched to this rec collision was also matched to other rec collisions (allows to skip those on analysis level )
77+
} // namespace gjmcevent
78+
DECLARE_SOA_TABLE(GjMCEvents, "AOD", "GJMCEVENT", gjmcevent::GjEventId, gjmcevent::Weight, gjmcevent::Rho, gjmcevent::IsMultipleAssigned)
79+
// Information about EMCal clusters
4280
namespace gjgamma
4381
{
4482
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent); //! event index
@@ -61,9 +99,32 @@ DECLARE_SOA_COLUMN(TMtrackP, tmtrackp, float); //! track
6199
} // namespace gjgamma
62100
DECLARE_SOA_TABLE(GjGammas, "AOD", "GJGAMMA",
63101
gjgamma::GjEventId, gjgamma::Energy, gjgamma::Definition, gjgamma::Eta, gjgamma::Phi, gjgamma::M02, gjgamma::M20, gjgamma::NCells, gjgamma::Time, gjgamma::IsExotic, gjgamma::DistanceToBadChannel, gjgamma::NLM, gjgamma::IsoRaw, gjgamma::PerpConeRho, gjgamma::TMdeltaPhi, gjgamma::TMdeltaEta, gjgamma::TMtrackP)
64-
namespace gjchjet
102+
103+
// MC information for reconstructed EMCal clusters
104+
namespace gjgammamcinfo
105+
{
106+
DECLARE_SOA_COLUMN(Origin, origin, uint16_t);
107+
DECLARE_SOA_COLUMN(LeadingEnergyFraction, leadingEnergyFraction, float); // fraction of energy from the leading MC particle
108+
} // namespace gjgammamcinfo
109+
DECLARE_SOA_TABLE(GjGammaMCInfos, "AOD", "GJGAMMAMCINFO", gjgamma::GjEventId, gjgammamcinfo::Origin, gjgammamcinfo::LeadingEnergyFraction)
110+
111+
// Generator level particle information from the MC collision that was matched to the reconstructed collision
112+
namespace gjmcparticle
65113
{
66114
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);
115+
DECLARE_SOA_COLUMN(Energy, energy, float);
116+
DECLARE_SOA_COLUMN(Eta, eta, float);
117+
DECLARE_SOA_COLUMN(Phi, phi, float);
118+
DECLARE_SOA_COLUMN(Pt, pt, float);
119+
DECLARE_SOA_COLUMN(PdgCode, pdgCode, ushort); // TODO also add smoe origin of particle? maybe only save original pi0 and eta and photon (not decay photons)
120+
DECLARE_SOA_COLUMN(MCIsolation, mcIsolation, float); // isolation in cone on mc gen level
121+
DECLARE_SOA_COLUMN(Origin, origin, uint16_t); // origin of particle
122+
} // namespace gjmcparticle
123+
DECLARE_SOA_TABLE(GjMCParticles, "AOD", "GJMCPARTICLE", gjmcparticle::GjEventId, gjmcparticle::Energy, gjmcparticle::Eta, gjmcparticle::Phi, gjmcparticle::Pt, gjmcparticle::PdgCode, gjmcparticle::MCIsolation, gjmcparticle::Origin)
124+
125+
// Reconstructed charged jet information
126+
namespace gjchjet
127+
{
67128
DECLARE_SOA_COLUMN(Pt, pt, float);
68129
DECLARE_SOA_COLUMN(Eta, eta, float);
69130
DECLARE_SOA_COLUMN(Phi, phi, float);
@@ -75,7 +136,30 @@ DECLARE_SOA_COLUMN(LeadingTrackPt, leadingtrackpt, float);
75136
DECLARE_SOA_COLUMN(PerpConeRho, perpconerho, float);
76137
DECLARE_SOA_COLUMN(NConstituents, nConstituents, ushort);
77138
} // namespace gjchjet
78-
DECLARE_SOA_TABLE(GjChargedJets, "AOD", "GJCHJET", gjchjet::GjEventId, gjchjet::Pt, gjchjet::Eta, gjchjet::Phi, gjchjet::Radius, gjchjet::Energy, gjchjet::Mass, gjchjet::Area, gjchjet::LeadingTrackPt, gjchjet::PerpConeRho, gjchjet::NConstituents)
139+
DECLARE_SOA_TABLE(GjChargedJets, "AOD", "GJCHJET", gjgamma::GjEventId, gjchjet::Pt, gjchjet::Eta, gjchjet::Phi, gjchjet::Radius, gjchjet::Energy, gjchjet::Mass, gjchjet::Area, gjchjet::LeadingTrackPt, gjchjet::PerpConeRho, gjchjet::NConstituents)
140+
141+
// MC information for reconstructed charged jet
142+
namespace gjchjetmcinfo
143+
{
144+
DECLARE_SOA_COLUMN(MatchedJetIndexGeo, matchedJetIndexGeo, int);
145+
DECLARE_SOA_COLUMN(MatchedJetIndexPt, matchedJetIndexPt, int);
146+
} // namespace gjchjetmcinfo
147+
DECLARE_SOA_TABLE(GjChJetMCInfos, "AOD", "GJCHJETMCINFO", gjgamma::GjEventId, gjchjetmcinfo::MatchedJetIndexGeo, gjchjetmcinfo::MatchedJetIndexPt)
148+
149+
// MC information for generator level jets of associated MC collision
150+
namespace gjmcjet
151+
{
152+
DECLARE_SOA_COLUMN(Pt, pt, float);
153+
DECLARE_SOA_COLUMN(Eta, eta, float);
154+
DECLARE_SOA_COLUMN(Phi, phi, float);
155+
DECLARE_SOA_COLUMN(Radius, radius, float);
156+
DECLARE_SOA_COLUMN(Energy, energy, float);
157+
DECLARE_SOA_COLUMN(Mass, mass, float);
158+
DECLARE_SOA_COLUMN(Area, area, float);
159+
DECLARE_SOA_COLUMN(PerpConeRho, perpconerho, float);
160+
} // namespace gjmcjet
161+
DECLARE_SOA_TABLE(GjMCJets, "AOD", "GJMCJET", gjgamma::GjEventId, gjmcjet::Pt, gjmcjet::Eta, gjmcjet::Phi, gjmcjet::Radius, gjmcjet::Energy, gjmcjet::Mass, gjmcjet::Area, gjmcjet::PerpConeRho)
162+
79163
} // namespace o2::aod
80164

81165
#endif // PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_

0 commit comments

Comments
 (0)