]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EMCAL/AliCaloFitResults.h
Return supermodule number from eta and phi, taking into account the number of supermo...
[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
25 // Container class to hold results from fitting 
26 // as well as other methods for
27 // raw data signals extraction
28 class  AliCaloFitResults
29 {
30  public:
31   enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};// possible return values
32   // kFitPar: method fit or parametrization was used
33   // kDummy: just a filler parameter, if e.g. chi2 not available
34   // kCrude: maximum was used
35   // kNoFit: maximum was used, exception handling for fit invoked
36   // kInvalid: could not even look for maximum
37
38   explicit AliCaloFitResults( const Int_t maxSig, 
39                               const Float_t ped, 
40                               const Short_t fitStatus, 
41                               const Float_t  amp, 
42                               const Float_t time,
43                               const Int_t maxTimebin,
44                               const Float_t chi, 
45                               const Int_t ndf, 
46                               const Int_t minSig, 
47                               const AliCaloFitSubarray fitSubarray  ); 
48
49   explicit AliCaloFitResults( const Int_t maxSig, 
50                               const Float_t ped, 
51                               const Short_t fitStatus, 
52                               const Float_t  amp, 
53                               const Float_t time,
54                               const Int_t maxTimebin,
55                               const Float_t chi, 
56                               const Int_t ndf, 
57                               const Int_t minSig = kDummy); 
58
59   // shorter interface when no fit is done
60   explicit AliCaloFitResults( const Int_t maxSig, 
61                               const Float_t ped, 
62                               const Short_t fitStatus, 
63                               const Float_t  amp, 
64                               const Int_t maxTimebin); 
65
66   // minimum interface
67   explicit AliCaloFitResults( const Int_t maxSig, const Int_t minSig );
68
69   AliCaloFitResults();
70   virtual  ~AliCaloFitResults();
71   Int_t  GetMaxSig() const  { return fMaxSig;};
72   Float_t   GetPed() const { return fPed;};
73   Int_t  GetMinSig() const { return fMinSig;};
74   Int_t  GetStatus() const  { return fStatus;};
75   Float_t   GetAmp() const {  return fAmpSig; };
76   Float_t   GetTof() const {  return fTime; }; 
77   Float_t   GetTime() const {  return fTime; };
78   Int_t   GetMaxTimebin() const {  return fMaxTimebin; };
79   Float_t   GetChi2() const { return fChi2Sig;};
80   Int_t  GetNdf() const { return fNdfSig; };
81   AliCaloFitSubarray  GetFitSubarray() const { return fFitSubarray; };
82   
83  private:
84   // AliCaloFitResults();
85   Int_t   fMaxSig;      //Maximum sample value ( 0 - 1023 )
86   Float_t    fPed;      //Pedestal 
87   Int_t   fStatus;      //Sucess or failure of fitting pocedure
88   Float_t    fAmpSig;   //Amplitude in entities of ADC counts
89   Float_t    fTime;     //peak/max time of signal in entities of sample intervals 
90   Int_t    fMaxTimebin; //timebin with maximum ADC value
91   Float_t    fChi2Sig;  //Chi Square of fit 
92   Int_t   fNdfSig;      //Number of degrees of freedom of fit
93   Int_t   fMinSig;      //Pedestal 
94   AliCaloFitSubarray fFitSubarray; // info on time-bin array used for the fitting
95 };
96
97 #endif