ATLAS Offline Software
Loading...
Searching...
No Matches
LArWaveHelper.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef LARWAVEHELPER_H
6#define LARWAVEHELPER_H
7
8#include "LArWave.h"
9#include "LArWaveCumul.h"
11#include <math.h>
12
13
15
16 public:
17
18 LArWave translate (const LArWave& theWave, int nShift, double baseline = 0.) const;
19 LArWave Dtranslate (const LArWave& theWave, double tShift, double baseline = 0.) const;
21 unsigned int getMin (const LArWave& theWave) const;
23 unsigned int getMax (const LArWave& theWave) const;
25 double getDMax (const LArWave& theWave, double &tMax)const;
27 LArWave derive (const LArWave& theWave) const;
29 LArWave derive_smooth(const LArWave& theWave) const;
31 LArWave autocorr (const LArWave& theWave) const;
32
33 LArWave subSample(const LArWave& theWave,unsigned Nfirst,unsigned deltaN) const;
34 double getBaseline(const LArWave& theWave,unsigned nBase) const;
35 double getSumTail(const LArWave& theWave,unsigned iFirst) const;
36 double getSumRegion(const LArWave& theWave,unsigned iFirst,unsigned iLast) const;
37 double getSumSquareTail(const LArWave& theWave,unsigned iFirst) const;
38 double getSumSquareRegion(const LArWave& theWave,unsigned iFirst,unsigned iLast) const;
39 double getArea(const LArWave& theWave)const;
40 double getWidth(const LArWave& theWave)const;
41 double getMaxAmp(const LArWave& theWave)const;
42 double getT0(const LArWave& theWave)const;
43 double getT5(const LArWave& theWave)const;
44 unsigned getStart(const LArWave& theWave)const;
45 unsigned getZeroCross(const LArWave& theWave)const;
46 double getJitter(const LArWaveCumul& theWave)const;
47
49
50 std::vector<double> linfit(const LArWave& theWave,unsigned iFirst,unsigned iLast,
51 double& rho) const;
52 std::vector<double> expfit(const LArWave& theWave,unsigned iFirst,unsigned iLast,
53 double& rho) const;
54 std::vector<double> polyfit(const LArWave& theWave,unsigned iFirst,unsigned iLast,
55 unsigned Ndeg) const;
56
57 // the following returns a linear master waveform and a "dac0" intercept
58 // [0] is dac0, [1] is master waveform
59 std::vector<LArWave> linearMasterWave(const std::vector<const LArWave*>& vWaves,const std::vector<double>& vAmpli) const;
60
61 private:
62
63 unsigned fact(unsigned N) const { return ( N<2 ) ? 1 : N*fact(N-1) ; };
64
65 std::vector<double> linfit(const std::vector<double>& X,const std::vector<double>& Y,
66 double& rho) const;
67 std::vector<double> expfit(const std::vector<double>& X,const std::vector<double>& Y,
68 double& rho) const;
69 std::vector<double> polyfit(const std::vector<double>& X,const std::vector<double>& Y,
70 unsigned Ndeg) const;
71 unsigned get_fit_vectors(const LArWave& theWave,unsigned iFirst,unsigned iLast,
72 std::vector<double>& X,std::vector<double>& Y) const;
73
74} ;
75
76
77#endif // LARWAVEHELPER_H
@ baseline
double getJitter(const LArWaveCumul &theWave) const
LArWave translate(const LArWave &theWave, int nShift, double baseline=0.) const
std::vector< double > polyfit(const LArWave &theWave, unsigned iFirst, unsigned iLast, unsigned Ndeg) const
LArWave Dtranslate(const LArWave &theWave, double tShift, double baseline=0.) const
unsigned int getMin(const LArWave &theWave) const
return index of minimum sample
std::vector< LArWave > linearMasterWave(const std::vector< const LArWave * > &vWaves, const std::vector< double > &vAmpli) const
unsigned fact(unsigned N) const
double getSumSquareTail(const LArWave &theWave, unsigned iFirst) const
double getSumSquareRegion(const LArWave &theWave, unsigned iFirst, unsigned iLast) const
unsigned get_fit_vectors(const LArWave &theWave, unsigned iFirst, unsigned iLast, std::vector< double > &X, std::vector< double > &Y) const
LArWaveDerivedQuantitiesP getDerivedQuantities(const LArWaveCumul &theWave) const
double getMaxAmp(const LArWave &theWave) const
double getWidth(const LArWave &theWave) const
LArWave autocorr(const LArWave &theWave) const
autocorrelation function (not normalized)
unsigned getZeroCross(const LArWave &theWave) const
LArWave derive_smooth(const LArWave &theWave) const
smoothed derivative
double getBaseline(const LArWave &theWave, unsigned nBase) const
double getSumRegion(const LArWave &theWave, unsigned iFirst, unsigned iLast) const
LArWave subSample(const LArWave &theWave, unsigned Nfirst, unsigned deltaN) const
std::vector< double > expfit(const LArWave &theWave, unsigned iFirst, unsigned iLast, double &rho) const
double getT5(const LArWave &theWave) const
double getT0(const LArWave &theWave) const
std::vector< double > linfit(const LArWave &theWave, unsigned iFirst, unsigned iLast, double &rho) const
unsigned int getMax(const LArWave &theWave) const
return index of maximum sample
double getSumTail(const LArWave &theWave, unsigned iFirst) const
double getDMax(const LArWave &theWave, double &tMax) const
return amplitude aproximation from poly2 fit around maxima, and it's time
LArWave derive(const LArWave &theWave) const
crude derivative
unsigned getStart(const LArWave &theWave) const
double getArea(const LArWave &theWave) const