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 #include "StHelixModel.h"
00052 #include "StThreeVectorF.hh"
00053 #include "SystemOfUnits.h"
00054 #include "PhysicalConstants.h"
00055
00056 ClassImp(StHelixModel)
00057
00058 static const char rcsid[] = "$Id: StHelixModel.cxx,v 2.12 2009/11/23 16:34:06 fisyak Exp $";
00059
00060 StHelixModel::StHelixModel() : mModel(helixModel)
00061 {
00062 mPsi = 0;
00063 mCurvature = 1.e-6;
00064 mDipAngle = 0;
00065 mCharge = 0;
00066 mHelicity = 0;
00067 }
00068
00069 StHelixModel::StHelixModel(short q, float psi, float c, float dip,
00070 const StThreeVectorF& o, const StThreeVectorF& p, short h)
00071 : mModel(helixModel),
00072 mCharge(q),
00073 mPsi(psi),
00074 mCurvature(c+1.e-10),
00075 mDipAngle(dip),
00076 mOrigin(o),
00077 mMomentum(p),
00078 mHelicity(h)
00079 {}
00080
00081 StHelixModel::~StHelixModel() { }
00082
00083 StTrackGeometry*
00084 StHelixModel::copy() const { return new StHelixModel(*this); }
00085
00086 StTrackModel
00087 StHelixModel::model() const {return mModel;}
00088
00089 short
00090 StHelixModel::charge() const {return mCharge;}
00091
00092 short
00093 StHelixModel::helicity() const {return mHelicity;}
00094
00095 double
00096 StHelixModel::curvature() const {return mCurvature;}
00097
00098 double
00099 StHelixModel::psi() const {return mPsi;}
00100
00101 double
00102 StHelixModel::dipAngle() const {return mDipAngle;}
00103
00104 const StThreeVectorF&
00105 StHelixModel::origin() const {return mOrigin;}
00106
00107 const StThreeVectorF&
00108 StHelixModel::momentum() const {return mMomentum;}
00109
00110 StPhysicalHelixD
00111 StHelixModel::helix() const
00112 {
00113
00114
00115
00116
00117
00118
00119 double curvature = mCurvature;
00120 if (mCharge == 0) curvature = 0;
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133 int h = mHelicity;
00134
00135
00136
00137
00138
00139
00140 if (h == 0) {
00141 if (mCharge == 0)
00142 h = 1;
00143 else if (mCharge > 0)
00144 h = -1;
00145 else
00146 h = 1;
00147 }
00148
00149
00150
00151 if (mCharge == 0) h = 1;
00152
00153 double phase = mPsi-h*pi/2;
00154
00155 return StPhysicalHelixD(curvature,
00156 mDipAngle,
00157 phase,
00158 mOrigin,
00159 h);
00160 }
00161
00162 void
00163 StHelixModel::setCharge(short val) { mCharge = val; }
00164
00165 void
00166 StHelixModel::setHelicity(short val) { mHelicity = val; }
00167
00168 void
00169 StHelixModel::setCurvature(double val) { mCurvature = val; }
00170
00171 void
00172 StHelixModel::setPsi(double val) { mPsi = val; }
00173
00174 void
00175 StHelixModel::setDipAngle(double val) { mDipAngle = val; }
00176
00177 void
00178 StHelixModel::setOrigin(const StThreeVectorF& val) { mOrigin = val; }
00179
00180 void
00181 StHelixModel::setMomentum(const StThreeVectorF& val) { mMomentum = val; }