00001 #include <vector> 00002 00003 const long int RUN0 = 0; 00004 const long int RUN1 = 0; 00005 const long int RUN2 = 5459; 00006 const long int RUN3 = 8093; 00007 const long int RUN4 = 9947; 00008 const long int RUN5 = 11397; 00009 const long int RUN6 = 23455; 00010 const long int RUN7 = 25244; 00011 00013 const double HV1_curvep0=500.0*0.1165; 00014 const double HV1_curvep1=9.404; 00015 const double HV1_curvep2=0.009811; 00016 const double HV1_curvep3=1.621; 00017 const double HV1_curvep4=1.19; 00018 const double HV1_index_sin=0; 00019 const double HV1_index_nhit=0.9525; 00020 const double HV1_sigmap0=65; 00021 const double HV1_sigmap1=57.08; 00022 const double HV1_sigmap2=60.03; 00023 const double HV1_sigmap3=-2.747; 00024 00026 const double HV2_curvep0=550.0*0.0182604; 00027 const double HV2_curvep1=35.0428; 00028 const double HV2_curvep2=1.24185e-09; 00029 const double HV2_curvep3= 2.25831; 00030 const double HV2_curvep4=5.81573; 00031 const double HV2_index_sin=0.341267; 00032 const double HV2_index_nhit=0.557516; 00033 const double HV2_sigmap0=33.0; 00034 const double HV2_sigmap1=33.1897; 00035 const double HV2_sigmap2=29.3308; 00036 const double HV2_sigmap3=-2.11828; 00037 00038 const double VR0CUT = 1.0; 00039 const double VZ0CUT = 10.0; 00040 const double PT0HighCut = 5.0; 00041 const double PT0LowCut = 0.05; 00042 00043 #define NormalMean 550 //reference value 00044 00045 #define NumHistBins 300 //set histogram range for gauss and landau distribution 00046 #define MinHistValue 10 00047 #define MaxHistValue 3000 00048 #define MinHistValue1 300 00049 #define MaxHistValue1 950 00050 #define MinChiValue -1 00051 #define MaxChiValue 1 00052 00053 #define MinADCValuecut 10 //choose hits again in calibration 00054 #define MaxADCValuecut 35000 00055 #define RPhi_PathMaxCut 3 00056 #define Iner_RPhi_PathMinCut 0.24 00057 #define Out_RPhi_PathMinCut 0.32 00058 #define Iner_DriftDistCut 0.75 00059 #define Out_DriftDistCut 1.0 00060 00061 #define NumSlices 100 00062 #define NumSlicesDoca 40 00063 #define NumSlicesEAng 40 00064 #define DocaMin -1.1 00065 #define DocaMax 1.1 00066 #define PhiMin -0.25 00067 #define PhiMax 0.25 00068 00069 #define NumBinCostheta 80 00070 #define CosthetaMin -1.00 00071 #define CosthetaMax 1.00 00072 00073 static const double doca_norm[43] = 00074 { 00075 0.585, 0.615, 0.63, 0.61, 0.59, 0.57, 0.565, 0.61, 0.8, 0.855, 00076 0.8, 0.855, 0.805, 0.845, 0.8, 0.845, 0.785, 0.825, 0.785, 0.815, 00077 0.765, 0.795, 0.82, 0.855, 0.8, 0.82, 0.86, 0.895, 0.77, 0.805, 00078 0.83, 0.87, 0.75, 0.78, 0.8, 0.82, 0.8, 0.815, 0.83, 0.87, 00079 0.77, 0.795, 0.8 00080 }; 00081 00082 static const double Eangle_value_cut[15] = 00083 {-0.25, -0.06, -0.04, -0.03, -0.02, -0.01, -0.005, 0, 00084 0.005, 0.01, 0.02, 0.03, 0.04, 0.06, 0.25 00085 }; 00086 00087 static const double Eangle_cut_bin[14] = {1, 1, 2, 6, 6, 2, 2, 2, 2, 6, 6, 2, 1, 1}; 00088 00089 double mylan(double *x, double *par); 00090 double landaun(double *x, double *par); 00091 double Landau(double *x, double *par); 00092 double Vavilov(double *x, double *par); 00093 double AsymGauss(double *x, double *par); 00094 00095 void dedx_pid_exp_old( int landau, int runflag, float dedx,int Nohit, float mom, float theta, float t0, float lsamp,double dedx_exp[5], double ex_sigma[5],double pid_prob[5], double chi_dedx[5]); 00096 00097 void dedx_pid_exp(int vflag[3], float dedx, int trkalg,int Nohit, float mom, float theta, float t0, float lsamp, double dedx_exp[5], double ex_sigma[5],double pid_prob[5], double chi_dedx[5],std::vector<double> & par, std::vector<double> & sig_par); 00098 00099 double SpaceChargeCorrec(double m_theta, double mom, int Particle, double dEdx);