119 #ifndef TSTOFGENERATOR_H_
120 #define TSTOFGENERATOR_H_
132 #include "TSVariable.h"
149 double ComputeDm2(
double tof,
double mom,
double len)
const;
150 double ComputeDm2dp(
double tof,
double mom,
double len)
const;
151 double ComputeDm2dt(
double tof,
double mom,
double len)
const;
152 double ComputeDm2dL(
double tof,
double mom,
double len)
const;
153 double ComputeMass(
double tof,
double mom,
double len)
const;
154 double ComputeToF(
double mass,
double mom,
double len)
const;
155 double GenerateMass2(TString part,
double mom)
const;
156 double GenerateMass2(
double mass,
double mom,
double len)
const;
157 TF1* GetMass2Distrib(TString part,
double mom)
const;
158 int GetMass2DistribNPars(TString part)
const;
159 TF1* GetMomResolFunc()
const {
return fMomResol;}
160 TF1* GetParametrization(TString name,
int par)
const;
161 double GetParamValue(TString name,
int par,
double p)
const;
162 double GetSigmaMom(
double)
const;
163 double GetSigmaPathLen()
const {
return fSigmaLen;}
164 double GetSigmaToF()
const {
return fSigmaToF;}
165 double GetToFOffset()
const {
return fToFT0;}
166 TF1* GetToFResolDistr()
const {
return fToFResolDistr;}
169 TF1* ImportMass2Distrib(TString part,
double mom)
const;
171 void SetParticle(TString name, TString label,
float mass=0);
181 void SetParamFunction(TString name,
int par, TString poly_name,
double,
double=0,
double=0);
184 void SetMomentumResolution(
double,
double =0,
double =0);
185 void SetPathLengthResolution(
double);
186 void SetMomentumRange(
double min,
double max);
187 void SetToFResolution(
double);
188 void SetToFResolution(TF1&);
190 void SetToFRange(
double,
double);
191 void SetToFOffset(
double);
198 std::map<TString,TSToF_Part*> fPartList;
228 TSToF_Part(TString name, TString label,
float mass=0);
231 TString GetLabel()
const {
return Label;}
232 float GetMass()
const {
return Mass;}
233 TF1* GetMass2Distrib()
const {
return fMass2Distrib;}
234 TF1* GetMass2Distrib(
double mom)
const;
235 TString GetMass2DistribName()
const {
return fMass2DistribName;}
236 TString GetName()
const {
return Name;}
237 TF1* GetParamFunction(
int)
const;
238 double GetParamValue(
int par,
double p)
const;
239 int GetNpar()
const {
return fMass2Distrib==0 ? 0 : fMass2Distrib->GetNpar();}
240 int GetNumOfParFuncs()
const {
return fParamFunc.size();}
241 double GetMassScale()
const {
return fMassScale;}
243 int GetWidthParam()
const {
return fWidthPar;}
244 bool Mass2IsGaussian()
const {
return fMass2IsGauss;}
245 void SetMass(
float m) {Mass=m;}
246 void SetMassScale(
float m) {fMassScale=m; SetUseMassScale(
true);}
247 void SetMass2Distrib(TString fname,
double xmin,
double xmax,
int width_par=-1);
248 void SetMass2Distrib(TF1&,
int width_par=-1);
253 void SetUseMassScale(
bool b) {fUseMassScale=b;}
254 void SetWidthPar(
int p) {fWidthPar=p;}
255 bool UseMassScale()
const {
return fUseMassScale;}
267 std::map<int,TF1*> fParamFunc;
269 TString fMass2DistribName;
void SetMass2WidthScaling(TString part1, TString part2)
Definition: TSToFGenerator.cc:1195
void SetMass2MeanFunction(TString name, TF1 &)
Definition: TSToFGenerator.cc:902
Definition: TSToFGenerator.h:139
Definition: TSVariable.h:55
double ComputeToF(double mass, double mom, double len) const
Definition: TSToFGenerator.cc:551
double GetMassScaling(int, double) const
Definition: TSToFGenerator.cc:272
void SetParamFunction(TString, int par, TF1 &)
Definition: TSToFGenerator.cc:1266
double ComputeMass(double tof, double mom, double len) const
Definition: TSToFGenerator.cc:533
void SetMass2DistributionFunction(TString name, TF1 &, int width_par=-1)
Definition: TSToFGenerator.cc:797
void SetMass2WidthFunction(TString name, TF1 &)
Definition: TSToFGenerator.cc:1046
void SetParamFunc(int, TF1 &)
Definition: TSToFGenerator.cc:381
Definition: TSToFGenerator.h:223