StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTrackDetectorInfo.h
1 
5 /***************************************************************************
6  *
7  * $Id: StTrackDetectorInfo.h,v 2.16 2015/05/19 20:09:40 perev Exp $
8  *
9  * Author: Thomas Ullrich, Sep 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  * Note the following: with the arrival of ITTF it is now possible to
15  * store the numberOfPoints for every detector individually. Before
16  * that and because of the way the tables were defined TPC and FTPC were
17  * one and the same. This caused confusion. However, since we have to
18  * stay backwards compatible the "old way" is still working.
19  * If
20  * a) mNumberOfPoints == 0 the new encoding is the one to use, i.e.,
21  * mNumberOfPointsTpc
22  * mNumberOfPointsFtpcWest
23  * mNumberOfPointsFtpcEast
24  * mNumberOfPointsSvt
25  * mNumberOfPointsSsd
26  * are the ones that count
27  * b) mNumberOfPoints != 0 then we still loaded the info from
28  * the tables and all is as it was before, i.e., we do not distinguish
29  * between FTPC and TPC.
30  *
31  ***************************************************************************
32  *
33  * $Log: StTrackDetectorInfo.h,v $
34  * Revision 2.16 2015/05/19 20:09:40 perev
35  * added Ist & Pxl
36  *
37  * Revision 2.15 2012/08/03 23:42:24 perev
38  * ClassDef vers++
39  *
40  * Revision 2.14 2012/07/21 03:33:54 perev
41  * Add Other hits
42  *
43  * Revision 2.13 2009/11/23 16:34:07 fisyak
44  * Cleanup, remove dependence on dst tables, clean up software monitors
45  *
46  * Revision 2.12 2004/10/13 16:11:59 ullrich
47  * Added optional arg to addHit() to allow NOT to increase ref counter.
48  *
49  * Revision 2.11 2004/08/05 22:23:32 ullrich
50  * Fixed bug in first argument type of setNumberOfPoints().
51  *
52  * Revision 2.10 2004/08/05 19:25:03 ullrich
53  * Changes to the handling of numberOfPoints() to allow ITTF more flexibility.
54  *
55  * Revision 2.9 2004/07/15 16:36:26 ullrich
56  * Removed all clone() declerations and definitions. Use StObject::clone() only.
57  *
58  * Revision 2.8 2003/10/30 20:07:32 perev
59  * Check of quality added
60  *
61  * Revision 2.7 2002/02/22 22:56:52 jeromel
62  * Doxygen basic documentation in all header files. None of this is required
63  * for QM production.
64  *
65  * Revision 2.6 2001/04/05 04:00:45 ullrich
66  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
67  *
68  * Revision 2.5 2001/03/24 03:35:00 perev
69  * clone() -> clone() const
70  *
71  * Revision 2.4 2000/04/20 13:30:02 ullrich
72  * Added new methods and removed inconsistencies in numberOfPoints().
73  *
74  * Revision 2.3 1999/11/01 12:45:12 ullrich
75  * Modified unpacking of point counter
76  *
77  * Revision 2.2 1999/10/28 22:27:30 ullrich
78  * Adapted new StArray version. First version to compile on Linux and Sun.
79  *
80  * Revision 2.1 1999/10/13 19:44:11 ullrich
81  * Initial Revision
82  *
83  **************************************************************************/
84 #ifndef StTrackDetectorInfo_hh
85 #define StTrackDetectorInfo_hh
86 #include "StContainers.h"
87 #include "StObject.h"
88 #include "StThreeVectorF.hh"
89 #include "StEnumerations.h"
90 
91 class StHitFilter;
92 class StHit;
93 
94 class StTrackDetectorInfo : public StObject {
95 public:
97  // StTrackDetectorInfo(const StTrackDetectorInfo&); use default
98  // StTrackDetectorInfo & operator=(const StTrackDetectorInfo&); use default
99  virtual ~StTrackDetectorInfo();
100 
101  const StThreeVectorF& firstPoint() const;
102  const StThreeVectorF& lastPoint() const;
103 
104  unsigned short numberOfPoints() const;
105  unsigned short numberOfPoints(StDetectorId) const;
106 
107  unsigned short numberOfReferencedPoints() const;
108  unsigned short numberOfReferencedPoints(StDetectorId) const;
109 
110  StPtrVecHit hits(StDetectorId) const;
111  StPtrVecHit hits(StHitFilter&) const;
112  StPtrVecHit& hits();
113  const StPtrVecHit& hits() const;
114 
115  void setFirstPoint(const StThreeVectorF&);
116  void setLastPoint(const StThreeVectorF&);
117  void setNumberOfPoints(unsigned char, StDetectorId);
118  void addHit(StHit*, bool = true);
119  void removeHit(StHit*&);
120  int bad() const;
121 
122 protected:
123  void setNumberOfPoints(unsigned short); // obsolete since ITTF
124 
125 private:
126  StThreeVectorF mFirstPoint;
127  StThreeVectorF mLastPoint;
128  UShort_t mNumberOfPoints; // obsolete since ITTF
129  UChar_t mNumberOfPointsTpc;
130  UChar_t mNumberOfPointsFtpcWest;
131  UChar_t mNumberOfPointsFtpcEast;
132  UChar_t mNumberOfPointsSvt;
133  UChar_t mNumberOfPointsSsd;
134  UChar_t mNumberOfPointsOth; // Other hits
135  UChar_t mNumberOfPointsIst;
136  UChar_t mNumberOfPointsPxl;
137 
138  StPtrVecHit mHits;
139 
140  ClassDef(StTrackDetectorInfo,4)
141 };
142 
143 #endif
Definition: StHit.h:125