Skip to content

Conversation

@njacazio
Copy link
Collaborator

@njacazio njacazio commented Jul 20, 2021

  • Introduce hack to allow using expression columns for eta and y
  • Fix TOF information writing
  • Minor addition to analysis code
  • Add dummy class for event time determination from TOF (to be used in the TOF PID Response)

@njacazio
Copy link
Collaborator Author

@noferini we can start from here

@njacazio njacazio marked this pull request as ready for review July 20, 2021 14:50
@njacazio njacazio requested review from a team, iarsene, jgrosseo and noferini as code owners July 20, 2021 14:50
@jgrosseo
Copy link
Collaborator

For me this is fine, but @sawenzel or @nburmaso should also comment

@sawenzel sawenzel requested a review from shahor02 July 22, 2021 12:49
sawenzel
sawenzel previously approved these changes Jul 22, 2021
Copy link
Collaborator

@sawenzel sawenzel left a comment

Choose a reason for hiding this comment

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

Fine for me (although I can't judge correctness)

@njacazio
Copy link
Collaborator Author

Thanks @sawenzel let's see if @nburmaso is also happy and then we merge

@nburmaso
Copy link
Contributor

Hi @njacazio. Looks fine for me too

}
const float mass = o2::constants::physics::MassPionCharged; // default pid = pion
if (tofInt.getTOF(o2::track::PID::Pion) > 0.f) {
const float expBeta = (intLen / tofInt.getTOF(o2::track::PID::Pion) / cSpeed);
Copy link
Collaborator

Choose a reason for hiding this comment

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

one division less with const float expBeta = (intLen / (tofInt.getTOF(o2::track::PID::Pion) * cSpeed))

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hi Ruben, indeed, I missed that thanks!

Comment on lines 403 to 413
const float limit = 1e-4;
const float mom = TMath::Sqrt(pX * pX + pY * pY + pZ * pZ);
const float eta = 0.5f * TMath::Log((mom + pZ) / (mom - pZ));
if (TMath::Abs(eta) > 0.9) {
if (TMath::Abs((mom - pZ) / pZ) <= limit) {
pX = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ * 0.5, mMcParticleMom);
pY = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ * 0.5, mMcParticleMom);
}
if (TMath::Abs(energy - pZ) < limit) {
energy = truncateFloatFraction(pZ + limit, mMcParticleMom);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

could you elaborate what produces FPE? In any case, if you want to approximate the

pT^2 = ( (1+limit)^2 - 1) pZ^2

then one should have

pX = truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ  / sqrt(2), mMcParticleMom);
...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Here the FPE is observed when computing rapidity/pseudorapidity for particles that are in the beampipe. This hack is needed to bypass a limitation that will be solved in the future when we will be able to handle conditions in Gandiva for the computation of the expression columns.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK, but if you want to make (mom - pZ) / pZ) = limit, this means pT^2 = ( (1+limit)^2 - 1) pZ^2 and with pX=pY=pT/sqrt(2) this gives pX=pY=truncateFloatFraction(TMath::Sqrt((1.f + limit) * (1.f + limit) - 1.f) * pZ / sqrt(2), mMcParticleMom); (note the factor 1/sqrt(2) instead of 0.5)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

that's true, thanks for spotting this!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

nonetheless, the difference should be small i.e. *0.7 vs *0.5

@njacazio
Copy link
Collaborator Author

@shahor02 thanks for the useful comments! Everything should be taken care of, could we go on?

@shahor02 shahor02 merged commit 5df6315 into AliceO2Group:dev Jul 23, 2021
@njacazio njacazio deleted the nj-AOD-writing branch July 23, 2021 09:24
skundu692 pushed a commit to skundu692/AliceO2 that referenced this pull request Aug 10, 2021
* Fix the way TOF is written

* Add PDG codes of heavier particles

* Add shift in momentum energy hack

* Add more fixes

* Add dummy TOF EventTime maker

* Resolve extra division

* Fix for sqrt(2) in FPE protection hack
EmilGorm pushed a commit to EmilGorm/AliceO2 that referenced this pull request Nov 22, 2021
* Fix the way TOF is written

* Add PDG codes of heavier particles

* Add shift in momentum energy hack

* Add more fixes

* Add dummy TOF EventTime maker

* Resolve extra division

* Fix for sqrt(2) in FPE protection hack
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.

5 participants