BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Analysis/VertexFit/include/VertexFit/TrackPool.h
Go to the documentation of this file.
1#ifndef VertexFit_TrackPool_H
2#define VertexFit_TrackPool_H
3
4//
5// Add Track Parameters to VertexFit/KinematicFit
6// Author: K.L. He date: 11/09/2005, created
7//
8
9// #include <map>
10// #include <string>
11// #include <utility>
12
13#include "VertexFit/GammaShape.h"
14#include "VertexFit/WTrackParameter.h"
15#include <vector>
16
17#ifndef BEAN
18// #include "DstEvent/DstMdcTrack.h"
19// #include "DstEvent/DstMdcKalTrack.h"
20// #include "DstEvent/DstEmcTrack.h"
21# include "EmcRecEventModel/RecEmcShower.h"
22# include "MdcRecEvent/RecMdcKalTrack.h"
23# include "MdcRecEvent/RecMdcTrack.h"
24#else
25# include "DstEvtRecTracks.h"
26#endif
27
28class TrackPool {
29
30public:
31 // constructor & deconstructor
32 TrackPool();
33 ~TrackPool() { ; }
34
35 //
36 // Constructor Function
37 //
38 // event data model dependent
39 void AddTrack( const int number, const double mass, const RecMdcTrack* trk );
40 void AddTrack( const int number, const double mass, const RecMdcKalTrack* trk );
41 void AddTrack( const int number, const double mass, const RecEmcShower* trk );
42 // event data model independent
43 void AddTrack( const int number, const WTrackParameter wtrk );
44 // virtual track with missing parameters
45 void AddMissTrack( const int number, const double mass );
46 void AddMissTrack( const int number, const double mass, const HepLorentzVector p4 );
47 void AddMissTrack( const int number, const double mass, const RecEmcShower* trk );
48 void AddMissTrack( const int number, const RecEmcShower* trk );
49 void AddMissTrack( const int number, const HepLorentzVector p4 );
50 void AddTrackVertex( const int number, const double mass, const RecEmcShower* trk );
51
52 std::vector<int> AddList( int n1 );
53 std::vector<int> AddList( int n1, int n2 );
54 std::vector<int> AddList( int n1, int n2, int n3 );
55 std::vector<int> AddList( int n1, int n2, int n3, int n4 );
56 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5 );
57 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6 );
58 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7 );
59 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8 );
60 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
61 int n9 );
62 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
63 int n9, int n10 );
64 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
65 int n9, int n10, int n11 );
66 std::vector<int> AddList( int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
67 int n9, int n10, int n11, int n12 );
68
69 // Get Function
70
71 std::vector<WTrackParameter> wTrackOrigin() const { return m_wtrk_origin; }
72 std::vector<WTrackParameter> wTrackInfit() const { return m_wtrk_infit; }
73 std::vector<int> wTrackList() const { return m_lwtrk; }
74 WTrackParameter wTrackOrigin( int n ) const { return m_wtrk_origin[n]; }
75 WTrackParameter wTrackInfit( int n ) const { return m_wtrk_infit[n]; }
76 int wTrackList( int n ) const { return m_lwtrk[n]; }
77 // number of WTrack
78 int numberWTrack() const { return ( (int)( m_lwtrk.size() ) ); }
79 //
80 // For Virtual Particles
81 //
82 // std::vector<WTrackParameter> wTrackOrigin_V() const {return m_wtrk_origin_V;}
83 // std::vector<WTrackParameter> wTrackInfit_V() const {return m_wtrk_infit_V;}
84 // std::vector<int> wTrackList_V() const {return m_lwtrk_V;}
85 // WTrackParameter wTrackOrigin_V(int n) const {return m_wtrk_origin_V[n];}
86 // WTrackParameter wTrackInfit_V(int n) const {return m_wtrk_infit_V[n];}
87 // int wTrackList_V(int n) const {return m_lwtrk_V[n];}
88 // number of WTrack
89 // int numberWTrack_V() const { return ((int)(m_lwtrk_V.size()));}
90
91 //
92 // gammashape get function
93 //
94 std::vector<GammaShape> GammaShapeValue() const { return m_gammashape; }
95 std::vector<int> GammaShapeList() const { return m_lgammashape; }
96 GammaShape GammaShapeValue( int n ) const { return m_gammashape[n]; }
97 int GammaShapeList( int n ) const { return m_lgammashape[n]; }
98 int numberGammaShape() const { return ( (int)( m_lgammashape.size() ) ); }
99 //
100 // modifier
101 //
102
103 // set Function
104 void setWTrackOrigin( const int n, const WTrackParameter wtrk ) { m_wtrk_origin[n] = wtrk; }
105 void setWTrackInfit( const int n, const WTrackParameter wtrk ) { m_wtrk_infit[n] = wtrk; }
106 void setWTrackOrigin( const WTrackParameter wtrk ) { m_wtrk_origin.push_back( wtrk ); }
107 void setWTrackInfit( const WTrackParameter wtrk ) { m_wtrk_infit.push_back( wtrk ); }
108 void setWTrackList( const int n ) { m_lwtrk.push_back( n ); }
109 // clear Function
110 void clearWTrackOrigin() { m_wtrk_origin.clear(); }
111 void clearWTrackInfit() { m_wtrk_infit.clear(); }
112 void clearWTrackList() { m_lwtrk.clear(); }
113
114 void clearone() { m_numberone = 0; }
115 void cleartwo() { m_numbertwo = 0; }
116 int numberone() const { return m_numberone; }
117 int numbertwo() const { return m_numbertwo; }
118
119 vector<int> mappositionA() const { return m_mappositionA; }
120 vector<int> mappositionB() const { return m_mappositionB; }
121 vector<int> mapkinematic() const { return m_mapkinematic; }
122
123 void clearMapkinematic() { m_mapkinematic.clear(); }
124 void clearMappositionA() { m_mappositionA.clear(); }
125 void clearMappositionB() { m_mappositionB.clear(); }
126
127 void setMapkinematic( const int n ) { m_mapkinematic.push_back( n ); }
128 void setMappositionA( const int n ) { m_mappositionA.push_back( n ); }
129 void setMappositionB( const int n ) { m_mappositionB.push_back( n ); }
130
131 //
132 // set GammaShape
133 //
134 void setGammaShape( const int n, const GammaShape gammashape ) {
135 m_gammashape[n] = gammashape;
136 }
137 void setGammaShape( const GammaShape gammashape ) { m_gammashape.push_back( gammashape ); }
138 void setGammaShapeList( const int n ) { m_lgammashape.push_back( n ); }
139 // clear gammashape
140 void clearGammaShape() { m_gammashape.clear(); }
141 void clearGammaShapeList() { m_lgammashape.clear(); }
142
143 //=== set beam information===
144 void setBeamPosition( const HepPoint3D BeamPosition ) { m_BeamPosition = BeamPosition; }
145 void setVBeamPosition( const HepSymMatrix VBeamPosition ) {
146 m_VBeamPosition = VBeamPosition;
147 }
148
149 //=== get beam information===
150 HepPoint3D getBeamPosition() const { return m_BeamPosition; }
151 HepSymMatrix getVBeamPosition() const { return m_VBeamPosition; }
152
153protected:
154private:
155 std::vector<WTrackParameter> m_wtrk_origin; // WTrack parameter before fit
156 std::vector<WTrackParameter> m_wtrk_infit; // WTrack Parameter in fit
157 std::vector<int> m_lwtrk; // List of the WTrack number ( != DST tracklist ID)
158 //
159 // For Virtual Particles
160 //
161 // std::vector<WTrackParameter> m_wtrk_origin_V;
162 // std::vector<WTrackParameter> m_wtrk_infit_V;
163 // std::vector<int> m_lwtrk_V;
164
165 // std::multimap< int, int > m_mapkinematic; // index origin track and new track
166 // std::multimap< int, int > m_mappositionA;
167 // std::multimap< int, int > m_mappositionB;
168 int m_numberone; // recording the number of common particlss
169 int m_numbertwo; // recording the number of virtual particles
170 // Gamma dynamic error information
171 //
172 std::vector<GammaShape> m_gammashape;
173 std::vector<int> m_lgammashape; // maybe can share with the m_lwtrk
174
175 std::vector<int> m_mapkinematic; // index origin track and new track
176 std::vector<int> m_mappositionA;
177 std::vector<int> m_mappositionB;
178
179private:
180 HepPoint3D m_BeamPosition;
181 HepSymMatrix m_VBeamPosition;
182};
183#endif
double mass
HepGeom::Point3D< double > HepPoint3D
const Int_t n
int n2
Definition SD0Tag.cxx:59
int n1
Definition SD0Tag.cxx:58
std::vector< int > AddList(int n1)
std::vector< WTrackParameter > wTrackInfit() const
void setVBeamPosition(const HepSymMatrix VBeamPosition)
void setWTrackInfit(const WTrackParameter wtrk)
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
Definition TrackPool.cxx:21
void setWTrackOrigin(const WTrackParameter wtrk)
void AddTrackVertex(const int number, const double mass, const RecEmcShower *trk)
void AddMissTrack(const int number, const double mass)
void setGammaShape(const int n, const GammaShape gammashape)
std::vector< GammaShape > GammaShapeValue() const
std::vector< WTrackParameter > wTrackOrigin() const
std::vector< int > GammaShapeList() const
void setGammaShape(const GammaShape gammashape)
WTrackParameter wTrackOrigin(int n) const
void setBeamPosition(const HepPoint3D BeamPosition)
WTrackParameter wTrackInfit(int n) const
void setWTrackOrigin(const int n, const WTrackParameter wtrk)
std::vector< int > wTrackList() const
void AddTrack(const int number, const double mass, const RecMdcKalTrack *trk)
void setWTrackInfit(const int n, const WTrackParameter wtrk)