CGEM BOSS 6.6.5.g
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_staticRecCgemTrackCol = 0;
11TObjArray *TRecTrackEvent::s_staticRecCgemSegmentCol = 0;
12TObjArray *TRecTrackEvent::s_staticRecCgemHitCol = 0;
13TObjArray *TRecTrackEvent::s_staticRecCgemClusterCol = 0;
14TObjArray *TRecTrackEvent::s_staticTofTrackCol = 0;
15TObjArray *TRecTrackEvent::s_staticEmcHitCol = 0;
16TObjArray *TRecTrackEvent::s_staticEmcClusterCol = 0;
17TObjArray *TRecTrackEvent::s_staticEmcShowerCol = 0;
18TObjArray *TRecTrackEvent::s_staticMucTrackCol = 0;
19TObjArray *TRecTrackEvent::s_staticRecMdcDedxCol = 0;
20TObjArray *TRecTrackEvent::s_staticRecMdcDedxHitCol = 0;
21TObjArray *TRecTrackEvent::s_staticRecCgemDedxCol = 0;
22TObjArray *TRecTrackEvent::s_staticRecCgemDedxHitCol = 0;
23TObjArray *TRecTrackEvent::s_staticExtTrackCol = 0;
24TObjArray *TRecTrackEvent::s_staticRecMdcKalTrackCol = 0;
25TObjArray *TRecTrackEvent::s_staticRecMdcKalHelixSegCol = 0;
26TObjArray *TRecTrackEvent::s_staticRecCgemKalTrackCol = 0;
27TObjArray *TRecTrackEvent::s_staticRecCgemKalHelixSegCol = 0;
28TObjArray *TRecTrackEvent::s_staticEvTimeCol = 0;
29TObjArray *TRecTrackEvent::s_staticRecZddChannelCol = 0;
30
31//***************************************************************
33{
34 //Dst Track
35 //Rec Track
36 if (!s_staticRecMdcTrackCol) {
37 s_staticRecMdcTrackCol = new TObjArray();
38 }
39 m_recMdcTrackCol = s_staticRecMdcTrackCol;
40
41 if (!s_staticRecMdcHitCol) {
42 s_staticRecMdcHitCol = new TObjArray();
43 }
44 m_recMdcHitCol = s_staticRecMdcHitCol;
45
46 if (!s_staticRecCgemTrackCol) {
47 s_staticRecCgemTrackCol = new TObjArray();
48 }
49 m_recCgemTrackCol = s_staticRecCgemTrackCol;
50
51 if (!s_staticRecCgemSegmentCol) {
52 s_staticRecCgemSegmentCol = new TObjArray();
53 }
54 m_recCgemSegmentCol = s_staticRecCgemSegmentCol;
55
56 if (!s_staticRecCgemHitCol) {
57 s_staticRecCgemHitCol = new TObjArray();
58 }
59 m_recCgemHitCol = s_staticRecCgemHitCol;
60
61 if (!s_staticRecCgemClusterCol) {
62 s_staticRecCgemClusterCol = new TObjArray();
63 }
64 m_recCgemClusterCol = s_staticRecCgemClusterCol;
65
66 if (! s_staticTofTrackCol ){
67 s_staticTofTrackCol = new TObjArray();
68 }
69 m_recTofTrackCol = s_staticTofTrackCol;
70
71 if (!s_staticEmcHitCol ){
72 s_staticEmcHitCol = new TObjArray();
73 }
74 m_recEmcHitCol = s_staticEmcHitCol;
75
76 if (!s_staticEmcClusterCol ){
77 s_staticEmcClusterCol = new TObjArray();
78 }
79 m_recEmcClusterCol = s_staticEmcClusterCol;
80
81 if (!s_staticEmcShowerCol ){
82 s_staticEmcShowerCol = new TObjArray();
83 }
84 m_recEmcShowerCol = s_staticEmcShowerCol;
85
86
87 if (! s_staticMucTrackCol ){
88 s_staticMucTrackCol = new TObjArray();
89 }
90 m_recMucTrackCol = s_staticMucTrackCol;
91
92 if (! s_staticRecMdcDedxCol ){
93 s_staticRecMdcDedxCol = new TObjArray();
94 }
95 m_recMdcDedxCol = s_staticRecMdcDedxCol;
96
97 if (! s_staticRecMdcDedxHitCol ){
98 s_staticRecMdcDedxHitCol = new TObjArray();
99 }
100 m_recMdcDedxHitCol = s_staticRecMdcDedxHitCol;
101
102 if (! s_staticRecCgemDedxCol ){
103 s_staticRecCgemDedxCol = new TObjArray();
104 }
105 m_recCgemDedxCol = s_staticRecCgemDedxCol;
106
107 if (! s_staticRecCgemDedxHitCol ){
108 s_staticRecCgemDedxHitCol = new TObjArray();
109 }
110 m_recCgemDedxHitCol = s_staticRecCgemDedxHitCol;
111
112
113 if (! s_staticExtTrackCol ){
114 s_staticExtTrackCol = new TObjArray();
115 }
116 m_recExtTrackCol = s_staticExtTrackCol;
117
118
119 if (! s_staticRecMdcKalTrackCol ){
120 s_staticRecMdcKalTrackCol = new TObjArray();
121 }
122 m_recMdcKalTrackCol = s_staticRecMdcKalTrackCol;
123
124 if (! s_staticRecMdcKalHelixSegCol ){
125 s_staticRecMdcKalHelixSegCol = new TObjArray();
126 }
127 m_recMdcKalHelixSegCol = s_staticRecMdcKalHelixSegCol;
128
129 if (! s_staticRecCgemKalTrackCol ){
130 s_staticRecCgemKalTrackCol = new TObjArray();
131 }
132 m_recCgemKalTrackCol = s_staticRecCgemKalTrackCol;
133
134 if (! s_staticRecCgemKalHelixSegCol ){
135 s_staticRecCgemKalHelixSegCol = new TObjArray();
136 }
137 m_recCgemKalHelixSegCol = s_staticRecCgemKalHelixSegCol;
138
139 if(! s_staticEvTimeCol ){
140 s_staticEvTimeCol = new TObjArray();
141 }
142 m_recEvTimeCol = s_staticEvTimeCol;
143
144 if ( ! s_staticRecZddChannelCol ) {
145 s_staticRecZddChannelCol = new TObjArray();
146 }
147 m_recZddChannelCol = s_staticRecZddChannelCol;
148
149 Clear();
150
151}
152
153//*****************************************************************
155
156 /**************************** Dst Track *************************/
157 if(m_recMdcTrackCol == s_staticRecMdcTrackCol) s_staticRecMdcTrackCol = 0;
158 m_recMdcTrackCol->Delete();
159 delete m_recMdcTrackCol;
160 m_recMdcTrackCol = 0;
161
162 if(m_recMdcHitCol == s_staticRecMdcHitCol) s_staticRecMdcHitCol = 0;
163 m_recMdcHitCol->Delete();
164 delete m_recMdcHitCol;
165 m_recMdcHitCol = 0;
166
167 if(m_recCgemTrackCol == s_staticRecCgemTrackCol) s_staticRecCgemTrackCol = 0;
168 m_recCgemTrackCol->Delete();
169 delete m_recCgemTrackCol;
170 m_recCgemTrackCol = 0;
171
172 if(m_recCgemSegmentCol == s_staticRecCgemSegmentCol) s_staticRecCgemSegmentCol = 0;
173 m_recCgemSegmentCol->Delete();
174 delete m_recCgemSegmentCol;
175 m_recCgemSegmentCol = 0;
176
177 if(m_recCgemHitCol == s_staticRecCgemHitCol) s_staticRecCgemHitCol = 0;
178 m_recCgemHitCol->Delete();
179 delete m_recCgemHitCol;
180 m_recCgemHitCol = 0;
181
182 if(m_recCgemClusterCol == s_staticRecCgemClusterCol) s_staticRecCgemClusterCol = 0;
183 m_recCgemClusterCol->Delete();
184 delete m_recCgemClusterCol;
185 m_recCgemClusterCol = 0;
186
187 if(m_recTofTrackCol == s_staticTofTrackCol ) s_staticTofTrackCol = 0;
188 m_recTofTrackCol->Delete();
189 delete m_recTofTrackCol;
190 m_recTofTrackCol = 0;
191
192 if(m_recEmcHitCol == s_staticEmcHitCol) s_staticEmcHitCol = 0;
193 m_recEmcHitCol->Delete();
194 delete m_recEmcHitCol;
195 m_recEmcHitCol = 0;
196
197 if(m_recEmcClusterCol == s_staticEmcClusterCol) s_staticEmcClusterCol = 0;
198 m_recEmcClusterCol->Delete();
199 delete m_recEmcClusterCol;
200 m_recEmcClusterCol = 0;
201
202 if(m_recEmcShowerCol == s_staticEmcShowerCol) s_staticEmcShowerCol = 0;
203 m_recEmcShowerCol->Delete();
204 delete m_recEmcShowerCol;
205 m_recEmcShowerCol = 0;
206
207
208 if(m_recMucTrackCol == s_staticMucTrackCol ) s_staticMucTrackCol = 0;
209 m_recMucTrackCol->Delete();
210 delete m_recMucTrackCol;
211 m_recMucTrackCol = 0;
212
213 if(m_recMdcDedxCol == s_staticRecMdcDedxCol ) s_staticRecMdcDedxCol = 0;
214 m_recMdcDedxCol->Delete();
215 delete m_recMdcDedxCol;
216 m_recMdcDedxCol = 0;
217
218 if(m_recMdcDedxHitCol == s_staticRecMdcDedxHitCol ) s_staticRecMdcDedxHitCol = 0;
219 m_recMdcDedxHitCol->Delete();
220 delete m_recMdcDedxHitCol;
221 m_recMdcDedxHitCol = 0;
222
223 if(m_recCgemDedxCol == s_staticRecCgemDedxCol ) s_staticRecCgemDedxCol = 0;
224 m_recCgemDedxCol->Delete();
225 delete m_recCgemDedxCol;
226 m_recCgemDedxCol = 0;
227
228 if(m_recCgemDedxHitCol == s_staticRecCgemDedxHitCol ) s_staticRecCgemDedxHitCol = 0;
229 m_recCgemDedxHitCol->Delete();
230 delete m_recCgemDedxHitCol;
231 m_recCgemDedxHitCol = 0;
232
233
234 if(m_recExtTrackCol == s_staticExtTrackCol ) s_staticExtTrackCol = 0;
235 m_recExtTrackCol->Delete();
236 delete m_recExtTrackCol;
237 m_recExtTrackCol = 0;
238
239 if(m_recMdcKalTrackCol == s_staticRecMdcKalTrackCol ) s_staticRecMdcKalTrackCol = 0;
240 m_recMdcKalTrackCol->Delete();
241 delete m_recMdcKalTrackCol;
242 m_recMdcKalTrackCol = 0;
243
244 if(m_recMdcKalHelixSegCol == s_staticRecMdcKalHelixSegCol ) s_staticRecMdcKalHelixSegCol = 0;
245 m_recMdcKalHelixSegCol->Delete();
246 delete m_recMdcKalHelixSegCol;
247 m_recMdcKalHelixSegCol = 0;
248
249 if(m_recCgemKalTrackCol == s_staticRecCgemKalTrackCol ) s_staticRecCgemKalTrackCol = 0;
250 m_recCgemKalTrackCol->Delete();
251 delete m_recCgemKalTrackCol;
252 m_recCgemKalTrackCol = 0;
253
254 if(m_recCgemKalHelixSegCol == s_staticRecCgemKalHelixSegCol ) s_staticRecCgemKalHelixSegCol = 0;
255 m_recCgemKalHelixSegCol->Delete();
256 delete m_recCgemKalHelixSegCol;
257 m_recCgemKalHelixSegCol = 0;
258
259 if(m_recEvTimeCol == s_staticEvTimeCol ) s_staticEvTimeCol = 0;
260 m_recEvTimeCol->Delete();
261 delete m_recEvTimeCol;
262 m_recEvTimeCol = 0;
263
264 if ( m_recZddChannelCol == s_staticRecZddChannelCol ) s_staticRecZddChannelCol = 0;
265 m_recZddChannelCol->Delete();
266 delete m_recZddChannelCol;
267 m_recZddChannelCol = 0;
268}
269
270//*****************************************************************
272}
273
274//*****************************************************************
275void TRecTrackEvent::Clear(Option_t *option) {
276
277}
278
279//*****************************************************************************
280void TRecTrackEvent::Print(Option_t *option) const {
281 TObject::Print(option);
282}
283
284
285/**************** Dst Track ************************/
286/// Mdc
288 m_recMdcTrackCol->Add(Track);
289 }
290
292 if (Int_t(i) >= m_recMdcTrackCol->GetEntries())
293 return 0;
294 return (TRecMdcTrack*)m_recMdcTrackCol->At(i);
295 }
296
298 m_recMdcHitCol->Add(Hit);
299 }
300
302 if (Int_t(i) >= m_recMdcHitCol->GetEntries())
303 return 0;
304 return (TRecMdcHit*)m_recMdcHitCol->At(i);
305 }
306
307/// Cgem
309 m_recCgemSegmentCol->Add(Segment);
310 }
311
313 if (Int_t(i) >= m_recCgemSegmentCol->GetEntries())
314 return 0;
315 return (TRecCgemSegment*)m_recCgemSegmentCol->At(i);
316 }
317
319 m_recCgemTrackCol->Add(Track);
320 }
321
323 if (Int_t(i) >= m_recCgemTrackCol->GetEntries())
324 return 0;
325 return (TRecCgemTrack*)m_recCgemTrackCol->At(i);
326 }
327
329 m_recCgemHitCol->Add(Hit);
330 }
331
333 if (Int_t(i) >= m_recCgemHitCol->GetEntries())
334 return 0;
335 return (TRecCgemHit*)m_recCgemHitCol->At(i);
336 }
337
339 m_recCgemClusterCol->Add(Cluster);
340 }
342 if(Int_t(i) >= m_recCgemClusterCol->GetEntries())
343 return 0;
344 return (TRecCgemCluster*)m_recCgemClusterCol->At(i);
345 }
346
347///Tof
349 m_recTofTrackCol->Add(Track);
350}
351
353 if(Int_t(i) >=m_recTofTrackCol->GetEntries())
354 return 0;
355 return (TRecTofTrack*) m_recTofTrackCol->At(i);
356}
357
358 ///Emc
360 m_recEmcHitCol->Add(Track);
361 }
362
363 const TRecEmcHit* TRecTrackEvent::getEmcHit( Int_t i) const {
364 if(Int_t(i) >= m_recEmcHitCol->GetEntries())
365 return 0;
366 return (TRecEmcHit*)m_recEmcHitCol->At(i);
367 }
368
370 m_recEmcClusterCol->Add(Track);
371 }
372
374 if(Int_t(i) >= m_recEmcClusterCol->GetEntries())
375 return 0;
376 return (TRecEmcCluster*)m_recEmcClusterCol->At(i);
377 }
378
380 m_recEmcShowerCol->Add(Track);
381 }
382
384 if(Int_t(i) >= m_recEmcShowerCol->GetEntries())
385 return 0;
386 return (TRecEmcShower*)m_recEmcShowerCol->At(i);
387 }
388
389 ///Muc
391 m_recMucTrackCol->Add(Track);
392}
393
394
396 if(Int_t(i) >=m_recMucTrackCol->GetEntries())
397 return 0;
398 return (TRecMucTrack*) m_recMucTrackCol->At(i);
399}
400
401///Dedx
403 m_recMdcDedxCol->Add(Track);
404 }
405
406
408 if(Int_t(i) >=m_recMdcDedxCol->GetEntries())
409 return 0;
410 return (TRecMdcDedx*) m_recMdcDedxCol->At(i);
411 }
412
413
415 m_recMdcDedxHitCol->Add(Track);
416}
417
418
420 if(Int_t(i) >=m_recMdcDedxHitCol->GetEntries())
421 return 0;
422 return (TRecMdcDedxHit*) m_recMdcDedxHitCol->At(i);
423 }
424
426 m_recCgemDedxCol->Add(Track);
427 }
428
429
431 if(Int_t(i) >=m_recCgemDedxCol->GetEntries())
432 return 0;
433 return (TRecCgemDedx*) m_recCgemDedxCol->At(i);
434 }
435
436
438 m_recCgemDedxHitCol->Add(Track);
439}
440
441
443 if(Int_t(i) >=m_recCgemDedxHitCol->GetEntries())
444 return 0;
445 return (TRecCgemDedxHit*) m_recCgemDedxHitCol->At(i);
446 }
447
448// // Ext
450 m_recExtTrackCol->Add(Track);
451 }
452
454 if(Int_t(i) >=m_recExtTrackCol->GetEntries())
455 return 0;
456 return (TRecExtTrack*) m_recExtTrackCol->At(i);
457 }
458
459//RecMdcKal
461 m_recMdcKalTrackCol->Add(Track);
462}
463
465 if(Int_t(i) >=m_recMdcKalTrackCol->GetEntries())
466 return 0;
467 return (TRecMdcKalTrack*) m_recMdcKalTrackCol->At(i);
468}
469
471 m_recMdcKalHelixSegCol->Add(Track);
472}
473
475 if(Int_t(i) >= m_recMdcKalHelixSegCol->GetEntries())
476 return 0;
477 return ( TRecMdcKalHelixSeg*) m_recMdcKalHelixSegCol->At(i);
478}
479
480//RecCgemKal
482 m_recCgemKalTrackCol->Add(Track);
483}
484
486 if(Int_t(i) >=m_recCgemKalTrackCol->GetEntries())
487 return 0;
488 return (TRecCgemKalTrack*) m_recCgemKalTrackCol->At(i);
489}
490
492 m_recCgemKalHelixSegCol->Add(Track);
493}
494
496 if(Int_t(i) >= m_recCgemKalHelixSegCol->GetEntries())
497 return 0;
498 return ( TRecCgemKalHelixSeg*) m_recCgemKalHelixSegCol->At(i);
499}
500
501//EsTime
503 m_recEvTimeCol->Add(Track);
504}
505
507 if(Int_t(i) >=m_recEvTimeCol->GetEntries())
508 return 0;
509 return (TRecEvTime*) m_recEvTimeCol->At(i);
510}
511
512// ZDD
514 m_recZddChannelCol->Add(zdd);
515}
516
518 if ( i >= m_recZddChannelCol->GetEntries() || i < 0 )
519 return 0;
520 return (TRecZddChannel*) m_recZddChannelCol->At(i);
521}
ClassImp(TBossFullEvent) TBossFullEvent
#define Segment
Definition: TTrackBase.h:31
#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 TRecCgemKalTrack * getRecCgemKalTrack(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 addRecCgemTrack(TRecCgemTrack *Track)
Add a TkrTrack into the Cgem data collection.
void addRecCgemDedx(TRecCgemDedx *Track)
Add a Dedx into the TOF 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 addRecCgemSegment(TRecCgemSegment *Segment)
Add a TkrSegment into the Cgem data collection.
void addRecMdcDedx(TRecMdcDedx *Track)
Add a Dedx into the TOF Data collection.
void addEmcShower(TRecEmcShower *Track)
Add a TkrTrack into the Emc data collection *‍/.
void addRecCgemHit(TRecCgemHit *Hit)
Add a Rec Cgem Hit into the Cgem 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 TRecCgemDedx * getRecCgemDedx(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
const TRecEmcCluster * getEmcCluster(Int_t i) const
retrieve a EmcCluster from the collection, using the index into the array *‍/
const TRecCgemSegment * getRecCgemSegment(Int_t i) const
retrieve a CgemSegment from the collection, using the index into the array
void addRecCgemKalHelixSeg(TRecCgemKalHelixSeg *Track)
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)
void addRecCgemDedxHit(TRecCgemDedxHit *Track)
Add a Dedx into the TOF Data collection.
const TRecMdcTrack * getRecMdcTrack(Int_t i) const
retrieve a MdcTrack from the collection, using the index into the array
const TRecCgemKalHelixSeg * getRecCgemKalHelixSeg(Int_t i) const
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
void addRecCgemCluster(TRecCgemCluster *Cluster)
Add a Rec Cgem Cluster into the Cgem data collection.
const TRecCgemCluster * getRecCgemCluster(Int_t i) const
retrieve a RecCgemCluster 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 addRecCgemKalTrack(TRecCgemKalTrack *Track)
const TRecCgemHit * getRecCgemHit(Int_t i) const
retrieve a RecCgemHit 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)
const TRecCgemTrack * getRecCgemTrack(Int_t i) const
retrieve a CgemTrack from the collection, using the index into the array
const TRecCgemDedxHit * getRecCgemDedxHit(Int_t i) const
retrieve a TofTrack From the collection, using the index into the array
void addExtTrack(TRecExtTrack *Track)
Add a ExtTrack into the Ext Data collection.