BOSS 6.6.4.p03
BESIII Offline Software System
Loading...
Searching...
No Matches
TRecTrackEvent.cxx
Go to the documentation of this file.
2#include "TCollection.h" // Declares TIter
3
5
6// Allocate the TObjArray just once
7
8TObjArray *TRecTrackEvent::s_staticRecMdcTrackCol = 0;
9TObjArray *TRecTrackEvent::s_staticRecMdcHitCol = 0;
10TObjArray *TRecTrackEvent::s_staticTofTrackCol = 0;
11TObjArray *TRecTrackEvent::s_staticEmcHitCol = 0;
12TObjArray *TRecTrackEvent::s_staticEmcClusterCol = 0;
13TObjArray *TRecTrackEvent::s_staticEmcShowerCol = 0;
14TObjArray *TRecTrackEvent::s_staticMucTrackCol = 0;
15TObjArray *TRecTrackEvent::s_staticRecMdcDedxCol = 0;
16TObjArray *TRecTrackEvent::s_staticRecMdcDedxHitCol = 0;
17TObjArray *TRecTrackEvent::s_staticExtTrackCol = 0;
18TObjArray *TRecTrackEvent::s_staticRecMdcKalTrackCol = 0;
19TObjArray *TRecTrackEvent::s_staticRecMdcKalHelixSegCol = 0;
20TObjArray *TRecTrackEvent::s_staticEvTimeCol = 0;
21
22//***************************************************************
24{
25 //Dst Track
26 //Rec Track
27 if (!s_staticRecMdcTrackCol) {
28 s_staticRecMdcTrackCol = new TObjArray();
29 }
30 m_recMdcTrackCol = s_staticRecMdcTrackCol;
31
32 if (!s_staticRecMdcHitCol) {
33 s_staticRecMdcHitCol = new TObjArray();
34 }
35 m_recMdcHitCol = s_staticRecMdcHitCol;
36
37
38 if (! s_staticTofTrackCol ){
39 s_staticTofTrackCol = new TObjArray();
40 }
41 m_recTofTrackCol = s_staticTofTrackCol;
42
43 if (!s_staticEmcHitCol ){
44 s_staticEmcHitCol = new TObjArray();
45 }
46 m_recEmcHitCol = s_staticEmcHitCol;
47
48 if (!s_staticEmcClusterCol ){
49 s_staticEmcClusterCol = new TObjArray();
50 }
51 m_recEmcClusterCol = s_staticEmcClusterCol;
52
53 if (!s_staticEmcShowerCol ){
54 s_staticEmcShowerCol = new TObjArray();
55 }
56 m_recEmcShowerCol = s_staticEmcShowerCol;
57
58
59 if (! s_staticMucTrackCol ){
60 s_staticMucTrackCol = new TObjArray();
61 }
62 m_recMucTrackCol = s_staticMucTrackCol;
63
64 if (! s_staticRecMdcDedxCol ){
65 s_staticRecMdcDedxCol = new TObjArray();
66 }
67 m_recMdcDedxCol = s_staticRecMdcDedxCol;
68
69 if (! s_staticRecMdcDedxHitCol ){
70 s_staticRecMdcDedxHitCol = new TObjArray();
71 }
72 m_recMdcDedxHitCol = s_staticRecMdcDedxHitCol;
73
74
75 if (! s_staticExtTrackCol ){
76 s_staticExtTrackCol = new TObjArray();
77 }
78 m_recExtTrackCol = s_staticExtTrackCol;
79
80
81 if (! s_staticRecMdcKalTrackCol ){
82 s_staticRecMdcKalTrackCol = new TObjArray();
83 }
84 m_recMdcKalTrackCol = s_staticRecMdcKalTrackCol;
85
86 if (! s_staticRecMdcKalHelixSegCol ){
87 s_staticRecMdcKalHelixSegCol = new TObjArray();
88 }
89 m_recMdcKalHelixSegCol = s_staticRecMdcKalHelixSegCol;
90
91 if(! s_staticEvTimeCol ){
92 s_staticEvTimeCol = new TObjArray();
93 }
94 m_recEvTimeCol = s_staticEvTimeCol;
95
96 Clear();
97
98}
99
100//*****************************************************************
102
103 /**************************** Dst Track *************************/
104 if(m_recMdcTrackCol == s_staticRecMdcTrackCol) s_staticRecMdcTrackCol = 0;
105 m_recMdcTrackCol->Delete();
106 delete m_recMdcTrackCol;
107 m_recMdcTrackCol = 0;
108
109 if(m_recMdcHitCol == s_staticRecMdcHitCol) s_staticRecMdcHitCol = 0;
110 m_recMdcHitCol->Delete();
111 delete m_recMdcHitCol;
112 m_recMdcHitCol = 0;
113
114 if(m_recTofTrackCol == s_staticTofTrackCol ) s_staticTofTrackCol = 0;
115 m_recTofTrackCol->Delete();
116 delete m_recTofTrackCol;
117 m_recTofTrackCol = 0;
118
119 if(m_recEmcHitCol == s_staticEmcHitCol) s_staticEmcHitCol = 0;
120 m_recEmcHitCol->Delete();
121 delete m_recEmcHitCol;
122 m_recEmcHitCol = 0;
123
124 if(m_recEmcClusterCol == s_staticEmcClusterCol) s_staticEmcClusterCol = 0;
125 m_recEmcClusterCol->Delete();
126 delete m_recEmcClusterCol;
127 m_recEmcClusterCol = 0;
128
129 if(m_recEmcShowerCol == s_staticEmcShowerCol) s_staticEmcShowerCol = 0;
130 m_recEmcShowerCol->Delete();
131 delete m_recEmcShowerCol;
132 m_recEmcShowerCol = 0;
133
134
135 if(m_recMucTrackCol == s_staticMucTrackCol ) s_staticMucTrackCol = 0;
136 m_recMucTrackCol->Delete();
137 delete m_recMucTrackCol;
138 m_recMucTrackCol = 0;
139
140 if(m_recMdcDedxCol == s_staticRecMdcDedxCol ) s_staticRecMdcDedxCol = 0;
141 m_recMdcDedxCol->Delete();
142 delete m_recMdcDedxCol;
143 m_recMdcDedxCol = 0;
144
145 if(m_recMdcDedxHitCol == s_staticRecMdcDedxHitCol ) s_staticRecMdcDedxHitCol = 0;
146 m_recMdcDedxHitCol->Delete();
147 delete m_recMdcDedxHitCol;
148 m_recMdcDedxHitCol = 0;
149
150
151 if(m_recExtTrackCol == s_staticExtTrackCol ) s_staticExtTrackCol = 0;
152 m_recExtTrackCol->Delete();
153 delete m_recExtTrackCol;
154 m_recExtTrackCol = 0;
155
156 if(m_recMdcKalTrackCol == s_staticRecMdcKalTrackCol ) s_staticRecMdcKalTrackCol = 0;
157 m_recMdcKalTrackCol->Delete();
158 delete m_recMdcKalTrackCol;
159 m_recMdcKalTrackCol = 0;
160
161 if(m_recMdcKalHelixSegCol == s_staticRecMdcKalHelixSegCol ) s_staticRecMdcKalHelixSegCol = 0;
162 m_recMdcKalHelixSegCol->Delete();
163 delete m_recMdcKalHelixSegCol;
164 m_recMdcKalHelixSegCol = 0;
165
166 if(m_recEvTimeCol == s_staticEvTimeCol ) s_staticEvTimeCol = 0;
167 m_recEvTimeCol->Delete();
168 delete m_recEvTimeCol;
169 m_recEvTimeCol = 0;
170}
171
172//*****************************************************************
174}
175
176//*****************************************************************
177void TRecTrackEvent::Clear(Option_t *option) {
178
179}
180
181//*****************************************************************************
182void TRecTrackEvent::Print(Option_t *option) const {
183 TObject::Print(option);
184}
185
186
187/**************** Dst Track ************************/
188/// Mdc
190 m_recMdcTrackCol->Add(Track);
191 }
192
194 if (Int_t(i) >= m_recMdcTrackCol->GetEntries())
195 return 0;
196 return (TRecMdcTrack*)m_recMdcTrackCol->At(i);
197 }
198
200 m_recMdcHitCol->Add(Hit);
201 }
202
204 if (Int_t(i) >= m_recMdcHitCol->GetEntries())
205 return 0;
206 return (TRecMdcHit*)m_recMdcHitCol->At(i);
207 }
208
209///Tof
211 m_recTofTrackCol->Add(Track);
212}
213
215 if(Int_t(i) >=m_recTofTrackCol->GetEntries())
216 return 0;
217 return (TRecTofTrack*) m_recTofTrackCol->At(i);
218}
219
220 ///Emc
222 m_recEmcHitCol->Add(Track);
223 }
224
225 const TRecEmcHit* TRecTrackEvent::getEmcHit( Int_t i) const {
226 if(Int_t(i) >= m_recEmcHitCol->GetEntries())
227 return 0;
228 return (TRecEmcHit*)m_recEmcHitCol->At(i);
229 }
230
232 m_recEmcClusterCol->Add(Track);
233 }
234
236 if(Int_t(i) >= m_recEmcClusterCol->GetEntries())
237 return 0;
238 return (TRecEmcCluster*)m_recEmcClusterCol->At(i);
239 }
240
242 m_recEmcShowerCol->Add(Track);
243 }
244
246 if(Int_t(i) >= m_recEmcShowerCol->GetEntries())
247 return 0;
248 return (TRecEmcShower*)m_recEmcShowerCol->At(i);
249 }
250
251 ///Muc
253 m_recMucTrackCol->Add(Track);
254}
255
256
258 if(Int_t(i) >=m_recMucTrackCol->GetEntries())
259 return 0;
260 return (TRecMucTrack*) m_recMucTrackCol->At(i);
261}
262
263///Dedx
265 m_recMdcDedxCol->Add(Track);
266 }
267
268
270 if(Int_t(i) >=m_recMdcDedxCol->GetEntries())
271 return 0;
272 return (TRecMdcDedx*) m_recMdcDedxCol->At(i);
273 }
274
275
277 m_recMdcDedxHitCol->Add(Track);
278}
279
280
282 if(Int_t(i) >=m_recMdcDedxHitCol->GetEntries())
283 return 0;
284 return (TRecMdcDedxHit*) m_recMdcDedxHitCol->At(i);
285 }
286
287// // Ext
289 m_recExtTrackCol->Add(Track);
290 }
291
293 if(Int_t(i) >=m_recExtTrackCol->GetEntries())
294 return 0;
295 return (TRecExtTrack*) m_recExtTrackCol->At(i);
296 }
297
298//RecMdcKal
300 m_recMdcKalTrackCol->Add(Track);
301}
302
304 if(Int_t(i) >=m_recMdcKalTrackCol->GetEntries())
305 return 0;
306 return (TRecMdcKalTrack*) m_recMdcKalTrackCol->At(i);
307}
308
310 m_recMdcKalHelixSegCol->Add(Track);
311}
312
314 if(Int_t(i) >= m_recMdcKalHelixSegCol->GetEntries())
315 return 0;
316 return ( TRecMdcKalHelixSeg*) m_recMdcKalHelixSegCol->At(i);
317}
318
319//EsTime
321 m_recEvTimeCol->Add(Track);
322}
323
325 if(Int_t(i) >=m_recEvTimeCol->GetEntries())
326 return 0;
327 return (TRecEvTime*) m_recEvTimeCol->At(i);
328}
329
ClassImp(TBossFullEvent) TBossFullEvent
#define Track
Definition: TTrackBase.h:30
void addRecMdcKalTrack(TRecMdcKalTrack *Track)
void Clear(Option_t *option="")
void addMucTrack(TRecMucTrack *Track)
Add a MucTrack into the TOF Data collection.
const TRecExtTrack * getExtTrack(Int_t i) const
const TRecMdcKalHelixSeg * getRecMdcKalHelixSeg(Int_t i) const
void addRecMdcTrack(TRecMdcTrack *Track)
Add a TkrTrack into the Mdc data collection.
void addEmcCluster(TRecEmcCluster *Track)
Add a TkrTrack into the Emc data collection *‍/.
void addEmcHit(TRecEmcHit *Track)
Add a TkrTrack into the Emc data collection *‍/.
const TRecMdcKalTrack * getRecMdcKalTrack(Int_t i) const
virtual ~TRecTrackEvent()
void addRecMdcKalHelixSeg(TRecMdcKalHelixSeg *Track)
void addRecMdcDedx(TRecMdcDedx *Track)
Add a Dedx into the TOF Data collection.
void addEmcShower(TRecEmcShower *Track)
Add a TkrTrack into the Emc data collection *‍/.
const TRecMdcDedx * getRecMdcDedx(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TRecEvTime * getEvTime(Int_t i) const
const TRecEmcCluster * getEmcCluster(Int_t i) const
retrieve a EmcCluster from the collection, using the index into the array *‍/
const TRecTofTrack * getTofTrack(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TRecEmcHit * getEmcHit(Int_t i) const
retrieve a EmcHit from the collection, using the index into the array *‍/
void addEvTime(TRecEvTime *Track)
const TRecMdcTrack * getRecMdcTrack(Int_t i) const
retrieve a MdcTrack from the collection, using the index into the array
void addRecMdcHit(TRecMdcHit *Hit)
Add a Rec Mdc Hit into the Mdc data collection.
void Print(Option_t *option="") const
const TRecMdcDedxHit * getRecMdcDedxHit(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TRecEmcShower * getEmcShower(Int_t i) const
retrieve a EmcShower from the collection, using the index into the array *‍/
void addRecMdcDedxHit(TRecMdcDedxHit *Track)
Add a Dedx into the TOF Data collection.
void addTofTrack(TRecTofTrack *Track)
Add a TofTrack into the TOF Data collection.
const TRecMucTrack * getMucTrack(Int_t i) const
retrieve a MucTrack From the collection, using the index into the array
const TRecMdcHit * getRecMdcHit(Int_t i) const
retrieve a RecMdcHit from the collection, using the index into the array
void addExtTrack(TRecExtTrack *Track)
Add a ExtTrack into the Ext Data collection.