#include <DifFourVector.h>
|
|
|
|
|
|
|
|
|
00048 {} // destroy
|
|
|
|
|
|
|
|
|
|
00048 {} // destroy
|
|
|
|
00167 { 00168 const DifVector xHat(1,0,0); 00169 const DifVector yHat(0,1,0); 00170 const DifVector zHat(0,1,0); 00171 DifVector z=pFrom.direction(); 00172 DifVector y=zHat-z*(zHat*z); 00173 if(y.length()<0.01) y=xHat-z*(xHat*z); 00174 y.normalize(); 00175 DifVector x(cross(y,z)); 00176 00177 DifNumber px=P*x; 00178 DifNumber py=P*y; 00179 DifNumber pz=P*z; 00180 00181 DifNumber gamma=pFrom.E/pFrom.mass(); 00182 DifNumber beta=pFrom.pMag()/pFrom.E; 00183 00184 DifNumber pzP=gamma*(pz+beta*E); 00185 DifNumber eP=gamma*(E+beta*pz); 00186 00187 E=eP; 00188 P=px*x+py*y+pzP*z; 00189 }
|
|
|
|
00134 { 00135 const DifVector xHat(1,0,0); 00136 const DifVector yHat(0,1,0); 00137 const DifVector zHat(0,0,1); 00138 DifVector z=P; 00139 z.normalize(); 00140 DifVector y(zHat-z*(zHat*z)); 00141 if(y.lengthSq()<0.0001) y=xHat-z*(xHat*z); 00142 y.normalize(); 00143 DifVector x(cross(y,z)); 00144 00145 DifNumber gamma=E/mass(); 00146 DifNumber beta=pMag()/E; 00147 00148 for(int i=0;i<(int)list.size();i++) { 00149 DifFourVector& p4i=*list[i]; 00150 DifNumber px=p4i.P*x; 00151 DifNumber py=p4i.P*y; 00152 DifNumber pz=p4i.P*z; 00153 DifNumber e=p4i.E; 00154 00155 DifNumber pzP=gamma*(pz+beta*e); 00156 DifNumber eP=gamma*(e+beta*pz); 00157 00158 p4i.E=eP; 00159 p4i.P=px*x+py*y+pzP*z; 00160 00161 } 00162 00163 }
|
|
|
|
00073 { 00074 const DifVector xHat(1,0,0); 00075 const DifVector yHat(0,1,0); 00076 const DifVector zHat(0,1,0); 00077 DifVector z=pTo.direction(); 00078 DifVector y=zHat-z*(zHat*z); 00079 if(y.length()<0.01) y=xHat-z*(xHat*z); 00080 y.normalize(); 00081 DifVector x(cross(y,z)); 00082 00083 DifNumber px=P*x; 00084 DifNumber py=P*y; 00085 DifNumber pz=P*z; 00086 00087 DifNumber gamma=pTo.E/pTo.mass(); 00088 DifNumber beta=pTo.pMag()/pTo.E; 00089 00090 DifNumber pzP=gamma*(pz-beta*E); 00091 DifNumber eP=gamma*(E-beta*pz); 00092 00093 E=eP; 00094 P=px*x+py*y+pzP*z; 00095 00096 return; 00097 00098 }
|
|
|
|
00101 { 00102 const DifVector xHat(1,0,0); 00103 const DifVector yHat(0,1,0); 00104 const DifVector zHat(0,0,1); 00105 DifVector z=P; 00106 z.normalize(); 00107 DifVector y(zHat-z*(zHat*z)); 00108 if(y.lengthSq()<0.0001) y=xHat-z*(xHat*z); 00109 y.normalize(); 00110 DifVector x(cross(y,z)); 00111 00112 DifNumber gamma=E/mass(); 00113 DifNumber beta=pMag()/E; 00114 00115 for(int i=0;i<(int)list.size();i++) { 00116 DifFourVector& p4i=*list[i]; 00117 DifNumber px=p4i.P*x; 00118 DifNumber py=p4i.P*y; 00119 DifNumber pz=p4i.P*z; 00120 DifNumber e=p4i.E; 00121 00122 DifNumber pzP=gamma*(pz-beta*e); 00123 DifNumber eP=gamma*(e-beta*pz); 00124 00125 p4i.E=eP; 00126 p4i.P=px*x+py*y+pzP*z; 00127 00128 } 00129 00130 }
|
|
|
|
|
|
|
|
00044 { 00045 HepSymMatrix temp(4); 00046 temp(1,1)=correlation(E,E,e); 00047 temp(1,2)=correlation(E,P.x,e); 00048 temp(1,3)=correlation(E,P.y,e); 00049 temp(1,4)=correlation(E,P.z,e); 00050 temp(2,2)=correlation(P.x,P.x,e); 00051 temp(2,3)=correlation(P.x,P.y,e); 00052 temp(2,4)=correlation(P.x,P.z,e); 00053 temp(3,3)=correlation(P.y,P.y,e); 00054 temp(3,4)=correlation(P.y,P.z,e); 00055 temp(4,4)=correlation(P.z,P.z,e); 00056 return temp; 00057 }
|
|
|
|
00059 { 00060 int npar=E.nPar(); 00061 HepMatrix temp(4,npar); 00062 for(int i=1; i<=npar; i++){ 00063 temp(1,i)=E.derivative(i); 00064 temp(2,i)=P.x.derivative(i); 00065 temp(3,i)=P.y.derivative(i); 00066 temp(4,i)=P.z.derivative(i); 00067 } // (int i=1; i<=npar; i++) 00068 return temp; 00069 }
|
|
00077 { 00078 DifNumber temp=massSq(); 00079 if(temp>=0) return sqrt(temp); 00080 return -sqrt(-massSq()); 00081 }
|
|
00077 { 00078 DifNumber temp=massSq(); 00079 if(temp>=0) return sqrt(temp); 00080 return -sqrt(-massSq()); 00081 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
00192 { 00193 //SKIP cout << "E:" << endl << E; 00194 //SKIP cout << "P:" << endl << P; 00195 cout << "SKIP of DifFourVector::print()" <<endl;//TEMP 00196 }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|