BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
FTFinder.h
Go to the documentation of this file.
1#pragma once
2
3#include "CLHEP/Vector/ThreeVector.h"
4#include "GaudiKernel/Algorithm.h"
5#include "HepPDT/ParticleDataTable.hh"
6
7#include "MagneticFieldSvc/IBesMagFieldSvc.h"
8#include "RawDataProviderSvc/IRawDataProviderSvc.h"
9
10#include "FTGeom.h"
11#include "FTLayer.h"
12#include "FTList.h"
13#include "FTSegment.h"
14#include "FTSuperLayer.h"
15#include "FTTrack.h"
16#include "FTWire.h"
17#include "MdcParameter.h"
18
19#ifndef ENABLE_BACKWARDS_COMPATIBILITY
20typedef HepGeom::Point3D<double> HepPoint3D;
21#endif
22
23using namespace CLHEP;
24
25class FTFinder {
26public:
27 /// returns FTFinder pointer
28 // static FTFinder * GetPointer(void);
29
30 void setAlgorithmPointer( Algorithm* );
31
32public:
33 /// Constructors and destructor
34 FTFinder();
35
36 /// initializer(creates geometry)
37 void init();
38
39 /// terminator
40 void term();
41
42 /// begin run function(reads constants)
43 void begin_run();
44
45 /// track finder core
46 void event();
47
48public: // Selectors
49 /// returns superlayer
50 FTSuperLayer* superLayer( int id ) const;
51
52 /// returns track list
54
55 /// returns event primary vertex
56 CLHEP::Hep3Vector vertex() const;
57
58 /// returns wire ID for given FTWire object
59 int getWireId( FTWire* ) const;
60
61 /// convert t to x
62 float t2x( const FTLayer* l, const float t ) const;
63
64 /// convert x to t
65 float x2t( const FTLayer* l, const float x ) const;
66
67 /// set bunchtime for MC events
68 void setBunchtime( double bunchtime ) { _bunchtime = bunchtime; };
69 /// set crude mdc time calibconst (~200 ns) for t0 calculation
70 void setT0cal( double t0cal ) { _t0cal = t0cal; };
71
72private: // private member functions
73 Algorithm* m_algorithm;
74
75 /// clear object
76 void clear();
77
78 /// unpack RAWCDC and create wire-hit
79 int updateMdc();
80
81 /// get event start time from segment linear fit
82 void getTestime();
83
84 /// create track list
85 void mkTrackList();
86
87 /// create 3D track list
88 void mkTrack3D();
89
90 /// finds event primary vertex
91 int VertexFit( int z_flag );
92
93 /// finds event primary vertex from 2D tracks
94 int VertexFit2D();
95
96 /// find vertex closest to IP
97 int findBestVertex();
98
99 /// corrects event timing after 2nd r-phi fit and returns event timing
100 int CorrectEvtTiming();
101
102 /// link axial segments to make track
103 FTTrack* linkAxialSegments( FTSegment* inner, FTSegment* outer );
104
105 // link 2,3,4 axial segments
106 void linkAxialSuperLayer234( FTList<FTSegment*>& inner_segments );
107
108 // link 9,10 axial segments
109 void linkAxialSuperLayer910( FTList<FTSegment*>& outer_segments );
110
111 void linkAxialSegments_step( FTList<FTSegment*>& InnerSegments,
112 FTList<FTSegment*>& OuterSegments,
113 FTList<FTSegment*>& Connected, float maxDphi, float maxChi2 );
114
115#ifndef OnlineMode
116 /// make Mdst_charged/trk/trk_fit table from reconstruted tracks
117 void makeMdst();
118#endif
119
120 /// output tracking results into TDS
121 // by wangdy
122 StatusCode makeTds();
123
124 // register T0 into TDS by max
125 // StatusCode registT0();
126
127public: // public data menbers
129 int runNo;
131 float t0Estime;
132 float tOffSet;
135 float Testime;
139
140private: // private data members
141 // static FTFinder * _tFinder;
142 FTGeom* m_geom;
143
144 FTList<FTTrack*> _tracks;
145 FTList<FTSegment*> _linkedSegments;
146 FTList<FTSegment*> _axialSegCollect;
147
148 double _vx;
149 double _vy;
150 double _vz;
151 int _ExpNo;
152 int _RunNo;
153 double _bunchtime;
154 double _t0cal;
155 int m_total_trk;
156
157 HepPDT::ParticleDataTable* m_particleTable;
158 IRawDataProviderSvc* m_rawDataProviderSvc;
159 IBesMagFieldSvc* m_pmgnIMF;
160
161 static MdcParameter* param;
162};
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
Definition FTFinder.h:20
float t0Estime
Definition FTFinder.h:131
FTList< FTTrack * > & tracks()
returns track list
Definition FTFinder.cxx:86
FTSuperLayer * superLayer(int id) const
returns superlayer
Definition FTFinder.cxx:85
int i_rPhiFit
Definition FTFinder.h:136
float t2x(const FTLayer *l, const float t) const
convert t to x
Definition FTFinder.cxx:95
void event()
track finder core
Definition FTFinder.cxx:170
int tEstFlag
Definition FTFinder.h:137
void init()
initializer(creates geometry)
Definition FTFinder.cxx:131
float tOffSet
Definition FTFinder.h:132
float evtTiming
Definition FTFinder.h:133
float Testime
Definition FTFinder.h:135
int eventNo
Definition FTFinder.h:128
CLHEP::Hep3Vector vertex() const
returns event primary vertex
Definition FTFinder.cxx:107
void begin_run()
begin run function(reads constants)
Definition FTFinder.cxx:154
void setT0cal(double t0cal)
set crude mdc time calibconst (~200 ns) for t0 calculation
Definition FTFinder.h:70
void term()
terminator
int runNo
Definition FTFinder.h:129
int expflag
Definition FTFinder.h:130
void setAlgorithmPointer(Algorithm *)
returns FTFinder pointer
Definition FTFinder.cxx:87
int getWireId(FTWire *) const
returns wire ID for given FTWire object
Definition FTFinder.cxx:89
float x2t(const FTLayer *l, const float x) const
convert x to t
Definition FTFinder.cxx:91
FTFinder()
Constructors and destructor.
Definition FTFinder.cxx:111
const HepPoint3D pivot
Definition FTFinder.h:134
FTList< FTList< float > > tEstime
Definition FTFinder.h:138
void setBunchtime(double bunchtime)
set bunchtime for MC events
Definition FTFinder.h:68
Definition FTList.h:6
int t()
Definition t.c:1