Skip to content

Commit 563d48b

Browse files
committed
finished implementation of MC capabilities
1 parent f1d4570 commit 563d48b

File tree

2 files changed

+1128
-108
lines changed

2 files changed

+1128
-108
lines changed

PWGJE/DataModel/GammaJetAnalysisTree.h

Lines changed: 92 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,43 @@
1717
#ifndef PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_
1818
#define PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_
1919

20-
#include <Framework/ASoA.h>
21-
22-
#include <sys/types.h>
23-
24-
#include <cstdint>
20+
#include "Framework/AnalysisDataModel.h"
21+
#include "PWGJE/DataModel/EMCALClusters.h"
22+
#include "PWGJE/Core/JetDerivedDataUtilities.h"
23+
#include "PWGJE/DataModel/Jet.h"
2524

25+
namespace o2::aod::gjanalysis{
26+
enum class ClusterOrigin{
27+
kUnknown = 0,
28+
kPhoton, // dominant amount of energy from the cluster is from a photon
29+
kPromptPhoton,
30+
kDirectPromptPhoton,
31+
kFragmentationPhoton,
32+
kDecayPhoton, // the particle that produced the cluster is a decay product
33+
kDecayPhotonPi0, // the cluster was produced by a pi0 decay
34+
kDecayPhotonEta, // the cluster was produced by a eta decay
35+
kMergedPi0, // the cluster was produced by a merged pi0, i.e. two photons contribute to the cluster that both come from pi0 decay
36+
kMergedEta, // the cluster was produced by a merged eta, i.e. two photons contribute to the cluster that both come from eta decay
37+
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
38+
};
39+
enum class ParticleOrigin{
40+
kUnknown = 0,
41+
kPromptPhoton,
42+
kDirectPromptPhoton,
43+
kFragmentationPhoton,
44+
kDecayPhoton,
45+
kDecayPhotonPi0,
46+
kDecayPhotonEta,
47+
kDecayPhotonOther,
48+
kPi0
49+
};
50+
}
2651
namespace o2::aod
2752
{
2853

54+
// Collision level information
2955
namespace gjevent
30-
{ // TODO add rho //! event index
56+
{ //! event index
3157
DECLARE_SOA_COLUMN(Multiplicity, multiplicity, float);
3258
DECLARE_SOA_COLUMN(Centrality, centrality, float);
3359
DECLARE_SOA_COLUMN(Rho, rho, float);
@@ -39,6 +65,16 @@ DECLARE_SOA_TABLE(GjEvents, "AOD", "GJEVENT", o2::soa::Index<>, gjevent::Multipl
3965

4066
using GjEvent = GjEvents::iterator;
4167

68+
// Information about the MC collision that was matched to the reconstructed collision
69+
namespace gjmcevent
70+
{
71+
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);
72+
DECLARE_SOA_COLUMN(Weight, weight, double);
73+
DECLARE_SOA_COLUMN(Rho, rho, float); // gen level rho
74+
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 )
75+
} // namespace gjmcevent
76+
DECLARE_SOA_TABLE(GjMCEvents, "AOD", "GJMCEVENT", gjmcevent::GjEventId, gjmcevent::Weight, gjmcevent::Rho, gjmcevent::IsMultipleAssigned)
77+
// Information about EMCal clusters
4278
namespace gjgamma
4379
{
4480
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent); //! event index
@@ -61,9 +97,33 @@ DECLARE_SOA_COLUMN(TMtrackP, tmtrackp, float); //! track
6197
} // namespace gjgamma
6298
DECLARE_SOA_TABLE(GjGammas, "AOD", "GJGAMMA",
6399
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
100+
101+
// MC information for reconstructed EMCal clusters
102+
namespace gjgammamcinfo
103+
{
104+
DECLARE_SOA_COLUMN(Origin, origin, uint16_t);
105+
DECLARE_SOA_COLUMN(LeadingEnergyFraction, leadingEnergyFraction, float); // fraction of energy from the leading MC particle
106+
} // namespace gjgammamcinfo
107+
DECLARE_SOA_TABLE(GjGammaMCInfos, "AOD", "GJGAMMAMCINFO", gjgamma::GjEventId, gjgammamcinfo::Origin, gjgammamcinfo::LeadingEnergyFraction)
108+
109+
110+
// Generator level particle information from the MC collision that was matched to the reconstructed collision
111+
namespace gjmcparticle
65112
{
66113
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);
114+
DECLARE_SOA_COLUMN(Energy, energy, float);
115+
DECLARE_SOA_COLUMN(Eta, eta, float);
116+
DECLARE_SOA_COLUMN(Phi, phi, float);
117+
DECLARE_SOA_COLUMN(Pt, pt, float);
118+
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)
119+
DECLARE_SOA_COLUMN(MCIsolation, mcIsolation, float); // isolation in cone on mc gen level
120+
DECLARE_SOA_COLUMN(Origin, origin, uint16_t); // origin of particle
121+
}
122+
DECLARE_SOA_TABLE(GjMCParticles, "AOD", "GJMCPARTICLE", gjmcparticle::GjEventId, gjmcparticle::Energy, gjmcparticle::Eta, gjmcparticle::Phi, gjmcparticle::Pt, gjmcparticle::PdgCode, gjmcparticle::MCIsolation, gjmcparticle::Origin)
123+
124+
// Reconstructed charged jet information
125+
namespace gjchjet
126+
{
67127
DECLARE_SOA_COLUMN(Pt, pt, float);
68128
DECLARE_SOA_COLUMN(Eta, eta, float);
69129
DECLARE_SOA_COLUMN(Phi, phi, float);
@@ -75,7 +135,30 @@ DECLARE_SOA_COLUMN(LeadingTrackPt, leadingtrackpt, float);
75135
DECLARE_SOA_COLUMN(PerpConeRho, perpconerho, float);
76136
DECLARE_SOA_COLUMN(NConstituents, nConstituents, ushort);
77137
} // 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)
138+
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)
139+
140+
// MC information for reconstructed charged jet
141+
namespace gjchjetmcinfo
142+
{
143+
DECLARE_SOA_COLUMN(MatchedJetIndexGeo, matchedJetIndexGeo, int);
144+
DECLARE_SOA_COLUMN(MatchedJetIndexPt, matchedJetIndexPt, int);
145+
} // namespace gjchjetmcinfo
146+
DECLARE_SOA_TABLE(GjChJetMCInfos, "AOD", "GJCHJETMCINFO", gjgamma::GjEventId, gjchjetmcinfo::MatchedJetIndexGeo, gjchjetmcinfo::MatchedJetIndexPt)
147+
148+
// MC information for generator level jets of associated MC collision
149+
namespace gjmcjet
150+
{
151+
DECLARE_SOA_COLUMN(Pt, pt, float);
152+
DECLARE_SOA_COLUMN(Eta, eta, float);
153+
DECLARE_SOA_COLUMN(Phi, phi, float);
154+
DECLARE_SOA_COLUMN(Radius, radius, float);
155+
DECLARE_SOA_COLUMN(Energy, energy, float);
156+
DECLARE_SOA_COLUMN(Mass, mass, float);
157+
DECLARE_SOA_COLUMN(Area, area, float);
158+
DECLARE_SOA_COLUMN(PerpConeRho, perpconerho, float);
159+
} // namespace gjmcjet
160+
DECLARE_SOA_TABLE(GjMCJets, "AOD", "GJMCJET", gjgamma::GjEventId, gjmcjet::Pt, gjmcjet::Eta, gjmcjet::Phi, gjmcjet::Radius, gjmcjet::Energy, gjmcjet::Mass, gjmcjet::Area, gjmcjet::PerpConeRho)
161+
79162
} // namespace o2::aod
80163

81-
#endif // PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_
164+
#endif // PWGJE_DATAMODEL_GAMMAJETANALYSISTREE_H_

0 commit comments

Comments
 (0)