@@ -366,6 +366,39 @@ DECLARE_SOA_TABLE(ReducedFITs, "AOD", "REDUCEDFIT", //! FIT detector information
366366
367367using ReducedFIT = ReducedFITs::iterator;
368368
369+ namespace reducedemcal
370+ {
371+ // EMCal cluster information (from aod::EMCALClusters, see PWGJE/DataModel/EMCALClusters.h)
372+ DECLARE_SOA_INDEX_COLUMN (ReducedEvent, reducedevent); // !
373+ DECLARE_SOA_BITMAP_COLUMN (FilteringFlags, filteringFlags, 64 ); // ! Bitmap of the cluster selections
374+ DECLARE_SOA_COLUMN (Energy, energy, float ); // ! cluster energy (GeV)
375+ DECLARE_SOA_COLUMN (CoreEnergy, coreEnergy, float ); // ! cluster core energy (GeV)
376+ DECLARE_SOA_COLUMN (RawEnergy, rawEnergy, float ); // ! raw cluster energy (GeV)
377+ DECLARE_SOA_COLUMN (Eta, eta, float ); // ! cluster pseudorapidity (calculated using vertex)
378+ DECLARE_SOA_COLUMN (Phi, phi, float ); // ! cluster azimuthal angle (calculated using vertex)
379+ DECLARE_SOA_COLUMN (M02 , m02, float ); // ! shower shape long axis
380+ DECLARE_SOA_COLUMN (M20 , m20, float ); // ! shower shape short axis
381+ DECLARE_SOA_COLUMN (NCells, nCells, int ); // ! number of cells in cluster
382+ DECLARE_SOA_COLUMN (Time, time, float ); // ! cluster time (ns)
383+ DECLARE_SOA_COLUMN (IsExotic, isExotic, bool ); // ! flag to mark cluster as exotic
384+ DECLARE_SOA_COLUMN (DistanceToBadChannel, distanceToBadChannel, float ); // ! distance to bad channel
385+ DECLARE_SOA_COLUMN (NLM , nlm, int ); // ! number of local maxima
386+ DECLARE_SOA_COLUMN (Definition, definition, int ); // ! cluster definition, see EMCALClusterDefinition.h
387+ DECLARE_SOA_COLUMN (IsAmbiguous, isAmbiguous, bool ); // ! true for clusters from BCs with no or multiple collisions
388+ } // namespace reducedemcal
389+
390+ // Skimmed EMCal cluster information; standalone table (not joinable to the barrel track tables),
391+ // the matching to barrel tracks is stored as an index column in the ReducedTracksBarrelEMCal table
392+ DECLARE_SOA_TABLE (ReducedEMCals, " AOD" , " REDUCEDEMCAL" , // !
393+ o2::soa::Index<>, reducedemcal::ReducedEventId, reducedemcal::FilteringFlags,
394+ reducedemcal::Energy, reducedemcal::CoreEnergy, reducedemcal::RawEnergy,
395+ reducedemcal::Eta, reducedemcal::Phi, reducedemcal::M02 , reducedemcal::M20 ,
396+ reducedemcal::NCells, reducedemcal::Time, reducedemcal::IsExotic,
397+ reducedemcal::DistanceToBadChannel, reducedemcal::NLM , reducedemcal::Definition,
398+ reducedemcal::IsAmbiguous);
399+
400+ using ReducedEMCal = ReducedEMCals::iterator;
401+
369402namespace reducedtrack
370403{
371404// basic track information
@@ -399,6 +432,9 @@ DECLARE_SOA_DYNAMIC_COLUMN(Pz, pz, //!
399432 [](float pt, float eta) -> float { return pt * std::sinh (eta); });
400433DECLARE_SOA_DYNAMIC_COLUMN (P, p, // !
401434 [](float pt, float eta) -> float { return pt * std::cosh (eta); });
435+ DECLARE_SOA_INDEX_COLUMN (ReducedEMCal, matchedEMCalCluster); // ! matching index pointing to the ReducedEMCals table, -1 if no matched cluster
436+ DECLARE_SOA_COLUMN (EMCalMatchDeltaEta, emcalMatchDeltaEta, float ); // ! eta residual of the matched EMCal cluster w.r.t. the track
437+ DECLARE_SOA_COLUMN (EMCalMatchDeltaPhi, emcalMatchDeltaPhi, float ); // ! phi residual of the matched EMCal cluster w.r.t. the track
402438} // namespace reducedtrack
403439
404440// basic track information
@@ -447,11 +483,18 @@ DECLARE_SOA_TABLE(ReducedTracksBarrelPID, "AOD", "RTBARRELPID", //!
447483DECLARE_SOA_TABLE (ReducedTracksBarrelInfo, " AOD" , " RTBARRELINFO" ,
448484 reducedtrack::CollisionId, collision::PosX, collision::PosY, collision::PosZ, reducedtrack::TrackId);
449485
486+ // barrel track EMCal matching information (joined with ReducedTracks);
487+ // one entry per skimmed barrel track, the index is -1 for tracks without a matched cluster
488+ DECLARE_SOA_TABLE (ReducedTracksBarrelEMCal, " AOD" , " RTBARRELEMCAL" , // !
489+ reducedtrack::ReducedEMCalId,
490+ reducedtrack::EMCalMatchDeltaEta, reducedtrack::EMCalMatchDeltaPhi);
491+
450492using ReducedTrack = ReducedTracks::iterator;
451493using ReducedTrackBarrel = ReducedTracksBarrel::iterator;
452494using ReducedTrackBarrelCov = ReducedTracksBarrelCov::iterator;
453495using ReducedTrackBarrelPID = ReducedTracksBarrelPID::iterator;
454496using ReducedTrackBarrelInfo = ReducedTracksBarrelInfo::iterator;
497+ using ReducedTrackBarrelEMCal = ReducedTracksBarrelEMCal::iterator;
455498
456499namespace reducedtrackMC
457500{
0 commit comments