Project
Loading...
Searching...
No Matches
TrackFitter.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 O2_MCH_TRACKFITTER_H_
18#define O2_MCH_TRACKFITTER_H_
19
21#include "MCHTracking/Track.h"
23
24namespace o2
25{
26namespace mch
27{
28
31{
32 public:
33 TrackFitter() = default;
34 ~TrackFitter() = default;
35
36 TrackFitter(const TrackFitter&) = delete;
40
41 void initField(float l3Current, float dipoleCurrent);
42
44 void setBendingVertexDispersion(double ey) { mBendingVertexDispersion2 = ey * ey; }
45
47 void smoothTracks(bool smooth) { mSmooth = smooth; }
49 bool isSmootherEnabled() { return mSmooth; }
50
52 void useClusterResolution() { mUseChamberResolution = false; }
54 void useChamberResolution() { mUseChamberResolution = true; }
55 // Set the chamber resolution in x and y directions
56 void setChamberResolution(double ex, double ey);
57
58 void fit(Track& track, bool smooth = true, bool finalize = true,
59 std::list<TrackParam>::reverse_iterator* itStartingParam = nullptr,
60 bool skipLocalChi2Calculation = false);
61
62 void runKalmanFilter(TrackParam& trackParam);
63
65 static constexpr double getMaxChi2() { return SMaxChi2; }
66
67 private:
68 void initTrack(const Cluster& cl1, const Cluster& cl2, TrackParam& param);
69 void addCluster(const TrackParam& startingParam, const Cluster& cl, TrackParam& param);
70 void smoothTrack(Track& track, bool finalize, bool skipLocalChi2Calculation);
71 void runSmoother(const TrackParam& previousParam, TrackParam& param, bool skipLocalChi2Calculation);
72
73 static constexpr double SMaxChi2 = 2.e10;
75 static constexpr double SDefaultChamberZ[10] = {-526.16, -545.24, -676.4, -695.4, -967.5,
76 -998.5, -1276.5, -1307.5, -1406.6, -1437.6};
78 static constexpr double SChamberThicknessInX0[10] = {0.065, 0.065, 0.075, 0.075, 0.035,
79 0.035, 0.035, 0.035, 0.035, 0.035};
80
81 double mBendingVertexDispersion2 = 4900.;
82
83 bool mSmooth = false;
84
85 bool mUseChamberResolution = false;
86 double mChamberResolutionX2 = 0.04;
87 double mChamberResolutionY2 = 0.04;
88};
89
90//_________________________________________________________________________________________________
91inline void TrackFitter::setChamberResolution(double ex, double ey)
92{
94 mChamberResolutionX2 = ex * ex;
95 mChamberResolutionY2 = ey * ey;
96}
97
98} // namespace mch
99} // namespace o2
100
101#endif // O2_MCH_TRACKFITTER_H_
Definition of the MCH cluster minimal structure.
Definition of the MCH track for internal use.
Definition of the MCH track parameters for internal use.
Class to fit a track to a set of clusters.
Definition TrackFitter.h:31
TrackFitter & operator=(const TrackFitter &)=delete
void setChamberResolution(double ex, double ey)
Definition TrackFitter.h:91
void useChamberResolution()
Use the chamber resolution instead of cluster resolution during the fit.
Definition TrackFitter.h:54
void initField(float l3Current, float dipoleCurrent)
void useClusterResolution()
Use the own resolution of each cluster during the fit (default)
Definition TrackFitter.h:52
void setBendingVertexDispersion(double ey)
Set the vertex dispersion in y direction used for the track covariance seed.
Definition TrackFitter.h:44
bool isSmootherEnabled()
Return the smoother enable/disable flag.
Definition TrackFitter.h:49
void smoothTracks(bool smooth)
Enable/disable the smoother (and the saving of related parameters)
Definition TrackFitter.h:47
static constexpr double getMaxChi2()
Return the maximum chi2 above which the track can be considered as abnormal.
Definition TrackFitter.h:65
TrackFitter(const TrackFitter &)=delete
TrackFitter(TrackFitter &&)=delete
TrackFitter & operator=(TrackFitter &&)=delete
void runKalmanFilter(TrackParam &trackParam)
track parameters for internal use
Definition TrackParam.h:34
track for internal use
Definition Track.h:33
GLenum GLfloat param
Definition glcorearb.h:271
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...
cluster minimal structure
Definition Cluster.h:31