Skip to content
Open
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
13 changes: 12 additions & 1 deletion PWGEM/Dilepton/TableProducer/filterEoI.cxx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.

Check failure on line 1 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/workflow-file]

Name of a workflow file must match the name of the main struct in it (without the PWG prefix). (Class implementation files should be in "Core" directories.)

Check failure on line 1 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Specify task name only when it cannot be derived from the struct name. Only append to the default name.
// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
// All rights not expressly granted are reserved.
//
Expand Down Expand Up @@ -117,7 +117,7 @@
}
if constexpr (static_cast<bool>(system & kElectronFromDalitz)) {
auto electronsda_coll = electronsda.sliceBy(perCollision_elda, collision.globalIndex());
if (electronsda_coll.size() >= 2) {

Check failure on line 120 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
does_electronda_exist = true;
}
}
Expand All @@ -135,7 +135,11 @@
fRegistry.fill(HIST("hEventCounter"), 8);
}

emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
if constexpr (static_cast<bool>(system & kPCM) && static_cast<bool>(system & kElectronFromDalitz)) {
emeoi(does_pcm_exist && does_electronda_exist);
} else {
emeoi(does_electron_exist || does_fwdmuon_exist || does_pcm_exist || does_electronda_exist);
}

} // end of collision loop

Expand Down Expand Up @@ -171,6 +175,12 @@
selectEoI<sysflag>(collisions, electrons, muons, v0s, nullptr);
}

void process_ElectronFromDalitz(aod::Collisions const& collisions, aod::EMPrimaryElectronsFromDalitz const& electronsda)
{
const uint8_t sysflag = kElectronFromDalitz;
selectEoI<sysflag>(collisions, nullptr, nullptr, nullptr, electronsda);
}

void process_PCM_ElectronFromDalitz(aod::Collisions const& collisions, aod::V0PhotonsKF const& v0s, aod::EMPrimaryElectronsFromDalitz const& electronsda)
{
const uint8_t sysflag = kPCM | kElectronFromDalitz;
Expand All @@ -189,10 +199,11 @@
PROCESS_SWITCH(filterEoI, process_PCM, "create filter bit for PCM", false);
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon, "create filter bit for Electron, FwdMuon", false);
PROCESS_SWITCH(filterEoI, process_Electron_FwdMuon_PCM, "create filter bit for Electron, FwdMuon, PCM", false);
PROCESS_SWITCH(filterEoI, process_ElectronFromDalitz, "create filter bit for ElectronFromDalitz", false);
PROCESS_SWITCH(filterEoI, process_PCM_ElectronFromDalitz, "create filter bit for PCM, ElectronFromDalitz", false);
PROCESS_SWITCH(filterEoI, processDummy, "processDummy", true);
};
WorkflowSpec defineDataProcessing(ConfigContext const& cfgc)
{
return WorkflowSpec{adaptAnalysisTask<filterEoI>(cfgc, TaskName{"filter-eoi"})};

Check failure on line 208 in PWGEM/Dilepton/TableProducer/filterEoI.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[name/o2-task]

Device names filter-eoi and filter-eo-i generated from the specified task name filter-eoi and from the struct name filterEoI, respectively, differ in hyphenation. Consider fixing capitalisation of the struct name to FilterEoi and removing TaskName.
}
107 changes: 107 additions & 0 deletions PWGEM/PhotonMeson/DataModel/gammaTables.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@

namespace v0legmclabel
{
DECLARE_SOA_INDEX_COLUMN(EMMCParticle, emmcparticle); //!

Check failure on line 89 in PWGEM/PhotonMeson/DataModel/gammaTables.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(McMask, mcMask, uint16_t);
} // namespace v0legmclabel

Expand Down Expand Up @@ -115,7 +115,7 @@

namespace ememcclustermclabel
{
DECLARE_SOA_ARRAY_INDEX_COLUMN(EMMCParticle, emmcparticle); //! Array of indice of EmMcParticles

Check failure on line 118 in PWGEM/PhotonMeson/DataModel/gammaTables.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(Amplitude, amplitude, std::vector<float>); //! vector of aplitudes stored in cluster. Ordering is identical to the ordering of EMMCParticleId
} // namespace ememcclustermclabel

