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