Skip to content

Comments

[PWGEM] Add optional PCM material-budget weights in PCMPCM#15139

Open
yelmardb wants to merge 3 commits intoAliceO2Group:masterfrom
yelmardb:yelmard-pcmpcm-omega-mb-weights
Open

[PWGEM] Add optional PCM material-budget weights in PCMPCM#15139
yelmardb wants to merge 3 commits intoAliceO2Group:masterfrom
yelmardb:yelmard-pcmpcm-omega-mb-weights

Conversation

@yelmardb
Copy link
Contributor

Add a V0 photon material-budget weight table (Omega MB weights) and join it in the PCMPCM pi0/eta workflow. The weights are applied only when the joined column is available, using compile-time guarded access.

Introduce a configurable switch (runWithMBWeights) in MaterialBudgetWeights:

  • false: no CCDB query, write weight=1
  • true: require CCDB histogram and abort if missing

Add a V0 photon material-budget weight table (Omega MB weights) and join it
in the PCMPCM pi0/eta workflow. The weights are applied only when the joined
column is available, using compile-time guarded access.

Introduce a configurable switch (runWithMBWeights) in MaterialBudgetWeights:
- false: no CCDB query, write weight=1
- true: require CCDB histogram and abort if missing
@github-actions github-actions bot changed the title Add optional PCM material-budget weights in PCMPCM [PWGEM] Add optional PCM material-budget weights in PCMPCM Feb 24, 2026
@yelmardb yelmardb force-pushed the yelmard-pcmpcm-omega-mb-weights branch 2 times, most recently from 1a5015f to af257e1 Compare February 24, 2026 12:57
Comment on lines -229 to +234
o2::framework::PresliceOptional<o2::soa::Filtered<o2::soa::Join<o2::aod::V0PhotonsKF, o2::aod::V0KFEMEventIds, o2::aod::V0PhotonsKFPrefilterBitDerived>>> perCollision_pcm = o2::aod::v0photonkf::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::EmEmcClusters, o2::aod::EMCEMEventIds>> perCollision_emc = o2::aod::emccluster::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::PHOSClusters, o2::aod::PHOSEMEventIds>> perCollision_phos = o2::aod::phoscluster::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Filtered<o2::soa::Join<o2::aod::EMPrimaryElectronsFromDalitz, o2::aod::EMPrimaryElectronDaEMEventIds, o2::aod::EMPrimaryElectronsPrefilterBitDerived>>> perCollision_electron = o2::aod::emprimaryelectronda::emphotoneventId;

o2::framework::PresliceOptional<
o2::soa::Filtered<o2::soa::Join<o2::aod::V0PhotonsKF, o2::aod::V0KFEMEventIds, o2::aod::V0PhotonsKFPrefilterBitDerived, o2::aod::V0PhotonOmegaMBWeights>>>
perCollision_pcm = o2::aod::v0photonkf::emeventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::EmEmcClusters, o2::aod::EMCEMEventIds>> perCollision_emc = o2::aod::emccluster::emeventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::PHOSClusters, o2::aod::PHOSEMEventIds>> perCollision_phos = o2::aod::phoscluster::emeventId;
o2::framework::PresliceOptional<o2::soa::Filtered<o2::soa::Join<o2::aod::EMPrimaryElectronsFromDalitz, o2::aod::EMPrimaryElectronEMEventIds, o2::aod::EMPrimaryElectronsPrefilterBitDerived>>> perCollision_electron = o2::aod::emprimaryelectron::emeventId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure you are using the new emphotoneventId

Comment on lines +85 to +95
void process(MyV0PhotonMB const& v0)
{
if (!runWithMBWeights) {
omegaMBWeight(1.f);
return;
}

omegaMBWeight(computeMBWeight(v0.v0radius()));
}
};

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a dummyProcess function which fills the weights with 1 is needed, since the weights are now needed for all MC PCM Photon analysis technically.

Comment on lines 227 to -232
// Preslices and partitions
o2::framework::SliceCache cache;
o2::framework::PresliceOptional<o2::soa::Filtered<o2::soa::Join<o2::aod::V0PhotonsKF, o2::aod::V0KFEMEventIds, o2::aod::V0PhotonsKFPrefilterBitDerived>>> perCollision_pcm = o2::aod::v0photonkf::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::EmEmcClusters, o2::aod::EMCEMEventIds>> perCollision_emc = o2::aod::emccluster::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Join<o2::aod::PHOSClusters, o2::aod::PHOSEMEventIds>> perCollision_phos = o2::aod::phoscluster::emphotoneventId;
o2::framework::PresliceOptional<o2::soa::Filtered<o2::soa::Join<o2::aod::EMPrimaryElectronsFromDalitz, o2::aod::EMPrimaryElectronDaEMEventIds, o2::aod::EMPrimaryElectronsPrefilterBitDerived>>> perCollision_electron = o2::aod::emprimaryelectronda::emphotoneventId;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong header, the weights should be used in MC not in data

Comment on lines -29 to +30
using MyV0Photons = o2::soa::Filtered<o2::soa::Join<o2::aod::V0PhotonsKF, o2::aod::V0KFEMEventIds, o2::aod::V0PhotonsKFPrefilterBitDerived>>;
using MyV0Photons = o2::soa::Filtered<o2::soa::Join<o2::aod::V0PhotonsKF, o2::aod::V0KFEMEventIds, o2::aod::V0PhotonsKFPrefilterBitDerived, o2::aod::V0PhotonOmegaMBWeights>>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong .cxx, this should be added in MC not in data.
Also it would be good to add this to PCMDalitzee as well in one go.


Configurable<std::string> ccdbUrl{"ccdbUrl", "http://ccdb-test.cern.ch:8080", "CCDB url"};
Configurable<std::string> mbWeightsPath{"mbWeightsPath", "Users/y/yelmard/MaterialBudget/OmegaMBWeights", "Path of the mb weights"};
Configurable<bool> runWithMBWeights{"runWithMBWeights", false, "Run task using material-budget weights for PCM photons"};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

runWithMBWeights right now on false just results in an Fata error which is not caught and results in a crash.
I suggest to remove this configurable. Instead see comment below the addition of a dummy process function and process switches.
You can then use

if (doprocessName){
...
}

inside the init function to only load the histogram if the non dummy process function is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants