StRoot  1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
StTrsMiniChargeSegment.hh
1 /***************************************************************************
2  *
3  * $Id: StTrsMiniChargeSegment.hh,v 1.4 2003/12/24 13:44:51 fisyak Exp $
4  *
5  * Author: brian
6  *
7  ***************************************************************************
8  *
9  * Description: piece of a decomposed g2t segmetn
10  *
11  ***************************************************************************
12  *
13  * $Log: StTrsMiniChargeSegment.hh,v $
14  * Revision 1.4 2003/12/24 13:44:51 fisyak
15  * Add (GEANT) track Id information in Trs; propagate it via St_tpcdaq_Maker; account interface change in StTrsZeroSuppressedReaded in StMixerMaker
16  *
17  * Revision 1.3 2003/09/02 17:59:16 perev
18  * gcc 3.2 updates + WarnOff
19  *
20  * Revision 1.2 1999/01/18 21:03:30 lasiuk
21  * Jan 18,1999
22  *
23  * Revision 1.1 1998/11/10 17:12:11 fisyak
24  * Put Brian trs versin into StRoot
25  *
26  * Revision 1.6 1998/11/08 17:03:41 lasiuk
27  * inline arguments for LINUX use built-in types
28  *
29  * Revision 1.5 1998/11/02 22:49:10 lasiuk
30  * add setCharge()
31  * overload << operator
32  *
33  * Revision 1.4 1998/10/22 00:23:25 lasiuk
34  * Oct 22
35  *
36  * Revision 1.3 1998/06/04 23:17:25 lasiuk
37  * define access functions
38  *
39  * Revision 1.1.1.1 1998/05/19 22:33:44 lasiuk
40  * Initial Revision
41  *
42  **************************************************************************/
43 #ifndef ST_TRS_MINI_CHARGE_SEGMENT_HH
44 #define ST_TRS_MINI_CHARGE_SEGMENT_HH
45 
46 #include <Stiostream.h>
47 #include <vector>
48 
49 #include "StGlobals.hh"
50 #include "StThreeVector.hh"
51 #include "StMatrix.hh"
52 
54 
55 public:
56  StTrsMiniChargeSegment(StThreeVector<double>, double, double, int);
58  //StTrsMiniChargeSegment(const StTrsMiniChargeSegment&);
59  //StTrsMiniChargeSegment& operator=(const StTrsMiniChargeSegment&);
60 
61 #ifdef ST_NO_TEMPLATE_DEF_ARGS // need for allocator
63 #endif
64  // access functions
65  StThreeVector<double>& position() ; // this is coordinate in sector 12 frame
66  const StThreeVector<double>& position() const;
67  double dl() const;
68  const double charge() const;
69 
70  void setCharge(double);
71  int id() const {return mId;}
72 private:
73  double mNumberOfElectrons;
74  double mLength;
75  StThreeVector<double> mPosition;
76  int mId; // geant track id
77 };
78 
80 StTrsMiniChargeSegment::position() {return mPosition;}
81 inline const StThreeVector<double>&
82 StTrsMiniChargeSegment::position() const {return mPosition;}
83 
84 inline double StTrsMiniChargeSegment::dl() const {return mLength;}
85 inline const double StTrsMiniChargeSegment::charge() const {return mNumberOfElectrons;}
86 inline void StTrsMiniChargeSegment::setCharge(double n) {mNumberOfElectrons = n;}
87 
88 // Non-Member Function
89 ostream& operator<<(ostream&, const StTrsMiniChargeSegment&);
90 #endif