Project
Loading...
Searching...
No Matches
ExtendedTrack.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 O2_MCH_EVALUATION_EXTENDED_TRACK_H__
13#define O2_MCH_EVALUATION_EXTENDED_TRACK_H__
14
17#include "MCHTracking/Track.h"
18#include "Math/Vector4D.h"
19#include <gsl/span>
20#include <iostream>
21#include <vector>
22
23namespace o2::mch
24{
25namespace eval
26{
27
36{
37 public:
44 gsl::span<const Cluster>& clusters,
45 double x, double y, double z);
46
47 bool operator==(const ExtendedTrack& track) const;
48
49 bool isMatching(const ExtendedTrack& track) const;
50
51 const std::vector<Cluster>& getClusters() const { return mClusters; }
52
53 std::string asString() const;
54
55 bool hasMatchFound() const { return mHasMatchFound; }
56 bool hasMatchIdentical() const { return mHasMatchIdentical; }
57
58 void setMatchFound(bool val = true) { mHasMatchFound = val; }
59 void setMatchIdentical(bool val = true) { mHasMatchIdentical = val; }
60
61 const TrackParam& param() const;
62 const Track& track() const;
63
64 double getDCA() const { return mDCA; }
65 double getRabs() const { return mRabs; }
66 double getCharge() const { return param().getCharge(); }
67
68 const ROOT::Math::PxPyPzMVector& P() const { return mMomentum4D; }
69
70 double getNormalizedChi2() const;
71
72 private:
73 void extrapToVertex(double x, double y, double z);
74
75 private:
76 Track mTrack{};
77 std::vector<Cluster> mClusters{};
78 ROOT::Math::PxPyPzMVector mMomentum4D{};
79 bool mHasMatchFound;
80 bool mHasMatchIdentical;
81 double mDCA{0.};
82 double mRabs{0.};
83 static constexpr double sChi2Max{2. * 4. * 4.};
84};
85
86std::ostream& operator<<(std::ostream& out, const ExtendedTrack& track);
87
90bool areEqual(const ExtendedTrack& t1, const ExtendedTrack& t2, double chi2Max);
91
92/* Try to match this track with the given track.
93 *
94 * Matching conditions:
95 * - more than 50% of clusters from one of the two tracks matched with
96 * clusters from the other
97 * - at least 1 cluster matched before and 1 cluster matched after the dipole
98 */
99bool areMatching(const ExtendedTrack& t1, const ExtendedTrack& t2, double chi2Max);
100
101} // namespace eval
102}; // namespace o2::mch
103
104#endif
Definition of the MCH cluster minimal structure.
Definition of the MCH track for internal use.
Definition of the MCH track.
MCH track external format.
Definition TrackMCH.h:34
track parameters for internal use
Definition TrackParam.h:34
Double_t getCharge() const
return the charge (assumed forward motion)
Definition TrackParam.h:71
track for internal use
Definition Track.h:33
void setMatchFound(bool val=true)
const TrackParam & param() const
bool isMatching(const ExtendedTrack &track) const
bool operator==(const ExtendedTrack &track) const
const ROOT::Math::PxPyPzMVector & P() const
const std::vector< Cluster > & getClusters() const
void setMatchIdentical(bool val=true)
const Track & track() const
GLint GLenum GLint x
Definition glcorearb.h:403
GLuint GLfloat * val
Definition glcorearb.h:1582
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat GLfloat t1
Definition glcorearb.h:5034
bool areMatching(const ExtendedTrack &t1, const ExtendedTrack &t2, double chi2Max)
bool areEqual(const ExtendedTrack &t1, const ExtendedTrack &t2, double chi2Max)
std::ostream & operator<<(std::ostream &out, const ExtendedTrack &track)
std::vector< Cluster > clusters