musrfit  1.9.2
PRunMuMinus.h
Go to the documentation of this file.
1 /***************************************************************************
2 
3  PRunMuMinus.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 _PRUNMUMINUS_H_
31 #define _PRUNMUMINUS_H_
32 
33 #include "PRunBase.h"
34 
38 class PRunMuMinus : public PRunBase
39 {
40  public:
41  PRunMuMinus();
42  PRunMuMinus(PMsrHandler *msrInfo, PRunDataHandler *rawData, UInt_t runNo, EPMusrHandleTag tag, Bool_t theoAsData);
43  virtual ~PRunMuMinus();
44 
45  virtual Double_t CalcChiSquare(const std::vector<Double_t>& par);
46  virtual Double_t CalcChiSquareExpected(const std::vector<Double_t>& par);
47  virtual Double_t CalcMaxLikelihood(const std::vector<Double_t>& par);
48  virtual void CalcTheory();
49 
50  virtual UInt_t GetNoOfFitBins();
51 
52  virtual void SetFitRangeBin(const TString fitRange);
53 
54  virtual Int_t GetStartTimeBin() { return fStartTimeBin; }
55  virtual Int_t GetEndTimeBin() { return fEndTimeBin; }
56  virtual Int_t GetPacking() { return fPacking; }
57 
58  virtual void CalcNoOfFitBins();
59 
60  protected:
61  virtual Bool_t PrepareData();
62  virtual Bool_t PrepareFitData(PRawRunData* runData, const UInt_t histoNo);
63  virtual Bool_t PrepareRawViewData(PRawRunData* runData, const UInt_t histoNo);
64 
65  private:
66  UInt_t fNoOfFitBins;
67  Int_t fPacking;
68  Bool_t fTheoAsData;
69 
70  Int_t fGoodBins[2];
71 
73 
74  Int_t fStartTimeBin;
75  Int_t fEndTimeBin;
76 
77  virtual Bool_t GetProperT0(PRawRunData* runData, PMsrGlobalBlock *globalBlock, PUIntVector &histoNo);
78  virtual Bool_t GetProperDataRange();
79  virtual void GetProperFitRange(PMsrGlobalBlock *globalBlock);
80 };
81 
82 #endif // _PRUNMUMINUS_H_
virtual void GetProperFitRange(PMsrGlobalBlock *globalBlock)
virtual Double_t CalcChiSquare(const std::vector< Double_t > &par)
virtual void CalcNoOfFitBins()
virtual void CalcTheory()
Int_t fPacking
packing for this particular run. Either given in the RUN- or GLOBAL-block.
Definition: PRunMuMinus.h:67
virtual Bool_t PrepareRawViewData(PRawRunData *runData, const UInt_t histoNo)
std::vector< UInt_t > PUIntVector
Definition: PMusr.h:172
std::vector< Double_t > PDoubleVector
Definition: PMusr.h:196
virtual Bool_t PrepareFitData(PRawRunData *runData, const UInt_t histoNo)
virtual Int_t GetStartTimeBin()
Definition: PRunMuMinus.h:54
virtual Int_t GetPacking()
Definition: PRunMuMinus.h:56
virtual Bool_t PrepareData()
virtual Int_t GetEndTimeBin()
Definition: PRunMuMinus.h:55
Int_t fEndTimeBin
bin at which the fit ends
Definition: PRunMuMinus.h:75
EPMusrHandleTag
Definition: PMusr.h:220
virtual UInt_t GetNoOfFitBins()
UInt_t fNoOfFitBins
number of bins to be fitted
Definition: PRunMuMinus.h:66
Int_t fGoodBins[2]
keep first/last good bins. 0=fgb, 1=lgb
Definition: PRunMuMinus.h:70
Int_t fStartTimeBin
bin at which the fit starts
Definition: PRunMuMinus.h:74
PDoubleVector fForward
forward histo data
Definition: PRunMuMinus.h:72
virtual ~PRunMuMinus()
virtual Double_t CalcChiSquareExpected(const std::vector< Double_t > &par)
Bool_t fTheoAsData
true=only calculate the theory points at the data points, false=calculate more points for the theory ...
Definition: PRunMuMinus.h:68
virtual Bool_t GetProperT0(PRawRunData *runData, PMsrGlobalBlock *globalBlock, PUIntVector &histoNo)
virtual void SetFitRangeBin(const TString fitRange)
virtual Double_t CalcMaxLikelihood(const std::vector< Double_t > &par)
virtual Bool_t GetProperDataRange()