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 ALICEO2_MFT_TrackFitter_H_
18#define ALICEO2_MFT_TrackFitter_H_
19
20#include "MFTTracking/Cluster.h"
21#include "MFTTracking/TrackCA.h"
24#include <TLinearFitter.h>
25#include <list>
26
27namespace o2
28{
29namespace mft
30{
31
33template <typename T>
35{
36
39
40 public:
41 TrackFitter() = default;
42 ~TrackFitter() = default;
43
44 TrackFitter(const TrackFitter&) = delete;
48
49 void setBz(float bZ) { mBZField = bZ; }
50 void setMFTRadLength(float MFT_x2X0) { mMFTDiskThicknessInX0 = MFT_x2X0 / 5.0; }
51 void setVerbosity(bool v) { mVerbose = v; }
52 void setTrackModel(Int_t m) { mTrackModel = m; }
53 auto& getTrackModel() const { return mTrackModel; }
54 void setAlignResiduals(Float_t res) { mAlignResidual = res; }
55
56 bool initTrack(T& track, bool outward = false);
57 bool fit(T& track, bool outward = false);
58
60 static constexpr double getMaxChi2() { return SMaxChi2; }
61
62 private:
63 bool propagateToZ(T& track, double z);
64 bool propagateToNextClusterWithMCS(T& track, double z, int& startingLayerID, const int& newLayerID);
65 bool computeCluster(T& track, int cluster, int& startingLayerID);
66
67 bool mFieldON = true;
68 Float_t mBZField; // kiloGauss.
69 Float_t mMFTDiskThicknessInX0 = 0.042 / 5;
70 Int_t mTrackModel = MFTTrackModel::Optimized;
71 Float_t mAlignResidual = 0.f;
72
73 static constexpr double SMaxChi2 = 2.e10;
74 bool mVerbose = false;
75};
76
77// Functions to estimate momentum and charge from track curvature
78template <typename T>
79Double_t invQPtFromFCF(const T& track, Double_t bFieldZ, Double_t& chi2);
80Bool_t LinearRegression(Int_t nVal, std::vector<double>& xVal, std::vector<double>& yVal, std::vector<double>& yErr, Double_t& a, Double_t& ae, Double_t& b, Double_t& be);
81
82} // namespace mft
83} // namespace o2
84
85#endif // ALICEO2_MFT_TrackFitter_H_
A simple structure for the MFT cluster, used by the standalone track finder.
uint32_t res
Definition RawData.h:0
Standalone classes for the track found by the Linear-Track-Finder (LTF) and by the Cellular-Automaton...
Class to fit a forward track to a set of clusters.
Definition TrackFitter.h:35
void setTrackModel(Int_t m)
Definition TrackFitter.h:52
bool initTrack(T &track, bool outward=false)
TrackFitter(TrackFitter &&)=delete
TrackFitter(const TrackFitter &)=delete
void setAlignResiduals(Float_t res)
Definition TrackFitter.h:54
void setBz(float bZ)
Definition TrackFitter.h:49
static constexpr double getMaxChi2()
Return the maximum chi2 above which the track can be considered as abnormal.
Definition TrackFitter.h:60
TrackFitter & operator=(TrackFitter &&)=delete
auto & getTrackModel() const
Definition TrackFitter.h:53
void setVerbosity(bool v)
Definition TrackFitter.h:51
TrackFitter & operator=(const TrackFitter &)=delete
void setMFTRadLength(float MFT_x2X0)
Definition TrackFitter.h:50
const GLfloat * m
Definition glcorearb.h:4066
const GLdouble * v
Definition glcorearb.h:832
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233
GLdouble GLdouble GLdouble z
Definition glcorearb.h:843
Bool_t LinearRegression(Int_t nVal, std::vector< double > &xVal, std::vector< double > &yVal, std::vector< double > &yErr, Double_t &a, Double_t &ae, Double_t &b, Double_t &be)
Double_t invQPtFromFCF(const T &track, Double_t bFieldZ, Double_t &chi2)
a couple of static helper functions to create timestamp values for CCDB queries or override obsolete ...