ATLAS Offline Software
Loading...
Searching...
No Matches
TBPlaneTrackingAlgo.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef TBREC_TBPLANETRACKINGALGO_H
6#define TBREC_TBPLANETRACKINGALGO_H
7
9
11
12#include <utility>
13#include <vector>
14
19
21 public:
22
24 // Contructor & Destructor //
26 TBPlaneTrackingAlgo(const std::string& name, ISvcLocator* pSvcLocator);
28
29 // public methods //
30 virtual StatusCode initialize() override;
31 virtual StatusCode execute() override;
32 virtual StatusCode finalize() override;
33
34 private:
35 void FillRandomHit();
36 StatusCode getnewcalib();
37
38
39 // Private function members //
40
45 bool fitPlane(const TBHitPlaneCont * hitPlaneCont, double &a1, double &a2,
46 double &chi2, std::vector<double> &residual);
47
51 bool fitHits(const std::vector<double> & u, const std::vector<double> & w,
52 const std::vector<double> & eu, // const std::vector<double> & ew,
53 double &a1, double &a2);
54
58 double getResidual(const double & u, const double & w,const double &a1,
59 const double &a2);
60
64 double getChi2(const std::vector<double> &v_u,
65 const std::vector<double> &v_w,
66 const std::vector<double> &v_eu,
67// const std::vector<double> &v_ew,
68 const double &a1, const double &a2);
69
73 StatusCode buildHits();
74
75 //Used to test this algo set to true if you want to debug
79
80 // Positions of BPC needed to construct hits
83 std::vector<float> m_bpc_errmeasX,m_bpc_errmeasY;
84
85 std::vector<std::string> m_bpc_names;
86
87 // filename containing positions constants
88 std::string m_calib_filename;
89 unsigned int m_runnumber;
90
91};
92
93#endif
AthAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Holds a set of TBHitPlane objects.
std::vector< float > m_bpc_posX
double getChi2(const std::vector< double > &v_u, const std::vector< double > &v_w, const std::vector< double > &v_eu, const double &a1, const double &a2)
Calculates the chi2 += ((u_i - a1 - a2*w_i)/eu)^2.
std::vector< float > m_bpc_errmeasX
StatusCode buildHits()
Build HitPlaneCont from BPC.
virtual StatusCode execute() override
virtual StatusCode initialize() override
std::vector< float > m_bpc_errposY
std::vector< float > m_bpc_posZX
bool fitPlane(const TBHitPlaneCont *hitPlaneCont, double &a1, double &a2, double &chi2, std::vector< double > &residual)
Fit data to the function u = a1 + a2*w.
std::vector< float > m_bpc_posY
bool fitHits(const std::vector< double > &u, const std::vector< double > &w, const std::vector< double > &eu, double &a1, double &a2)
Fit data to the function u = a1 + a2*w.
std::vector< std::string > m_bpc_names
std::vector< float > m_bpc_errposZY
std::vector< float > m_bpc_errposZX
std::vector< float > m_bpc_errmeasY
std::vector< float > m_bpc_posZY
virtual StatusCode finalize() override
TBHitPlaneCont m_hitPlaneCont_u
std::vector< float > m_bpc_errposX
TBHitPlaneCont m_hitPlaneCont_v
double getResidual(const double &u, const double &w, const double &a1, const double &a2)
Calculates the residual-> r = (u_i - a1 - a2*w_i)
TBPlaneTrackingAlgo(const std::string &name, ISvcLocator *pSvcLocator)
double chi2(TH1 *h0, TH1 *h1)