]>
Commit | Line | Data |
---|---|---|
d655d7dd | 1 | // -*- mode: c++ -*- |
57839add | 2 | #ifndef ALICALOFITRESULTS_H |
3 | #define ALICALOFITRESULTS_H | |
d655d7dd | 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 | ||
d655d7dd | 22 | #include "Rtypes.h" |
f57baa2d | 23 | #include "AliCaloFitSubarray.h" |
168c7b3c | 24 | #include "AliCaloConstants.h" |
25 | ||
26 | //using namespace CaloConstants::ReturnCodes; | |
27 | // using CaloConstants::FitAlgorithm; | |
f57baa2d | 28 | |
d655d7dd | 29 | // Container class to hold results from fitting |
30 | // as well as other methods for | |
31 | // raw data signals extraction | |
57839add | 32 | class AliCaloFitResults |
d655d7dd | 33 | { |
34 | public: | |
168c7b3c | 35 | // enum kReturnCode {kFitPar=1, kDummy=-1, kCrude=-9, kNoFit=-99, kInvalid=-9999};// possible return values |
507751ce | 36 | // kFitPar: method fit or parametrization was used |
37 | // kDummy: just a filler parameter, if e.g. chi2 not available | |
38 | // kCrude: maximum was used | |
39 | // kNoFit: maximum was used, exception handling for fit invoked | |
40 | // kInvalid: could not even look for maximum | |
f57baa2d | 41 | |
42 | explicit AliCaloFitResults( const Int_t maxSig, | |
43 | const Float_t ped, | |
44 | const Short_t fitStatus, | |
45 | const Float_t amp, | |
507751ce | 46 | const Float_t time, |
47 | const Int_t maxTimebin, | |
f57baa2d | 48 | const Float_t chi, |
49 | const Int_t ndf, | |
50 | const Int_t minSig, | |
6d1befcf | 51 | const AliCaloFitSubarray fitSubarray ); |
f57baa2d | 52 | |
57839add | 53 | explicit AliCaloFitResults( const Int_t maxSig, |
54 | const Float_t ped, | |
55 | const Short_t fitStatus, | |
56 | const Float_t amp, | |
507751ce | 57 | const Float_t time, |
58 | const Int_t maxTimebin, | |
57839add | 59 | const Float_t chi, |
60 | const Int_t ndf, | |
168c7b3c | 61 | const Int_t minSig = Ret::kDummy); |
62 | // const Int_t minSig = CaloConstants::ReturnCodes::kDummy); | |
63 | ||
d655d7dd | 64 | |
507751ce | 65 | // shorter interface when no fit is done |
66 | explicit AliCaloFitResults( const Int_t maxSig, | |
67 | const Float_t ped, | |
68 | const Short_t fitStatus, | |
69 | const Float_t amp, | |
70 | const Int_t maxTimebin); | |
71 | ||
72 | // minimum interface | |
57839add | 73 | explicit AliCaloFitResults( const Int_t maxSig, const Int_t minSig ); |
d655d7dd | 74 | |
6d1befcf | 75 | AliCaloFitResults(); |
57839add | 76 | virtual ~AliCaloFitResults(); |
77 | Int_t GetMaxSig() const { return fMaxSig;}; | |
d655d7dd | 78 | Float_t GetPed() const { return fPed;}; |
57839add | 79 | Int_t GetMinSig() const { return fMinSig;}; |
80 | Int_t GetStatus() const { return fStatus;}; | |
d655d7dd | 81 | Float_t GetAmp() const { return fAmpSig; }; |
507751ce | 82 | Float_t GetTof() const { return fTime; }; |
83 | Float_t GetTime() const { return fTime; }; | |
84 | Int_t GetMaxTimebin() const { return fMaxTimebin; }; | |
947c8e28 | 85 | Float_t GetChi2() const { return fChi2Sig;}; |
57839add | 86 | Int_t GetNdf() const { return fNdfSig; }; |
f57baa2d | 87 | AliCaloFitSubarray GetFitSubarray() const { return fFitSubarray; }; |
d655d7dd | 88 | |
89 | private: | |
6d1befcf | 90 | // AliCaloFitResults(); |
91 | Int_t fMaxSig; //Maximum sample value ( 0 - 1023 ) | |
d655d7dd | 92 | Float_t fPed; //Pedestal |
6d1befcf | 93 | Int_t fStatus; //Sucess or failure of fitting pocedure |
d655d7dd | 94 | Float_t fAmpSig; //Amplitude in entities of ADC counts |
6d1befcf | 95 | Float_t fTime; //peak/max time of signal in entities of sample intervals |
96 | Int_t fMaxTimebin; //timebin with maximum ADC value | |
d655d7dd | 97 | Float_t fChi2Sig; //Chi Square of fit |
6d1befcf | 98 | Int_t fNdfSig; //Number of degrees of freedom of fit |
99 | Int_t fMinSig; //Pedestal | |
f57baa2d | 100 | AliCaloFitSubarray fFitSubarray; // info on time-bin array used for the fitting |
d655d7dd | 101 | }; |
102 | ||
103 | #endif |