TPC timeseries: Propagating TPC track to TOF cluster#12312
Conversation
| float tpcYatTOF = 0; | ||
| float tpcZatTOF = 0; | ||
| if (hasTOFCluster) { | ||
| if (trackTmp.rotate(o2::math_utils::sector2Angle(tofCl.getSector())) && propagator->propagateTo(trackTmp, tofCl.getX(), false, mMaxSnp, mFineStep, mMatType)) { |
There was a problem hiding this comment.
Hello @shahor02
we wanted to get for each TPC track that has a TOF cluster assigned the TPC track propagated to the TOF cluster position and then compare the propagated TPC track position with the TOF cluster position.
Can you take a look if I did it properly?
I am also not quite sure if the propagation is correctly done. I assumed here that the tfCl.getX() returns the local X position of the cluster.
There was a problem hiding this comment.
One should not use the TPC innermost track param for propagation to TOF, instead use (since you don't use errors)
o2::track::TrackPar trackTmpOut(tracksTPC[iTrk].getParamOut());
...
| // loop over ITS-TPC-TRD-TOF and ITS-TPC-TOF tracks an store for each ITS-TPC track the TOF track index | ||
| for (const auto& tofMatch : tofMatches) { | ||
| for (const auto& tpctofmatch : tofMatch) { | ||
| auto refTPC = recoData.getSingleDetectorRefs(tpctofmatch.getTrackRef())[TrkSrc::TPC]; |
There was a problem hiding this comment.
since you need only TPC index, you can use faster method
auto refTPC = recoData.getTPCContributorGID(tpctofmatch.getTrackRef());
| void fillDCA(const gsl::span<const TrackTPC> tracksTPC, const gsl::span<const o2::dataformats::TrackTPCITS> tracksITSTPC, const gsl::span<const o2::dataformats::PrimaryVertex> vertices, const int iTrk, const int iThread, const std::unordered_map<unsigned int, std::array<int, 2>>& indicesITSTPC, const gsl::span<const o2::its::TrackITS> tracksITS) | ||
| void fillDCA(const gsl::span<const TrackTPC> tracksTPC, const gsl::span<const o2::dataformats::TrackTPCITS> tracksITSTPC, const gsl::span<const o2::dataformats::PrimaryVertex> vertices, const int iTrk, const int iThread, const std::unordered_map<unsigned int, std::array<int, 2>>& indicesITSTPC, const gsl::span<const o2::its::TrackITS> tracksITS, const std::vector<int>& idxTPCTrackToTOFCluster, const gsl::span<const o2::tof::Cluster> tofClusters) | ||
| { | ||
| TrackTPC track = tracksTPC[iTrk]; |
There was a problem hiding this comment.
I see that you are still cloning the full TPC track. Why? For the propagation it is enough to clone TrackParCov.
There was a problem hiding this comment.
Thanks, I thought since we want the errors we would still need then the full track. But you are right, thanks.
| float tpcYatTOF = 0; | ||
| float tpcZatTOF = 0; | ||
| if (hasTOFCluster) { | ||
| if (trackTmp.rotate(o2::math_utils::sector2Angle(tofCl.getSector())) && propagator->propagateTo(trackTmp, tofCl.getX(), false, mMaxSnp, mFineStep, mMatType)) { |
There was a problem hiding this comment.
One should not use the TPC innermost track param for propagation to TOF, instead use (since you don't use errors)
o2::track::TrackPar trackTmpOut(tracksTPC[iTrk].getParamOut());
...
- storing delta parameter of TPC between inner and outer param - small fixes
- storing getDXatTOF and getDZatTOF
|
Hello @matthias-kleiner Please include mDXatTOF and mDZatTOF for combined tracks as well. If I come across anything later, we can make the necessary updates. I'm considering including TOF dY and dZ of combined tracks not only in the skimmed data but also to the time series. In the pull request, let's explicitly provide the values for dY and dZ, and inquire whether they seem reasonable. The variation in dY suggests that the sectors may not be aligned correctly. I am checking what could be the reason (TPC or TOF?), but the code should be checked if alignment correction was applied. |
TOF observations based on the RootInteractive dashboard:
|
|
@miranov25 is this with the corrected TPC outerParam track extrapolation or previous, inner param extrapolation to TOF? |
This is with the latest version of the code like you suggested |
|
Very strange, could you produce a similar plot for the opposite polarity? What is the IR of this run? |
We looked at different runs: 544126.50Hz, 544124.8kHz, 544122.18kHz, 544116.38kHz. It was the same for all of them. |
|
The residuals in tofmatch are ok. The problem is only when we are doing own matching. I assume it could be because we read clusters from root file, maybe some corrections were not applied. |
That would be strange, but better @noferini comments. |
|
We don't have any additional correction on TOF clusters. What is read is used. |
| float tpcZDeltaAtTOF = -999; | ||
| if (hasTOFCluster) { | ||
| o2::track::TrackPar trackTmpOut(tracksTPC[iTrk].getParamOut()); | ||
| if (trackTmpOut.rotate(o2::math_utils::sector2Angle(tofCl.getSector())) && propagator->propagateTo(trackTmpOut, tofCl.getX(), false, mMaxSnp, mFineStep, mMatType)) { |
There was a problem hiding this comment.
Hello @noferini
the propagation with the TPC track to TOF cluster is done here.
When we calculate the difference between TPC and TOF cluster in z (tpcZDeltaAtTOF) direction, we are also doing some correction, but I am not fully sure if this is correct:
tpcZDeltaAtTOF = signSide * (o2::tpc::ParameterElectronics::Instance().ZbinWidth * trackFull.getTime0() - vertex.getTimeStamp().getTimeStamp()) * mVDrift - trackTmpOut.getZ() + tofCl.getZ();
For the difference in y we are just doing tpcYDeltaAtTOF = trackTmpOut.getY() - tofCl.getY();
There was a problem hiding this comment.
@matthias-kleiner, I am not completely sure about the signs in tpcZDeltaAtTOF formula but for tpcYDeltaAtTOF there are no problems. I don't see any evident problem in the propagation call.
Do you have also tpcZDeltaAtTOF vs phi/sector?
There was a problem hiding this comment.
Hi @noferini ,
yes sure it looks like this.

There was a problem hiding this comment.
It looks much better than Y residual.
What is the fine-step you are using in propagation? 2 cm (default)?
Does this play a role?
|
Dear @matthias-kleiner, @shahor02 and @noferini I've uploaded the RootInteractive dashboard with all observations to EOS. This allows you to test all residual data (DCA, delta parameters at the vertex, and TOF) as a function of the rate and kinematic variables. The data is grouped into three categories, facilitating functional decomposition. For TOF, we have data for the standard delta (as in official reconstruction) and for the TPC-only track deltas. I won't have time to follow that pull request during the weekend, but I'll post some observations here that might be helpful. From our perspective, it will be important to integrate TPC-TOF into production. Even if we don't obtain absolute values, relative values will still be useful. More details will be provided in the following posts. Marian |
Data aggregation analysis and interactive dashboard:
|
|
Hello all. Do you have any suggestions for what could be the problem? I asked Matthias to create a full TOF cluster and TOF match dump so we can debug it. Indeed, this will be a good option to have in general (switched OFF in production) |
|
@noferini actually, in the TOF matching you are not using TOF cluster positions as they are stored, using instead. Also, in the alignment I am recalculating the coordinates from the channels ideal positions with particular "starting" alignment matrices:AliceO2/Detectors/Align/src/AlignableDetectorTOF.cxx Lines 95 to 109 in 42a8244 Are you sure the coordinates as they are set in the clustering are equivalent to those set in the matching? |
|
Should we perform the "realignment" in our code, as indicated by @shahor02 in the code snippet, or do you prefer another solution?
|
|
Chiara just informed me that Francesco is on a trip, so we won't get an update soon. As we would like to test other aspects of the code in the test, I suggest merging it as it is and fixing the TOF alignment issue later. Do you agree? Can we proceed with the merge? |
It is fine from my side. I removed the draft |
|
will merge after the CI but not before 4pm (in case @noferini responds) |
|
Hello @shahor02 |
Hi @shahor02 , |
|
Hi, I did further checks inside the TOF matching algorithm comparing the position extracted with
|






No description provided.