ATLAS Offline Software
Loading...
Searching...
No Matches
TimePointBetaFitter.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef MUON_STAU_TIMEPOINTBETAFITTER_H
6#define MUON_STAU_TIMEPOINTBETAFITTER_H
7
8#include <vector>
9#include "GaudiKernel/PhysicalConstants.h"
10
11static constexpr double const& invSpeedOfLight = 1 / Gaudi::Units::c_light; // need 1/299.792458
12
13namespace Muon {
14
16 public:
18 struct Hit {
20 Hit(float distance_, float time_, float error_ ) : distance(distance_), time(time_+distance*invSpeedOfLight), error(error_), useInFit(true), residual(0.) { weight2 = 1./(error*error); }
21
23 float distance;
24 float time;
25 float error;
26 float weight2;
27 bool useInFit;
28 float residual;
29 };
30 typedef std::vector<Hit> HitVec;
31
33 struct FitResult {
35 FitResult() : status(0), beta(0), chi2(0), ndof(1) {}
36 FitResult(int status_, float beta_, float chi2_, int ndof_) : status(status_), beta(beta_), chi2(chi2_), ndof(ndof_) {}
37
39 float chi2PerDOF() const { return (status == 0 || ndof == 0) ? 0 : chi2/ndof; }
40
42 int status;
43 float beta;
44 float chi2;
45 int ndof;
46 };
47
50
52 static FitResult fit( HitVec& hits ) ;
53
55 FitResult fitWithOutlierLogic( HitVec& hits ) const;
56
57 };
58
59}
60
61#endif
static constexpr double const & invSpeedOfLight
FitResult fitWithOutlierLogic(HitVec &hits) const
fit beta with outlier logic
static FitResult fit(HitVec &hits)
fit beta
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
FitResult(int status_, float beta_, float chi2_, int ndof_)
float chi2PerDOF() const
chi2/ndof, return 0 if ndof == 0 or status == 0
float beta
status flag (0 = failed, 1 = ok)
float time
distance from time reference point use to calculate TOF
float residual
flag to indicate whether to use the hit in the fit
Hit(float distance_, float time_, float error_)
constructor, takes the distance of the point to the IP, the measured time with tof subtracted and the...