Expand Down Expand Up @@ -144,7 +144,7 @@
DECLARE_SOA_DYNAMIC_COLUMN(Tgl, tgl, [](float px, float py, float pz) -> float { return std::tan(o2::constants::math::PIHalf - 2 * std::atan(std::exp(-RecoDecay::eta(std::array{px, py, pz})))); });
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITS, meanClusterSizeITS, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 7; layer++) {

Check failure on line 147 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -158,7 +158,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSib, meanClusterSizeITSib, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 0; layer < 3; layer++) {

Check failure on line 161 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand All @@ -172,7 +172,7 @@
});
DECLARE_SOA_DYNAMIC_COLUMN(MeanClusterSizeITSob, meanClusterSizeITSob, [](uint32_t itsClusterSizes) -> float {
int total_cluster_size = 0, nl = 0;
for (unsigned int layer = 3; layer < 7; layer++) {

Check failure on line 175 in PWGEM/PhotonMeson/DataModel/gammaTables.h

View workflow job for this annotation

GitHub Actions / O2 linter

[magic-number]

Avoid magic numbers in expressions. Assign the value to a clearly named variable or constant.
int cluster_size_per_layer = (itsClusterSizes >> (layer * 4)) & 0xf;
if (cluster_size_per_layer > 0) {
nl++;
Expand Down Expand Up @@ -242,19 +242,59 @@
// iterators
using V0Leg = V0Legs::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE(V0LegsTmp, "AOD", "V0LEGTMP", //!
o2::soa::Index<>, v0leg::CollisionId, v0leg::TrackId, v0leg::Sign,
v0leg::Px, v0leg::Py, v0leg::Pz,
track::DcaXY, track::DcaZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
track::ITSClusterSizes, track::ITSChi2NCl, track::DetectorMap,

// dynamic column
v0leg::P<v0leg::Px, v0leg::Py, v0leg::Pz>,
v0leg::Pt<v0leg::Px, v0leg::Py>,
v0leg::Eta<v0leg::Px, v0leg::Py, v0leg::Pz>,
v0leg::Phi<v0leg::Px, v0leg::Py>,
v0leg::Tgl<v0leg::Px, v0leg::Py, v0leg::Pz>,

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>,
v0leg::MeanClusterSizeITS<track::ITSClusterSizes>,
v0leg::MeanClusterSizeITSib<track::ITSClusterSizes>,
v0leg::MeanClusterSizeITSob<track::ITSClusterSizes>);
// iterators
using V0LegTmp = V0LegsTmp::iterator;

DECLARE_SOA_TABLE_VERSIONED(V0LegsXYZ_000, "AOD", "V0LEGXYZ", 0, track::X, track::Y, track::Z);
using V0LegsXYZ = V0LegsXYZ_000;
// iterators
using V0LegXYZ = V0LegsXYZ::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE(V0LegsXYZTmp, "AOD", "V0LEGXYZTMP", track::X, track::Y, track::Z);
// iterators
using V0LegXYZTmp = V0LegsXYZTmp::iterator;

DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMC_000, "AOD", "V0LEGDEDXMC", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
using V0LegsDeDxMC = V0LegsDeDxMC_000;
// iterators
using V0LegDeDxMC = V0LegsDeDxMC::iterator;

// copy of V0Legs table
DECLARE_SOA_TABLE_VERSIONED(V0LegsDeDxMCTmp, "AOD", "V0LEGDEDXMCTMP", 0, mcpidtpc::DeDxTunedMc, o2::soa::Marker<2>);
// iterators
using V0LegDeDxMCTmp = V0LegsDeDxMCTmp::iterator;

namespace emevent
{
DECLARE_SOA_COLUMN(NgPCM, ngpcm, int);

Check failure on line 297 in PWGEM/PhotonMeson/DataModel/gammaTables.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, float); //! Weight of the event (e.g. for JJ MCs). Set to 1 for data and non-weighted MCs.
} // namespace emevent

Expand Down Expand Up @@ -347,6 +387,27 @@
// iterators
using V0PhotonKF = V0PhotonsKF::iterator;

// Clone of V0PhotonKF table for intermediate processing needed for dalitz
DECLARE_SOA_TABLE(V0PhotonsKFTmp, "AOD", "V0PHOTONKFTMP", //!
o2::soa::Index<>, v0photonkf::CollisionId, v0photonkf::V0Id, v0photonkf::PosTrackId, v0photonkf::NegTrackId,
v0photonkf::Vx, v0photonkf::Vy, v0photonkf::Vz,
v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz,
v0photonkf::MGamma,
v0photonkf::DCAxyToPV, v0photonkf::DCAzToPV,
v0photonkf::CosPA, v0photonkf::CosPAXY, v0photonkf::CosPARZ, v0photonkf::PCA,
v0photonkf::Alpha, v0photonkf::QtArm,
v0photonkf::ChiSquareNDF,

// dynamic column
v0photonkf::E<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::Pt<v0photonkf::Px, v0photonkf::Py>,
v0photonkf::Eta<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::Phi<v0photonkf::Px, v0photonkf::Py>,
v0photonkf::P<v0photonkf::Px, v0photonkf::Py, v0photonkf::Pz>,
v0photonkf::V0Radius<v0photonkf::Vx, v0photonkf::Vy>);
// iterators
using V0PhotonKFTmp = V0PhotonsKFTmp::iterator;

DECLARE_SOA_TABLE(V0KFEMEventIds_000, "AOD", "V0KFEMEVENTID", v0photonkf::EMEventId); // To be joined with V0PhotonsKF table at analysis level.
DECLARE_SOA_TABLE_VERSIONED(V0KFEMEventIds_001, "AOD", "V0KFEMEVENTID", 1, v0photonkf::PMEventId); // To be joined with V0PhotonsKF table at analysis level.
using V0KFEMEventIds = V0KFEMEventIds_001;
Expand Down Expand Up @@ -423,6 +484,45 @@
// iterators
using EMPrimaryElectronFromDalitz = EMPrimaryElectronsFromDalitz::iterator;

// Table that is a clone of EMPrimaryELectronsFromDalitz but needed for event selection purposes
DECLARE_SOA_TABLE(EMPrimaryElectronsFromDalitzTmp, "AOD", "EMPRIMARYELDATMP", //!
o2::soa::Index<>, emprimaryelectron::CollisionId,
emprimaryelectron::TrackId, emprimaryelectron::Sign,
track::Pt, track::Eta, track::Phi, track::DcaXY, track::DcaZ, track::CYY, track::CZY, track::CZZ,
track::TPCNClsFindable, track::TPCNClsFindableMinusFound, track::TPCNClsFindableMinusCrossedRows, track::TPCNClsShared,
track::TPCChi2NCl, track::TPCInnerParam,
track::TPCSignal, pidtpc::TPCNSigmaEl, pidtpc::TPCNSigmaPi,
pidtofbeta::Beta, pidtof::TOFNSigmaEl,
track::ITSClusterSizes, track::ITSChi2NCl, track::TOFChi2, track::DetectorMap,

// 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::v001::ITSClusterMap<track::ITSClusterSizes>, track::v001::ITSNCls<track::ITSClusterSizes>, track::v001::ITSNClsInnerBarrel<track::ITSClusterSizes>,
track::TPCFractionSharedCls<track::TPCNClsShared, track::TPCNClsFindable, track::TPCNClsFindableMinusFound>,
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::Tgl<track::Eta>,
emprimaryelectron::MeanClusterSizeITS<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSib<track::ITSClusterSizes>,
emprimaryelectron::MeanClusterSizeITSob<track::ITSClusterSizes>);

// iterators
using EMPrimaryElectronFromDalitzTmp = EMPrimaryElectronsFromDalitzTmp::iterator;

// copy of EMPrimaryElectronDeDxMC to use as intermediate step for Dalitz analysis
DECLARE_SOA_TABLE(EMPrimaryElectronsDeDxMCTmp, "AOD", "EMELDEDXMCTMP", mcpidtpc::DeDxTunedMc, o2::soa::Marker<1>);
using EMPrimaryElectronsDeDxMCTmp = EMPrimaryElectronsDeDxMCTmp;
// iterators
using EMPrimaryElectronDeDxMCTmp = EMPrimaryElectronsDeDxMCTmp::iterator;

namespace emprimaryelectronda
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
Expand All @@ -445,6 +545,12 @@
// iterators
using V0PhotonsPhiVPsi = V0PhotonsPhiVPsi;

// clone for temporary table
DECLARE_SOA_TABLE(V0PhotonsPhiVPsiTmp, "AOD", "V0PHOTONPHIVTMP", //!
o2::soa::Index<>, v0photonsphivpsi::PhiV, v0photonsphivpsi::PsiPair);
// iterators
using V0PhotonsPhiVPsiTmp = V0PhotonsPhiVPsiTmp;

namespace dalitzee
{
DECLARE_SOA_INDEX_COLUMN(EMEvent, emevent); //!
Expand Down Expand Up @@ -731,6 +837,7 @@
DECLARE_SOA_TABLE(V0PhotonOmegaMBWeights, "AOD", "V0PHOTONMBW", v0photonMBweights::OmegaMBWeight); // store MB weights. To be joined with V0PhotonsKF table at analysis level.

using V0PhotonOmegaMBWeight = V0PhotonOmegaMBWeights::iterator;

} // namespace o2::aod

#endif // PWGEM_PHOTONMESON_DATAMODEL_GAMMATABLES_H_
15 changes: 15 additions & 0 deletions PWGEM/PhotonMeson/TableProducer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ o2physics_add_dpl_workflow(photon-conversion-builder
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(photon-conversion-builder-tmptable
SOURCES photonconversionbuilderTmpTable.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2::DCAFitter O2Physics::AnalysisCore O2Physics::MLCore KFParticle::KFParticle O2Physics::TPCDriftManager
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(create-emevent-photon
SOURCES createEMEventPhoton.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGJECore
Expand Down Expand Up @@ -46,6 +51,16 @@ o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-primary-electron-from-dalitzee-tmptable
SOURCES skimmerPrimaryElectronFromDalitzEETmpTable.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(skimmer-dalitz-events
SOURCES skimmerDalitzEvents.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore
COMPONENT_NAME Analysis)

o2physics_add_dpl_workflow(non-lin-producer
SOURCES nonLinProducer.cxx
PUBLIC_LINK_LIBRARIES O2::Framework O2Physics::AnalysisCore O2Physics::PWGEMPhotonMesonCore
Expand Down
Loading
Loading