BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
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 <vector>
16
17#ifndef BEAN
18//#include "DstEvent/DstMdcTrack.h"
19//#include "DstEvent/DstMdcKalTrack.h"
20//#include "DstEvent/DstEmcTrack.h"
24#else
25#include "DstEvtRecTracks.h"
26#endif
27
28class TrackPool {
29
30 public:
31
32 // constructor & deconstructor
33 TrackPool();
35
36 //
37 // Constructor Function
38 //
39 // event data model dependent
40 void AddTrack(const int number, const double mass, const RecMdcTrack *trk);
41 void AddTrack(const int number, const double mass, const RecMdcKalTrack *trk);
42 void AddTrack(const int number, const double mass, const RecEmcShower *trk);
43 // event data model independent
44 void AddTrack(const int number, const WTrackParameter wtrk);
45 // virtual track with missing parameters
46 void AddMissTrack(const int number, const double mass);
47 void AddMissTrack(const int number, const double mass, const HepLorentzVector p4);
48 void AddMissTrack(const int number, const double mass, const RecEmcShower *trk);
49 void AddMissTrack(const int number, const RecEmcShower *trk);
50 void AddMissTrack(const int number, const HepLorentzVector p4);
51 void AddTrackVertex(const int number, const double mass, const RecEmcShower *trk);
52
53 std::vector<int> AddList(int n1);
54 std::vector<int> AddList(int n1, int n2);
55 std::vector<int> AddList(int n1, int n2, int n3);
56 std::vector<int> AddList(int n1, int n2, int n3, int n4);
57 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5);
58 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6);
59 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7);
60 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8);
61 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
62 int n9);
63 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
64 int n9, int n10);
65 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
66 int n9, int n10, int n11);
67 std::vector<int> AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8,
68 int n9, int n10, int n11, int n12);
69
70 // Get Function
71
72 std::vector<WTrackParameter> wTrackOrigin() const {return m_wtrk_origin;}
73 std::vector<WTrackParameter> wTrackInfit() const {return m_wtrk_infit;}
74 std::vector<int> wTrackList() const {return m_lwtrk;}
75 WTrackParameter wTrackOrigin(int n) const {return m_wtrk_origin[n];}
76 WTrackParameter wTrackInfit(int n) const {return m_wtrk_infit[n];}
77 int wTrackList(int n) const {return m_lwtrk[n];}
78 // number of WTrack
79 int numberWTrack() const { return ((int)(m_lwtrk.size()));}
80 //
81 // For Virtual Particles
82 //
83 // std::vector<WTrackParameter> wTrackOrigin_V() const {return m_wtrk_origin_V;}
84 // std::vector<WTrackParameter> wTrackInfit_V() const {return m_wtrk_infit_V;}
85 // std::vector<int> wTrackList_V() const {return m_lwtrk_V;}
86 // WTrackParameter wTrackOrigin_V(int n) const {return m_wtrk_origin_V[n];}
87 // WTrackParameter wTrackInfit_V(int n) const {return m_wtrk_infit_V[n];}
88 // int wTrackList_V(int n) const {return m_lwtrk_V[n];}
89 // number of WTrack
90 // int numberWTrack_V() const { return ((int)(m_lwtrk_V.size()));}
91
92 //
93 // gammashape get function
94 //
95 std::vector<GammaShape> GammaShapeValue() const {return m_gammashape;}
96 std::vector<int> GammaShapeList() const {return m_lgammashape;}
97 GammaShape GammaShapeValue(int n) const {return m_gammashape[n];}
98 int GammaShapeList(int n) const {return m_lgammashape[n];}
99 int numberGammaShape() const { return ((int)(m_lgammashape.size()) );}
100 //
101 // modifier
102 //
103
104 // set Function
105 void setWTrackOrigin(const int n, const WTrackParameter wtrk) {m_wtrk_origin[n] = wtrk;}
106 void setWTrackInfit(const int n, const WTrackParameter wtrk) {m_wtrk_infit[n] = wtrk;}
107 void setWTrackOrigin(const WTrackParameter wtrk) {m_wtrk_origin.push_back(wtrk);}
108 void setWTrackInfit(const WTrackParameter wtrk) {m_wtrk_infit.push_back(wtrk);}
109 void setWTrackList(const int n) {m_lwtrk.push_back(n);}
110 // clear Function
111 void clearWTrackOrigin() {m_wtrk_origin.clear();}
112 void clearWTrackInfit() {m_wtrk_infit.clear();}
113 void clearWTrackList() {m_lwtrk.clear();}
114
115 void clearone() {m_numberone = 0;}
116 void cleartwo() {m_numbertwo = 0;}
117 int numberone() const {return m_numberone;}
118 int numbertwo() const {return m_numbertwo;}
119
120 vector<int> mappositionA() const {return m_mappositionA;}
121 vector<int> mappositionB() const {return m_mappositionB;}
122 vector<int> mapkinematic() const {return m_mapkinematic;}
123
124 void clearMapkinematic() {m_mapkinematic.clear();}
125 void clearMappositionA() {m_mappositionA.clear();}
126 void clearMappositionB() {m_mappositionB.clear();}
127
128 void setMapkinematic(const int n) {m_mapkinematic.push_back(n);}
129 void setMappositionA(const int n) {m_mappositionA.push_back(n);}
130 void setMappositionB(const int n) {m_mappositionB.push_back(n);}
131
132 //
133 // set GammaShape
134 //
135 void setGammaShape(const int n, const GammaShape gammashape) {m_gammashape[n] = gammashape;}
136 void setGammaShape(const GammaShape gammashape) {m_gammashape.push_back(gammashape);}
137 void setGammaShapeList(const int n) {m_lgammashape.push_back(n);}
138 // clear gammashape
139 void clearGammaShape() {m_gammashape.clear();}
140 void clearGammaShapeList() {m_lgammashape.clear();}
141
142 //=== set beam information===
143 void setBeamPosition(const HepPoint3D BeamPosition) {m_BeamPosition = BeamPosition;}
144 void setVBeamPosition(const HepSymMatrix VBeamPosition) {m_VBeamPosition = VBeamPosition;}
145
146 //=== get beam information===
147 HepPoint3D getBeamPosition() const{return m_BeamPosition;}
148 HepSymMatrix getVBeamPosition() const {return m_VBeamPosition;}
149
150
151 protected:
152
153
154 private:
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
179 private:
180 HepPoint3D m_BeamPosition;
181 HepSymMatrix m_VBeamPosition;
182
183};
184#endif
double mass
const Int_t n
int n2
Definition: SD0Tag.cxx:55
int n1
Definition: SD0Tag.cxx:54
std::vector< int > AddList(int n1)
Definition: TrackPool.cxx:483
int numberone() const
Definition: TrackPool.h:117
void setMappositionB(const int n)
Definition: TrackPool.h:130
std::vector< WTrackParameter > wTrackInfit() const
Definition: TrackPool.h:73
void setVBeamPosition(const HepSymMatrix VBeamPosition)
Definition: TrackPool.h:144
void setWTrackInfit(const WTrackParameter wtrk)
Definition: TrackPool.h:108
int numberWTrack() const
Definition: TrackPool.h:79
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
Definition: TrackPool.cxx:22
void clearMapkinematic()
Definition: TrackPool.h:124
void clearGammaShapeList()
Definition: TrackPool.h:140
void clearWTrackOrigin()
Definition: TrackPool.h:111
void clearone()
Definition: TrackPool.h:115
void clearMappositionB()
Definition: TrackPool.h:126
int GammaShapeList(int n) const
Definition: TrackPool.h:98
int numberGammaShape() const
Definition: TrackPool.h:99
int wTrackList(int n) const
Definition: TrackPool.h:77
void setWTrackOrigin(const WTrackParameter wtrk)
Definition: TrackPool.h:107
vector< int > mappositionA() const
Definition: TrackPool.h:120
void clearWTrackList()
Definition: TrackPool.h:113
HepSymMatrix getVBeamPosition() const
Definition: TrackPool.h:148
void AddTrackVertex(const int number, const double mass, const RecEmcShower *trk)
Definition: TrackPool.cxx:444
void clearMappositionA()
Definition: TrackPool.h:125
void AddMissTrack(const int number, const double mass)
Definition: TrackPool.cxx:375
HepPoint3D getBeamPosition() const
Definition: TrackPool.h:147
void setGammaShape(const int n, const GammaShape gammashape)
Definition: TrackPool.h:135
std::vector< GammaShape > GammaShapeValue() const
Definition: TrackPool.h:95
void setWTrackList(const int n)
Definition: TrackPool.h:109
std::vector< WTrackParameter > wTrackOrigin() const
Definition: TrackPool.h:72
void setGammaShapeList(const int n)
Definition: TrackPool.h:137
int numbertwo() const
Definition: TrackPool.h:118
~TrackPool()
Definition: TrackPool.h:34
std::vector< int > GammaShapeList() const
Definition: TrackPool.h:96
void setGammaShape(const GammaShape gammashape)
Definition: TrackPool.h:136
vector< int > mappositionB() const
Definition: TrackPool.h:121
void setMappositionA(const int n)
Definition: TrackPool.h:129
void cleartwo()
Definition: TrackPool.h:116
void clearGammaShape()
Definition: TrackPool.h:139
vector< int > mapkinematic() const
Definition: TrackPool.h:122
void clearWTrackInfit()
Definition: TrackPool.h:112
WTrackParameter wTrackOrigin(int n) const
Definition: TrackPool.h:75
void setBeamPosition(const HepPoint3D BeamPosition)
Definition: TrackPool.h:143
WTrackParameter wTrackInfit(int n) const
Definition: TrackPool.h:76
void setMapkinematic(const int n)
Definition: TrackPool.h:128
void setWTrackOrigin(const int n, const WTrackParameter wtrk)
Definition: TrackPool.h:105
std::vector< int > wTrackList() const
Definition: TrackPool.h:74
GammaShape GammaShapeValue(int n) const
Definition: TrackPool.h:97
void AddTrack(const int number, const double mass, const RecMdcKalTrack *trk)
void setWTrackInfit(const int n, const WTrackParameter wtrk)
Definition: TrackPool.h:106
double double double * p4
Definition: qcdloop1.h:77