Skip to content
Merged
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
10 changes: 5 additions & 5 deletions PWGJE/DataModel/GammaJetAnalysisTree.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
// Information about the MC collision that was matched to the reconstructed collision
namespace gjmcevent
{
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);

Check failure on line 73 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Weight, weight, double);
DECLARE_SOA_COLUMN(Rho, rho, float); // gen level rho
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 )
Expand All @@ -79,7 +79,7 @@
// Information about EMCal clusters
namespace gjgamma
{
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent); //! event index

Check failure on line 82 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Energy, energy, float); //! cluster energy (GeV)
DECLARE_SOA_COLUMN(Definition, definition, int); //! cluster definition, see EMCALClusterDefinition.h
DECLARE_SOA_COLUMN(Eta, eta, float); //! cluster pseudorapidity (calculated using vertex)
Expand All @@ -90,12 +90,12 @@
DECLARE_SOA_COLUMN(Time, time, float); //! cluster time (ns)
DECLARE_SOA_COLUMN(IsExotic, isExotic, bool); //! flag to mark cluster as exotic
DECLARE_SOA_COLUMN(DistanceToBadChannel, distanceToBadChannel, float); //! distance to bad channel
DECLARE_SOA_COLUMN(NLM, nlm, ushort); //! number of local maxima

Check failure on line 93 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(IsoRaw, isoraw, float); //! isolation in cone not corrected for Rho

Check failure on line 94 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(PerpConeRho, perpconerho, float); //! rho in perpendicular cone

Check failure on line 95 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TMdeltaPhi, tmdeltaphi, float); //! delta phi between cluster and closest match

Check failure on line 96 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TMdeltaEta, tmdeltaeta, float); //! delta eta between cluster and closest match

Check failure on line 97 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(TMtrackP, tmtrackp, float); //! track momentum of closest match, -1 if no match found

Check failure on line 98 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
} // namespace gjgamma
DECLARE_SOA_TABLE(GjGammas, "AOD", "GJGAMMA",
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)
Expand All @@ -111,13 +111,13 @@
// Generator level particle information from the MC collision that was matched to the reconstructed collision
namespace gjmcparticle
{
DECLARE_SOA_INDEX_COLUMN(GjEvent, gjevent);

Check failure on line 114 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Energy, energy, float);
DECLARE_SOA_COLUMN(Eta, eta, float);
DECLARE_SOA_COLUMN(Phi, phi, float);
DECLARE_SOA_COLUMN(Pt, pt, float);
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)
DECLARE_SOA_COLUMN(MCIsolation, mcIsolation, float); // isolation in cone on mc gen level

Check failure on line 120 in PWGJE/DataModel/GammaJetAnalysisTree.h

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-column]

