BOSS 7.0.8
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcDedxTrk.h
Go to the documentation of this file.
1// BesIII MDC dE/dx Reconstruction Module
2// Class: MdcDedxTrk
3// Created by Dayong WANG 2003/11
4
5#ifndef _INCLUDE_ExTrk_H
6#define _INCLUDE_ExTrk_H
7
8#ifndef _ExTrk_DEFINED_
9#define _ExTrk_DEFINED_
10#endif
11
12#include <cmath>
13#include <vector>
14
18//#include "MdcDedxAlg/MdcDedxCorrection.h"
19
22{
23
24 public:
25 MdcDedxTrk( RecMdcTrack& trk );
26 MdcDedxTrk( RecMdcKalTrack& trk_kal, int pid);
27 MdcDedxTrk();
29
30 void set_ExTrk( RecMdcTrack& trk );
31 void set_ExTrk_Kal( RecMdcKalTrack& trk_kal, int pid);
32
33 double cal_dedx( float );
34 double cal_dedx_bitrunc(float, int, int& );
35 double cal_dedx_median( float );
36 double cal_dedx_geometric( float );
37 double cal_dedx_geometric_trunc( float );
38 double cal_dedx_harmonic( float );
39 double cal_dedx_harmonic_trunc( float );
40 double cal_dedx_transform( int );
41 double cal_dedx_log( float , int);
42 double SpaceChargeCorrec( double, double, int, double );
43
44 void set_dEdx( int l, float dEdx_meas, int trkalg,int runflag, int vflag[3], double t0, vector<double> & DedxCurve_Parameter, vector<double> & DedxSigma_Parameter, MdcDedxCorrection*);
45 void set_phlist( const vector<double>& phlist) {m_phlist = phlist;}
46 void set_phlist_hit( const vector<double>& phlist) {m_phlist_hit = phlist;}
47 void setVecDedxHits(const DedxHitRefVec& vecdedxhit) { m_vecdedxhit= vecdedxhit;}
48
49 vector<double> get_phlist(void) {return m_phlist;}
50 vector<double> get_phlist_hit(void) {return m_phlist_hit;}
51 DedxHitRefVec getVecDedxHits() const {return m_vecdedxhit;}
52
53 RecMdcTrack* trk_ptr() const {return m_trk;}
54 RecMdcKalTrack* trk_ptr_kal() const {return m_trk_kal;}
55
56
57 int stat()const {return m_stat;}
58 int trk_id()const {return m_trk_id;}
59 //int trk_id_kal()const {return m_trk_id_kal;}
60 int nsample()const {return m_nsample;}
61 int quality()const {return m_quality;}
62 double dedx()const {return m_dEdx;}
63 int charge()const {return m_charge;}
64 double P()const {return m_P;}
65 double theta()const {return m_theta;}
66 double phi()const {return m_phi;}
67 double Pt()const {return m_P*std::sin(m_theta);}
68 double expect(int pid)const;
69 double exp_sigma(int pid)const;
70 double prob(int pid)const;
71 double chi_dedx(int pid) const;
72 double* pexpect() {return dedx_exp;}
73 double* pexp_sigma() {return ex_sigma;}
74 double* pprob() {return pid_prob;}
75 double* pchi_dedx() {return chi_ex;}
76
77 private:
78 double dedx_exp[5];
79 double ex_sigma[5];
80 double pid_prob[5];
81 double chi_ex[5];
82 double m_dEdx;
83 float m_truncate;
84
85 RecMdcTrack* m_trk;
86 RecMdcKalTrack* m_trk_kal;
87 int m_stat;
88 int m_trk_id;
89 //int m_trk_id_kal;
90 int m_quality;
91 int m_charge;
92 float m_P;
93 double m_theta;
94 double m_phi;
95 int m_nsample; //all the hits on track;
96 double m_pl_rp;
97
98 vector<double> m_phlist;
99 vector<double> m_phlist_hit;
100 DedxHitRefVec m_vecdedxhit;
101};
102
103//--------------------------------------------------------------------
104inline double MdcDedxTrk::expect( int pid) const
105{
106 if( pid >= 0 && pid < 5 ) return dedx_exp[pid];
107 else return -1;
108}
109
110inline double MdcDedxTrk::exp_sigma( int pid) const
111{
112 if( pid >= 0 && pid < 5 ) return ex_sigma[pid];
113 else return -1;
114}
115
116inline double MdcDedxTrk::prob( int pid) const
117{
118 if( pid >= 0 && pid < 5 ) return pid_prob[pid];
119 else return -1;
120}
121
122inline double MdcDedxTrk::chi_dedx( int pid) const
123{
124 if( pid >= 0 && pid < 5 ) return chi_ex[pid];
125 else return -1;
126}
127#endif
SmartRefVector< RecMdcDedxHit > DedxHitRefVec
Definition: RecMdcDedx.h:27
int vflag[3]
Curve parameter vars.
double P() const
Definition: MdcDedxTrk.h:64
double cal_dedx_geometric_trunc(float)
Definition: MdcDedxTrk.cxx:222
double expect(int pid) const
Definition: MdcDedxTrk.h:104
RecMdcKalTrack * trk_ptr_kal() const
Definition: MdcDedxTrk.h:54
double cal_dedx_bitrunc(float, int, int &)
Definition: MdcDedxTrk.cxx:171
void set_dEdx(int l, float dEdx_meas, int trkalg, int runflag, int vflag[3], double t0, vector< double > &DedxCurve_Parameter, vector< double > &DedxSigma_Parameter, MdcDedxCorrection *)
Definition: MdcDedxTrk.cxx:307
double prob(int pid) const
Definition: MdcDedxTrk.h:116
double cal_dedx_harmonic_trunc(float)
Definition: MdcDedxTrk.cxx:256
void set_ExTrk_Kal(RecMdcKalTrack &trk_kal, int pid)
Definition: MdcDedxTrk.cxx:122
double theta() const
Definition: MdcDedxTrk.h:65
double dedx() const
Definition: MdcDedxTrk.h:62
int trk_id() const
Definition: MdcDedxTrk.h:58
void setVecDedxHits(const DedxHitRefVec &vecdedxhit)
Definition: MdcDedxTrk.h:47
void set_ExTrk(RecMdcTrack &trk)
Definition: MdcDedxTrk.cxx:94
double cal_dedx_harmonic(float)
Definition: MdcDedxTrk.cxx:241
double cal_dedx_log(float, int)
Definition: MdcDedxTrk.cxx:291
int quality() const
Definition: MdcDedxTrk.h:61
double * pprob()
Definition: MdcDedxTrk.h:74
double * pexp_sigma()
Definition: MdcDedxTrk.h:73
vector< double > get_phlist(void)
Definition: MdcDedxTrk.h:49
DedxHitRefVec getVecDedxHits() const
Definition: MdcDedxTrk.h:51
int stat() const
Definition: MdcDedxTrk.h:57
void set_phlist_hit(const vector< double > &phlist)
Definition: MdcDedxTrk.h:46
double cal_dedx(float)
Definition: MdcDedxTrk.cxx:153
double chi_dedx(int pid) const
Definition: MdcDedxTrk.h:122
void set_phlist(const vector< double > &phlist)
Definition: MdcDedxTrk.h:45
double SpaceChargeCorrec(double, double, int, double)
Definition: MdcDedxTrk.cxx:333
vector< double > get_phlist_hit(void)
Definition: MdcDedxTrk.h:50
double cal_dedx_median(float)
Definition: MdcDedxTrk.cxx:193
int charge() const
Definition: MdcDedxTrk.h:63
double * pchi_dedx()
Definition: MdcDedxTrk.h:75
double * pexpect()
Definition: MdcDedxTrk.h:72
double Pt() const
Definition: MdcDedxTrk.h:67
int nsample() const
Definition: MdcDedxTrk.h:60
double phi() const
Definition: MdcDedxTrk.h:66
RecMdcTrack * trk_ptr() const
Definition: MdcDedxTrk.h:53
double cal_dedx_geometric(float)
Definition: MdcDedxTrk.cxx:207
double exp_sigma(int pid) const
Definition: MdcDedxTrk.h:110
double cal_dedx_transform(int)
Definition: MdcDedxTrk.cxx:274
float dEdx_meas