00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #ifndef ST_TRS_MINI_CHARGE_SEGMENT_HH
00044 #define ST_TRS_MINI_CHARGE_SEGMENT_HH
00045
00046 #include <Stiostream.h>
00047 #include <vector>
00048
00049 #include "StGlobals.hh"
00050 #include "StThreeVector.hh"
00051 #include "StMatrix.hh"
00052
00053 class StTrsMiniChargeSegment {
00054
00055 public:
00056 StTrsMiniChargeSegment(StThreeVector<double>, double, double, int);
00057 ~StTrsMiniChargeSegment();
00058
00059
00060
00061 #ifdef ST_NO_TEMPLATE_DEF_ARGS // need for allocator
00062 StTrsMiniChargeSegment() {}
00063 #endif
00064
00065 StThreeVector<double>& position() ;
00066 const StThreeVector<double>& position() const;
00067 double dl() const;
00068 const double charge() const;
00069
00070 void setCharge(double);
00071 int id() const {return mId;}
00072 private:
00073 double mNumberOfElectrons;
00074 double mLength;
00075 StThreeVector<double> mPosition;
00076 int mId;
00077 };
00078
00079 inline StThreeVector<double>&
00080 StTrsMiniChargeSegment::position() {return mPosition;}
00081 inline const StThreeVector<double>&
00082 StTrsMiniChargeSegment::position() const {return mPosition;}
00083
00084 inline double StTrsMiniChargeSegment::dl() const {return mLength;}
00085 inline const double StTrsMiniChargeSegment::charge() const {return mNumberOfElectrons;}
00086 inline void StTrsMiniChargeSegment::setCharge(double n) {mNumberOfElectrons = n;}
00087
00088
00089 ostream& operator<<(ostream&, const StTrsMiniChargeSegment&);
00090 #endif