BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Event/DstEvent/include/DstEvent/DstMdcDedx.h
Go to the documentation of this file.
1#ifndef DST_DSTMDCDEDX_H
2#define DST_DSTMDCDEDX_H
3#include "EventModel/EventModel.h"
4#include "GaudiKernel/ContainedObject.h"
5#include "GaudiKernel/ObjectVector.h"
6
7using namespace EventModel;
8extern const CLID& CLID_DstMdcDedx;
10
11class DstMdcDedx : virtual public ContainedObject {
12public:
13 // ctor and dector
15 virtual ~DstMdcDedx() {}
16
17 virtual const CLID& clID() const { return DstMdcDedx::classID(); }
18 static const CLID& classID() { return CLID_DstMdcDedx; }
19
20 // extractors
21 // int getTrackId() const {return m_trackId ;}
22 // int getParticleId() const { return m_particleId; }
23 // int getStatus() const { return m_status; }
24 // int geTruncAlg() const { return m_trunc_alg; }
25 // double getNumChidedx(int i) const { return m_numChidedx[i]; }
26 // int getNumGoodHits() const { return m_numGoodHits; }
27 // int getNumTotalHits() const { return m_numTotalHits; }
28 // double getProbPH() const { return m_probPH; }
29 // double getNormPH() const { return m_normPH; }
30 // extractors
31 int trackId() const { return m_trackId; }
32 int particleId() const { return m_particleId; } // will converge to particleType() later
34 switch ( particleId() )
35 {
36 case 0: return electron; break;
37 case 1: return muon; break;
38 case 2: return kaon; break;
39 case 3: return pion; break;
40 case 4: return proton; break;
41 default:
42 std::cerr << "the particleType receive an incorrect input!" << std::endl;
43 exit( 1 );
44 }
45 }
46 int status() const { return m_status; }
47 int truncAlg() const { return m_trunc_alg; }
48 double chi( int i ) const { return m_chi[i]; }
49 double chiE() const { return m_chi[0]; }
50 double chiMu() const { return m_chi[1]; }
51 double chiPi() const { return m_chi[2]; }
52 double chiK() const { return m_chi[3]; }
53 double chiP() const { return m_chi[4]; }
54 int numGoodHits() const { return m_numGoodHits; }
55 int numTotalHits() const { return m_numTotalHits; }
56 double probPH() const { return m_probPH; }
57 double normPH() const { return m_normPH; }
58 double errorPH() const { return m_errorPH; }
59 double twentyPH() const { return m_twentyPH; }
60
61 // modifiers
64 void setStatus( int status ) { m_status = status; }
65 void setTruncAlg( int trunc_alg ) { m_trunc_alg = trunc_alg; }
66
67 void setChi( double* chi ) {
68 for ( int i = 0; i < 5; i++ ) m_chi[i] = chi[i];
69 }
70
73 void setProbPH( double probPH ) { m_probPH = probPH; }
74 void setNormPH( double normPH ) { m_normPH = normPH; }
75 void setErrorPH( double errorPH ) { m_errorPH = errorPH; }
77
78protected:
79 int m_trackId{ 0 }; // Track ID Add 2005-10-18
80 int m_particleId{ 0 }; // Particle ID from De/Dx
81 int m_status{ 0 }; // Status
82 int m_trunc_alg{ 0 }; // truncate method
83 double m_chi[5]{}; // Number of Chi_dEdx for different particles
84 // 0: e 1: mu 2: pi 3: K 4:p
85 int m_numGoodHits{ 0 }; // No. of good de/dx hits(exclude overflow)
86 int m_numTotalHits{ 0 }; // No. of good de/dx hits(include overflow)
87 double m_probPH{ 0.0 }; // Most probable pulse height from truncated mean
88 double m_normPH{ 0.0 }; // normalized pulse height
89 double m_errorPH{ 0.0 }; // resolution of truncated mean
90 double m_twentyPH{ 0.0 }; // de/dx value of bitrunction rate equal to 20%
91};
92
93typedef ObjectVector<DstMdcDedx> DstMdcDedxCol;
94
95#endif // DST_DEDX_H
const CLID & CLID_DstMdcDedx
ObjectVector< DstMdcDedx > DstMdcDedxCol
int pion
const CLID & CLID_DstMdcDedx
virtual const CLID & clID() const