BOSS 7.0.4
BESIII Offline Software System
Loading...
Searching...
No Matches
TRecTrackEvent.cxx
Go to the documentation of this file.
1#include "RootEventData/TRecTrackEvent.h"
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;
21TObjArray *TRecTrackEvent::s_staticRecZddChannelCol = 0;
22
23//***************************************************************
25{
26 //Dst Track
27 //Rec Track
28 if (!s_staticRecMdcTrackCol) {
29 s_staticRecMdcTrackCol = new TObjArray();
30 }
31 m_recMdcTrackCol = s_staticRecMdcTrackCol;
32
33 if (!s_staticRecMdcHitCol) {
34 s_staticRecMdcHitCol = new TObjArray();
35 }
36 m_recMdcHitCol = s_staticRecMdcHitCol;
37
38
39 if (! s_staticTofTrackCol ){
40 s_staticTofTrackCol = new TObjArray();
41 }
42 m_recTofTrackCol = s_staticTofTrackCol;
43
44 if (!s_staticEmcHitCol ){
45 s_staticEmcHitCol = new TObjArray();
46 }
47 m_recEmcHitCol = s_staticEmcHitCol;
48
49 if (!s_staticEmcClusterCol ){
50 s_staticEmcClusterCol = new TObjArray();
51 }
52 m_recEmcClusterCol = s_staticEmcClusterCol;
53
54 if (!s_staticEmcShowerCol ){
55 s_staticEmcShowerCol = new TObjArray();
56 }
57 m_recEmcShowerCol = s_staticEmcShowerCol;
58
59
60 if (! s_staticMucTrackCol ){
61 s_staticMucTrackCol = new TObjArray();
62 }
63 m_recMucTrackCol = s_staticMucTrackCol;
64
65 if (! s_staticRecMdcDedxCol ){
66 s_staticRecMdcDedxCol = new TObjArray();
67 }
68 m_recMdcDedxCol = s_staticRecMdcDedxCol;
69
70 if (! s_staticRecMdcDedxHitCol ){
71 s_staticRecMdcDedxHitCol = new TObjArray();
72 }
73 m_recMdcDedxHitCol = s_staticRecMdcDedxHitCol;
74
75
76 if (! s_staticExtTrackCol ){
77 s_staticExtTrackCol = new TObjArray();
78 }
79 m_recExtTrackCol = s_staticExtTrackCol;
80
81
82 if (! s_staticRecMdcKalTrackCol ){
83 s_staticRecMdcKalTrackCol = new TObjArray();
84 }
85 m_recMdcKalTrackCol = s_staticRecMdcKalTrackCol;
86
87 if (! s_staticRecMdcKalHelixSegCol ){
88 s_staticRecMdcKalHelixSegCol = new TObjArray();
89 }
90 m_recMdcKalHelixSegCol = s_staticRecMdcKalHelixSegCol;
91
92 if(! s_staticEvTimeCol ){
93 s_staticEvTimeCol = new TObjArray();
94 }
95 m_recEvTimeCol = s_staticEvTimeCol;
96
97 if ( ! s_staticRecZddChannelCol ) {
98 s_staticRecZddChannelCol = new TObjArray();
99 }
100 m_recZddChannelCol = s_staticRecZddChannelCol;
101
102 Clear();
103
104}
105
106//*****************************************************************
108
109 /**************************** Dst Track *************************/
110 if(m_recMdcTrackCol == s_staticRecMdcTrackCol) s_staticRecMdcTrackCol = 0;
111 m_recMdcTrackCol->Delete();
112 delete m_recMdcTrackCol;
113 m_recMdcTrackCol = 0;
114
115 if(m_recMdcHitCol == s_staticRecMdcHitCol) s_staticRecMdcHitCol = 0;
116 m_recMdcHitCol->Delete();
117 delete m_recMdcHitCol;
118 m_recMdcHitCol = 0;
119
120 if(m_recTofTrackCol == s_staticTofTrackCol ) s_staticTofTrackCol = 0;
121 m_recTofTrackCol->Delete();
122 delete m_recTofTrackCol;
123 m_recTofTrackCol = 0;
124
125 if(m_recEmcHitCol == s_staticEmcHitCol) s_staticEmcHitCol = 0;
126 m_recEmcHitCol->Delete();
127 delete m_recEmcHitCol;
128 m_recEmcHitCol = 0;
129
130 if(m_recEmcClusterCol == s_staticEmcClusterCol) s_staticEmcClusterCol = 0;
131 m_recEmcClusterCol->Delete();
132 delete m_recEmcClusterCol;
133 m_recEmcClusterCol = 0;
134
135 if(m_recEmcShowerCol == s_staticEmcShowerCol) s_staticEmcShowerCol = 0;
136 m_recEmcShowerCol->Delete();
137 delete m_recEmcShowerCol;
138 m_recEmcShowerCol = 0;
139
140
141 if(m_recMucTrackCol == s_staticMucTrackCol ) s_staticMucTrackCol = 0;
142 m_recMucTrackCol->Delete();
143 delete m_recMucTrackCol;
144 m_recMucTrackCol = 0;
145
146 if(m_recMdcDedxCol == s_staticRecMdcDedxCol ) s_staticRecMdcDedxCol = 0;
147 m_recMdcDedxCol->Delete();
148 delete m_recMdcDedxCol;
149 m_recMdcDedxCol = 0;
150
151 if(m_recMdcDedxHitCol == s_staticRecMdcDedxHitCol ) s_staticRecMdcDedxHitCol = 0;
152 m_recMdcDedxHitCol->Delete();
153 delete m_recMdcDedxHitCol;
154 m_recMdcDedxHitCol = 0;
155
156
157 if(m_recExtTrackCol == s_staticExtTrackCol ) s_staticExtTrackCol = 0;
158 m_recExtTrackCol->Delete();
159 delete m_recExtTrackCol;
160 m_recExtTrackCol = 0;
161
162 if(m_recMdcKalTrackCol == s_staticRecMdcKalTrackCol ) s_staticRecMdcKalTrackCol = 0;
163 m_recMdcKalTrackCol->Delete();
164 delete m_recMdcKalTrackCol;
165 m_recMdcKalTrackCol = 0;
166
167 if(m_recMdcKalHelixSegCol == s_staticRecMdcKalHelixSegCol ) s_staticRecMdcKalHelixSegCol = 0;
168 m_recMdcKalHelixSegCol->Delete();
169 delete m_recMdcKalHelixSegCol;
170 m_recMdcKalHelixSegCol = 0;
171
172 if(m_recEvTimeCol == s_staticEvTimeCol ) s_staticEvTimeCol = 0;
173 m_recEvTimeCol->Delete();
174 delete m_recEvTimeCol;
175 m_recEvTimeCol = 0;
176
177 if ( m_recZddChannelCol == s_staticRecZddChannelCol ) s_staticRecZddChannelCol = 0;
178 m_recZddChannelCol->Delete();
179 delete m_recZddChannelCol;
180 m_recZddChannelCol = 0;
181}
182
183//*****************************************************************
185}
186
187//*****************************************************************
188void TRecTrackEvent::Clear(Option_t *option) {
189
190}
191
192//*****************************************************************************
193void TRecTrackEvent::Print(Option_t *option) const {
194 TObject::Print(option);
195}
196
197
198/**************** Dst Track ************************/
199/// Mdc
201 m_recMdcTrackCol->Add(Track);
202 }
203
205 if (Int_t(i) >= m_recMdcTrackCol->GetEntries())
206 return 0;
207 return (TRecMdcTrack*)m_recMdcTrackCol->At(i);
208 }
209
211 m_recMdcHitCol->Add(Hit);
212 }
213
215 if (Int_t(i) >= m_recMdcHitCol->GetEntries())
216 return 0;
217 return (TRecMdcHit*)m_recMdcHitCol->At(i);
218 }
219
220///Tof
222 m_recTofTrackCol->Add(Track);
223}
224
226 if(Int_t(i) >=m_recTofTrackCol->GetEntries())
227 return 0;
228 return (TRecTofTrack*) m_recTofTrackCol->At(i);
229}
230
231 ///Emc
233 m_recEmcHitCol->Add(Track);
234 }
235
236 const TRecEmcHit* TRecTrackEvent::getEmcHit( Int_t i) const {
237 if(Int_t(i) >= m_recEmcHitCol->GetEntries())
238 return 0;
239 return (TRecEmcHit*)m_recEmcHitCol->At(i);
240 }
241
243 m_recEmcClusterCol->Add(Track);
244 }
245
247 if(Int_t(i) >= m_recEmcClusterCol->GetEntries())
248 return 0;
249 return (TRecEmcCluster*)m_recEmcClusterCol->At(i);
250 }
251
253 m_recEmcShowerCol->Add(Track);
254 }
255
257 if(Int_t(i) >= m_recEmcShowerCol->GetEntries())
258 return 0;
259 return (TRecEmcShower*)m_recEmcShowerCol->At(i);
260 }
261
262 ///Muc
264 m_recMucTrackCol->Add(Track);
265}
266
267
269 if(Int_t(i) >=m_recMucTrackCol->GetEntries())
270 return 0;
271 return (TRecMucTrack*) m_recMucTrackCol->At(i);
272}
273
274///Dedx
276 m_recMdcDedxCol->Add(Track);
277 }
278
279
281 if(Int_t(i) >=m_recMdcDedxCol->GetEntries())
282 return 0;
283 return (TRecMdcDedx*) m_recMdcDedxCol->At(i);
284 }
285
286
288 m_recMdcDedxHitCol->Add(Track);
289}
290
291
293 if(Int_t(i) >=m_recMdcDedxHitCol->GetEntries())
294 return 0;
295 return (TRecMdcDedxHit*) m_recMdcDedxHitCol->At(i);
296 }
297
298// // Ext
300 m_recExtTrackCol->Add(Track);
301 }
302
304 if(Int_t(i) >=m_recExtTrackCol->GetEntries())
305 return 0;
306 return (TRecExtTrack*) m_recExtTrackCol->At(i);
307 }
308
309//RecMdcKal
311 m_recMdcKalTrackCol->Add(Track);
312}
313
315 if(Int_t(i) >=m_recMdcKalTrackCol->GetEntries())
316 return 0;
317 return (TRecMdcKalTrack*) m_recMdcKalTrackCol->At(i);
318}
319
321 m_recMdcKalHelixSegCol->Add(Track);
322}
323
325 if(Int_t(i) >= m_recMdcKalHelixSegCol->GetEntries())
326 return 0;
327 return ( TRecMdcKalHelixSeg*) m_recMdcKalHelixSegCol->At(i);
328}
329
330//EsTime
332 m_recEvTimeCol->Add(Track);
333}
334
336 if(Int_t(i) >=m_recEvTimeCol->GetEntries())
337 return 0;
338 return (TRecEvTime*) m_recEvTimeCol->At(i);
339}
340
341// ZDD
343 m_recZddChannelCol->Add(zdd);
344}
345
347 if ( i >= m_recZddChannelCol->GetEntries() || i < 0 )
348 return 0;
349 return (TRecZddChannel*) m_recZddChannelCol->At(i);
350}
ClassImp(TBossFullEvent) TBossFullEvent
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 TRecZddChannel * getRecZddChannel(Int_t i) const
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 addRecZddChannel(TRecZddChannel *dtag)
void addExtTrack(TRecExtTrack *Track)
Add a ExtTrack into the Ext Data collection.