CbmRoot
Loading...
Searching...
No Matches
StorableRecoResults.h
Go to the documentation of this file.
1/* Copyright (C) 2023 FIAS Frankfurt Institute for Advanced Studies, Frankfurt / Main
2 SPDX-License-Identifier: GPL-3.0-only
3 Authors: Felix Weiglhofer [committer], P.-A. Loizeau */
4#ifndef CBM_ALGO_GLOBAL_STORABLE_RECO_RESULTS_H
5#define CBM_ALGO_GLOBAL_STORABLE_RECO_RESULTS_H
6
7#include "CbmDigiEvent.h"
8#include "PartitionedVector.h"
11#include "sts/Cluster.h"
12#include "sts/Hit.h"
13#include "tof/Hit.h"
14#include "trd/Hit.h"
15
16#include <boost/serialization/access.hpp>
17#include <boost/serialization/utility.hpp>
18#include <boost/serialization/vector.hpp>
19
20#include <cstdint>
21
22namespace cbm::algo
23{
24
26
27 public:
29
34
35 StorableRecoResults(uint64_t tsIndex, uint64_t tsStartTime) : fTsIndex(tsIndex), fTsStartTime(tsStartTime) {}
36
40 uint64_t TsIndex() const { return fTsIndex; }
41
45 uint64_t TsStartTime() const { return fTsStartTime; }
46
50 size_t SizeBytes() const;
51
52 std::vector<CbmBmonDigi>& BmonDigis() { return fBmonDigis; }
53 const std::vector<CbmBmonDigi>& BmonDigis() const { return fBmonDigis; }
54
55 std::vector<CbmStsDigi>& StsDigis() { return fStsDigis; }
56 const std::vector<CbmStsDigi>& StsDigis() const { return fStsDigis; }
57
58 std::vector<CbmMuchDigi>& MuchDigis() { return fMuchDigis; }
59 const std::vector<CbmMuchDigi>& MuchDigis() const { return fMuchDigis; }
60
61 std::vector<CbmTrdDigi>& Trd2dDigis() { return fTrd2dDigis; }
62 const std::vector<CbmTrdDigi>& Trd2dDigis() const { return fTrd2dDigis; }
63
64 std::vector<CbmTrdDigi>& TrdDigis() { return fTrdDigis; }
65 const std::vector<CbmTrdDigi>& TrdDigis() const { return fTrdDigis; }
66
67 std::vector<CbmTofDigi>& TofDigis() { return fTofDigis; }
68 const std::vector<CbmTofDigi>& TofDigis() const { return fTofDigis; }
69
70 std::vector<CbmRichDigi>& RichDigis() { return fRichDigis; }
71 const std::vector<CbmRichDigi>& RichDigis() const { return fRichDigis; }
72
73 std::vector<CbmDigiEvent>& DigiEvents() { return fDigiEvents; }
74 const std::vector<CbmDigiEvent>& DigiEvents() const { return fDigiEvents; }
75
78
80 const PartitionedVector<sts::Hit>& StsHits() const { return fStsHits; }
81
83 const PartitionedVector<tof::Hit>& TofHits() const { return fTofHits; }
84
86 const PartitionedVector<trd::Hit>& TrdHits() const { return fTrdHits; }
87
89 const ca::Vector<ca::Track>& Tracks() const { return fTracks; }
90
93
96
97 private:
98 uint64_t fTsIndex = UINT64_MAX;
99 uint64_t fTsStartTime = UINT64_MAX;
100
101 // Unpackers output
102 std::vector<CbmBmonDigi> fBmonDigis;
103 std::vector<CbmStsDigi> fStsDigis;
104 std::vector<CbmMuchDigi> fMuchDigis;
105 std::vector<CbmTrdDigi> fTrd2dDigis;
106 std::vector<CbmTrdDigi> fTrdDigis;
107 std::vector<CbmTofDigi> fTofDigis;
108 std::vector<CbmRichDigi> fRichDigis;
109
110 // Event builder/filter output
111 std::vector<CbmDigiEvent> fDigiEvents;
112
113 // Local Reconstruction output
118
119 // Tracking output
121
125
129
131
132 template<class Archive>
133 void serialize(Archive& ar, unsigned int /*version*/)
134 {
135 ar& fTsIndex;
136 ar& fTsStartTime;
137
138 ar& fBmonDigis;
139 ar& fStsDigis;
140 ar& fMuchDigis;
141 ar& fTrd2dDigis;
142 ar& fTrdDigis;
143 ar& fTofDigis;
144 ar& fRichDigis;
145
146 ar& fDigiEvents;
147
148 ar& fStsClusters;
149 ar& fStsHits;
150 ar& fTofHits;
151 ar& fTrdHits;
152
153 ar& fTracks;
156 }
157 };
158
159} // namespace cbm::algo
160
161#endif // CBM_ALGO_GLOBAL_STORABLE_RECO_RESULTS_H
source file for the ca::Track class
A vector that is partitioned into multiple subvectors.
std::vector< CbmMuchDigi > & MuchDigis()
const PartitionedVector< sts::Hit > & StsHits() const
std::vector< CbmMuchDigi > fMuchDigis
ca::Vector< ca::Track > & Tracks()
PartitionedVector< sts::Cluster > fStsClusters
TrackHitIndexContainer_t & TrackStsHitIndices()
const TrackHitIndexContainer_t & TrackStsHitIndices() const
const std::vector< CbmTrdDigi > & Trd2dDigis() const
TrackHitIndexContainer_t fTrackTofHitIndices
TOF hit indices of tracks.
std::vector< CbmTrdDigi > & Trd2dDigis()
const TrackHitIndexContainer_t & TrackTofHitIndices() const
TrackHitIndexContainer_t fTrackStsHitIndices
STS hit indices of tracks.
const std::vector< CbmTofDigi > & TofDigis() const
const PartitionedVector< sts::Cluster > & StsClusters() const
std::vector< CbmBmonDigi > & BmonDigis()
TrackHitIndexContainer_t & TrackTofHitIndices()
const std::vector< CbmTrdDigi > & TrdDigis() const
std::vector< CbmStsDigi > & StsDigis()
const std::vector< CbmDigiEvent > & DigiEvents() const
StorableRecoResults(uint64_t tsIndex, uint64_t tsStartTime)
uint64_t TsIndex() const
Index of the timeslice during the run.
std::vector< CbmTofDigi > & TofDigis()
std::vector< CbmRichDigi > fRichDigis
const ca::Vector< ca::Track > & Tracks() const
const std::vector< CbmStsDigi > & StsDigis() const
std::vector< CbmRichDigi > & RichDigis()
const std::vector< CbmMuchDigi > & MuchDigis() const
std::vector< CbmStsDigi > fStsDigis
PartitionedVector< tof::Hit > fTofHits
const PartitionedVector< trd::Hit > & TrdHits() const
const PartitionedVector< tof::Hit > & TofHits() const
uint64_t TsStartTime() const
Start time of the timeslice.
friend class boost::serialization::access
const std::vector< CbmRichDigi > & RichDigis() const
PartitionedVector< sts::Cluster > & StsClusters()
PartitionedVector< trd::Hit > fTrdHits
std::vector< CbmTofDigi > fTofDigis
StorableRecoResults()=default
Default constructor (required by boost::serialization)
PartitionedVector< sts::Hit > fStsHits
const std::vector< CbmBmonDigi > & BmonDigis() const
PartitionedVector< trd::Hit > & TrdHits()
PartitionedVector< sts::Hit > & StsHits()
std::vector< CbmTrdDigi > & TrdDigis()
std::vector< CbmTrdDigi > fTrd2dDigis
std::vector< CbmTrdDigi > fTrdDigis
std::vector< CbmDigiEvent > & DigiEvents()
std::vector< CbmBmonDigi > fBmonDigis
void serialize(Archive &ar, unsigned int)
PartitionedVector< tof::Hit > & TofHits()
size_t SizeBytes() const
Total size in bytes.
std::vector< CbmDigiEvent > fDigiEvents
A light-weight TRD hit class for online reconstruction, based on CbmTrdHit. .