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 
232 class StEvent : public StXRefMain {
233 public:
234  StEvent();
235  virtual ~StEvent();
236 
237  static const TString& cvsTag();
238 
239  TString type() const;
240  int id() const;
241  int runId() const;
242  int time() const;
243  unsigned int triggerMask() const;
244  unsigned int bunchCrossingNumber(unsigned int) const;
245 
246  StEventInfo* info();
247  const StEventInfo* info() const;
248 
249  StRunInfo* runInfo();
250  const StRunInfo* runInfo() const;
251 
252  StEventSummary* summary();
253  const StEventSummary* summary() const;
254 
255  StTpcHitCollection* tpcHitCollection();
256  const StTpcHitCollection* tpcHitCollection() const;
257  StFtpcHitCollection* ftpcHitCollection();
258  const StFtpcHitCollection* ftpcHitCollection() const;
259  StSvtHitCollection* svtHitCollection();
260  const StSvtHitCollection* svtHitCollection() const;
261  StSsdHitCollection* ssdHitCollection();
262  const StSsdHitCollection* ssdHitCollection() const;
263  StSstHitCollection* sstHitCollection();
264  const StSstHitCollection* sstHitCollection() const;
265  StEmcCollection* emcCollection();
266  const StEmcCollection* emcCollection() const;
267  StFcsCollection* fcsCollection();
268  const StFcsCollection* fcsCollection() const;
269  StFttCollection* fttCollection();
270  const StFttCollection* fttCollection() const;
271  StFmsCollection* fmsCollection();
272  const StFmsCollection* fmsCollection() const;
273  StRHICfCollection* rhicfCollection();
274  const StRHICfCollection* rhicfCollection() const;
275  StRichCollection* richCollection();
276  const StRichCollection* richCollection() const;
277  StRpsCollection* rpsCollection();
278  const StRpsCollection* rpsCollection() const;
279  StTofCollection* tofCollection();
280  const StTofCollection* tofCollection() const;
281  StBTofCollection* btofCollection();
282  const StBTofCollection* btofCollection() const;
283  StETofCollection* etofCollection();
284  const StETofCollection* etofCollection() const;
285  StMtdCollection* mtdCollection();
286  const StMtdCollection* mtdCollection() const;
287  StFpdCollection* fpdCollection();
288  const StFpdCollection* fpdCollection() const;
289  StPhmdCollection* phmdCollection();
290  const StPhmdCollection* phmdCollection() const;
291  StRnDHitCollection* rndHitCollection();
292  const StRnDHitCollection* rndHitCollection() const;
293  StEtrHitCollection* etrHitCollection();
294  const StEtrHitCollection* etrHitCollection() const;
295  StHltEvent* hltEvent();
296  const StHltEvent* hltEvent() const;
297  StFgtCollection* fgtCollection();
298  const StFgtCollection* fgtCollection() const;
299  StPxlHitCollection* pxlHitCollection();
300  const StPxlHitCollection* pxlHitCollection() const;
301  StIstHitCollection* istHitCollection();
302  const StIstHitCollection* istHitCollection() const;
303  StFstEvtCollection* fstEvtCollection();
304  const StFstEvtCollection* fstEvtCollection() const;
305  StFstHitCollection* fstHitCollection();
306  const StFstHitCollection* fstHitCollection() const;
307  StEpdCollection* epdCollection();
308  const StEpdCollection* epdCollection() const;
309  StL0Trigger* l0Trigger();
310  const StL0Trigger* l0Trigger() const;
311  StL1Trigger* l1Trigger();
312  const StL1Trigger* l1Trigger() const;
313  StL3Trigger* l3Trigger();
314  const StL3Trigger* l3Trigger() const;
315  StTriggerDetectorCollection* triggerDetectorCollection();
316  const StTriggerDetectorCollection* triggerDetectorCollection() const;
317  StTriggerIdCollection* triggerIdCollection();
318  const StTriggerIdCollection* triggerIdCollection() const;
319  StTriggerData* triggerData();
320  const StTriggerData* triggerData() const;
321 
322  StSPtrVecTrackDetectorInfo& trackDetectorInfo();
323  const StSPtrVecTrackDetectorInfo& trackDetectorInfo() const;
324 
325  StSPtrVecTrackNode& trackNodes();
326  const StSPtrVecTrackNode& trackNodes() const;
327 
328  unsigned int numberOfPrimaryVertices() const;
329  StPrimaryVertex* primaryVertex(unsigned int = 0);
330  const StPrimaryVertex* primaryVertex(unsigned int = 0) const;
331 
332  unsigned int numberOfCalibrationVertices() const;
333  StCalibrationVertex* calibrationVertex(unsigned int);
334  const StCalibrationVertex* calibrationVertex(unsigned int) const;
335 
336  StSPtrVecV0Vertex& v0Vertices();
337  const StSPtrVecV0Vertex& v0Vertices() const;
338  StSPtrVecXiVertex& xiVertices();
339  const StSPtrVecXiVertex& xiVertices() const;
340  StSPtrVecKinkVertex& kinkVertices();
341  const StSPtrVecKinkVertex& kinkVertices() const;
342 
343  StFwdTrackCollection* fwdTrackCollection();
344  const StFwdTrackCollection* fwdTrackCollection() const;
345 
346  StDetectorState* detectorState(StDetectorId);
347  const StDetectorState* detectorState(StDetectorId) const;
348 
349  StPsd* psd(StPwg, int);
350  const StPsd* psd(StPwg, int) const;
351  unsigned int numberOfPsds() const;
352  unsigned int numberOfPsds(StPwg) const;
353 
354  StSPtrVecHit* hitCollection(const Char_t *name);
355 
356  StSPtrVecObject& content(); // for IO purposes only
357 
358  const StEventClusteringHints* clusteringHints() const; // for IO purposes only
359  StEventClusteringHints* clusteringHints(); // for IO purposes only
360 
361  void statistics(); // *MENU*
362 
363  void setType(const char*);
364  void setRunId(int);
365  void setId(int);
366  void setTime(int);
367  void setTriggerMask(unsigned int);
368  void setBunchCrossingNumber(unsigned int, unsigned int);
369  void setInfo(StEventInfo*);
370  void setRunInfo(StRunInfo*);
371  void setSummary(StEventSummary*);
372  void setIdTruth();
373 
374  void setTpcHitCollection(StTpcHitCollection*);
375  void setRnDHitCollection(StRnDHitCollection*);
376  void setEtrHitCollection(StEtrHitCollection*);
377  void setFtpcHitCollection(StFtpcHitCollection*);
378  void setSvtHitCollection(StSvtHitCollection*);
379  void setSsdHitCollection(StSsdHitCollection*);
380  void setSstHitCollection(StSstHitCollection*);
381  void setPxlHitCollection(StPxlHitCollection*);
382  void setIstHitCollection(StIstHitCollection*);
383  void setFstEvtCollection(StFstEvtCollection*);
384  void setFstHitCollection(StFstHitCollection*);
385  void setEmcCollection(StEmcCollection*);
386  void setEpdCollection(StEpdCollection*);
387  void setFcsCollection(StFcsCollection*);
388  void setFttCollection(StFttCollection*);
389  void setFmsCollection(StFmsCollection*);
390  void setRHICfCollection(StRHICfCollection*);
391  void setRichCollection(StRichCollection*);
392  void setRpsCollection(StRpsCollection*);
393  void setTofCollection(StTofCollection*);
394  void setBTofCollection(StBTofCollection*);
395  void setETofCollection(StETofCollection*);
396  void setMtdCollection(StMtdCollection*);
397  void setFpdCollection(StFpdCollection*);
398  void setPhmdCollection(StPhmdCollection*);
399  void setTriggerDetectorCollection(StTriggerDetectorCollection*);
400  void setTriggerIdCollection(StTriggerIdCollection*);
401  void setTriggerData(StTriggerData*);
402  void setL0Trigger(StL0Trigger*);
403  void setL1Trigger(StL1Trigger*);
404  void setL3Trigger(StL3Trigger*);
405  void setHltEvent(StHltEvent*);
406  void setFgtCollection(StFgtCollection*);
407  void setFwdTrackCollection(StFwdTrackCollection*);
409  void addCalibrationVertex(StCalibrationVertex*);
410  void addDetectorState(StDetectorState*);
411  void addPsd(StPsd*);
412  void removePsd(StPsd*);
413  void addHitCollection(StSPtrVecHit* p, const Char_t *name);
414  void removeHitCollection(const Char_t *name);
415 
416  virtual Bool_t Notify();
417 
418 protected:
419  mutable StSPtrVecObject mContent;
420  static TString mCvsTag;
421  void Split();
422  int IsMain() const {return 1;}
423 
424 private:
425  StEvent& operator=(const StEvent&);
426  StEvent(const StEvent&);
427  void initToZero();
428 
429  ClassDef(StEvent,6)
430 };
431 #endif
432 
433 
434 
435 
436 
437 
438 
StPrimaryVertexOrder
StPwg
Definition: StPsd.h:39
Collection of trigger ids as stored in StEvent.