Project
Loading...
Searching...
No Matches
TrackMCHMID.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
16
17#ifndef ALICEO2_TRACKMCHMID_H
18#define ALICEO2_TRACKMCHMID_H
19
20#include <utility>
21
25
26namespace o2
27{
28namespace dataformats
29{
30
33{
35
36 public:
37 TrackMCHMID() = default;
38 TrackMCHMID(const GlobalTrackID& mchID, const GlobalTrackID& midID, const InteractionRecord& midIR, double chi2)
39 : mMCHRef(mchID), mMIDRef(midID), mIR(midIR), mMatchNChi2(chi2) {}
40 TrackMCHMID(uint32_t mchIdx, uint32_t midIdx, const InteractionRecord& midIR, double chi2)
41 : mMCHRef(mchIdx, GlobalTrackID::MCH), mMIDRef(midIdx, GlobalTrackID::MID), mIR(midIR), mMatchNChi2(chi2) {}
42 ~TrackMCHMID() = default;
43
44 TrackMCHMID(const TrackMCHMID& track) = default;
45 TrackMCHMID& operator=(const TrackMCHMID& track) = default;
48
50 GlobalTrackID getMCHRef() const { return mMCHRef; }
52 void setMCHRef(const GlobalTrackID& id) { mMCHRef = id; }
54 void setMCHRef(uint32_t idx) { mMCHRef.set(idx, GlobalTrackID::MCH); }
55
57 GlobalTrackID getMIDRef() const { return mMIDRef; }
59 void setMIDRef(const GlobalTrackID& id) { mMIDRef = id; }
61 void setMIDRef(uint32_t idx) { mMIDRef.set(idx, GlobalTrackID::MID); }
62
64 InteractionRecord getIR() const { return mIR; }
66 void setIR(const InteractionRecord& ir) { mIR = ir; }
67
68 std::pair<Time, bool> getTimeMUS(const InteractionRecord& startIR, uint32_t nOrbits = 128,
69 bool printError = false) const;
70
72 double getMatchChi2OverNDF() const { return mMatchNChi2; }
74 void setMatchChi2OverNDF(double chi2) { mMatchNChi2 = chi2; }
75
76 void print() const;
77
78 private:
79 GlobalTrackID mMCHRef{};
80 GlobalTrackID mMIDRef{};
81 InteractionRecord mIR{};
82 double mMatchNChi2 = 0.;
83
84 ClassDefNV(TrackMCHMID, 1);
85};
86
87std::ostream& operator<<(std::ostream& os, const TrackMCHMID& track);
88
89} // namespace dataformats
90} // namespace o2
91
92#endif // ALICEO2_TRACKMCHMID_H
Global index for barrel track: provides provenance (detectors combination), index in respective array...
MUON track external format.
Definition TrackMCHMID.h:33
TrackMCHMID(TrackMCHMID &&)=default
void setIR(const InteractionRecord &ir)
set the interaction record associated to this track
Definition TrackMCHMID.h:66
TrackMCHMID & operator=(TrackMCHMID &&)=default
InteractionRecord getIR() const
get the interaction record associated to this track
Definition TrackMCHMID.h:64
TrackMCHMID(const TrackMCHMID &track)=default
std::pair< Time, bool > getTimeMUS(const InteractionRecord &startIR, uint32_t nOrbits=128, bool printError=false) const
void setMIDRef(uint32_t idx)
set the reference to the MID track entry in its original container
Definition TrackMCHMID.h:61
void setMCHRef(const GlobalTrackID &id)
set the reference to the MCH track entry in its original container
Definition TrackMCHMID.h:52
void setMCHRef(uint32_t idx)
set the reference to the MCH track entry in its original container
Definition TrackMCHMID.h:54
double getMatchChi2OverNDF() const
get the MCH-MID matching chi2/ndf
Definition TrackMCHMID.h:72
GlobalTrackID getMCHRef() const
get the reference to the MCH track entry in its original container
Definition TrackMCHMID.h:50
TrackMCHMID(uint32_t mchIdx, uint32_t midIdx, const InteractionRecord &midIR, double chi2)
Definition TrackMCHMID.h:40
void setMatchChi2OverNDF(double chi2)
set the MCH-MID matching chi2/ndf
Definition TrackMCHMID.h:74
void print() const
write the content of the track to the standard output
void setMIDRef(const GlobalTrackID &id)
set the reference to the MID track entry in its original container
Definition TrackMCHMID.h:59
TrackMCHMID & operator=(const TrackMCHMID &track)=default
TrackMCHMID(const GlobalTrackID &mchID, const GlobalTrackID &midID, const InteractionRecord &midIR, double chi2)
Definition TrackMCHMID.h:38
GlobalTrackID getMIDRef() const
get the reference to the MID track entry in its original container
Definition TrackMCHMID.h:57
GLuint id
Definition glcorearb.h:650
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)