[PWGEM] Add optional PCM material-budget weights in PCMPCM#15139
[PWGEM] Add optional PCM material-budget weights in PCMPCM#15139yelmardb wants to merge 3 commits intoAliceO2Group:masterfrom
Conversation
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
1a5015f to
af257e1
Compare
af257e1 to
9476160
Compare
| 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; |
There was a problem hiding this comment.
Please make sure you are using the new emphotoneventId
| void process(MyV0PhotonMB const& v0) | ||
| { | ||
| if (!runWithMBWeights) { | ||
| omegaMBWeight(1.f); | ||
| return; | ||
| } | ||
|
|
||
| omegaMBWeight(computeMBWeight(v0.v0radius())); | ||
| } | ||
| }; | ||
|
|
There was a problem hiding this comment.
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.
| // 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; |
There was a problem hiding this comment.
Wrong header, the weights should be used in MC not in data
| 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>>; |
There was a problem hiding this comment.
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"}; |
There was a problem hiding this comment.
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.
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: