PandaRoot
PndEmcPSAParabolicBaseline.h
Go to the documentation of this file.
1 //****************************************************************************
2 //* This file is part of PandaRoot. *
3 //* *
4 //* PandaRoot is distributed under the terms of the *
5 //* GNU General Public License (GPL) version 3, *
6 //* copied verbatim in the file "LICENSE". *
7 //* *
8 //* Copyright (C) 2006 - 2024 FAIR GmbH and copyright holders of PandaRoot *
9 //* The copyright holders are listed in the file "COPYRIGHTHOLDERS". *
10 //* The authors are listed in the file "AUTHORS". *
11 //****************************************************************************
12 
13 //-----------------------------------------------------------
14 // Description:
15 // Pulseshape analysis for ADC waveforms
16 // Amplitude and time are determined from the simple parabolic fit
17 // by three points (maximum bin and its left and right neigbours)
18 //
19 //-----------------------------------------------------------
20 
21 #ifndef EMCPSAPARABOLICBASELINE_HH
22 #define EMCPSAPARABOLICBASELINE_HH
23 
24 // Base Class Headers ----------------
25 #include <vector>
26 #include "PndEmcAbsPSA.h"
27 #include "TObject.h"
28 
29 class PndEmcWaveform;
30 
39  public:
40  // Constructors/Destructors ---------
41  PndEmcPSAParabolicBaseline(Int_t baselength = 0) : lBaselength(baselength) {}
43 
44  virtual void Process(const PndEmcWaveform *waveform, Double_t &amplitude, Double_t &time);
45 
46  virtual Int_t Process(const PndEmcWaveform *waveform);
47  virtual void GetHit(Int_t i, Double_t &energy, Double_t &time);
48 
49  void FitPeak(const std::vector<Double_t> &signal, Double_t &ampl, Double_t &pos, Int_t peakBin) const;
50  void FitPeak(const std::vector<Double_t> &signal, Double_t &ampl, Double_t &pos, Int_t start, Int_t end) const;
51  void FitPeak(const std::vector<Double_t> &signal, Double_t &ampl, Double_t &pos) const;
52  void GetBaseline(const std::vector<Double_t> &signal, Double_t &baseline) const;
53 
54  private:
55  Int_t lBaselength;
56  Double_t lAmplitude;
57  Double_t lTime;
58 
59  ClassDef(PndEmcPSAParabolicBaseline, 1);
60 };
61 
62 #endif
void FitPeak(const std::vector< Double_t > &signal, Double_t &ampl, Double_t &pos, Int_t peakBin) const
unsigned int i
Definition: P4_F32vec4.h:33
virtual void Process(const PndEmcWaveform *waveform, Double_t &amplitude, Double_t &time)
Deprecated. Do not use.
void GetBaseline(const std::vector< Double_t > &signal, Double_t &baseline) const
represents a simulated waveform in an emc crystal
Baseclass for pulseshapeanalysis ( featureextraction )
Definition: PndEmcAbsPSA.h:33
virtual void GetHit(Int_t i, Double_t &energy, Double_t &time)
Get energy and time of hit.
Pulseshape analysis for ADC waveforms.
PndEmcPSAParabolicBaseline(Int_t baselength=0)