Use UpperCamelCase for names of O2 columns and matching lowerCamelCase names for their getters.
DECLARE_SOA_COLUMN(Origin, origin, uint16_t); // origin of particle
} // namespace gjmcparticle
DECLARE_SOA_TABLE(GjMCParticles, "AOD", "GJMCPARTICLE", gjmcparticle::GjEventId, gjmcparticle::Energy, gjmcparticle::Eta, gjmcparticle::Phi, gjmcparticle::Pt, gjmcparticle::PdgCode, gjmcparticle::MCIsolation, gjmcparticle::Origin)
Expand All @@ -143,11 +143,11 @@
// Jet substructure information (vectors stored per jet)
namespace gjjetsubstructure
{
DECLARE_SOA_INDEX_COLUMN(GjChargedJet, gjchargedjet); //! jet index
DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector<float>); //! energy of mother subjet at each splitting
DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector<float>); //! pt of leading subjet at each splitting
DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector<float>); //! pt of subleading subjet at each splitting
DECLARE_SOA_COLUMN(Theta, theta, std::vector<float>); //! opening angle theta at each splitting
DECLARE_SOA_INDEX_COLUMN(GjChargedJet, gjchargedjet); //! jet index
DECLARE_SOA_COLUMN(EnergyMother, energyMother, std::vector<float>); //! energy of mother subjet at each splitting
DECLARE_SOA_COLUMN(PtLeading, ptLeading, std::vector<float>); //! pt of leading subjet at each splitting
DECLARE_SOA_COLUMN(PtSubLeading, ptSubLeading, std::vector<float>); //! pt of subleading subjet at each splitting
DECLARE_SOA_COLUMN(Theta, theta, std::vector<float>); //! opening angle theta at each splitting
} // namespace gjjetsubstructure
DECLARE_SOA_TABLE(GjJetSubstructures, "AOD", "GJJETSUBSTR",
gjjetsubstructure::GjChargedJetId,
Expand Down
47 changes: 22 additions & 25 deletions PWGJE/Tasks/gammaJetTreeProducer.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
// Framework and other headers after
#include "PWGJE/Core/FastJetUtilities.h"
#include "PWGJE/Core/JetDerivedDataUtilities.h"
#include "PWGJE/Core/JetFinder.h"
#include "PWGJE/Core/JetFindingUtilities.h"
#include "PWGJE/Core/JetSubstructureUtilities.h"
#include "PWGJE/Core/JetUtilities.h"
#include "PWGJE/DataModel/EMCALClusters.h"
#include "PWGJE/DataModel/GammaJetAnalysisTree.h"
#include "PWGJE/DataModel/Jet.h"
#include "PWGJE/Core/JetFinder.h"
#include "PWGJE/Core/JetFindingUtilities.h"
#include "PWGJE/Core/JetSubstructureUtilities.h"

#include "Common/Core/RecoDecay.h"
#include "Common/Core/TrackSelection.h"
Expand Down Expand Up @@ -71,14 +71,14 @@ struct GammaJetTreeProducer {
// analysis tree
// charged jets
// photon candidates
Produces<aod::GjChargedJets> chargedJetsTable; // detector level jets
Produces<aod::GjEvents> eventsTable; // rec events
Produces<aod::GjGammas> gammasTable; // detector level clusters
Produces<aod::GjMCEvents> mcEventsTable; // mc collisions information
Produces<aod::GjMCParticles> mcParticlesTable; // gen level particles (photons and pi0)
Produces<aod::GjGammaMCInfos> gammaMCInfosTable; // detector level clusters MC information
Produces<aod::GjChJetMCInfos> chJetMCInfosTable; // detector level charged jets MC information
Produces<aod::GjMCJets> mcJetsTable; // gen level jets
Produces<aod::GjChargedJets> chargedJetsTable; // detector level jets
Produces<aod::GjEvents> eventsTable; // rec events
Produces<aod::GjGammas> gammasTable; // detector level clusters
Produces<aod::GjMCEvents> mcEventsTable; // mc collisions information
Produces<aod::GjMCParticles> mcParticlesTable; // gen level particles (photons and pi0)
Produces<aod::GjGammaMCInfos> gammaMCInfosTable; // detector level clusters MC information
Produces<aod::GjChJetMCInfos> chJetMCInfosTable; // detector level charged jets MC information
Produces<aod::GjMCJets> mcJetsTable; // gen level jets
Produces<aod::GjJetSubstructures> jetSubstructuresTable; // jet substructure observables

HistogramRegistry mHistograms{"GammaJetTreeProducerHisto"};
Expand Down Expand Up @@ -932,7 +932,7 @@ struct GammaJetTreeProducer {
if (collision.posZ() > mVertexCut) {
continue;
}
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits,true,true,rctLabel)) {
if (!jetderiveddatautilities::selectCollision(collision, eventSelectionBits, true, true, rctLabel)) {
continue;
}
if (!jetderiveddatautilities::selectTrigger(collision, triggerMaskBits)) {
Expand Down Expand Up @@ -1208,11 +1208,11 @@ struct GammaJetTreeProducer {

fastjet::ClusterSequenceArea clusterSeq(jetReclusterer.findJets(jetConstituents, jetReclustered));
jetReclustered = sorted_by_pt(jetReclustered);

if (jetReclustered.size() == 0) {
return;
}

fastjet::PseudoJet daughterSubJet = jetReclustered[0];
fastjet::PseudoJet parentSubJet1;
fastjet::PseudoJet parentSubJet2;
Expand All @@ -1231,7 +1231,7 @@ struct GammaJetTreeProducer {
// Continue with harder parent
daughterSubJet = parentSubJet1;
}

// Fill one row per jet with all splittings stored as vectors
// Pass the jet's global index to associate this substructure entry with the jet
jetSubstructuresTable(jetGlobalIndex, energyMotherVec, ptLeadingVec, ptSubLeadingVec, thetaVec);
Expand All @@ -1248,15 +1248,15 @@ struct GammaJetTreeProducer {
int32_t storedColIndex = getStoredColIndex(collision);
if (storedColIndex == -1)
return;

// build kd tree for tracks (needed for perpendicular cone rho calculation)
buildKdTree(collision, tracks);

// loop over charged jets
for (const auto& jet : chargedJets) {
// Fill jet table and get the stored jet's global index
int64_t jetGlobalIndex = fillChargedJetTable(storedColIndex, jet, tracks);

// Fill substructure table if enabled and jet was stored
if (calculateJetSubstructure && jetGlobalIndex >= 0) {
fillSubstructureTable(jetGlobalIndex, jet, tracks);
Expand All @@ -1265,9 +1265,6 @@ struct GammaJetTreeProducer {
}
PROCESS_SWITCH(GammaJetTreeProducer, processChargedJetsData, "Process charged jets", true);




Preslice<aod::JetParticles> ParticlesPerMCCollisions = aod::jmcparticle::mcCollisionId;
/// \brief Processes MC particles and fills MC particle table
/// \param collision The collision to process
Expand Down Expand Up @@ -1362,11 +1359,11 @@ struct GammaJetTreeProducer {
if (!collision.has_mcCollision()) {
return;
}

// build kd tree for mc particles (needed for perpendicular cone rho calculation)
auto particlesPerMcCollision = mcgenparticles.sliceBy(ParticlesPerMCCollisions, collision.mcCollisionId());
buildKdTree(collision, particlesPerMcCollision);

int localIndex = 0;
auto pjetsPerMcCollision = chargedJets.sliceBy(PJetsPerMCCollisions, collision.mcCollisionId());
for (const auto& pjet : pjetsPerMcCollision) {
Expand Down Expand Up @@ -1394,10 +1391,10 @@ struct GammaJetTreeProducer {
int32_t storedColIndex = getStoredColIndex(collision);
if (storedColIndex == -1)
return;

// build kd tree for tracks (needed for perpendicular cone rho calculation)
buildKdTree(collision, tracks);

// loop over charged jets
for (const auto& jet : chargedJets) {
// Fill jet table and get the stored jet's global index
Expand Down
Loading