00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include "CLHEP/Geometry/Point3D.h"
00012 #ifndef ENABLE_BACKWARDS_COMPATIBILITY
00013 typedef HepGeom::Point3D<double> HepPoint3D;
00014 #endif
00015
00016 #include "KalFitAlg/helix/Helix.h"
00017
00018 #include "KalFitAlg/KalFitMaterial.h"
00019 #include "KalFitAlg/KalFitTrack.h"
00020 #include "KalFitAlg/KalFitElement.h"
00021
00022 int KalFitElement::loss_;
00023 int KalFitElement::muls_;
00024
00025 void KalFitElement::updateTrack(KalFitTrack& track, int index)
00026 {
00027
00028 HepPoint3D x;
00029 double path = intersect(track, x);
00030
00031
00032
00033 if(path > 0){
00034
00035
00036
00037
00038
00039
00040
00041 track.pivot_numf(x);
00042
00043
00044
00045
00046
00047 int index_element(index);
00048 if (index_element==0) index_element=1;
00049 if(muls_) track.ms(path, *material_, index_element);
00050 if(loss_) track.eloss(path, *material_, index_element);
00051
00052
00053 }
00054
00055 }
00056
00057 void KalFitElement::updateTrack_rphi(KalFitTrack& track, int index)
00058 {
00059 HepPoint3D x;
00060 double path = intersect(track, x);
00061 if(path > 0){
00062
00063 track.pivot_numf(x);
00064
00065
00066 if(muls_) track.ms(path, *material_, index);
00067 if(loss_) track.eloss(path, *material_, index);
00068 }
00069 }
00070
00071 void KalFitElement::updateTrack_alreadyfound(KalFitTrack& track,
00072 int index)
00073 {
00074 HepPoint3D x;
00075 double path = intersect(track, x);
00076 if(path > 0){
00077
00078 track.pivot_numf(x);
00079
00080
00081 if(muls_) track.ms(path, *material_, index);
00082 if(loss_) track.eloss(path, *material_, index);
00083 }
00084 }
00085
00086
00087 void KalFitElement::asso_rphi(Lpav& circ, KalFitTrack& track)
00088 {}
00089
00090 void KalFitElement::asso_rphi(KalFitTrack& track)
00091 {}
00092
00093 void KalFitElement::muls(int i)
00094 {
00095 muls_ = i;
00096 }
00097
00098 void KalFitElement::loss(int i)
00099 {
00100 loss_ = i;
00101 }
00102
00103 int KalFitElement::muls(void)
00104 {
00105 return muls_;
00106 }
00107
00108 int KalFitElement::loss(void)
00109 {
00110 return loss_;
00111 }