StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRichPid.h
1 
5 /***************************************************************************
6  *
7  * $Id: StRichPid.h,v 2.7 2002/02/22 22:56:49 jeromel Exp $
8  *
9  * Author: Matt Horsley, Sep 2000
10  ***************************************************************************
11  *
12  * Description: Definition of PID object
13  *
14  ***************************************************************************
15  *
16  * $Log: StRichPid.h,v $
17  * Revision 2.7 2002/02/22 22:56:49 jeromel
18  * Doxygen basic documentation in all header files. None of this is required
19  * for QM production.
20  *
21  * Revision 2.6 2001/04/05 04:00:40 ullrich
22  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
23  *
24  * Revision 2.5 2000/11/27 17:19:09 lasiuk
25  * keep the constant angle
26  *
27  * Revision 2.4 2000/11/25 11:51:52 lasiuk
28  * remove D vector and replace with a container of StRichPhotonInfo
29  *
30  * Revision 2.3 2000/11/21 19:47:36 lasiuk
31  * add the d information for each hit
32  * use the TArrayF
33  *
34  * Revision 2.2 2000/11/01 16:45:46 lasiuk
35  * Keep the pointers to the hits that are associated with the track
36  * in order to use the bit flag information. These are kept
37  * in an StPtrVec (does not own the hits) The PDG encoded number
38  * is kept as a data member now
39  *
40  * Revision 2.1 2000/09/28 10:54:00 ullrich
41  * Initial Revision.
42  *
43  ***************************************************************************/
44 #ifndef StRichPid_hh
45 #define StRichPid_hh
46 
47 #include "StObject.h"
48 #include "StContainers.h"
49 
50 #include "StRichHit.h"
51 
52 #include "StParticleDefinition.hh"
53 #include "StThreeVectorD.hh"
54 #include "StEnumerations.h"
55 
56 
57 class StRichPid : public StObject {
58 public:
59  StRichPid();
60  ~StRichPid();
62  float totAzim, float totArea,
63  unsigned short totHits, float trunAzim,
64  float trunArea, unsigned short trunHits);
65 
66  // StRichPid(const StRichPid&) {}
67  // StRichPid& operator=(const StRichPid&) {}
68 
69  int operator==(const StRichPid&) const;
70 
71  const StPtrVecRichHit& getAssociatedRichHits() const;
72  StPtrVecRichHit& getAssociatedRichHits();
73  void addHit(StRichHit*);
74 
75  const StSPtrVecRichPhotonInfo& getPhotonInfo();
76  StRichPhotonInfo* getPhotonInfo(int); // should be constant
77  void addPhotonInfo(StRichPhotonInfo*);
78 
79  void setRingType(StParticleDefinition* particle);
80  void setMipResidual(StThreeVectorD t);
81 
82  // whole ring
83  void setTotalAzimuth(float);
84  void setTotalArea(float);
85  void setTotalHits(unsigned short);
86  void setTotalDensity(float);
87 
88  float getTotalAzimuth() const;
89  float getTotalArea() const;
90  unsigned short getTotalHits() const;
91  float getTotalDensity() const;
92 
93  // constant area cut
94  void setTruncatedAzimuth(float);
95  void setTruncatedArea(float);
96  void setTruncatedHits(unsigned short);
97  void setTruncatedDensity(float);
98 
99  float getTruncatedAzimuth() const;
100  float getTruncatedArea() const;
101  unsigned short getTruncatedHits() const;
102  float getTruncatedDensity() const;
103 
104  float getConstantAreaCut() const;
105  void setConstantAreaCut(float);
106 
107  StParticleDefinition* getRingType() const;
108  int getParticleNumber() const;
109 
110 
111  StThreeVectorD getMipResidual() const;
112 
113  // Flag
114  bool isSet(StRichPidFlag) const;
115  void setBit(StRichPidFlag);
116  void unSetBit(StRichPidFlag);
117 
118 private:
119  StParticleDefinition* mParticleType;
120  Int_t mParticleNumber;
121 
122  StPtrVecRichHit mAssociatedHits;
123  StSPtrVecRichPhotonInfo mPhotonInfo;
124 
125  StThreeVectorD mMipResidual;
126 
127  Float_t mTotalAzimuth;
128  Float_t mTotalArea;
129  UShort_t mTotalHits;
130  Float_t mTotalDensity;
131 
132  Float_t mTruncatedAzimuth;
133  Float_t mTruncatedArea;
134  UShort_t mTruncatedHits;
135  Float_t mTruncatedDensity;
136 
137  Float_t mConstantAreaCut;
138 
139  UInt_t mFlags;
140 
141  ClassDef(StRichPid,1)
142 };
143 
144 
145 // sets
146 inline void StRichPid::setMipResidual(StThreeVectorD t) { mMipResidual=t;}
147 
148 inline void StRichPid::setTotalAzimuth(float t) { mTotalAzimuth=t;}
149 inline void StRichPid::setTotalArea(float t) { mTotalArea=t;}
150 inline void StRichPid::setTotalHits(unsigned short t) { mTotalHits=t;}
151 inline void StRichPid::setTotalDensity(float t) {mTotalDensity=t;}
152 
153 inline void StRichPid::setTruncatedAzimuth(float t) { mTruncatedAzimuth=t;}
154 inline void StRichPid::setTruncatedArea(float t) { mTruncatedArea=t;}
155 inline void StRichPid::setTruncatedHits(unsigned short t) { mTruncatedHits=t;}
156 inline void StRichPid::setTruncatedDensity(float t) {mTruncatedDensity=t;}
157 
158 
159 // containers
160 inline const StPtrVecRichHit& StRichPid::getAssociatedRichHits() const {return mAssociatedHits;}
161 inline StPtrVecRichHit& StRichPid::getAssociatedRichHits() {return mAssociatedHits;}
162 inline void StRichPid::addHit(StRichHit* hit) { mAssociatedHits.push_back(hit); }
163 
164 // gets
165 
166 inline StParticleDefinition* StRichPid::getRingType() const { return mParticleType;}
167 inline int StRichPid::getParticleNumber() const {return mParticleNumber;}
168 inline float StRichPid::getTotalAzimuth() const { return mTotalAzimuth;}
169 inline float StRichPid::getTotalArea() const { return mTotalArea;}
170 inline unsigned short StRichPid::getTotalHits() const { return mTotalHits;}
171 inline float StRichPid::getTotalDensity() const { return mTotalDensity;}
172 
173 inline float StRichPid::getTruncatedAzimuth() const { return mTruncatedAzimuth;}
174 inline float StRichPid::getTruncatedArea() const { return mTruncatedArea;}
175 inline unsigned short StRichPid::getTruncatedHits() const { return mTruncatedHits;}
176 inline float StRichPid::getTruncatedDensity() const { return mTruncatedDensity;}
177 
178 inline float StRichPid::getConstantAreaCut() const {return mConstantAreaCut;}
179 inline void StRichPid::setConstantAreaCut(float c) { mConstantAreaCut = c;}
180 
181 
182 
183 inline StThreeVectorD StRichPid::getMipResidual() const { return mMipResidual;}
184 
185 
186 // Flag operations
187 inline bool StRichPid::isSet(StRichPidFlag f) const { return (mFlags & f);}
188 inline void StRichPid::setBit(StRichPidFlag f) { (mFlags |= f);}
189 inline void StRichPid::unSetBit(StRichPidFlag f) { (mFlags &= ~(f));}
190 
191 //non-members
192 //ostream& operator<<(ostream& os, const StRichPid& hit);
193 #endif
StRichPidFlag