23 :
WriterT(cfg.collection,
"RootVertexAndTracksWriter", lvl),
25 m_outputFile(cfg.rootFile) {
28 throw std::invalid_argument(
"Missing input collection");
30 throw std::invalid_argument(
"Missing tree name");
37 throw std::ios_base::failure(
"Could not open '" +
m_cfg.
filePath);
43 throw std::bad_alloc();
105 m_outputFile->Close();
112 m_outputTree->Write();
113 ACTS_INFO(
"Wrote event to tree '" << m_cfg.treeName <<
"' in '"
114 << m_cfg.filePath <<
"'");
176 const std::vector<VertexAndTracks>& vertexAndTracksCollection) {
177 if (m_outputFile ==
nullptr || vertexAndTracksCollection.empty()) {
182 std::lock_guard<std::mutex> lock(m_writeMutex);
189 for (
auto& vertexAndTracks : vertexAndTracksCollection) {
191 m_vx.push_back(vertexAndTracks.vertex.position().x());
192 m_vy.push_back(vertexAndTracks.vertex.position().y());
193 m_vz.push_back(vertexAndTracks.vertex.position().z());
195 for (
auto&
track : vertexAndTracks.tracks) {
204 m_vtxID.push_back(m_vx.size() - 1);
209 m_cov11.push_back(cov(0, 0));
210 m_cov12.push_back(cov(0, 1));
211 m_cov13.push_back(cov(0, 2));
212 m_cov14.push_back(cov(0, 3));
213 m_cov15.push_back(cov(0, 4));
214 m_cov16.push_back(cov(0, 5));
216 m_cov21.push_back(cov(1, 0));
217 m_cov22.push_back(cov(1, 1));
218 m_cov23.push_back(cov(1, 2));
219 m_cov24.push_back(cov(1, 3));
220 m_cov25.push_back(cov(1, 4));
221 m_cov26.push_back(cov(1, 5));
223 m_cov31.push_back(cov(2, 0));
224 m_cov32.push_back(cov(2, 1));
225 m_cov33.push_back(cov(2, 2));
226 m_cov34.push_back(cov(2, 3));
227 m_cov35.push_back(cov(2, 4));
228 m_cov36.push_back(cov(2, 5));
230 m_cov41.push_back(cov(3, 0));
231 m_cov42.push_back(cov(3, 1));
232 m_cov43.push_back(cov(3, 2));
233 m_cov44.push_back(cov(3, 3));
234 m_cov45.push_back(cov(3, 4));
235 m_cov46.push_back(cov(3, 5));
237 m_cov51.push_back(cov(4, 0));
238 m_cov52.push_back(cov(4, 1));
239 m_cov53.push_back(cov(4, 2));
240 m_cov54.push_back(cov(4, 3));
241 m_cov55.push_back(cov(4, 4));
242 m_cov56.push_back(cov(4, 5));
244 m_cov61.push_back(cov(5, 0));
245 m_cov62.push_back(cov(5, 1));
246 m_cov63.push_back(cov(5, 2));
247 m_cov64.push_back(cov(5, 3));
248 m_cov65.push_back(cov(5, 4));
249 m_cov66.push_back(cov(5, 5));
253 m_outputTree->Fill();