Skip to content

PWGLF: Change in derivedcascadeanalysis.cxx#6028

Merged
mbombara merged 1 commit into
AliceO2Group:masterfrom
lhusova:Casc_configurables
May 10, 2024
Merged

PWGLF: Change in derivedcascadeanalysis.cxx#6028
mbombara merged 1 commit into
AliceO2Group:masterfrom
lhusova:Casc_configurables

Conversation

@lhusova

@lhusova lhusova commented May 7, 2024

Copy link
Copy Markdown
Collaborator

add configurables for filling histograms

@mbombara mbombara merged commit 4ecf524 into AliceO2Group:master May 10, 2024
auto negeta = RecoDecay::eta(std::array{casc.pxneg(), casc.pyneg(), casc.pzneg()});
auto bacheta = RecoDecay::eta(std::array{casc.pxbach(), casc.pybach(), casc.pzbach()});

auto fullMomentumPosDaugh = TMath::Sqrt(TMath::Power(casc.pxpos(), 2) + TMath::Power(casc.pypos(), 2) + TMath::Power(casc.pzpos(), 2));

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

If you define auto pVecPos = std::array{casc.pxpos(), casc.pypos(), casc.pzpos()}, you can directly use

auto poseta = RecoDecay::eta(pVecPos);
auto fullMomentumPosDaugh = RecoDecay::p(pVecPos);

Even better would be to add a dynamic column that returns std::array{casc.pxpos(), casc.pypos(), casc.pzpos()}.
See

DECLARE_SOA_DYNAMIC_COLUMN(PVectorProng0, pVectorProng0, //!
[](float px, float py, float pz) -> std::array<float, 3> { return std::array{px, py, pz}; });

hahassan7 pushed a commit to hahassan7/O2Physics that referenced this pull request May 17, 2024
Co-authored-by: Lucia Anna Tarasovicova <lucia.anna.husova@cern.ch>
@lhusova lhusova deleted the Casc_configurables branch August 14, 2024 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants