FEDRA emulsion software from the OPERA Collaboration
EdbMomentumEstimator.h
Go to the documentation of this file.
1#ifndef ROOT_EdbMomentumEstimator
2#define ROOT_EdbMomentumEstimator
5
11
12#include "EdbTrackFitter.h"
13#include "TCanvas.h"
14#include "TF1.h"
15
16class TGraphErrors;
17class TString;
18class TGraphAsymmErrors;
19
20//______________________________________________________________________________
22
23 public:
24
25 int eAlg;
26 int eStatus;
27
29
34
36 float ePx,ePy;
37 float eDPx,eDPy;
38
39 float ePXmin, ePXmax;
40 float ePYmin, ePYmax;
41
43 float eP, eDP;
44 float ePmin, ePmax;
45
47
49 TF1 *eF1X;
50 TF1 *eF1Y;
51 TF1 *eF1;
52 TGraphErrors *eG;
53 TGraphErrors *eGX;
54 TGraphErrors *eGY;
55
56 TGraphAsymmErrors *eGA;
57 TGraphAsymmErrors *eGAX;
58 TGraphAsymmErrors *eGAY;
59
60 public:
62 virtual ~EdbMomentumEstimator();
63
64 void SetParPMS_Mag();
65 void SetParPMS_Mag(Int_t type, Int_t parNumber, Double_t parvalue);
66 void Set0();
67 float PMS(EdbTrackP &tr);
68 float PMSang(EdbTrackP &tr);
69 float PMSang_corr(EdbTrackP &tr);
71 float CellWeight(int npl, int m);
72 void EstimateMomentumError(float P, int npl, float ang, float &pmin, float &pmax);
73 double Mat(float P, int npl, float ang);
74 TF1 *MCSErrorFunction(const char *name, float x0, float dtx);
75 TF1 *MCSCoordErrorFunction(const char *name, float tmean, float x0);
76
80
81 double GetDTx(double Tx){return eDTxErrorFun.Eval(Tx);}
82 double GetDTy(double Ty){return eDTyErrorFun.Eval(Ty);}
83 double GetDTs(double Ts){return eDTsErrorFun.Eval(Ts);}
84
87 TF1 *MCSErrorFunction_base(const char *name, float x0, float dtx);
88
89 float P_MS(EdbTrackP &tr);
90// void DrawPlots();
91 void DrawPlots(TCanvas *c1=NULL);
92
93 TString AlgStr(int alg);
94 void Print();
95
96 ClassDef(EdbMomentumEstimator,1) // track momentum estimator
97};
98
99#endif /* ROOT_EdbMomentumEstimator */
FILE * f
Definition: RecDispMC.C:150
TTree * tr
Definition: Shower_E_FromShowerRoot.C:5
Definition: EdbMomentumEstimator.h:21
int PMSang_base_A(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:1168
bool eVerbose
Definition: EdbMomentumEstimator.h:48
void SetDTxErrorFunction(TF1 &f)
Definition: EdbMomentumEstimator.h:77
void SetDTsErrorFunction(TF1 &f)
Definition: EdbMomentumEstimator.h:79
double GetDTx(double Tx)
Definition: EdbMomentumEstimator.h:81
float ePmax
momentum 90% errors range
Definition: EdbMomentumEstimator.h:44
float P_MS(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:1072
float ePXmin
Definition: EdbMomentumEstimator.h:39
TGraphAsymmErrors * eGAX
longitudianl component of the momentum
Definition: EdbMomentumEstimator.h:57
int eAlg
select the algorithm for PMS estimation
Definition: EdbMomentumEstimator.h:25
float PMSang(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:255
EdbMomentumEstimator()
Definition: EdbMomentumEstimator.cxx:30
TGraphAsymmErrors * eGAY
transverse component of the momentum
Definition: EdbMomentumEstimator.h:58
void DrawPlots(TCanvas *c1=NULL)
Definition: EdbMomentumEstimator.cxx:724
float PMSang_corr(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:158
float eP
the output of PMSang
Definition: EdbMomentumEstimator.h:43
TF1 * eF1Y
Definition: EdbMomentumEstimator.h:50
void SetParPMS_Mag()
Definition: EdbMomentumEstimator.cxx:73
void Set0()
Definition: EdbMomentumEstimator.cxx:63
TF1 * MCSErrorFunction_base(const char *name, float x0, float dtx)
Definition: EdbMomentumEstimator.cxx:1049
TF1 * MCSErrorFunction(const char *name, float x0, float dtx)
Definition: EdbMomentumEstimator.cxx:658
void SetDTyErrorFunction(TF1 &f)
Definition: EdbMomentumEstimator.h:78
float eDPy
the fit error
Definition: EdbMomentumEstimator.h:37
float ePx
the fit results
Definition: EdbMomentumEstimator.h:36
TGraphErrors * eG
3D component of the momentum
Definition: EdbMomentumEstimator.h:52
int eMinEntr
min number of entries in the cell to accept it for fitting (def=1)
Definition: EdbMomentumEstimator.h:28
int eStatus
status of the estimation (-1 nothing was done)
Definition: EdbMomentumEstimator.h:26
double GetDTy(double Ty)
Definition: EdbMomentumEstimator.h:82
TF1 eDTxErrorFun
input parameters for PMS_mag
Definition: EdbMomentumEstimator.h:31
float ePy
the estimated momentum
Definition: EdbMomentumEstimator.h:36
TGraphAsymmErrors * eGA
3D component of the momentum
Definition: EdbMomentumEstimator.h:56
float PMScoordinate(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:477
TGraphErrors * eGY
transverse component of the momentum
Definition: EdbMomentumEstimator.h:54
float ePXmax
momentum 90% errors range
Definition: EdbMomentumEstimator.h:39
virtual ~EdbMomentumEstimator()
Definition: EdbMomentumEstimator.cxx:52
float ePmin
Definition: EdbMomentumEstimator.h:44
TF1 * MCSCoordErrorFunction(const char *name, float tmean, float x0)
Definition: EdbMomentumEstimator.cxx:684
EdbTrackP eTrack
the copy of the track to be used for plots
Definition: EdbMomentumEstimator.h:46
float eDPx
Definition: EdbMomentumEstimator.h:37
double Mat(float P, int npl, float ang)
Definition: EdbMomentumEstimator.cxx:711
void EstimateMomentumError(float P, int npl, float ang, float &pmin, float &pmax)
Definition: EdbMomentumEstimator.cxx:699
TF1 eDTyErrorFun
Definition: EdbMomentumEstimator.h:32
float ePYmax
momentum 90% errors range
Definition: EdbMomentumEstimator.h:40
float ePYmin
Definition: EdbMomentumEstimator.h:40
float PMS(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:121
float eDP
Definition: EdbMomentumEstimator.h:43
TF1 * eF1X
fit function
Definition: EdbMomentumEstimator.h:49
double GetDTs(double Ts)
Definition: EdbMomentumEstimator.h:83
int PMSang_base(EdbTrackP &tr)
Definition: EdbMomentumEstimator.cxx:900
TF1 eDTsErrorFun
Definition: EdbMomentumEstimator.h:33
TGraphErrors * eGX
longitudianl component of the momentum
Definition: EdbMomentumEstimator.h:53
TString AlgStr(int alg)
Definition: EdbMomentumEstimator.cxx:101
float CellWeight(int npl, int m)
Definition: EdbMomentumEstimator.cxx:644
TF1 * eF1
Definition: EdbMomentumEstimator.h:51
void Print()
Definition: EdbMomentumEstimator.cxx:90
Definition: EdbTrackFitter.h:17
Definition: EdbPattern.h:113
TCanvas * c1
Definition: energy.C:13
const char * name
Definition: merge_Energy_SytematicSources_Electron.C:24
#define NULL
Definition: nidaqmx.h:84
new TCanvas()
Int_t type
Definition: testBGReduction_By_ANN.C:15