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
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071 #ifndef ST_TRS_CHARGE_SEGMENT_HH
00072 #define ST_TRS_CHARGE_SEGMENT_HH
00073
00074 #include <Stiostream.h>
00075 #include <list>
00076
00077 #if defined (__SUNPRO_CC) && __SUNPRO_CC >= 0x500
00078 using std::list;
00079 #endif
00080
00081 #include "SystemOfUnits.h"
00082 #include "StGlobals.hh"
00083 #include "StThreeVector.hh"
00084 #include "StMatrix.hh"
00085 #include "Randomize.h"
00086
00087
00088 #include "StTpcSlowControl.hh"
00089 #include "StTpcGeometry.hh"
00090 #include "StTpcElectronics.hh"
00091 #include "StMagneticField.hh"
00092 #include "StTrsDeDx.hh"
00093 #include "StTrsMiniChargeSegment.hh"
00094
00095 class StTrsChargeSegment {
00096
00097 public:
00098 StTrsChargeSegment();
00099 StTrsChargeSegment(StThreeVector<double>& pos,
00100 StThreeVector<double>& mom,
00101 int id,
00102 double de,
00103 double ds,
00104 int pid = -1,
00105 double ne = -1);
00106
00107 ~StTrsChargeSegment();
00108
00109
00110
00111
00112
00113
00114 const StThreeVector<double>& position() const;
00115 const StThreeVector<double>& momentum() const;
00116 double dE() const;
00117 double ds() const;
00118 int id() const;
00119 int pid() const;
00120 double numberOfElectrons() const;
00121
00122 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00123 void split(StTrsDeDx*, StMagneticField*, int, list<StTrsMiniChargeSegment>*);
00124 void tssSplit(StTrsDeDx*, StMagneticField*, int, list<StTrsMiniChargeSegment>*);
00125 #else
00126 void split(StTrsDeDx*, StMagneticField*, int, list<StTrsMiniChargeSegment, allocator<StTrsMiniChargeSegment> >*);
00127 void tssSplit(StTrsDeDx*, StMagneticField*, int, list<StTrsMiniChargeSegment, allocator<StTrsMiniChargeSegment> >*);
00128 #endif
00129
00130 public:
00131
00132 double sigmaParameter(double, double, double, int) const;
00133 double meanParameter(double,double, double, int) const;
00134 double xReflectedGauss(double, double) const;
00135 double xReflectedLandau(double, double) const;
00136 double binaryPartition(double, double, double) const;
00137
00138
00139
00140 private:
00141 void whichGEANTParticle(double&, int&);
00142
00143 private:
00144 StThreeVector<double> mPosition;
00145 StThreeVector<double> mSector12Position;
00146 StThreeVector<double> mMomentum;
00147 int mId;
00148 double mDE;
00149 double mDs;
00150 int mPid;
00151
00152 double mNumberOfElectrons;
00153 int mSectorOfOrigin;
00154
00155 static HepJamesRandom mEngine;
00156 static RandFlat mFlatDistribution;
00157 };
00158 inline const StThreeVector<double>& StTrsChargeSegment::position() const {return mPosition;}
00159 inline const StThreeVector<double>& StTrsChargeSegment::momentum() const {return mMomentum;}
00160 inline double StTrsChargeSegment::dE() const {return mDE;}
00161 inline double StTrsChargeSegment::ds() const {return mDs;}
00162 inline int StTrsChargeSegment::id() const {return mId;}
00163 inline int StTrsChargeSegment::pid() const {return mPid;}
00164 inline double StTrsChargeSegment::numberOfElectrons() const {return mNumberOfElectrons;}
00165
00166
00167 ostream& operator<<(ostream&, const StTrsChargeSegment&);
00168 #endif