Project
Loading...
Searching...
No Matches
ROframe.cxx
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
15
16#include "ITStracking/ROframe.h"
17
18#include <iostream>
19
20namespace o2
21{
22namespace its
23{
24
25ROframe::ROframe(int ROframeId, int nLayers) : mROframeId{ROframeId}
26{
27 mClusters.resize(nLayers);
28 mTrackingFrameInfo.resize(nLayers);
29 // mClusterLabels.resize(nLayers);
30 mClusterExternalIndices.resize(nLayers);
31}
32
33void ROframe::addPrimaryVertex(const float xCoordinate, const float yCoordinate, const float zCoordinate)
34{
35 mPrimaryVertices.emplace_back(float3{xCoordinate, yCoordinate, zCoordinate});
36}
37
38void ROframe::addPrimaryVertices(std::vector<Vertex> vertices)
39{
40 for (Vertex& vertex : vertices) {
41 mPrimaryVertices.emplace_back(float3{vertex.getX(), vertex.getY(), vertex.getZ()});
42 }
43}
44
46{
47 const int verticesNum{static_cast<int>(mPrimaryVertices.size())};
48
49 for (int iVertex{0}; iVertex < verticesNum; ++iVertex) {
50
51 const float3& currentVertex = mPrimaryVertices[iVertex];
52 std::cout << "-1\t" << currentVertex.x << "\t" << currentVertex.y << "\t" << currentVertex.z << std::endl;
53 }
54}
55
57{
58 size_t totalClusters{0};
59 for (auto& clusters : mClusters) {
60 totalClusters += clusters.size();
61 }
62 return int(totalClusters);
63}
64} // namespace its
65} // namespace o2
uint64_t vertex
Definition RawEventData.h:9
ROframe(int ROframeId, int nLayers)
Definition ROframe.cxx:25
int getTotalClusters() const
Definition ROframe.cxx:56
void addPrimaryVertex(const float, const float, const float)
Definition ROframe.cxx:33
void addPrimaryVertices(std::vector< Vertex > vertices)
Definition ROframe.cxx:38
void printPrimaryVertices() const
Definition ROframe.cxx:45
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
std::vector< Cluster > clusters