|
64 | 64 | #include "Framework/DeviceSpec.h" |
65 | 65 | #include "GlobalTrackingWorkflow/CosmicsClusterCollectorSpec.h" |
66 | 66 | #include "DataFormatsGlobalTracking/RecoContainer.h" |
67 | | -#include "DataFormatsGlobalTracking/CosmicTrack.h" |
| 67 | +#include "DataFormatsGlobalTracking/TrackCosmicsExtended.h" |
68 | 68 | #include "ReconstructionDataFormats/TrackCosmics.h" |
69 | 69 | #include "DataFormatsTPC/TrackTPC.h" |
70 | 70 | #include "DataFormatsTPC/ClusterNative.h" |
@@ -186,19 +186,19 @@ class CosmicsClusterCollectorSpec : public Task |
186 | 186 | int index; ///< index of the cluster in the TF |
187 | 187 | }; |
188 | 188 | void addITS(const RecoContainer& data, GTrackID gid, uint8_t leg, std::vector<o2::dataformats::CosmicITSCluster>& out, int icosm, std::vector<ITSPattRequest>& requests, std::unordered_set<int>& matched) const; |
189 | | - void fillITSPatterns(const RecoContainer& data, std::vector<ITSPattRequest>& requests, std::vector<o2::dataformats::CosmicTrack>& cosmics) const; |
| 189 | + void fillITSPatterns(const RecoContainer& data, std::vector<ITSPattRequest>& requests, std::vector<o2::dataformats::TrackCosmicsExtended>& cosmics) const; |
190 | 190 | void addTOF(const RecoContainer& data, GTrackID gid, uint8_t leg, std::vector<o2::dataformats::CosmicTOFCluster>& out, std::unordered_set<int>& matched) const; |
191 | 191 | void addTRD(const RecoContainer& data, GTrackID gid, uint8_t leg, std::vector<o2::dataformats::CosmicTRDTracklet>& out, std::unordered_set<int>& matched) const; |
192 | 192 | std::pair<float, float> timeWindowMUS(const CosmicTime& cosmicTime) const; |
193 | 193 | bool predictOutward(const o2::tpc::TrackTPC& leg, const CosmicTime& cosmicTime, int sector, float x, float& y, float& z) const; |
194 | 194 | void roadTOF(const RecoContainer& data, const o2::tpc::TrackTPC* const* legs, const CosmicTime& cosmicTime, int icosm, std::vector<o2::dataformats::CosmicTOFCluster>& out, const std::unordered_set<int>& matched, float& timeTOFMUS, float& scoreTOFPair, float& scoreTOFReversed) const; |
195 | | - void polish(const o2::tpc::TrackTPC* const* legs, float timeMUS, o2::gpu::GPUO2InterfaceRefit& refitter, o2::dataformats::CosmicTrack& out) const; |
| 195 | + void polish(const o2::tpc::TrackTPC* const* legs, float timeMUS, o2::gpu::GPUO2InterfaceRefit& refitter, o2::dataformats::TrackCosmicsExtended& out) const; |
196 | 196 | void roadTRD(const RecoContainer& data, const o2::tpc::TrackTPC* const* legs, const CosmicTime& cosmicTime, int icosm, std::vector<o2::dataformats::CosmicTRDTracklet>& out, const std::unordered_set<int>& matched) const; |
197 | 197 | void roadITS(const RecoContainer& data, const o2::dataformats::TrackCosmics& cosm, const CosmicTime& cosmicTime, int legsSide, int icosm, std::vector<o2::dataformats::CosmicITSCluster>& out, std::vector<ITSPattRequest>& requests, |
198 | 198 | const std::unordered_set<int>& matched) const; |
199 | 199 | void cacheITSChipCentres(); |
200 | | - void writeDebug(const o2::dataformats::CosmicTrack& cosm, int icosm) const; |
201 | | - void flagDuplicates(std::vector<o2::dataformats::CosmicTrack>& cosmics) const; |
| 200 | + void writeDebug(const o2::dataformats::TrackCosmicsExtended& cosm, int icosm) const; |
| 201 | + void flagDuplicates(std::vector<o2::dataformats::TrackCosmicsExtended>& cosmics) const; |
202 | 202 | void writeDebugTOF(const o2::tof::Cluster& c, int icosm, int leg, uint8_t flags) const; |
203 | 203 |
|
204 | 204 | std::shared_ptr<DataRequest> mDataRequest; |
@@ -303,7 +303,7 @@ void CosmicsClusterCollectorSpec::run(ProcessingContext& pc) |
303 | 303 | tfInfo.vDrift = mCorrMap->getVDrift(); |
304 | 304 | tfInfo.t0 = mCorrMap->getT0(); |
305 | 305 |
|
306 | | - std::vector<o2::dataformats::CosmicTrack> cosmicsOut; |
| 306 | + std::vector<o2::dataformats::TrackCosmicsExtended> cosmicsOut; |
307 | 307 | const auto cosmics = recoData.getCosmicTracks(); |
308 | 308 | const size_t nCosmics = std::min(cosmics.size(), mMaxCosmicsPerTF); |
309 | 309 | if (nCosmics < cosmics.size()) { |
@@ -1062,7 +1062,7 @@ void CosmicsClusterCollectorSpec::roadTOF(const RecoContainer& data, const o2::t |
1062 | 1062 | } |
1063 | 1063 | } |
1064 | 1064 |
|
1065 | | -void CosmicsClusterCollectorSpec::polish(const o2::tpc::TrackTPC* const* legs, float timeMUS, o2::gpu::GPUO2InterfaceRefit& refitter, o2::dataformats::CosmicTrack& out) const |
| 1065 | +void CosmicsClusterCollectorSpec::polish(const o2::tpc::TrackTPC* const* legs, float timeMUS, o2::gpu::GPUO2InterfaceRefit& refitter, o2::dataformats::TrackCosmicsExtended& out) const |
1066 | 1066 | { |
1067 | 1067 | // refit of a cosmic with TPC-only legs at its TOF time, as MatchCosmics::refitWinners: the bottom leg inward, then to the closest approach |
1068 | 1068 | // to the beam line; the top leg inward, then to the same point; the two halves combined. Muon mass, energy loss along the muon's flight |
@@ -1324,7 +1324,7 @@ void CosmicsClusterCollectorSpec::roadITS(const RecoContainer& data, const o2::d |
1324 | 1324 | } |
1325 | 1325 | } |
1326 | 1326 |
|
1327 | | -void CosmicsClusterCollectorSpec::fillITSPatterns(const RecoContainer& data, std::vector<ITSPattRequest>& requests, std::vector<o2::dataformats::CosmicTrack>& cosmics) const |
| 1327 | +void CosmicsClusterCollectorSpec::fillITSPatterns(const RecoContainer& data, std::vector<ITSPattRequest>& requests, std::vector<o2::dataformats::TrackCosmicsExtended>& cosmics) const |
1328 | 1328 | { |
1329 | 1329 | // the TF's pattern stream holds, in cluster order, the patterns of the clusters with an invalid or a group pattern ID |
1330 | 1330 | if (!mITSDict) { |
@@ -1376,7 +1376,7 @@ void CosmicsClusterCollectorSpec::addTRD(const RecoContainer& data, GTrackID gid |
1376 | 1376 | } |
1377 | 1377 | } |
1378 | 1378 |
|
1379 | | -void CosmicsClusterCollectorSpec::flagDuplicates(std::vector<o2::dataformats::CosmicTrack>& cosmics) const |
| 1379 | +void CosmicsClusterCollectorSpec::flagDuplicates(std::vector<o2::dataformats::TrackCosmicsExtended>& cosmics) const |
1380 | 1380 | { |
1381 | 1381 | // the same muon can be matched twice, e.g. when a leg is split into two TPC tracks: the roads then collect largely the same clusters |
1382 | 1382 | // (PbPb 567939: 10 of 47 cosmic pairs in a TF share 56-99 % of the clusters of the smaller one, all others none). The best one (TOF time, |
@@ -1421,7 +1421,7 @@ void CosmicsClusterCollectorSpec::flagDuplicates(std::vector<o2::dataformats::Co |
1421 | 1421 | } |
1422 | 1422 | } |
1423 | 1423 |
|
1424 | | -void CosmicsClusterCollectorSpec::writeDebug(const o2::dataformats::CosmicTrack& cosm, int icosm) const |
| 1424 | +void CosmicsClusterCollectorSpec::writeDebug(const o2::dataformats::TrackCosmicsExtended& cosm, int icosm) const |
1425 | 1425 | { |
1426 | 1426 | constexpr int NSectorsA = TPCGeo::getNumberOfSectorsA(); |
1427 | 1427 | // the time the other-side corridor used (and the common frame zCos): the TOF time if the TOF road found one, else the TPC time |
|
0 commit comments