BOSS 7.0.2
BESIII Offline Software System
Loading...
Searching...
No Matches
InstallArea/include/VertexFit/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 <vector>
14#include "VertexFit/WTrackParameter.h"
15#include "VertexFit/GammaShape.h"
16
17#ifndef BEAN
18//#include "DstEvent/DstMdcTrack.h"
19//#include "DstEvent/DstMdcKalTrack.h"
20//#include "DstEvent/DstEmcTrack.h"
21#include "MdcRecEvent/RecMdcTrack.h"
22#include "MdcRecEvent/RecMdcKalTrack.h"
23#include "EmcRecEventModel/RecEmcShower.h"
24#else
25#include "DstEvtRecTracks.h"
26#endif
27
28class TrackPool {
29
30 public:
31
32 // constructor & deconstructor
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)
std::vector< WTrackParameter > wTrackInfit() const
void setVBeamPosition(const HepSymMatrix VBeamPosition)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6)
void setWTrackInfit(const WTrackParameter wtrk)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5)
void AddTrack(const int number, const double mass, const RecMdcTrack *trk)
void AddTrack(const int number, const double mass, const RecEmcShower *trk)
void setWTrackOrigin(const WTrackParameter wtrk)
void AddMissTrack(const int number, const RecEmcShower *trk)
void AddTrackVertex(const int number, const double mass, const RecEmcShower *trk)
void AddTrack(const int number, const WTrackParameter wtrk)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7)
void AddMissTrack(const int number, const double mass, const HepLorentzVector p4)
void AddMissTrack(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
void AddMissTrack(const int number, const HepLorentzVector p4)
std::vector< WTrackParameter > wTrackOrigin() const
std::vector< int > AddList(int n1, int n2, int n3)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11)
std::vector< int > GammaShapeList() const
void setGammaShape(const GammaShape gammashape)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9, int n10, int n11, int n12)
std::vector< int > AddList(int n1, int n2)
std::vector< int > AddList(int n1, int n2, int n3, int n4)
WTrackParameter wTrackOrigin(int n) const
void setBeamPosition(const HepPoint3D BeamPosition)
WTrackParameter wTrackInfit(int n) const
void setWTrackOrigin(const int n, const WTrackParameter wtrk)
void AddTrack(const int number, const double mass, const RecMdcKalTrack *trk)
std::vector< int > AddList(int n1, int n2, int n3, int n4, int n5, int n6, int n7, int n8, int n9)
void setWTrackInfit(const int n, const WTrackParameter wtrk)