StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StEvent.h
1 
5 /***************************************************************************
6  *
7  * $Id: StEvent.h,v 2.52 2021/01/11 20:27:40 ullrich Exp $
8  *
9  * Author: Thomas Ullrich, Sep 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StEvent.h,v $
17  * Revision 2.52 2021/01/11 20:27:40 ullrich
18  * Updated to add FCS elements (Akio).
19  *
20  * Revision 2.51 2018/12/11 19:53:10 ullrich
21  * Added RICHf.
22  *
23  * Revision 2.50 2018/07/09 16:50:31 ullrich
24  * Added EToF hooks.
25  *
26  * Revision 2.49 2018/02/08 17:36:26 ullrich
27  * Changed for new EPD classes.
28  *
29  * Revision 2.48 2015/05/13 17:06:13 ullrich
30  * Added hooks and interfaces to Sst detector (part of HFT).
31  *
32  * Revision 2.47 2014/04/10 16:00:13 jeromel
33  * Changes to inlcude Ist structure (Thomas OK-ed / may revisit some comments)
34  *
35  * Revision 2.46 2013/03/05 14:42:45 ullrich
36  * Added StPxl hits and Containers.
37  *
38  * Revision 2.45 2012/04/16 20:22:16 ullrich
39  * Changes necessary to add Fgt package.
40  *
41  * Revision 2.44 2012/02/21 18:47:13 perev
42  * Add IsMain() related to I/O
43  *
44  * Revision 2.43 2012/01/24 03:01:24 perev
45  * Etr detector added
46  *
47  * Revision 2.42 2011/10/17 00:13:49 fisyak
48  * Add handles for IdTruth info
49  *
50  * Revision 2.41 2011/04/25 21:25:09 ullrich
51  * Modifications to hold MTD data.
52  *
53  * Revision 2.40 2011/02/01 19:47:36 ullrich
54  * Added HLT branch and hooks.
55  *
56  * Revision 2.39 2010/08/31 19:53:37 fisyak
57  * Remove SoftwareMonitors
58  *
59  * Revision 2.38 2010/01/08 22:43:44 ullrich
60  * Updates needed to add StFmsCollection and related classes.
61  *
62  * Revision 2.37 2009/11/23 22:22:25 ullrich
63  * Minor cleanup performed and hooks for RPS added.
64  *
65  * Revision 2.36 2009/11/23 19:45:42 fisyak
66  * remove reference to event_header_st
67  *
68  * Revision 2.35 2009/11/23 19:31:23 fisyak
69  * remove reference to event_header_st
70  *
71  * Revision 2.33 2008/12/22 20:36:53 ullrich
72  * Added hooks for new ToF (BTof)
73  *
74  * Revision 2.32 2006/04/25 23:21:25 ullrich
75  * Modified addPrimaryVertex(). New 2nd arg: StPrimaryVertexOrder.
76  *
77  * Revision 2.31 2006/01/19 21:48:21 ullrich
78  * Add RnD collection.
79  *
80  * Revision 2.30 2003/04/16 17:48:32 ullrich
81  * Added StTriggerData and inherited classe(s).
82  *
83  * Revision 2.29 2003/01/30 18:36:31 ullrich
84  * Added hooks for StTriggerIdCollection.
85  *
86  * Revision 2.28 2002/12/20 22:41:30 ullrich
87  * Added PMD.
88  *
89  * Revision 2.27 2002/02/22 22:56:47 jeromel
90  * Doxygen basic documentation in all header files. None of this is required
91  * for QM production.
92  *
93  * Revision 2.26 2002/01/03 20:59:33 ullrich
94  * Added BBC and FPD.
95  *
96  * Revision 2.25 2001/12/01 15:40:48 ullrich
97  * Added StDetectorState access function.
98  *
99  * Revision 2.24 2001/11/10 23:53:23 ullrich
100  * Added calibration vertices.
101  *
102  * Revision 2.23 2001/11/07 21:19:42 ullrich
103  * Added L1 trigger.
104  *
105  * Revision 2.22 2001/09/18 00:15:25 ullrich
106  * Added StRunInfo and access functions.
107  *
108  * Revision 2.21 2001/05/30 17:45:53 perev
109  * StEvent branching
110  *
111  * Revision 2.20 2001/05/17 22:56:33 ullrich
112  * Removed all usage of dst_summary_param.
113  *
114  * Revision 2.19 2001/04/23 19:28:14 ullrich
115  * Added StClusteringHints and methods to access it.
116  *
117  * Revision 2.18 2001/04/05 04:00:36 ullrich
118  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
119  *
120  * Revision 2.17 2001/03/14 02:35:43 ullrich
121  * Added container and methods to handle PSDs.
122  *
123  * Revision 2.16 2001/03/09 05:24:01 ullrich
124  * Added new method statistics().
125  *
126  * Revision 2.15 2000/12/08 03:53:41 ullrich
127  * Prepared hooks for ToF.
128  *
129  * Revision 2.14 2000/09/25 14:21:30 ullrich
130  * Removed enums for content vector. Replaced by lookup function.
131  *
132  * Revision 2.13 2000/09/06 22:34:17 ullrich
133  * Changed mBunchCrossingNumber from scalar to array to hold all 64 bits.
134  *
135  * Revision 2.12 2000/06/19 01:32:15 perev
136  * Thomas StEvent branches added
137  *
138  * Revision 2.11 2000/05/24 15:46:10 ullrich
139  * Added setSummary() method.
140  *
141  * Revision 2.10 2000/05/22 21:47:15 ullrich
142  * Added RICH collection and related methods.
143  *
144  * Revision 2.9 2000/05/15 18:35:37 ullrich
145  * All data member related to collections and containers are now
146  * kept by pointer. The interface (public methods) stays the same.
147  * Those methods which returns references were modified to create
148  * an empty collection in case the pointer is null.
149  *
150  * Revision 2.8 2000/04/26 20:33:26 ullrich
151  * Removed redundant virtual keywords.
152  *
153  * Revision 2.7 2000/04/18 17:31:28 perev
154  * StEvent::Browse overload of TDataSet:;One
155  *
156  * Revision 2.6 2000/03/29 16:54:15 ullrich
157  * Added L3 trigger.
158  *
159  * Revision 2.5 2000/02/23 17:36:02 ullrich
160  * Changes due to the addition of the EMC to StEvent
161  *
162  * Revision 2.4 2000/01/13 21:06:22 lasiuk
163  * add rich pixel info/containers
164  *
165  * Revision 2.3 2000/01/05 16:02:28 ullrich
166  * SSD hits added to StEvent.
167  *
168  * Revision 2.2 1999/11/04 13:30:42 ullrich
169  * Added constructor without summary table
170  *
171  * Revision 2.1 1999/10/28 22:25:10 ullrich
172  * Adapted new StArray version. First version to compile on Linux and Sun.
173  *
174  * Revision 2.0 1999/10/12 18:41:58 ullrich
175  * Completely Revised for New Version
176  *
177  **************************************************************************/
178 #ifndef StEvent_hh
179 #define StEvent_hh
180 
181 #include "St_DataSet.h"
182 #include "TString.h"
183 #include "StContainers.h"
184 #include "StEnumerations.h"
185 
186 class StCalibrationVertex;
187 class StDetectorState;
189 class StEventInfo;
190 class StEventSummary;
191 class StFpdCollection;
192 class StPhmdCollection;
193 class StTpcHitCollection;
194 class StFtpcHitCollection;
195 class StSvtHitCollection;
196 class StSsdHitCollection;
197 class StSstHitCollection;
198 class StEtrHitCollection;
199 class StEmcCollection;
200 class StEpdCollection;
201 class StFcsCollection;
202 class StFttCollection;
203 class StFmsCollection;
204 class StRHICfCollection;
205 class StRichCollection;
206 class StRpsCollection;
207 class StTofCollection;
208 class StBTofCollection;
209 class StETofCollection;
210 class StMtdCollection;
213 class StTriggerData;
214 class StL0Trigger;
215 class StL1Trigger;
216 class StL3Trigger;
217 class StPrimaryVertex;
218 class StRunInfo;
219 class StV0Vertex;
220 class StXiVertex;
221 class StKinkVertex;
222 class StPsd;
223 class StRnDHitCollection;
224 class StHltEvent;
225 class StFgtCollection;
226 class StPxlHitCollection;
227 class StIstHitCollection;
228 class StFstEvtCollection;
229 class StFstHitCollection;
231 class StGmtCollection;
232 
233 class StEvent : public StXRefMain {
234 public:
235  StEvent();
236  virtual ~StEvent();
237 
238  static const TString& cvsTag();
239 
240  TString type() const;
241  int id() const;
242  int runId() const;
243  int time() const;
244  unsigned int triggerMask() const;
245  unsigned int bunchCrossingNumber(unsigned int) const;
246 
247  StEventInfo* info();
248  const StEventInfo* info() const;
249 
250  StRunInfo* runInfo();
251  const StRunInfo* runInfo() const;
252 
253  StEventSummary* summary();
254  const StEventSummary* summary() const;
255 
256  StTpcHitCollection* tpcHitCollection();
257  const StTpcHitCollection* tpcHitCollection() const;
258  StFtpcHitCollection* ftpcHitCollection();
259  const StFtpcHitCollection* ftpcHitCollection() const;
260  StSvtHitCollection* svtHitCollection();
261  const StSvtHitCollection* svtHitCollection() const;
262  StSsdHitCollection* ssdHitCollection();
263  const StSsdHitCollection* ssdHitCollection() const;
264  StSstHitCollection* sstHitCollection();
265  const StSstHitCollection* sstHitCollection() const;
266  StEmcCollection* emcCollection();
267  const StEmcCollection* emcCollection() const;
268  StFcsCollection* fcsCollection();
269  const StFcsCollection* fcsCollection() const;
270  StFttCollection* fttCollection();
271  const StFttCollection* fttCollection() const;
272  StFmsCollection* fmsCollection();
273  const StFmsCollection* fmsCollection() const;
274  StRHICfCollection* rhicfCollection();
275  const StRHICfCollection* rhicfCollection() const;
276  StRichCollection* richCollection();
277  const StRichCollection* richCollection() const;
278  StRpsCollection* rpsCollection();
279  const StRpsCollection* rpsCollection() const;
280  StTofCollection* tofCollection();
281  const StTofCollection* tofCollection() const;
282  StBTofCollection* btofCollection();
283  const StBTofCollection* btofCollection() const;
284  StETofCollection* etofCollection();
285  const StETofCollection* etofCollection() const;
286  StMtdCollection* mtdCollection();
287  const StMtdCollection* mtdCollection() const;
288  StFpdCollection* fpdCollection();
289  const StFpdCollection* fpdCollection() const;
290  StPhmdCollection* phmdCollection();
291  const StPhmdCollection* phmdCollection() const;
292  StRnDHitCollection* rndHitCollection();
293  const StRnDHitCollection* rndHitCollection() const;
294  StEtrHitCollection* etrHitCollection();
295  const StEtrHitCollection* etrHitCollection() const;
296  StHltEvent* hltEvent();
297  const StHltEvent* hltEvent() const;
298  StFgtCollection* fgtCollection();
299  const StFgtCollection* fgtCollection() const;
300  StPxlHitCollection* pxlHitCollection();
301  const StPxlHitCollection* pxlHitCollection() const;
302  StIstHitCollection* istHitCollection();
303  const StIstHitCollection* istHitCollection() const;
304  StFstEvtCollection* fstEvtCollection();
305  const StFstEvtCollection* fstEvtCollection() const;
306  StFstHitCollection* fstHitCollection();
307  const StFstHitCollection* fstHitCollection() const;
308  StEpdCollection* epdCollection();
309  const StEpdCollection* epdCollection() const;
310  StL0Trigger* l0Trigger();
311  const StL0Trigger* l0Trigger() const;
312  StL1Trigger* l1Trigger();
313  const StL1Trigger* l1Trigger() const;
314  StL3Trigger* l3Trigger();
315  const StL3Trigger* l3Trigger() const;
316  StTriggerDetectorCollection* triggerDetectorCollection();
317  const StTriggerDetectorCollection* triggerDetectorCollection() const;
318  StTriggerIdCollection* triggerIdCollection();
319  const StTriggerIdCollection* triggerIdCollection() const;
320  StTriggerData* triggerData();
321  const StTriggerData* triggerData() const;
322  StGmtCollection* gmtCollection();
323  const StGmtCollection* gmtCollection() const;
324 
325  StSPtrVecTrackDetectorInfo& trackDetectorInfo();
326  const StSPtrVecTrackDetectorInfo& trackDetectorInfo() const;
327 
328  StSPtrVecTrackNode& trackNodes();
329  const StSPtrVecTrackNode& trackNodes() const;
330 
331  unsigned int numberOfPrimaryVertices() const;
332  StPrimaryVertex* primaryVertex(unsigned int = 0);
333  const StPrimaryVertex* primaryVertex(unsigned int = 0) const;
334 
335  unsigned int numberOfCalibrationVertices() const;
336  StCalibrationVertex* calibrationVertex(unsigned int);
337  const StCalibrationVertex* calibrationVertex(unsigned int) const;
338 
339  StSPtrVecV0Vertex& v0Vertices();
340  const StSPtrVecV0Vertex& v0Vertices() const;
341  StSPtrVecXiVertex& xiVertices();
342  const StSPtrVecXiVertex& xiVertices() const;
343  StSPtrVecKinkVertex& kinkVertices();
344  const StSPtrVecKinkVertex& kinkVertices() const;
345 
346  StFwdTrackCollection* fwdTrackCollection();
347  const StFwdTrackCollection* fwdTrackCollection() const;
348 
349  StDetectorState* detectorState(StDetectorId);
350  const StDetectorState* detectorState(StDetectorId) const;
351 
352  StPsd* psd(StPwg, int);
353  const StPsd* psd(StPwg, int) const;
354  unsigned int numberOfPsds() const;
355  unsigned int numberOfPsds(StPwg) const;
356 
357  StSPtrVecHit* hitCollection(const Char_t *name);
358 
359  StSPtrVecObject& content(); // for IO purposes only
360 
361  const StEventClusteringHints* clusteringHints() const; // for IO purposes only
362  StEventClusteringHints* clusteringHints(); // for IO purposes only
363 
364  void statistics(); // *MENU*
365 
366  void setType(const char*);
367  void setRunId(int);
368  void setId(int);
369  void setTime(int);
370  void setTriggerMask(unsigned int);
371  void setBunchCrossingNumber(unsigned int, unsigned int);
372  void setInfo(StEventInfo*);
373  void setRunInfo(StRunInfo*);
374  void setSummary(StEventSummary*);
375  void setIdTruth();
376 
377  void setTpcHitCollection(StTpcHitCollection*);
378  void setRnDHitCollection(StRnDHitCollection*);
379  void setEtrHitCollection(StEtrHitCollection*);
380  void setFtpcHitCollection(StFtpcHitCollection*);
381  void setSvtHitCollection(StSvtHitCollection*);
382  void setSsdHitCollection(StSsdHitCollection*);
383  void setSstHitCollection(StSstHitCollection*);
384  void setPxlHitCollection(StPxlHitCollection*);
385  void setIstHitCollection(StIstHitCollection*);
386  void setFstEvtCollection(StFstEvtCollection*);
387  void setFstHitCollection(StFstHitCollection*);
388  void setEmcCollection(StEmcCollection*);
389  void setEpdCollection(StEpdCollection*);
390  void setFcsCollection(StFcsCollection*);
391  void setFttCollection(StFttCollection*);
392  void setFmsCollection(StFmsCollection*);
393  void setRHICfCollection(StRHICfCollection*);
394  void setRichCollection(StRichCollection*);
395  void setRpsCollection(StRpsCollection*);
396  void setTofCollection(StTofCollection*);
397  void setBTofCollection(StBTofCollection*);
398  void setETofCollection(StETofCollection*);
399  void setMtdCollection(StMtdCollection*);
400  void setFpdCollection(StFpdCollection*);
401  void setPhmdCollection(StPhmdCollection*);
402  void setTriggerDetectorCollection(StTriggerDetectorCollection*);
403  void setTriggerIdCollection(StTriggerIdCollection*);
404  void setTriggerData(StTriggerData*);
405  void setL0Trigger(StL0Trigger*);
406  void setL1Trigger(StL1Trigger*);
407  void setL3Trigger(StL3Trigger*);
408  void setHltEvent(StHltEvent*);
409  void setFgtCollection(StFgtCollection*);
410  void setFwdTrackCollection(StFwdTrackCollection*);
412  void addCalibrationVertex(StCalibrationVertex*);
413  void addDetectorState(StDetectorState*);
414  void addPsd(StPsd*);
415  void removePsd(StPsd*);
416  void addHitCollection(StSPtrVecHit* p, const Char_t *name);
417  void removeHitCollection(const Char_t *name);
418  void setGmtCollection(StGmtCollection*);
419 
420  virtual Bool_t Notify();
421 
422 protected:
423  mutable StSPtrVecObject mContent;
424  static TString mCvsTag;
425  void Split();
426  int IsMain() const {return 1;}
427 
428 private:
429  StEvent& operator=(const StEvent&);
430  StEvent(const StEvent&);
431  void initToZero();
432 
433  ClassDef(StEvent,6)
434 };
435 #endif
436 
437 
438 
439 
440 
441 
442 
Holds collections of GMT data.
StPrimaryVertexOrder
StPwg
Definition: StPsd.h:39
Collection of trigger ids as stored in StEvent.