StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StDedxPidTraits.h
1 
5 /***************************************************************************
6  *
7  * $Id: StDedxPidTraits.h,v 2.15 2012/04/29 22:51:18 fisyak Exp $
8  *
9  * Author: Thomas Ullrich, Sep 1999
10  ***************************************************************************
11  *
12  * Description:
13  *
14  ***************************************************************************
15  *
16  * $Log: StDedxPidTraits.h,v $
17  * Revision 2.15 2012/04/29 22:51:18 fisyak
18  * Add field for Log2(<dX>)
19  *
20  * Revision 2.14 2010/08/31 19:51:56 fisyak
21  * Clean up
22  *
23  * Revision 2.13 2004/09/16 02:24:18 perev
24  * Small optimization of alignement
25  *
26  * Revision 2.12 2004/07/15 16:36:23 ullrich
27  * Removed all clone() declerations and definitions. Use StObject::clone() only.
28  *
29  * Revision 2.11 2004/03/01 17:44:38 fisyak
30  * Add Print method
31  *
32  * Revision 2.10 2002/11/15 20:38:36 fisyak
33  * Set class version 2 for new calibration scheme
34  *
35  * Revision 2.9 2002/02/22 22:56:47 jeromel
36  * Doxygen basic documentation in all header files. None of this is required
37  * for QM production.
38  *
39  * Revision 2.8 2001/04/05 04:00:34 ullrich
40  * Replaced all (U)Long_t by (U)Int_t and all redundant ROOT typedefs.
41  *
42  * Revision 2.7 2001/03/24 03:34:43 perev
43  * clone() -> clone() const
44  *
45  * Revision 2.6 2000/12/18 17:25:14 fisyak
46  * Add track length used in dE/dx calculations
47  *
48  * Revision 2.5 2000/01/05 16:04:14 ullrich
49  * Changed method name sigma() to errorOnMean().
50  *
51  * Revision 2.4 1999/11/29 17:07:27 ullrich
52  * Moved method() from StTrackPidTraits to StDedxPidTraits.cxx
53  *
54  * Revision 2.3 1999/11/23 15:56:25 ullrich
55  * Added clone() const method. Was pure virtual.
56  *
57  * Revision 2.2 1999/11/16 14:11:41 ullrich
58  * Changed variance to sigma.
59  *
60  * Revision 2.1 1999/10/13 19:42:58 ullrich
61  * Initial Revision
62  *
63  **************************************************************************/
64 #ifndef StDedxPidTraits_hh
65 #define StDedxPidTraits_hh
66 #include "StTrackPidTraits.h"
67 
69  public:
70  StDedxPidTraits(StDetectorId det=kUnknownId, Short_t meth=kUndefinedMethodId,
71  UShort_t n=0, Float_t dedx=0, Float_t sig=0, Float_t log2dx=1) :
72  StTrackPidTraits(det),
73  mNumberOfPoints(n), mMethod(meth), mDedx(dedx), mSigma(sig), mLog2dX(log2dx) { /* noop */ }
74 
75  StDedxPidTraits(const dst_dedx_st& t) :
77  mNumberOfPoints(t.ndedx), mMethod(t.method), mDedx(t.dedx[0]),
78  mSigma(t.dedx[1]), mLog2dX(t.dedx[2]) { /* noop */ }
79 
80  ~StDedxPidTraits() { /* noop */ }
81 
82  UShort_t numberOfPoints() const { return mNumberOfPoints%100; }
83  Float_t length() const { return (mNumberOfPoints/100); }
84  StDedxMethod method() const;
85  Short_t encodedMethod() const;
86  Float_t mean() const;
87  Float_t errorOnMean() const;
88  void Print(Option_t *opt = "") const;
89  Float_t log2dX() const {return mLog2dX;}
90 protected:
91  UShort_t mNumberOfPoints;
92  Short_t mMethod;
93  Float_t mDedx;
94  Float_t mSigma;
95  Float_t mLog2dX; // Log2 from average dX
96  ClassDef(StDedxPidTraits,4)
97 };
98 #endif