Project
Loading...
Searching...
No Matches
PrimaryVertex.h
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.
11
12#ifndef ALICEO2_PRIMARYVERTEX_H
13#define ALICEO2_PRIMARYVERTEX_H
14
17
18namespace o2
19{
20namespace dataformats
21{
22
23// primary vertex class: position, time with error + IR (by default: not assigned)
24
25class PrimaryVertex : public Vertex<TimeStampWithError<float, float>>
26{
27 public:
29 PrimaryVertex() = default;
30 PrimaryVertex(const PrimaryVertex&) = default;
31 ~PrimaryVertex() = default;
32
33 const InteractionRecord& getIRMax() const { return mIRMax; }
35 const InteractionRecord& getIRMin() const { return mIRMin; }
37 void setIR(const InteractionRecord& ir) { mIRMin = mIRMax = ir; }
38 bool hasUniqueIR() const { return !mIRMin.isDummy() && (mIRMin == mIRMax); }
39
40 float getTMAD() const { return mTMAD; }
41 void setTMAD(float v) { mTMAD = v; }
42 float getZMAD() const { return mZMAD; }
43 void setZMAD(float v) { mZMAD = v; }
44
45#ifndef GPUCA_ALIGPUCODE
46 void print() const;
47 std::string asString() const;
48#endif
49
50 protected:
53 float mTMAD = -1;
54 float mZMAD = -1;
55
57};
58
59#ifndef GPUCA_ALIGPUCODE
60std::ostream& operator<<(std::ostream& os, const o2::dataformats::PrimaryVertex& v);
61#endif
62
63} // namespace dataformats
64
66namespace framework
67{
68template <typename T>
69struct is_messageable;
70template <>
71struct is_messageable<o2::dataformats::PrimaryVertex> : std::true_type {
72};
73} // namespace framework
74
75} // namespace o2
76#endif
const InteractionRecord & getIRMin() const
void setIR(const InteractionRecord &ir)
ClassDefNV(PrimaryVertex, 2)
void setIRMin(const InteractionRecord &ir)
InteractionRecord mIRMax
by default not assigned!
const InteractionRecord & getIRMax() const
PrimaryVertex(const PrimaryVertex &)=default
float mZMAD
MAD estimator for Zsigma.
InteractionRecord mIRMin
by default not assigned!
float mTMAD
MAD estimator for Tsigma.
void setIRMax(const InteractionRecord &ir)
const GLdouble * v
Definition glcorearb.h:832
std::ostream & operator<<(std::ostream &os, const o2::dataformats::MeanVertexObject &o)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
o2::InteractionRecord ir(0, 0)