Skip to content

[PWGHF/HFL] Calculate mass of Zee#10153

Merged
vkucera merged 32 commits intoAliceO2Group:masterfrom
sashingo:master
Mar 5, 2025
Merged

[PWGHF/HFL] Calculate mass of Zee#10153
vkucera merged 32 commits intoAliceO2Group:masterfrom
sashingo:master

Conversation

@sashingo
Copy link
Contributor

No description provided.

Comment on lines 78 to 92
struct HfElectronCandidate {
float pt, eta, phi, energy;
ElectronCandidate(float p, float e, float ph, float en)
: pt(p), eta(e), phi(ph), energy(en) {}

// 運動量成分を計算する関数を追加
float px() const { return pt * std::cos(phi); }
float py() const { return pt * std::sin(phi); }
float pz() const { return pt * std::sinh(eta); }
};
std::vector<HfElectronCandidate> selectedElectronsIso;
std::vector<HfElectronCandidate> selectedElectronsAss;

HfHelper hfHelper;

Copy link
Collaborator

Choose a reason for hiding this comment

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

This seems completely unnecessary if you just use std::array for the momenta and RecoDecay methods.

Comment on lines 388 to 390
auto mass = hfHelper.invMassZtoEE(e1, e2);
float ptIso = std::sqrt(e1.px() * e1.px() + e1.py() * e1.py());
float ptAss = std::sqrt(e2.px() * e2.px() + e2.py() * e2.py());
Copy link
Collaborator

Choose a reason for hiding this comment

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

This can be simplified with RecoDecay methods.

@vkucera vkucera marked this pull request as draft February 24, 2025 11:14
@vkucera
Copy link
Collaborator

vkucera commented Feb 24, 2025

Doesn't compile. Converted to draft until fixed. @sashingo Please open for review only after local tests.

@alibuild
Copy link
Collaborator

Error while checking build/O2Physics/o2 for f0b4201 at 2025-02-24 17:15:

## sw/BUILD/O2Physics-latest/log
/sw/SOURCES/O2Physics/10153-slc9_x86-64/0/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx:80:5: error: ISO C++ forbids declaration of 'ElectronCandidate' with no type [-fpermissive]
/sw/SOURCES/O2Physics/10153-slc9_x86-64/0/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx:81:9: error: only constructors take member initializers
/sw/SOURCES/O2Physics/10153-slc9_x86-64/0/PWGHF/HFL/Tasks/taskElectronWeakBoson.cxx:81:45: error: no return statement in function returning non-void [-Werror=return-type]
ninja: build stopped: subcommand failed.

Full log here.

@sashingo
Copy link
Contributor Author

sashingo commented Mar 3, 2025

Hi Vit, thank you for the suggestions.
The task is updated by using RecoDecay.
Concerning the comment to "struct HfElectronCandidate", the std::array is statistics, so I think it doesn't work.

@vkucera
Copy link
Collaborator

vkucera commented Mar 3, 2025

the std::array is statistics

Thanks @sashingo . What do you mean by "the std::array is statistics"?

Comment on lines 384 to 387
for (size_t i = 0; i < selectedElectronsIso.size() - 1; ++i) {
const auto& e1 = selectedElectronsIso[i];
for (size_t j = 0; j < selectedElectronsAss.size() - 1; ++j) {
const auto& e2 = selectedElectronsAss[j];
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do you skip the last element?
Why do you not use a range-based loop?

Comment on lines 81 to 82
HfElectronCandidate(float p, float e, float ph, float en, int ch)
: pt(p), eta(e), phi(ph), energy(en), charge(ch) {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

pt is not p.

Comment on lines 84 to 87
float px() const { return pt * std::cos(phi); }
float py() const { return pt * std::sin(phi); }
float pz() const { return pt * std::sinh(eta); }
int sign() const { return charge; }
Copy link
Collaborator

Choose a reason for hiding this comment

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

These methods are useless.

@sashingo
Copy link
Contributor Author

sashingo commented Mar 5, 2025

Hi Vit or HFCL convener,
could you approve the commit ?
I need the updated task to request performance figures for QM (as discussed in the last PAG meeting).
You might still have comments and suggestion, but I will do it in the next update

@vkucera vkucera marked this pull request as ready for review March 5, 2025 08:49
@sashingo
Copy link
Contributor Author

sashingo commented Mar 5, 2025

Hi Vit,
thank you very much for the approval !

@vkucera vkucera changed the title [PWGHF] updated to calculate mass of Zee [PWGHF/HFL] updated to calculate mass of Zee Mar 5, 2025
@vkucera vkucera changed the title [PWGHF/HFL] updated to calculate mass of Zee [PWGHF/HFL] Calculate mass of Zee Mar 5, 2025
@vkucera vkucera merged commit 9692f1f into AliceO2Group:master Mar 5, 2025
17 checks passed
njacazio pushed a commit that referenced this pull request Apr 11, 2025
EmilGorm pushed a commit to EmilGorm/O2Physics that referenced this pull request Apr 15, 2025
ariedel-cern pushed a commit to ariedel-cern/O2Physics that referenced this pull request May 23, 2025
alibuild pushed a commit to alibuild/O2Physics that referenced this pull request Aug 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pwghf PWG-HF

Development

Successfully merging this pull request may close these issues.

3 participants