musrfit  1.9.2
PPrepFourier.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  PPrepFourier.h
4 
5  Author: Andreas Suter
6  e-mail: andreas.suter@psi.ch
7 
8 ***************************************************************************/
9 
10 /***************************************************************************
11  * Copyright (C) 2007-2023 by Andreas Suter *
12  * andreas.suter@psi.ch *
13  * *
14  * This program is free software; you can redistribute it and/or modify *
15  * it under the terms of the GNU General Public License as published by *
16  * the Free Software Foundation; either version 2 of the License, or *
17  * (at your option) any later version. *
18  * *
19  * This program is distributed in the hope that it will be useful, *
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
22  * GNU General Public License for more details. *
23  * *
24  * You should have received a copy of the GNU General Public License *
25  * along with this program; if not, write to the *
26  * Free Software Foundation, Inc., *
27  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
28  ***************************************************************************/
29 
30 #ifndef _PPREPFOURIER_H_
31 #define _PPREPFOURIER_H_
32 
33 #include <iostream>
34 #include <vector>
35 
36 #include <TH1F.h>
37 #include <TMath.h>
38 
39 #include "PMusr.h"
40 
41 //----------------------------------------------------------------------------
46 struct musrFT_data {
47  Int_t dataSetTag;
48  TString info;
49  Double_t timeResolution;
50  Int_t t0;
51  Double_t timeRange[2];
53 };
54 
55 //----------------------------------------------------------------------------
60 class PPrepFourier {
61  public:
62  PPrepFourier();
63  PPrepFourier(const Int_t packing, const Int_t *bkgRange, PDoubleVector bkg);
64  virtual ~PPrepFourier();
65 
66  virtual void SetBkgRange(const Int_t *bkgRange);
67  virtual void SetBkg(PDoubleVector bkg);
68  virtual void SetPacking(const Int_t packing);
69  virtual void AddData(musrFT_data &data);
70  virtual void DoBkgCorrection();
71  virtual void DoPacking();
72  virtual void DoLifeTimeCorrection(Double_t fudge);
73 
74  TString GetInfo(const UInt_t idx);
75  Int_t GetDataSetTag(const UInt_t idx);
76  UInt_t GetNoOfData() { return fRawData.size(); }
77  std::vector<TH1F*> GetData();
78  TH1F *GetData(const UInt_t idx);
79 
80  private:
81  std::vector<musrFT_data> fRawData;
82  std::vector<PDoubleVector>fData;
83  Int_t fBkgRange[2];
85  Int_t fPacking;
86 
87  virtual void InitData();
88 };
89 
90 #endif // _PPREPFOURIER_H_
91 
TString GetInfo(const UInt_t idx)
virtual void DoPacking()
PDoubleVector rawData
a single time domain data vector
Definition: PPrepFourier.h:52
virtual void DoBkgCorrection()
std::vector< TH1F * > GetData()
std::vector< musrFT_data > fRawData
Definition: PPrepFourier.h:81
virtual void SetPacking(const Int_t packing)
virtual ~PPrepFourier()
PDoubleVector fBkg
Definition: PPrepFourier.h:84
Int_t fBkgRange[2]
Definition: PPrepFourier.h:83
Int_t dataSetTag
tag to label the data set. Needed for average-per-data-set
Definition: PPrepFourier.h:47
UInt_t GetNoOfData()
Definition: PPrepFourier.h:76
virtual void InitData()
std::vector< Double_t > PDoubleVector
Definition: PMusr.h:196
TString info
keeps all the meta information
Definition: PPrepFourier.h:48
virtual void SetBkgRange(const Int_t *bkgRange)
Double_t timeRange[2]
time range to be used, given in (usec).
Definition: PPrepFourier.h:51
std::vector< PDoubleVector > fData
Definition: PPrepFourier.h:82
Int_t GetDataSetTag(const UInt_t idx)
virtual void DoLifeTimeCorrection(Double_t fudge)
Int_t t0
keep the t0 bin
Definition: PPrepFourier.h:50
virtual void SetBkg(PDoubleVector bkg)
Int_t fPacking
Definition: PPrepFourier.h:85
virtual void AddData(musrFT_data &data)
Double_t timeResolution
time resolution in (usec)
Definition: PPrepFourier.h:49