56 #ifndef TSDEDXGENERATOR_H_
57 #define TSDEDXGENERATOR_H_
74 #include "TSVariable.h"
76 #include "TSBetheBlochFunc.h"
93 void ApplyCalibrationCorrection(
bool);
95 double ComputeAverage(std::vector<double> &clusters,
double trunc_low,
double trunc_up,
int algo,
double param=0)
const;
97 double Generate()
const;
98 double Generate(
int num_clusters)
const;
99 double Generate(
double momentum,
double mass,
int num_clusters=0)
const;
101 double GetMean()
const {
return fMean;}
102 int GetNumOfUsedClusters()
const {
return fNumOfUsedClusters;}
103 TObject* GetTrackDEdxDistrib()
const;
104 TObject* ImportTrackDEdxDistrib()
const;
109 void SetAverageAlgoType(
int);
110 void SetAverageAlgoParam(
double);
112 void SetAsymmetry(
double);
116 void SetClusterChargeDistrib(TF1 &);
117 void SetClusterChargeDistrib(TH1F &);
118 void SetClusterChargeDistrib(TString fname,
double min,
double max,
double p0,
double p1=0,
double p2=0,
double p3=0);
123 void SetMean(
double)
const;
124 void SetPointDistrib(TH1F &);
125 void SetSigmaScaling(
double m,
double alpha);
127 void SetTrackDEdxDistrib(TF1 &);
128 void SetTrackDEdxDistrib(TH1F &);
129 void SetTrackDEdxDistrib(TString fname,
double min,
double max,
double p0,
double p1=0,
double p2=0,
double p3=0);
130 void SetTruncation(
double up,
double low=0);
131 void SetWidthSmearing(
double);
136 double fComputeCalibrationCorrection(
int nclusters)
const;
138 void fInitTrackDistrib();
139 void fSetDistribTitles();
140 void fSetIsClusterDistrib();
141 void fSetIsTrackDistrib();
143 int fAverageAlgoType;
144 double fAverageAlgoParam;
146 TObject *fTrackDistrib;
150 mutable int fNumOfUsedClusters;
155 mutable double fMean;
159 bool fApplyCalibCorr;
161 TString fTrackDedxDistrName;
162 TString fClusterDedxDistrName;
164 bool fIsClusterDistrib;
165 bool fIsTrackDistrib;
166 TString fClusterChargeDistrTitle;
167 TString fTrackChargeDistrTitle;
186 double Distrib(
double *x,
double *p);
189 double GetMin()
const {
return xmin;}
190 double GetMax()
const {
return xmax;}
194 bool HasPointDistrib()
const {
return HasPointDistr;}
196 void InitFunctionParNames(TF1 &);
197 bool IsLandau()
const {
return fIsLandau;}
198 void SetFunctionPars(TF1 &);
199 void SetPointDistrib(TH1F &);
202 double GetMean()
const {
return mean;}
203 double GetSigma()
const {
return sigma;}
204 double GetSigmaTails()
const {
return sigma_tails;}
205 double GetRatioTails()
const {
return ratio_tails;}
206 double GetSigmaScaleBase()
const {
return sigma_scale_base;}
207 double GetSigmaScalePow()
const {
return alpha;}
208 double GetDelta()
const {
return delta;}
209 double GetSpread()
const {
return spread;}
212 void SetMean(
double);
213 void SetSigma(
double);
214 void SetSigmaTails(
double);
215 void SetRatioTails(
double);
216 void SetSigmaScaleBase(
double);
217 void SetSigmaScaling(
double);
218 void SetDelta(
double);
219 void SetSpread(
double);
220 void SetNPoints(
double);
222 bool MeanSet()
const {
return fMeanSet;}
224 bool SigmaSet()
const {
return fSigmaSet;}
225 bool SigmaTailsSet()
const {
return fSigmaTailsSet;}
226 bool RatioTailsSet()
const {
return fRatioTailsSet;}
227 bool SigmaScaleBaseSet()
const {
return fSigmaScaleBaseSet;}
228 bool SigmaScalingSet()
const {
return fSigmaScalingSet;}
229 bool DeltaSet()
const {
return fDeltaSet;}
230 bool SpreadSet()
const {
return fSpreadSet;}
231 bool NPointsSet()
const {
return fNPointsSet;}
233 void SetParameters(
double m,
double s,
double s2=0,
double r=0,
double scale=1,
double alpha=0,
double delta=0,
double rms=0,
double npts=1);
235 void SetMin(
double v) {xmin=v;}
236 void SetMax(
double v) {xmax=v;}
250 double sigma_scale_base;
256 double landau_mpv_shift;
262 std::map<int,bool> par_used;
263 std::map<int,TString> par_name;
264 std::map<TString,int> par_num;
265 std::map<int,double> par_val;
267 std::vector<float> mult;
268 std::vector<float> npts;
270 int ip_mean,ip_sigma,ip_sigma_tails
271 ,ip_ratio_tails,ip_sigma_scale_base,ip_sigma_scale_pow
272 ,ip_delta,ip_spread,ip_npoints;
274 bool fMeanSet,fSigmaSet,fSigmaTailsSet,fRatioTailsSet
275 ,fSigmaScaleBaseSet,fSigmaScalingSet,fDeltaSet,fSpreadSet,fNPointsSet;
Definition: TH1FAuto.h:41
double Distrib(double *x, double *p)
Definition: TSDEdxGenerator.cc:250
Definition: TSDEdxGenerator.h:181
Definition: TSVariable.h:55
Definition: TSDEdxGenerator.h:83
double PointAveragedDistrib(double *x, double *p)
Definition: TSDEdxGenerator.cc:206
Definition: TSBetheBlochFunc.h:30
double ComputeAverage(std::vector< double > &clusters, double trunc_low, double trunc_up, int algo, double param=0) const
Definition: TSDEdxGenerator.cc:720