Project
Loading...
Searching...
No Matches
TrackCosmics.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
15
16#ifndef ALICEO2_TRACKCOSMICS_H
17#define ALICEO2_TRACKCOSMICS_H
18
22
23namespace o2
24{
25namespace dataformats
26{
27
29{
31
32 public:
33 enum Flags : uint8_t {
34 NearBeamBottom = 0x1,
36 NearBeamTop = 0x2
37 };
38
39 TrackCosmics() = default;
40 ~TrackCosmics() = default;
41 TrackCosmics(const TrackCosmics& src) = default;
42 TrackCosmics(GlobalTrackID btm, GlobalTrackID top, const o2::track::TrackParCov& srcCent, const o2::track::TrackParCov& srcOut, float chi2Ref, float chi2Match, int ncl, float t, float tErr)
43 : o2::track::TrackParCov(srcCent), mParamOut(srcOut), mRefBottom(btm), mRefTop(top), mChi2Refit(chi2Ref), mChi2Match(chi2Match), mNClusters(ncl), mTimeMUS{t, tErr} {}
44
45 GlobalTrackID getRefBottom() const { return mRefBottom; }
46 GlobalTrackID getRefTop() const { return mRefTop; }
47 void setRefBottom(GlobalTrackID id) { mRefBottom = id; }
48 void setRefTop(GlobalTrackID id) { mRefTop = id; }
49
50 const timeEst& getTimeMUS() const { return mTimeMUS; }
51 timeEst& getTimeMUS() { return mTimeMUS; }
52 void setTimeMUS(const timeEst& t) { mTimeMUS = t; }
53 void setTimeMUS(float t, float te)
54 {
55 mTimeMUS.setTimeStamp(t);
56 mTimeMUS.setTimeStampError(te);
57 }
58
59 void setChi2Refit(float v) { mChi2Refit = v; }
60 float getChi2Refit() const { return mChi2Refit; }
61
62 void setChi2Match(float v) { mChi2Match = v; }
63 float getChi2Match() const { return mChi2Match; }
64
65 int getNClusters() const { return mNClusters; }
66 void setNClusters(int n) { mNClusters = n; }
67
68 uint8_t getFlags() const { return mFlags; }
69 void setFlags(uint8_t flags) { mFlags = flags; }
70 bool isNearBeam() const { return mFlags & (NearBeamBottom | NearBeamTop); }
71
72 o2::track::TrackParCov& getParamOut() { return mParamOut; }
73 const o2::track::TrackParCov& getParamOut() const { return mParamOut; }
74
75 void print() const;
76
77 private:
78 GlobalTrackID mRefBottom;
79 GlobalTrackID mRefTop;
80 float mChi2Refit = 0.f;
81 float mChi2Match = 0.f;
82 int mNClusters = 0;
83 timeEst mTimeMUS;
84 o2::track::TrackParCov mParamOut;
85 uint8_t mFlags = 0;
86
87 ClassDefNV(TrackCosmics, 2);
88};
89} // namespace dataformats
90} // namespace o2
91
92#endif
Base track model for the Barrel, params only, w/o covariance.
Global index for barrel track: provides provenance (detectors combination), index in respective array...
o2::track::TrackParCov TrackParCov
Definition Recon.h:39
o2::track::TrackParCov & getParamOut()
void setRefBottom(GlobalTrackID id)
void setFlags(uint8_t flags)
const o2::track::TrackParCov & getParamOut() const
@ NearBeamTop
the same for the top leg
const timeEst & getTimeMUS() const
void setTimeMUS(const timeEst &t)
TrackCosmics(GlobalTrackID btm, GlobalTrackID top, const o2::track::TrackParCov &srcCent, const o2::track::TrackParCov &srcOut, float chi2Ref, float chi2Match, int ncl, float t, float tErr)
void setRefTop(GlobalTrackID id)
GlobalTrackID getRefBottom() const
void setTimeMUS(float t, float te)
GlobalTrackID getRefTop() const
TrackCosmics(const TrackCosmics &src)=default
GLdouble n
Definition glcorearb.h:1982
GLenum src
Definition glcorearb.h:1767
const GLdouble * v
Definition glcorearb.h:832
GLdouble GLdouble GLdouble GLdouble top
Definition glcorearb.h:4077
GLbitfield flags
Definition glcorearb.h:1570
GLuint id
Definition glcorearb.h:650
TrackParCovF TrackParCov
Definition Track.h:33
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...