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_DEDX_HH
00072 #define ST_TRS_DEDX_HH
00073
00074 #include <string>
00075 #include <vector>
00076
00077
00078 #include "SystemOfUnits.h"
00079 #ifndef ST_NO_NAMESPACES
00080 using namespace units;
00081 #if defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x500
00082 using std::string;
00083 #endif
00084 #endif
00085
00086 #include "Randomize.h"
00087
00088 class StTrsDeDx {
00089 public:
00090 enum StElectron{
00091 primaries,
00092 secondaries,
00093 total,
00094 numberOfElectrons};
00095
00096 public:
00097 StTrsDeDx(const string&, double = 1.95*centimeter);
00098 StTrsDeDx(const char*, double = 1.95*centimeter);
00099 ~StTrsDeDx();
00100
00101
00102 double W() const;
00103 double padLength() const;
00104
00105 void setPadLength(double);
00106
00107 double transverseDiffusionCoefficient() const;
00108 double longitudinalDiffusionCoefficient() const;
00109 double attachmentCoefficient() const;
00110
00111
00112 double nextInteraction() const;
00113 int primary(double bg=3) const;
00114 int secondary(double*) const;
00115 double betheBloch(double) const;
00116 double betheBlochTSS(double,double,double) ;
00117
00118 #ifndef ST_NO_TEMPLATE_DEF_ARGS
00119 void electrons(vector<int>&, double bg=3) const;
00120 #else
00121 void electrons(vector<int, allocator<int> >&, double bg=3) const;
00122 #endif
00123
00124
00125 void print(ostream& os = cout) const;
00126
00127 protected:
00128 StTrsDeDx();
00129 void doInitialization();
00130
00131 protected:
00132 string mGas;
00133 double mPairs;
00134 double mMeanFreePath;
00135 double mIonize;
00136 double mW;
00137 double mEndPoint;
00138 double mExponent;
00139 double mEReduced;
00140 double mEE;
00141 double mDensity;
00142 double mZa;
00143
00144 double mSigmaTransverse;
00145 double mSigmaLongitudinal;
00146 double mAttachment;
00147
00148 double mPadLength;
00149
00150
00151 double mKonstant;
00152 double mAlfat;
00153
00154 static HepJamesRandom mEngine;
00155 static RandFlat mFlatDistribution;
00156 static RandPoisson mPoissonDistribution;
00157 static RandExponential mExponentialDistribution;
00158 };
00159
00160 inline double StTrsDeDx::W() const {return mW;}
00161 inline double StTrsDeDx::padLength() const {return mPadLength;}
00162 inline double StTrsDeDx::transverseDiffusionCoefficient() const {return mSigmaTransverse;}
00163 inline double StTrsDeDx::longitudinalDiffusionCoefficient() const {return mSigmaLongitudinal;}
00164 inline double StTrsDeDx::attachmentCoefficient() const {return mAttachment;}
00165 #endif