Skip to content

TPC PID Response#505

Merged
njacazio merged 58 commits intoAliceO2Group:masterfrom
AnnalenaKa:branch_Fixreso
Mar 8, 2022
Merged

TPC PID Response#505
njacazio merged 58 commits intoAliceO2Group:masterfrom
AnnalenaKa:branch_Fixreso

Conversation

@AnnalenaKa
Copy link
Copy Markdown
Contributor

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.

Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h Outdated
Comment thread Common/Core/PID/TPCPIDResponse.h
Comment thread Common/TableProducer/PID/qaTPCMC.cxx Outdated
@AnnalenaKa AnnalenaKa marked this pull request as ready for review February 24, 2022 13:55
@AnnalenaKa AnnalenaKa requested review from a team, alibuild, iarsene, jgrosseo and ktf as code owners February 24, 2022 13:55
Copy link
Copy Markdown
Collaborator

@njacazio njacazio left a comment

Choose a reason for hiding this comment

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

@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();
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.

This should be a float to avoid conversion, this applies also to other variables.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator

@njacazio njacazio Mar 7, 2022

Choose a reason for hiding this comment

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

Ah I understand, ok!
Then we might truly need the c++ implementation, let's see!

Comment thread Common/TableProducer/PID/pidTPC.cxx Outdated
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);
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.

you could pass *response in the lambda function

Comment thread Common/TableProducer/PID/pidTPC.cxx Outdated
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);
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.

Is this the Nsigma or the expected resolution?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is the expected resolution. I changed it to the number of sigma. Thanks for spotting this.

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.

Thanks to you!


template <o2::track::PID::ID pid>
using ResponseImplementation = o2::pid::tpc::ELoss<Trks::iterator, pid>;
void process(Coll const& collisions, Trks const& tracks)
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.

Here we probably need to merge the timestamp dependent call to the CCDB

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Isn't this what we do in line 128, when we get the response?

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.

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
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.

This might need formatting again

@@ -0,0 +1,253 @@
// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
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.

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

Comment thread Common/TableProducer/PID/pidTPCFull.cxx Outdated
makeTable(pidHe, tablePIDHe, response, responseHe);
makeTable(pidAl, tablePIDAl, response, responseAl);
// const o2::pid::tpc::Response& response;
makeTable(pidEl, tablePIDEl, *response, o2::track::PID::Electron);
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.

Idem, you can consider passing the *response to the lambda function arguments

@njacazio
Copy link
Copy Markdown
Collaborator

njacazio commented Mar 7, 2022

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

@njacazio njacazio enabled auto-merge (squash) March 8, 2022 09:22
@njacazio njacazio merged commit 7986c50 into AliceO2Group:master Mar 8, 2022
njacazio added a commit to njacazio/O2Physics that referenced this pull request Mar 11, 2022
jgrosseo pushed a commit that referenced this pull request Mar 11, 2022
@AnnalenaKa AnnalenaKa deleted the branch_Fixreso branch March 21, 2022 15:27
robincaron13 pushed a commit to robincaron13/O2Physics that referenced this pull request Apr 8, 2022
- 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>
robincaron13 pushed a commit to robincaron13/O2Physics that referenced this pull request Apr 8, 2022
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.

6 participants