BOSS 8.0.0
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
15#include "MdcRecEvent/RecMdcDedx.h"
16#include "MdcRecEvent/RecMdcKalTrack.h"
17#include "MdcRecEvent/RecMdcTrack.h"
18// #include "MdcDedxCorrection.h"
19
22
23public:
24 MdcDedxTrk( RecMdcTrack& trk );
25 MdcDedxTrk( RecMdcKalTrack& trk_kal, int pid );
26 MdcDedxTrk();
28
29 void set_ExTrk( RecMdcTrack& trk );
30 void set_ExTrk_Kal( RecMdcKalTrack& trk_kal, int pid );
31
32 double cal_dedx( float );
33 double cal_dedx_bitrunc( float, int, int& );
34 double cal_dedx_median( float );
35 double cal_dedx_geometric( float );
36 double cal_dedx_geometric_trunc( float );
37 double cal_dedx_harmonic( float );
38 double cal_dedx_harmonic_trunc( float );
39 double cal_dedx_transform( int );
40 double cal_dedx_log( float, int );
41 double SpaceChargeCorrec( double, double, int, double );
42
43 void set_dEdx( int l, float dEdx_meas, int trkalg, int runflag, int vflag[3], double t0,
44 vector<double>& DedxCurve_Parameter, vector<double>& DedxSigma_Parameter,
46 void set_phlist( const vector<double>& phlist ) { m_phlist = phlist; }
47 void set_phlist_hit( const vector<double>& phlist ) { m_phlist_hit = phlist; }
48 void setVecDedxHits( const DedxHitRefVec& vecdedxhit ) { m_vecdedxhit = vecdedxhit; }
49
50 vector<double> get_phlist( void ) { return m_phlist; }
51 vector<double> get_phlist_hit( void ) { return m_phlist_hit; }
52 DedxHitRefVec getVecDedxHits() const { return m_vecdedxhit; }
53
54 RecMdcTrack* trk_ptr() const { return m_trk; }
55 RecMdcKalTrack* trk_ptr_kal() const { return m_trk_kal; }
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
77private:
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 if ( pid >= 0 && pid < 5 ) return dedx_exp[pid];
106 else return -1;
107}
108
109inline double MdcDedxTrk::exp_sigma( int pid ) const {
110 if ( pid >= 0 && pid < 5 ) return ex_sigma[pid];
111 else return -1;
112}
113
114inline double MdcDedxTrk::prob( int pid ) const {
115 if ( pid >= 0 && pid < 5 ) return pid_prob[pid];
116 else return -1;
117}
118
119inline double MdcDedxTrk::chi_dedx( int pid ) const {
120 if ( pid >= 0 && pid < 5 ) return chi_ex[pid];
121 else return -1;
122}
123#endif
SmartRefVector< RecMdcDedxHit > DedxHitRefVec
double P() const
Definition MdcDedxTrk.h:64
double cal_dedx_geometric_trunc(float)
double expect(int pid) const
Definition MdcDedxTrk.h:104
RecMdcKalTrack * trk_ptr_kal() const
Definition MdcDedxTrk.h:55
double cal_dedx_bitrunc(float, int, int &)
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 *)
double prob(int pid) const
Definition MdcDedxTrk.h:114
double cal_dedx_harmonic_trunc(float)
void set_ExTrk_Kal(RecMdcKalTrack &trk_kal, int pid)
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:48
void set_ExTrk(RecMdcTrack &trk)
double cal_dedx_harmonic(float)
MdcDedxTrk(RecMdcTrack &trk)
double cal_dedx_log(float, int)
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:50
DedxHitRefVec getVecDedxHits() const
Definition MdcDedxTrk.h:52
int stat() const
Definition MdcDedxTrk.h:57
void set_phlist_hit(const vector< double > &phlist)
Definition MdcDedxTrk.h:47
double cal_dedx(float)
double chi_dedx(int pid) const
Definition MdcDedxTrk.h:119
void set_phlist(const vector< double > &phlist)
Definition MdcDedxTrk.h:46
double SpaceChargeCorrec(double, double, int, double)
vector< double > get_phlist_hit(void)
Definition MdcDedxTrk.h:51
double cal_dedx_median(float)
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:54
double cal_dedx_geometric(float)
double exp_sigma(int pid) const
Definition MdcDedxTrk.h:109
double cal_dedx_transform(int)