Skip to content

Commit

Permalink
PWGEM/Dilepton: update event and electron table and add 2 converters (A…
Browse files Browse the repository at this point in the history
  • Loading branch information
dsekihat authored Oct 29, 2024
1 parent 45ffe43 commit d1642fb
Show file tree
Hide file tree
Showing 14 changed files with 205 additions and 420 deletions.
42 changes: 40 additions & 2 deletions PWGEM/Dilepton/DataModel/dileptonTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,17 @@ DECLARE_SOA_DYNAMIC_COLUMN(EP4BNeg, ep4bneg, [](float q4x, float q4y) -> float {
DECLARE_SOA_DYNAMIC_COLUMN(EP4BTot, ep4btot, [](float q4x, float q4y) -> float { return std::atan2(q4y, q4x) / 4.0; });
} // namespace emevent

DECLARE_SOA_TABLE(EMEvents, "AOD", "EMEVENT", //! Main event information table
DECLARE_SOA_TABLE(EMEvents_000, "AOD", "EMEVENT", //! Main event information table
o2::soa::Index<>, emevent::CollisionId, bc::RunNumber, bc::GlobalBC, evsel::Alias, evsel::Selection, timestamp::Timestamp,
collision::PosX, collision::PosY, collision::PosZ,
collision::NumContrib, evsel::NumTracksInTimeRange, emevent::Sel8<evsel::Selection>);

DECLARE_SOA_TABLE_VERSIONED(EMEvents_001, "AOD", "EMEVENT", 1, //! Main event information table
o2::soa::Index<>, emevent::CollisionId, bc::RunNumber, bc::GlobalBC, evsel::Alias, evsel::Selection, timestamp::Timestamp,
collision::PosX, collision::PosY, collision::PosZ,
collision::NumContrib, evsel::NumTracksInTimeRange, evsel::SumAmpFT0CInTimeRange, emevent::Sel8<evsel::Selection>);

using EMEvents = EMEvents_001;
using EMEvent = EMEvents::iterator;

DECLARE_SOA_TABLE(EMEventsCov, "AOD", "EMEVENTCOV", //! joinable to EMEvents
Expand Down Expand Up @@ -414,7 +421,7 @@ DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32
}
});
} // namespace emprimaryelectron
DECLARE_SOA_TABLE(EMPrimaryElectrons, "AOD", "EMPRIMARYEL", //!
DECLARE_SOA_TABLE(EMPrimaryElectrons_000, "AOD", "EMPRIMARYEL", //!
o2::soa::Index<>, emprimaryelectron::CollisionId,
emprimaryelectron::TrackId, emprimaryelectron::Sign,
track::Pt, track::Eta, track::Phi, track::DcaXY, track::DcaZ,
Expand Down Expand Up @@ -442,6 +449,37 @@ DECLARE_SOA_TABLE(EMPrimaryElectrons, "AOD", "EMPRIMARYEL", //!
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

DECLARE_SOA_TABLE_VERSIONED(EMPrimaryElectrons_001, "AOD", "EMPRIMARYEL", 1, //!
o2::soa::Index<>, emprimaryelectron::CollisionId,
emprimaryelectron::TrackId, emprimaryelectron::Sign,
track::Pt, track::Eta, track::Phi, track::DcaXY, track::DcaZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaMu, pidtpc::TPCNSigmaPi, pidtpc::TPCNSigmaKa, pidtpc::TPCNSigmaPr,
pidtofbeta::Beta, pidtof::TOFNSigmaEl, pidtof::TOFNSigmaMu, pidtof::TOFNSigmaPi, pidtof::TOFNSigmaKa, pidtof::TOFNSigmaPr,
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap,
track::X, track::Alpha, track::Y, track::Z, track::Snp, track::Tgl, emprimaryelectron::IsAssociatedToMPC,

// dynamic column
track::TPCNClsFound<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCNClsCrossedRows<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCCrossedRowsOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusCrossedRows>,
track::TPCFoundOverFindableCls<track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
track::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::HasITS<track::DetectorMap>, track::HasTPC<track::DetectorMap>, track::HasTRD<track::DetectorMap>, track::HasTOF<track::DetectorMap>,
emprimaryelectron::Signed1Pt<track::Pt, emprimaryelectron::Sign>,
emprimaryelectron::P<track::Pt, track::Eta>,
emprimaryelectron::Px<track::Pt, track::Phi>,
emprimaryelectron::Py<track::Pt, track::Phi>,
emprimaryelectron::Pz<track::Pt, track::Eta>,
emprimaryelectron::Theta<track::Tgl>,
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

using EMPrimaryElectrons = EMPrimaryElectrons_001;
// iterators
using EMPrimaryElectron = EMPrimaryElectrons::iterator;

Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/DataModel/lmeeMLTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ DECLARE_SOA_TABLE(EMPrimaryTracks, "AOD", "EMPTRACK", //!
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaMu, pidtpc::TPCNSigmaPi, pidtpc::TPCNSigmaKa, pidtpc::TPCNSigmaPr,
pidtofbeta::Beta, pidtof::TOFNSigmaEl, pidtof::TOFNSigmaMu, pidtof::TOFNSigmaPi, pidtof::TOFNSigmaKa, pidtof::TOFNSigmaPr,
track::ITSClusterSizes, track::ITSChi2NCl, track::DetectorMap, emprimarytrack::PIDLabel, emprimarytrack::TrackType,
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap, emprimarytrack::PIDLabel, emprimarytrack::TrackType,

// dynamic column
emprimarytrack::P<track::Pt, track::Eta>,
Expand Down
5 changes: 0 additions & 5 deletions PWGEM/Dilepton/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,6 @@ o2physics_add_dpl_workflow(dielectron-ml
PUBLIC_LINK_LIBRARIES O2Physics::AnalysisCore O2Physics::MLCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(tree-creator-single-electron-qa
SOURCES treeCreatorSingleElectronQA.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-primary-electron
SOURCES skimmerPrimaryElectron.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/createEMEventDilepton.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ struct CreateEMEventDilepton {

event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), collision.alias_raw(), collision.selection_raw(), bc.timestamp(),
collision.posX(), collision.posY(), collision.posZ(),
collision.numContrib(), collision.trackOccupancyInTimeRange());
collision.numContrib(), collision.trackOccupancyInTimeRange(), collision.ft0cOccupancyInTimeRange());

// eventcov(collision.covXX(), collision.covXY(), collision.covXZ(), collision.covYY(), collision.covYZ(), collision.covZZ(), collision.chi2());

Expand Down
4 changes: 2 additions & 2 deletions PWGEM/Dilepton/TableProducer/filterDielectronEvent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ struct filterDielectronEvent {
track.tpcChi2NCl(), track.tpcInnerParam(),
track.tpcSignal(), track.tpcNSigmaEl(), track.tpcNSigmaMu(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
track.beta(), track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.itsClusterSizes(), track.itsChi2NCl(), track.detectorMap(),
track.itsClusterSizes(), track.itsChi2NCl(), track.tofChi2(), track.detectorMap(),
track_par_cov_recalc.getX(), track_par_cov_recalc.getAlpha(), track_par_cov_recalc.getY(), track_par_cov_recalc.getZ(), track_par_cov_recalc.getSnp(), track_par_cov_recalc.getTgl(), isAssociatedToMPC);

emprimaryelectronscov(
Expand Down Expand Up @@ -1214,7 +1214,7 @@ struct createEMEvent2VP {

event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), collision.alias_raw(), collision.selection_raw(), bc.timestamp(),
collision.posX(), collision.posY(), collision.posZ(),
collision.numContrib(), collision.trackOccupancyInTimeRange());
collision.numContrib(), collision.trackOccupancyInTimeRange(), collision.ft0cOccupancyInTimeRange());

// eventcov(collision.covXX(), collision.covXY(), collision.covXZ(), collision.covYY(), collision.covYZ(), collision.covZZ(), collision.chi2());

Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/skimmerPrimaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ struct skimmerPrimaryElectron {
track.tpcChi2NCl(), track.tpcInnerParam(),
track.tpcSignal(), track.tpcNSigmaEl(), track.tpcNSigmaMu(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
track.beta(), track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.itsClusterSizes(), track.itsChi2NCl(), track.detectorMap(),
track.itsClusterSizes(), track.itsChi2NCl(), track.tofChi2(), track.detectorMap(),
track_par_cov_recalc.getX(), track_par_cov_recalc.getAlpha(), track_par_cov_recalc.getY(), track_par_cov_recalc.getZ(), track_par_cov_recalc.getSnp(), track_par_cov_recalc.getTgl(), isAssociatedToMPC);

emprimaryelectronscov(
Expand Down
6 changes: 3 additions & 3 deletions PWGEM/Dilepton/TableProducer/skimmerSecondaryElectron.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ struct skimmerSecondaryElectron {
track.tpcChi2NCl(), track.tpcInnerParam(),
track.tpcSignal(), track.tpcNSigmaEl(), track.tpcNSigmaMu(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
track.beta(), track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.itsClusterSizes(), track.itsChi2NCl(), track.detectorMap(),
track.itsClusterSizes(), track.itsChi2NCl(), track.tofChi2(), track.detectorMap(),
track_par_cov_recalc.getX(), track_par_cov_recalc.getAlpha(), track_par_cov_recalc.getY(), track_par_cov_recalc.getZ(), track_par_cov_recalc.getSnp(), track_par_cov_recalc.getTgl(), isAssociatedToMPC);

emprimaryelectronscov(
Expand Down Expand Up @@ -378,7 +378,7 @@ struct skimmerSecondaryElectron {

event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), collision.alias_raw(), collision.selection_raw(), bc.timestamp(),
collision.posX(), collision.posY(), collision.posZ(),
collision.numContrib(), collision.trackOccupancyInTimeRange());
collision.numContrib(), collision.trackOccupancyInTimeRange(), collision.ft0cOccupancyInTimeRange());
event_mult(collision.multFT0A(), collision.multFT0C(), collision.multNTracksPV(), collision.multNTracksPVeta1(), collision.multNTracksPVetaHalf());
event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C());
} // end of collision loop
Expand Down Expand Up @@ -439,7 +439,7 @@ struct skimmerSecondaryElectron {

event(collision.globalIndex(), bc.runNumber(), bc.globalBC(), collision.alias_raw(), collision.selection_raw(), bc.timestamp(),
collision.posX(), collision.posY(), collision.posZ(),
collision.numContrib(), collision.trackOccupancyInTimeRange());
collision.numContrib(), collision.trackOccupancyInTimeRange(), collision.ft0cOccupancyInTimeRange());
event_mult(collision.multFT0A(), collision.multFT0C(), collision.multNTracksPV(), collision.multNTracksPVeta1(), collision.multNTracksPVetaHalf());
event_cent(collision.centFT0M(), collision.centFT0A(), collision.centFT0C());
} // end of collision loop
Expand Down
2 changes: 1 addition & 1 deletion PWGEM/Dilepton/TableProducer/treeCreatorElectronMLDDA.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ struct TreeCreatorElectronMLDDA {
track.tpcChi2NCl(), track.tpcInnerParam(),
track.tpcSignal(), track.tpcNSigmaEl(), track.tpcNSigmaMu(), track.tpcNSigmaPi(), track.tpcNSigmaKa(), track.tpcNSigmaPr(),
track.beta(), track.tofNSigmaEl(), track.tofNSigmaMu(), track.tofNSigmaPi(), track.tofNSigmaKa(), track.tofNSigmaPr(),
track.itsClusterSizes(), track.itsChi2NCl(), track.detectorMap(), pidlabel, tracktype);
track.itsClusterSizes(), track.itsChi2NCl(), track.tofChi2(), track.detectorMap(), pidlabel, tracktype);
stored_trackIds.emplace_back(track.globalIndex());
}
}
Expand Down
Loading

0 comments on commit d1642fb

Please sign in to comment.