StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StPicoDst.cxx
1 //
2 // StPicoDst holds pointers to TClonesArrays with all data
3 //
4 
5 // PicoDst headers
6 #include "StPicoMessMgr.h"
7 #include "StPicoEvent.h"
8 #include "StPicoTrack.h"
9 #include "StPicoEmcTrigger.h"
10 #include "StPicoBTowHit.h"
11 #include "StPicoBTofHit.h"
12 #include "StPicoMtdHit.h"
13 #include "StPicoFmsHit.h"
14 #include "StPicoBEmcPidTraits.h"
15 #include "StPicoBTofPidTraits.h"
16 #include "StPicoMtdPidTraits.h"
17 #include "StPicoTrackCovMatrix.h"
18 #include "StPicoBEmcSmdEHit.h"
19 #include "StPicoBEmcSmdPHit.h"
20 #include "StPicoETofHit.h"
21 #include "StPicoETofPidTraits.h"
22 #include "StPicoMcVertex.h"
23 #include "StPicoMcTrack.h"
24 #include "StPicoDst.h" //MUST be the last one
25 
26 TClonesArray** StPicoDst::picoArrays = 0;
27 
28 //_________________
30  picoArrays = 0;
31 }
32 
33 //_________________
34 void StPicoDst::set(TClonesArray** thePicoArrays) {
35  picoArrays = thePicoArrays;
36 }
37 
38 //_________________
39 void StPicoDst::print() const {
40  LOG_INFO << "\n=========== Event header =============\n\n";
41  event()->Print();
42  LOG_INFO << "=====================================\n\n";
43 }
44 
45 //_________________
47  if(numberOfTracks() == 0) {
48  LOG_INFO << "No tracks found!" << endm;
49  return;
50  }
51 
52  LOG_INFO << "\n+++++++++ track list ( " << numberOfTracks() << " entries )\n\n";
53  for(UInt_t iTrk=0; iTrk<numberOfTracks(); iTrk++) {
54  LOG_INFO << "+++ track " << iTrk << "\n";
55  track(iTrk)->Print();
56  LOG_INFO << "\n";
57  }
58 
59  LOG_INFO << endm;
60 }
61 
62 //_________________
64  if(numberOfMcVertices() == 0) {
65  LOG_INFO << "No MC vertices found!" << endm;
66  return;
67  }
68 
69  LOG_INFO << "\n+++++++++ vertex list ( " << numberOfMcTracks() << " entries )\n\n";
70  for(UInt_t iVtx=0; iVtx<numberOfMcVertices(); iVtx++) {
71  LOG_INFO << "+++ vertex " << iVtx << "\n";
72  mcVertex(iVtx)->Print();
73  LOG_INFO << "\n";
74  }
75 
76  LOG_INFO << endm;
77 }
78 
79 //_________________
81  if(numberOfMcTracks() == 0) {
82  LOG_INFO << "No MC tracks found!" << endm;
83  return;
84  }
85 
86  LOG_INFO << "\n+++++++++ track list ( " << numberOfMcTracks() << " entries )\n\n";
87  for(UInt_t iTrk=0; iTrk<numberOfMcTracks(); iTrk++) {
88  LOG_INFO << "+++ track " << iTrk << "\n";
89  mcTrack(iTrk)->Print();
90  LOG_INFO << "\n";
91  }
92 
93  LOG_INFO << endm;
94 }
95 
96 //_________________
98 
99  LOG_INFO << "=== EMC triggers ===" << "\n";
100 
101  if(numberOfEmcTriggers() == 0) {
102  LOG_INFO << "No triggers found!" << endm;
103  return;
104  }
105 
106  LOG_INFO << "\n\n+++++++++ trigger list ( " << numberOfEmcTriggers() << " entries )\n\n";
107  for(UInt_t iEntry=0; iEntry<numberOfEmcTriggers(); iEntry++) {
108  LOG_INFO << "+++ trigger " << iEntry << "\n";
109  emcTrigger(iEntry)->Print();
110  LOG_INFO << "\n";
111  }
112 
113  LOG_INFO << endm;
114 }
115 
116 //_________________
118 
119  if(numberOfBTowHits() == 0) {
120  LOG_INFO << "No BTowHit found!" << endm;
121  return;
122  }
123 
124  LOG_INFO << "\n+++++++++ BTowHit list ( " << numberOfBTowHits() << " entries )\n\n";
125  for(UInt_t iEntry=0; iEntry<numberOfBTowHits(); iEntry++) {
126  LOG_INFO << "+++ btowHit " << iEntry << "\n";
127  btowHit(iEntry)->Print();
128  LOG_INFO << "\n";
129  }
130 
131  LOG_INFO << endm;
132 }
133 
134 //_________________
136 
137  if(numberOfBTofHits() == 0) {
138  LOG_INFO << "No BTofHit found!" << endm;
139  return;
140  }
141 
142  LOG_INFO << "\n+++++++++ BTof list ( " << numberOfBTofHits() << " entries )\n\n";
143  for(UInt_t iEntry=0; iEntry<numberOfBTofHits(); iEntry++) {
144  LOG_INFO << "+++ btofHit " << iEntry << "\n";
145  btofHit(iEntry)->Print();
146  LOG_INFO << "\n";
147  }
148 
149  LOG_INFO << endm;
150 }
151 
152 //_________________
154 
155  if(numberOfMtdHits() == 0) {
156  LOG_INFO << "No MtdHit found!" << endm;
157  return;
158  }
159 
160  LOG_INFO << "\n+++++++++ Mtd list ( " << numberOfMtdHits() << " entries )\n\n";
161  for(UInt_t iEntry=0; iEntry<numberOfMtdHits(); iEntry++) {
162  LOG_INFO << "+++ mtdHit " << iEntry << "\n";
163  mtdHit(iEntry)->Print();
164  LOG_INFO << "\n";
165  }
166 
167  LOG_INFO << endm;
168 }
169 
170 //_________________
172 
173  if(numberOfFmsHits() == 0) {
174  LOG_INFO << "No FmsHit found!" << endm;
175  return;
176  }
177 
178  LOG_INFO << "\n+++++++++ Fms list ( " << numberOfFmsHits() << " entries )\n\n";
179  for(UInt_t iEntry=0; iEntry<numberOfFmsHits(); iEntry++) {
180  LOG_INFO << "+++ fmsHit " << iEntry << "\n";
181  fmsHit(iEntry)->Print();
182  LOG_INFO << "\n";
183  }
184 
185  LOG_INFO << endm;
186 }
187 
188 //_________________
190 
191  if(numberOfBEmcPidTraits() == 0) {
192  LOG_INFO << "No BEMC pidTraits found!" << endm;
193  return;
194  }
195 
196  LOG_INFO << "\n+++++++++ BEmc pidTraits list ( " << numberOfBEmcPidTraits() << " entries )\n\n";
197  for(UInt_t iEntry=0; iEntry<numberOfBEmcPidTraits(); iEntry++) {
198  LOG_INFO << "+++ BEmcPidTraits " << iEntry << "\n";
199  bemcPidTraits(iEntry)->Print();
200  LOG_INFO << "\n";
201  }
202 
203  LOG_INFO << endm;
204 }
205 
206 //_________________
208 
209  if(numberOfBTofPidTraits() == 0) {
210  LOG_INFO << "No BTof pidTraits found!" << endm;
211  return;
212  }
213 
214  LOG_INFO << "\n+++++++++ BTof pidTraits list ( " << numberOfBTofPidTraits() << " entries )\n\n";
215  for(UInt_t iEntry=0; iEntry<numberOfBTofPidTraits(); iEntry++) {
216  LOG_INFO << "+++ EmcPidTraits " << iEntry << "\n";
217  btofPidTraits(iEntry)->Print();
218  LOG_INFO << "\n";
219  }
220 
221  LOG_INFO << endm;
222 }
223 
224 //_________________
226 
227  if(numberOfMtdPidTraits() == 0) {
228  LOG_INFO << "No MTD pidTraits found!" << endm;
229  return;
230  }
231 
232  LOG_INFO << "\n+++++++++ MTD pidTraits list ( " << numberOfMtdPidTraits() << " entries )\n\n";
233  for(UInt_t iEntry=0; iEntry<numberOfMtdPidTraits(); iEntry++) {
234  LOG_INFO << "+++ mtdPidTraits " << iEntry << "\n";
235  mtdPidTraits(iEntry)->Print();
236  LOG_INFO << "\n";
237  }
238 
239  LOG_INFO << endm;
240 }
241 
242 //_________________
244 
245  if(numberOfTrackCovMatrices() == 0) {
246  LOG_INFO << "No TrackCovMatrix found!" << endm;
247  return;
248  }
249 
250  LOG_INFO << "\n+++++++++ trackCovMatrix list ( " << numberOfTrackCovMatrices() << " entries )\n\n";
251  for(UInt_t iEntry=0; iEntry<numberOfTrackCovMatrices(); iEntry++) {
252  LOG_INFO << "+++ trackCovMatrix " << iEntry << "\n";
253  trackCovMatrix(iEntry)->Print();
254  LOG_INFO << "\n";
255  }
256 
257  LOG_INFO << endm;
258 }
259 
260 //_________________
262 
263  if ( numberOfBEmcSmdEHits() == 0 ) {
264  LOG_INFO << "No BEmc SmdE hits found!" << endm;
265  return;
266  }
267 
268  LOG_INFO << "\n+++++++++ BEmc SmdE hits list ( " << numberOfBEmcSmdEHits() << " entries )\n\n";
269  for ( UInt_t iEntry=0; iEntry<numberOfBEmcSmdEHits(); iEntry++ ) {
270  LOG_INFO << "+++ BEmcSmdEHit " << iEntry << "\n";
271  bemcSmdEHit(iEntry)->Print();
272  LOG_INFO << "\n";
273  }
274 
275  LOG_INFO << endm;
276 }
277 
278 //_________________
280 
281  if ( numberOfBEmcSmdPHits() == 0 ) {
282  LOG_INFO << "No BEmc SmdP hits found!" << endm;
283  return;
284  }
285 
286  LOG_INFO << "\n+++++++++ BEmc SmdP hits list ( " << numberOfBEmcSmdPHits() << " entries )\n\n";
287  for( UInt_t iEntry=0; iEntry<numberOfBEmcSmdPHits(); iEntry++ ) {
288  LOG_INFO << "+++ BEmcSmdPHit " << iEntry << "\n";
289  bemcSmdPHit(iEntry)->Print();
290  LOG_INFO << "\n";
291  }
292 
293  LOG_INFO << endm;
294 }
295 
296 //_________________
298 
299  if(numberOfETofHits() == 0) {
300  LOG_INFO << "No ETofHit found!" << endm;
301  return;
302  }
303 
304  LOG_INFO << "\n+++++++++ ETof list ( " << numberOfETofHits() << " entries )\n\n";
305  for(UInt_t iEntry=0; iEntry<numberOfETofHits(); iEntry++) {
306  LOG_INFO << "+++ etofHit " << iEntry << "\n";
307  etofHit(iEntry)->Print();
308  LOG_INFO << "\n";
309  }
310 
311  LOG_INFO << endm;
312 }
313 
314 //_________________
316 
317  if(numberOfETofPidTraits() == 0) {
318  LOG_INFO << "No ETof pidTraits found!" << endm;
319  return;
320  }
321 
322  LOG_INFO << "\n+++++++++ ETof pidTraits list ( " << numberOfETofPidTraits() << " entries )\n\n";
323  for(UInt_t iEntry=0; iEntry<numberOfETofPidTraits(); iEntry++) {
324  LOG_INFO << "+++ ETofPidTraits " << iEntry << "\n";
325  etofPidTraits(iEntry)->Print();
326  LOG_INFO << "\n";
327  }
328 
329  LOG_INFO << endm;
330 }
static void printTrackCovMatrices()
Print track covariance matrix info.
Definition: StPicoDst.cxx:243
static StPicoMcTrack * mcTrack(Int_t i)
Return pointer to i-th MC track.
Definition: StPicoDst.h:101
virtual void Print(const Char_t *option="") const
Print eTOF PID traits information.
static StPicoMtdHit * mtdHit(Int_t i)
Return pointer to i-th mtd hit.
Definition: StPicoDst.h:75
static StPicoETofHit * etofHit(Int_t i)
Return pointer to i-th etof hit.
Definition: StPicoDst.h:95
static void printBEmcSmdEHits()
Print BEMC SMD eta info.
Definition: StPicoDst.cxx:261
static UInt_t numberOfFmsHits()
Return number of FMS hits.
Definition: StPicoDst.h:120
static void unset()
Reset the pointers to the TClonesArrays to 0.
Definition: StPicoDst.cxx:29
static UInt_t numberOfBTowHits()
Return number of BTow hits.
Definition: StPicoDst.h:110
static UInt_t numberOfEmcTriggers()
Return number of Emc triggers.
Definition: StPicoDst.h:106
virtual void Print(const Char_t *option="") const
Print MTD PID traits information.
virtual void Print(const Char_t *option="") const
Print some event information.
virtual void Print(const Char_t *option="") const
Print BEMC SmdEta hit information.
static void printMtdPidTraits()
Print MTD PID trait info.
Definition: StPicoDst.cxx:225
static UInt_t numberOfMtdHits()
Return number of MTD hits.
Definition: StPicoDst.h:114
static void printETofHits()
Print ETOF hit info.
Definition: StPicoDst.cxx:297
static UInt_t numberOfBTofPidTraits()
Return number of BTof PID traits.
Definition: StPicoDst.h:124
static StPicoBTowHit * btowHit(Int_t i)
Return pointer to i-th btow hit.
Definition: StPicoDst.h:71
static StPicoBEmcSmdPHit * bemcSmdPHit(Int_t i)
Return pointer to i-th BEMC SMD phi hit.
Definition: StPicoDst.h:93
static void printMcTracks()
Print MC track info.
Definition: StPicoDst.cxx:80
static void printETofPidTraits()
Print ETOF PID trait info.
Definition: StPicoDst.cxx:315
static void printFmsHits()
Print FMS hit info.
Definition: StPicoDst.cxx:171
virtual void Print(const Char_t *option="") const
Print hit information.
virtual void Print(const Char_t *option="") const
Print TOF PID traits information.
static UInt_t numberOfETofPidTraits()
Return number of ETOF PID traits.
Definition: StPicoDst.h:136
static StPicoEvent * event()
Return pointer to current StPicoEvent (class holding the event wise information)
Definition: StPicoDst.h:63
static StPicoETofPidTraits * etofPidTraits(Int_t i)
Return pointer to i-th etof pidTraits.
Definition: StPicoDst.h:97
virtual void Print(Char_t const *option="") const
Print option.
virtual void Print(const Char_t *option="") const
Print tower information.
static StPicoBEmcPidTraits * bemcPidTraits(Int_t i)
Return pointer to i-th emc pidTraits.
Definition: StPicoDst.h:83
static StPicoBEmcSmdEHit * bemcSmdEHit(Int_t i)
Return pointer to i-th BEMC SMD eta hit.
Definition: StPicoDst.h:91
static void printBTowHits()
Print BTOW hit info.
Definition: StPicoDst.cxx:117
virtual void Print(const Char_t *option="") const
Print MC vertex parameters.
static UInt_t numberOfETofHits()
Return number of ETof hits.
Definition: StPicoDst.h:134
static StPicoMtdPidTraits * mtdPidTraits(Int_t i)
Return pointer to i-th mtd pidTraits.
Definition: StPicoDst.h:87
static UInt_t numberOfTracks()
Return number of tracks.
Definition: StPicoDst.h:104
static void set(TClonesArray **)
Set the pointers to the TClonesArrays.
Definition: StPicoDst.cxx:34
virtual void Print(const Char_t *option="") const
Prints FMS hit information.
static void printBTofPidTraits()
Print BTOF PID trait info.
Definition: StPicoDst.cxx:207
static StPicoTrackCovMatrix * trackCovMatrix(Int_t i)
Return pointer to i-th track covariance matrix.
Definition: StPicoDst.h:89
static void printBEmcSmdPHits()
Print BEMC SMD phi info.
Definition: StPicoDst.cxx:279
static StPicoEmcTrigger * emcTrigger(Int_t i)
Return pointer to i-th trigger data.
Definition: StPicoDst.h:67
static StPicoBTofHit * btofHit(Int_t i)
Return pointer to i-th btof hit.
Definition: StPicoDst.h:73
virtual void Print(const Char_t *option="") const
Print BEMC SmdPhi hit information.
static UInt_t numberOfMtdPidTraits()
Return number of MTD traits.
Definition: StPicoDst.h:126
virtual void Print(const Char_t *option="") const
Print MC track parameters.
static StPicoTrack * track(Int_t i)
Return pointer to i-th track.
Definition: StPicoDst.h:65
static void printBEmcPidTraits()
Print BEMC PID trait info.
Definition: StPicoDst.cxx:189
static StPicoMcVertex * mcVertex(Int_t i)
Return pointer to i-th MC vertex.
Definition: StPicoDst.h:99
static void printTracks()
Print track info.
Definition: StPicoDst.cxx:46
static void printBTofHits()
Print BTOF hit info.
Definition: StPicoDst.cxx:135
static UInt_t numberOfBEmcSmdEHits()
Return number of BEMC SMD eta hits.
Definition: StPicoDst.h:130
static UInt_t numberOfBEmcSmdPHits()
Return number of BEMC SMD phi hits.
Definition: StPicoDst.h:132
virtual void Print(const Char_t *option="") const
Print the stored information.
virtual void Print(const Char_t *option="") const
Print hit information.
virtual void Print(const Char_t *option="") const
Print BEMC PID traits information.
static UInt_t numberOfTrackCovMatrices()
Return number of track covariance matrices.
Definition: StPicoDst.h:128
static void printTriggers()
Print trigger.
Definition: StPicoDst.cxx:97
virtual void Print(const Char_t *option="") const
Print track parameters.
static StPicoFmsHit * fmsHit(Int_t i)
Return pointer to i-th fms hit.
Definition: StPicoDst.h:81
static void printMcVertices()
Print MC vertex info.
Definition: StPicoDst.cxx:63
static UInt_t numberOfBTofHits()
Return number of BTof hits.
Definition: StPicoDst.h:112
static UInt_t numberOfMcVertices()
Return number of MC vertices.
Definition: StPicoDst.h:138
void print() const
Print information.
Definition: StPicoDst.cxx:39
static void printMtdHits()
Print MTD hit info.
Definition: StPicoDst.cxx:153
static UInt_t numberOfBEmcPidTraits()
Return number of BEMC PID traits.
Definition: StPicoDst.h:122
virtual void Print(const Char_t *option="") const
Print EMC trigger information.
static StPicoBTofPidTraits * btofPidTraits(Int_t i)
Return pointer to i-th btof pidTraits.
Definition: StPicoDst.h:85
static UInt_t numberOfMcTracks()
Return number of MC tracks.
Definition: StPicoDst.h:140