]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliCaloFitResults.h
Coverity fix
[u/mrichter/AliRoot.git] / EMCAL / AliCaloFitResults.h
1 // -*- mode: c++ -*-
2 #ifndef ALICALOFITRESULTS_H
3 #define ALICALOFITRESULTS_H
4 /**************************************************************************
5  * This file is property of and copyright by                              *
6  * the Relativistic Heavy Ion Group (RHIG), Yale University, US, 2009     *
7  *                                                                        *
8  * Primary Author: Per Thomas Hille <p.t.hille@fys.uio.no>                *
9  *                                                                        *
10  * Contributors are mentioned in the code where appropriate.              *
11  * Please report bugs to p.t.hille@fys.uio.no                             *
12  *                                                                        *
13  * Permission to use, copy, modify and distribute this software and its   *
14  * documentation strictly for non-commercial purposes is hereby granted   *
15  * without fee, provided that the above copyright notice appears in all   *
16  * copies and that both the copyright notice and this permission notice   *
17  * appear in the supporting documentation. The authors make no claims     *
18  * about the suitability of this software for any purpose. It is          *
19  * provided "as is" without express or implied warranty.                  *
20  **************************************************************************/
21
22 #include "Rtypes.h"
23 #include "AliCaloFitSubarray.h"
24 #include "AliCaloConstants.h"
25
26 class  AliCaloFitResults
27 {
28  public:
29   //  enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};// possible return values
30   // kFitPar: method fit or parametrization was used
31   // kDummy: just a filler parameter, if e.g. chi2 not available
32   // kCrude: maximum was used
33   // kNoFit: maximum was used, exception handling for fit invoked
34   // kInvalid: could not even look for maximum
35
36   explicit AliCaloFitResults( const Int_t maxSig, 
37                               const Float_t ped, 
38                               const Short_t fitStatus, 
39                               const Float_t  amp, 
40                               const Float_t time,
41                               const Int_t maxTimebin,
42                               //   const Float_t chi, 
43                               const Float_t chi,  
44                               const Int_t ndf, 
45                               const Int_t minSig, 
46                               const AliCaloFitSubarray fitSubarray  ); 
47
48   explicit AliCaloFitResults( const Int_t maxSig, 
49                               const Float_t ped, 
50                               const Short_t fitStatus, 
51                               const Float_t  amp, 
52                               const Float_t time,
53                               const Int_t maxTimebin,
54                               //   const Float_t chi, 
55                               const Float_t chi, 
56                               const Int_t ndf, 
57                               const Int_t minSig = Ret::kDummy);  
58   //                          const Int_t minSig = CaloConstants::ReturnCodes::kDummy); 
59
60
61   // shorter interface when no fit is done
62   explicit AliCaloFitResults( const Int_t maxSig, 
63                               const Float_t ped, 
64                               const Short_t fitStatus, 
65                               const Float_t  amp, 
66                               const Int_t maxTimebin); 
67
68   // minimum interface
69   explicit AliCaloFitResults( const Int_t maxSig, const Int_t minSig );
70
71   AliCaloFitResults();
72   virtual  ~AliCaloFitResults();
73   UShort_t  GetMaxSig() const  { return fMaxSig;};
74   Float_t   GetPed() const { return fPed;};
75   UShort_t  GetMinSig() const { return fMinSig;};
76   Int_t  GetStatus() const  { return fStatus;};
77   Float_t   GetAmp() const {  return fAmpSig; };
78   Float_t   GetTof() const {  return fTime; }; 
79   Float_t   GetTime() const {  return fTime; };
80   Int_t   GetMaxTimebin() const {  return fMaxTimebin; };
81   Float_t   GetChi2() const { return fChi2Sig;};
82   UShort_t  GetNdf() const { return fNdfSig; };
83   AliCaloFitSubarray  GetFitSubarray() const { return fFitSubarray; };
84   
85   
86  private:
87   // AliCaloFitResults();
88   UShort_t   fMaxSig;      //Maximum sample value ( 0 - 1023 )
89   Float_t    fPed;      //Pedestal 
90   Int_t   fStatus;      //Sucess or failure of fitting pocedure
91   Float_t    fAmpSig;   //Amplitude in entities of ADC counts
92   Float_t    fTime;     //peak/max time of signal in entities of sample intervals 
93   Int_t    fMaxTimebin; //timebin with maximum ADC value
94   Float_t    fChi2Sig;  //Chi Square of fit 
95   UShort_t   fNdfSig;      //Number of degrees of freedom of fit
96   UShort_t   fMinSig;      //Pedestal 
97   AliCaloFitSubarray fFitSubarray; // info on time-bin array used for the fitting
98 };
99
100 #endif