00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef ROOT_TUnfoldDensity
00014 #define ROOT_TUnfoldDensity
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044 #include "TUnfoldSys.h"
00045 #include "TUnfoldBinning.h"
00046
00047 #define TUnfoldDensity TUnfoldDensityV17
00048
00049 class TUnfoldDensityV17 : public TUnfoldSysV17 {
00050 protected:
00051
00052 const TUnfoldBinningV17 * fConstOutputBins;
00053
00054 const TUnfoldBinningV17 * fConstInputBins;
00055
00056 TUnfoldBinningV17 *fOwnedOutputBins;
00057
00058 TUnfoldBinningV17 *fOwnedInputBins;
00059
00060 TUnfoldBinningV17 *fRegularisationConditions;
00061
00062 public:
00063
00064 enum EDensityMode {
00065
00066 kDensityModeNone=0,
00067
00068 kDensityModeBinWidth=1,
00069
00070 kDensityModeUser=2,
00071
00072 kDensityModeBinWidthAndUser=3
00073 };
00074 protected:
00075
00076 virtual TString GetOutputBinName(Int_t iBinX) const;
00077
00078 Double_t GetDensityFactor(EDensityMode densityMode,Int_t iBin) const;
00079 void RegularizeDistributionRecursive
00080 (const TUnfoldBinningV17 *binning,ERegMode regmode,
00081 EDensityMode densityMode,const char *distribution,
00082 const char *axisSteering);
00083 void RegularizeOneDistribution
00084 (const TUnfoldBinningV17 *binning,ERegMode regmode,
00085 EDensityMode densityMode,const char *axisSteering);
00086
00087 public:
00088 TUnfoldDensityV17(void);
00089
00090 TUnfoldDensityV17(const TH2 *hist_A, EHistMap histmap,
00091 ERegMode regmode = kRegModeCurvature,
00092 EConstraint constraint=kEConstraintArea,
00093 EDensityMode densityMode=kDensityModeBinWidthAndUser,
00094 const TUnfoldBinningV17 *outputBins=0,
00095 const TUnfoldBinningV17 *inputBins=0,
00096 const char *regularisationDistribution=0,
00097 const char *regularisationAxisSteering="*[UOB]");
00098
00099 virtual ~ TUnfoldDensityV17(void);
00100
00101 void RegularizeDistribution(ERegMode regmode,EDensityMode densityMode,
00102 const char *distribution,
00103 const char *axisSteering);
00104
00105
00106 enum EScanTauMode {
00107
00108 kEScanTauRhoAvg =0,
00109
00110 kEScanTauRhoMax =1,
00111
00112 kEScanTauRhoAvgSys =2,
00113
00114 kEScanTauRhoMaxSys =3,
00115
00116 kEScanTauRhoSquareAvg =4,
00117
00118 kEScanTauRhoSquareAvgSys =5
00119 };
00120
00121 virtual Int_t ScanTau(Int_t nPoint,Double_t tauMin,Double_t tauMax,
00122 TSpline **scanResult,Int_t mode=kEScanTauRhoAvg,
00123 const char *distribution=0,const char *projectionMode=0,TGraph **lCurvePlot=0,TSpline **logTauXPlot=0,TSpline **logTauYPlot=0);
00124 virtual Double_t GetScanVariable(Int_t mode,const char *distribution,const char *projectionMode);
00125
00126 TH1 *GetOutput(const char *histogramName,
00127 const char *histogramTitle=0,const char *distributionName=0,
00128 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE) const;
00129 TH1 *GetBias(const char *histogramName,
00130 const char *histogramTitle=0,const char *distributionName=0,
00131 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE) const;
00132 TH1 *GetFoldedOutput(const char *histogramName,
00133 const char *histogramTitle=0,
00134 const char *distributionName=0,
00135 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE,
00136 Bool_t addBgr=kFALSE) const;
00137 TH1 *GetBackground(const char *histogramName,const char *bgrSource=0,
00138 const char *histogramTitle=0,
00139 const char *distributionName=0,
00140 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE,Int_t includeError=3) const;
00141 TH1 *GetInput(const char *histogramName,const char *histogramTitle=0,
00142 const char *distributionName=0,
00143 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE) const;
00144 TH1 *GetDeltaSysSource(const char *source,
00145 const char *histogramName,
00146 const char *histogramTitle=0,
00147 const char *distributionName=0,
00148 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00149 TH1 *GetDeltaSysBackgroundScale(const char *bgrSource,
00150 const char *histogramName,
00151 const char *histogramTitle=0,
00152 const char *distributionName=0,
00153 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00154 TH1 *GetDeltaSysTau(const char *histogramName,
00155 const char *histogramTitle=0,
00156 const char *distributionName=0,
00157 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00158 TH2 *GetEmatrixSysUncorr(const char *histogramName,
00159 const char *histogramTitle=0,
00160 const char *distributionName=0,
00161 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00162 TH2 *GetEmatrixSysBackgroundUncorr(const char *bgrSource,
00163 const char *histogramName,
00164 const char *histogramTitle=0,
00165 const char *distributionName=0,
00166 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00167 TH2 *GetEmatrixInput(const char *histogramName,
00168 const char *histogramTitle=0,
00169 const char *distributionName=0,
00170 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00171 TH2 *GetEmatrixTotal(const char *histogramName,
00172 const char *histogramTitle=0,
00173 const char *distributionName=0,
00174 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00175 TH1 *GetRhoIstatbgr(const char *histogramName,const char *histogramTitle=0,
00176 const char *distributionName=0,
00177 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE,
00178 TH2 **ematInv=0);
00179 TH1 *GetRhoItotal(const char *histogramName,const char *histogramTitle=0,
00180 const char *distributionName=0,
00181 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE,
00182 TH2 **ematInv=0);
00183 TH2 *GetRhoIJtotal(const char *histogramName,
00184 const char *histogramTitle=0,
00185 const char *distributionName=0,
00186 const char *projectionMode=0,Bool_t useAxisBinning=kTRUE);
00187 TH2 *GetL(const char *histogramName,
00188 const char *histogramTitle=0,
00189 Bool_t useAxisBinning=kTRUE);
00190 TH1 *GetLxMinusBias(const char *histogramName,const char *histogramTitle=0);
00191
00192 TH2 *GetProbabilityMatrix(const char *histogramName,
00193 const char *histogramTitle=0,Bool_t useAxisBinning=kTRUE) const;
00194
00195 const TUnfoldBinningV17 *GetInputBinning(const char *distributionName=0) const;
00196 const TUnfoldBinningV17 *GetOutputBinning(const char *distributionName=0) const;
00197
00198 TUnfoldBinningV17 *GetLBinning(void) const { return fRegularisationConditions; }
00199 ClassDef(TUnfoldDensityV17, TUnfold_CLASS_VERSION)
00200 };
00201
00202 #endif