ATLAS Offline Software
Loading...
Searching...
No Matches
CscBipolarStripFitter.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 CscBipolarStripFitter_H
6#define CscBipolarStripFitter_H
8// K. Nikolopoulos
9// V. Chernyatin and M. Schernau
10// Oct 2007
11//
12// CSC Strip fitter using the bipolar waveform of the pulse
13//
14//
15#include <vector>
16
19#include "GaudiKernel/ToolHandle.h"
20
21class ICscCalibTool;
22class CscIdHelper;
23namespace Muon {
24 class CscStripPrepData;
25}
26
27class CscBipolarStripFitter : virtual public ICscStripFitter, public AthAlgTool {
28public: // Ctors and dtor.
29 // Constructor.
30 CscBipolarStripFitter(const std::string &, const std::string &, const IInterface *);
31
32 // Destructor.
34
35public: // AlgTool methods
36 // Initialization.
37 StatusCode initialize() override;
38
39public: // Interface methods
40 // Tell compiler not to hide other fit methods.
42
43 // Fit a list of sample charges using the calibration tool.
44 // If that fit fails, the peak channel is used.
45 Result fit(const ChargeList &charges, double samplingTime, Identifier &stripId) const;
46
47private:
49
50 // Calibration tool.
51 ToolHandle<ICscCalibTool> m_cscCalibTool{
52 this,
53 "cscCalibTool",
54 "",
55 };
56
57 static double FindInitValues(double *x, double *initValues, int *maxsample) ;
58 double FindPow(double z) const;
59 static void InvertMatrix(double matrix[][3], const int dim, const int *) ;
60 static void InvertSymmetric4x4(double W[][4]) ;
61 void Derivative(double A[][3], double fp[][1], double p0[][1], int imeas, const int *meas) const;
62 int TheFitter(double *x, const double ex, const double *initValues, int imeas, int *meas, int ipar, int *par, double *chi2,
63 double *result) const;
64
65 // Job options.
66 double m_qerr; // Charge error for a successful fit.
67 double m_terr; // Time error for a succcessful fit.
68 double m_qerr_fail; // Charge error for a failed fit.
69 double m_terr_fail; // Time error for a failed fit.
70 double m_qerrprop; // Charge calibration error
71 double m_n;
72 double m_n2;
73 double m_zmax;
76};
77
78#endif
#define x
#define z
AthAlgTool(const std::string &type, const std::string &name, const IInterface *parent)
Constructor with parameters:
CscBipolarStripFitter(const std::string &, const std::string &, const IInterface *)
~CscBipolarStripFitter()=default
Result fit(const ChargeList &charges, double samplingTime, Identifier &stripId) const
void Derivative(double A[][3], double fp[][1], double p0[][1], int imeas, const int *meas) const
static void InvertMatrix(double matrix[][3], const int dim, const int *)
double FindPow(double z) const
int TheFitter(double *x, const double ex, const double *initValues, int imeas, int *meas, int ipar, int *par, double *chi2, double *result) const
ToolHandle< ICscCalibTool > m_cscCalibTool
const CscIdHelper * m_phelper
StatusCode initialize() override
static void InvertSymmetric4x4(double W[][4])
static double FindInitValues(double *x, double *initValues, int *maxsample)
std::vector< float > ChargeList
virtual Result fit(const ChargeList &ChargeList, double samplingTime, bool samplingPhase, Identifier &sid) const
Class representing the raw data of one CSC strip (for clusters look at Muon::CscPrepData).
double chi2(TH1 *h0, TH1 *h1)
NRpcCablingAlg reads raw condition data and writes derived condition data to the condition store.
hold the test vectors and ease the comparison