StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StRichPidTraits.h
1 
5 /***************************************************************************
6  *
7  * $Id: StRichPidTraits.h,v 2.15 2007/10/25 19:20:00 ullrich Exp $
8  *
9  * Author: Matt Horsley, Sep 2000
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StRichPidTraits.h,v $
17  * Revision 2.15 2007/10/25 19:20:00 ullrich
18  * Removed obsolete == operator
19  *
20  * Revision 2.14 2004/07/15 16:36:25 ullrich
21  * Removed all clone() declerations and definitions. Use StObject::clone() only.
22  *
23  * Revision 2.13 2003/09/02 17:58:05 perev
24  * gcc 3.2 updates + WarnOff
25  *
26  * Revision 2.12 2002/02/22 22:56:50 jeromel
27  * Doxygen basic documentation in all header files. None of this is required
28  * for QM production.
29  *
30  * Revision 2.11 2002/02/19 23:21:30 ullrich
31  * Added copy constructor and assignment operator. New destructor.
32  *
33  * Revision 2.10 2002/02/19 17:40:49 ullrich
34  * Changed version number from 2 to 3.
35  *
36  * Revision 2.9 2002/02/19 16:54:33 ullrich
37  * Minor changes - code not altered.
38  *
39  * Revision 2.8 2002/02/19 04:24:03 lasiuk
40  * addition of StRichSpectra information for uDST purposes
41  *
42  * Revision 2.7 2001/05/30 17:45:54 perev
43  * StEvent branching
44  *
45  * Revision 2.6 2001/04/05 04:00:41 ullrich
46  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
47  *
48  * Revision 2.5 2001/03/24 03:34:57 perev
49  * clone() -> clone() const
50  *
51  * Revision 2.4 2001/02/22 21:05:02 lasiuk
52  * add production version, associated MIP, dca residual 3Vectors
53  *
54  * Revision 2.3 2000/11/25 11:53:13 lasiuk
55  * introduction of hypothesis and probability
56  *
57  * Revision 2.2 2000/11/01 16:47:02 lasiuk
58  * Keep the StRichPid as the owner (use a StSPtrVec)
59  * also check the pdg encoded number now
60  *
61  * Revision 2.1 2000/09/28 10:54:48 ullrich
62  * Initial Revision.
63  *
64  ***************************************************************************/
65 #ifndef StRichPidTraits_hh
66 #define StRichPidTraits_hh
67 
68 #include <Stiostream.h>
69 #include "StTrackPidTraits.h"
70 #include "StParticleDefinition.hh"
71 #include "StContainers.h"
72 #include "StRichPid.h"
73 #include "StRichSpectra.h"
74 #include "StParticleTypes.hh"
75 
76 
78 public:
80  ~StRichPidTraits();
81 
83  StRichPidTraits& operator=(const StRichPidTraits&);
84 
85  void addPid(StRichPid* );
86 
87  const StSPtrVecRichPid& getAllPids() const;
88  StSPtrVecRichPid& getAllPids();
89 
90  StRichPid* getPid(StParticleDefinition* t);
91  const StRichPid* getPid(StParticleDefinition* t) const;
92 
93  StRichSpectra* getRichSpectra();
94  const StRichSpectra* getRichSpectra() const;
95 
96  void setRichSpectra(StRichSpectra*);
97 
98  void setProductionVersion(int);
99  void setId(int);
100  void setProbability(float);
101  void setAssociatedMip(StRichHit*);
102  void setMipResidual(const StThreeVectorF&);
103  void setRefitResidual(const StThreeVectorF&);
104  void setSignedDca2d(float);
105  void setSignedDca3d(float);
106 
107  int productionVersion() const;
108  int id() const;
109  float probability() const;
110 
111  const StRichHit* associatedMip() const;
112  const StThreeVectorF& mipResidual() const;
113  const StThreeVectorF& refitResidual() const;
114  float signedDca2d() const;
115  float signedDca3d() const;
116 
117 private:
118  StSPtrVecRichPid mThePids;
119  Int_t mProductionVersion;
120  Int_t mId;
121  Float_t mProbability;
122 #ifdef __CINT__
123  StObjLink mAssociatedMip;
124 #else
125  StLink<StRichHit> mAssociatedMip;
126 #endif //__CINT__
127  StThreeVectorF mMipResidual;
128  StThreeVectorF mRefitResidual;
129  Float_t mSigned3dDca;
130  Float_t mSigned2dDca;
131  StRichSpectra* mRichSpectra;
132 
133  ClassDef(StRichPidTraits,3)
134 };
135 
136 // sets
137 
138 inline StSPtrVecRichPid& StRichPidTraits::getAllPids() { return mThePids;}
139 inline const StSPtrVecRichPid& StRichPidTraits::getAllPids() const { return mThePids;}
140 inline void StRichPidTraits::addPid(StRichPid* t) {mThePids.push_back(t);}
141 inline void StRichPidTraits::setProductionVersion(int id) {mProductionVersion = id;}
142 inline void StRichPidTraits::setId(int id) {mId = id;}
143 inline void StRichPidTraits::setProbability(float p) {mProbability = p;}
144 inline void StRichPidTraits::setAssociatedMip(StRichHit* hit) {mAssociatedMip = hit;}
145 inline void StRichPidTraits::setMipResidual(const StThreeVectorF& res) {mMipResidual = res;}
146 inline void StRichPidTraits::setRefitResidual(const StThreeVectorF& res) {mRefitResidual = res;}
147 inline void StRichPidTraits::setSignedDca2d(float v) {mSigned2dDca = v;}
148 inline void StRichPidTraits::setSignedDca3d(float v) {mSigned3dDca = v;}
149 inline int StRichPidTraits::productionVersion() const { return mProductionVersion;}
150 inline int StRichPidTraits::id() const {return mId;}
151 inline float StRichPidTraits::probability() const {return mProbability;}
152 inline const StRichHit* StRichPidTraits::associatedMip() const { return mAssociatedMip;}
153 inline const StThreeVectorF& StRichPidTraits::mipResidual() const {return mMipResidual;}
154 inline const StThreeVectorF& StRichPidTraits::refitResidual() const { return mRefitResidual;}
155 inline float StRichPidTraits::signedDca2d() const { return mSigned2dDca;}
156 inline float StRichPidTraits::signedDca3d() const { return mSigned3dDca;}
157 inline StRichSpectra* StRichPidTraits::getRichSpectra() {return mRichSpectra;}
158 inline const StRichSpectra* StRichPidTraits::getRichSpectra() const {return mRichSpectra;}
159 inline void StRichPidTraits::setRichSpectra(StRichSpectra* sp) {mRichSpectra = sp;}
160 
161 //non-members
162 ostream& operator<<(ostream& os, const StRichPidTraits& t);
163 #endif