TPC PID Response#505
Conversation
njacazio
left a comment
There was a problem hiding this comment.
@AnnalenaKa thanks a lot for the PR and apologies for taking so much time to review it. I have no major comment apart from the need to solve the conflicts that you have to merge, the timestamp dependent call to the CCDB, the Nsigma vs sigma call to fill the table in pidTPC
We can also do it together later if you prefer, let me know
| } else { | ||
|
|
||
| const double ncl = 159. / track.tpcNClsFound(); // | ||
| const double p = track.tpcInnerParam(); |
There was a problem hiding this comment.
This should be a float to avoid conversion, this applies also to other variables.
There was a problem hiding this comment.
I wanted to use floats for these variables, but the TFormula takes only doubles and no floats. This is why I did not change it.
There was a problem hiding this comment.
Ah I understand, ok!
Then we might truly need the c++ implementation, let's see!
| makeTable(pidHe, tablePIDHe, response, responseHe); | ||
| makeTable(pidAl, tablePIDAl, response, responseAl); | ||
| makeTable(pidEl, tablePIDEl, *response, o2::track::PID::Electron); | ||
| makeTable(pidMu, tablePIDMu, *response, o2::track::PID::Muon); |
There was a problem hiding this comment.
you could pass *response in the lambda function
| for (auto const& trk : tracks) { // Loop on Tracks | ||
| const float separation = responsePID.GetSeparation(response, trk); | ||
| auto collision = collisions.iteratorAt(trk.collisionId()); | ||
| const float separation = response.GetExpectedSigma(collision, trk, pid); |
There was a problem hiding this comment.
Is this the Nsigma or the expected resolution?
There was a problem hiding this comment.
This is the expected resolution. I changed it to the number of sigma. Thanks for spotting this.
|
|
||
| template <o2::track::PID::ID pid> | ||
| using ResponseImplementation = o2::pid::tpc::ELoss<Trks::iterator, pid>; | ||
| void process(Coll const& collisions, Trks const& tracks) |
There was a problem hiding this comment.
Here we probably need to merge the timestamp dependent call to the CCDB
There was a problem hiding this comment.
Isn't this what we do in line 128, when we get the response?
There was a problem hiding this comment.
No, I meant that we we need to align this to the most recent code: https://github.com/AliceO2Group/O2Physics/blob/nightly-20220307/Common/TableProducer/PID/pidTPC.cxx#L140-L146 where the parametrization is taken from the timestamp of the collision
| } | ||
| return workflow; | ||
| } | ||
| } No newline at end of file |
There was a problem hiding this comment.
This might need formatting again
| @@ -0,0 +1,253 @@ | |||
| // Copyright 2019-2020 CERN and copyright holders of ALICE O2. | |||
There was a problem hiding this comment.
For now this is ok, in the future you can consider the implementation of https://github.com/AliceO2Group/O2Physics/blob/nightly-20220307/Common/Tools/handleParamTPCBetheBloch.cxx where the timestamp is taken from the run number to upload the calibration object to the CCDB
| makeTable(pidHe, tablePIDHe, response, responseHe); | ||
| makeTable(pidAl, tablePIDAl, response, responseAl); | ||
| // const o2::pid::tpc::Response& response; | ||
| makeTable(pidEl, tablePIDEl, *response, o2::track::PID::Electron); |
There was a problem hiding this comment.
Idem, you can consider passing the *response to the lambda function arguments
…d adjusted for clang format.
…ssed to functions directly - Modified pidTPCFullTest.cxx accordingly - Adjusted for clang-format and checked that it builds
- Adjusted for clang-format
…n added to TPCPIDResponse
625e115 to
f31ca9e
Compare
|
Hi @pzhristov we just finished reviewing the code together with @AnnalenaKa and for me it's ok. There is a small downgrade with respect what is currently in the master namely the time dependent parametrization that is taken from the CCDB but we agreed that we will handle this in another PR. I think we can merge this |
…eO2Group#594)" This reverts commit 7986c50. This reverts commit 2dc1cfd.
- Remove old TPC PID response from tasks - Change TPCPIDResponse.h: No template-parameters, particle-id is passed to functions directly - Added loading of TPCPIDResponse-instance from a file - customisable parameters in handleParamTPCResponse, PrintAll() function added to TPCPIDResponse - Add TF1 for Sigma parametrization - use multiplicity tracklets - add extended TPC PIDQA task - add ability to write to CCDB from existing file - add V0 loop to QA task - add eta dependence for TPC V0 QA - Add options default reso param and TFormula param Co-authored-by: Annalena Kalteyer <akalteye@lxir128.gsi.de> Co-authored-by: Jeremy Wilkinson <jeremy.wilkinson@cern.ch> Co-authored-by: Christian Sonnabend <sonnabendch@gmail.com> Co-authored-by: Jeremy Wilkinson <jeremy.wilkinson@gmail.com>
…eO2Group#594)" (AliceO2Group#607) This reverts commit 7986c50. This reverts commit 2dc1cfd.
These changes will move the TPC PID Response into one header file TPCPIDResponse.h and remove any headers and dependencies that are not needed anymore.