#include <KalFitCylinder.h>
Inheritance diagram for KalFitCylinder:
Public Member Functions | |
virtual void | asso_rphi (KalFitTrack &track) |
virtual void | asso_rphi (Lpav &circ, KalFitTrack &track) |
virtual void | asso_rphi (KalFitTrack &track) |
virtual void | asso_rphi (Lpav &circ, KalFitTrack &track) |
virtual double | intersect (const KalFitTrack &track, HepPoint3D &x, const HepPoint3D &point) const |
virtual double | intersect (const KalFitTrack &track, HepPoint3D &x) const |
Find intersection with Helix. | |
virtual double | intersect (const KalFitTrack &track, HepPoint3D &x, const HepPoint3D &point) const |
virtual double | intersect (const KalFitTrack &track, HepPoint3D &x) const |
Find intersection with Helix. | |
bool | isInside (const HepPoint3D &x) const |
Check if the position x is inside the current cylinder. | |
bool | isInside (const HepPoint3D &x) const |
Check if the position x is inside the current cylinder. | |
bool | isInside2 (const HepPoint3D &x) const |
bool | isInside2 (const HepPoint3D &x) const |
KalFitCylinder (const KalFitMaterial *material, double radius, double thick, double length, double z0) | |
Constructor. | |
KalFitCylinder (const KalFitMaterial *material, double radius, double thick, double length, double z0) | |
Constructor. | |
const KalFitMaterial & | material (void) const |
Return Material of which Element is made. | |
const KalFitMaterial & | material (void) const |
Return Material of which Element is made. | |
bool | operator< (const KalFitElement &a) const |
Operator. | |
bool | operator< (const KalFitElement &a) const |
Operator. | |
virtual double | radius (void) const |
Extract radius of the cylinder. | |
virtual double | radius (void) const |
Extract radius of the cylinder. | |
virtual void | updateTrack (KalFitTrack &track, int index) |
Update track according the material properties of the current element. | |
virtual void | updateTrack (KalFitTrack &track, int index) |
Update track according the material properties of the current element. | |
virtual void | updateTrack_alreadyfound (KalFitTrack &track, int index) |
virtual void | updateTrack_alreadyfound (KalFitTrack &track, int index) |
virtual void | updateTrack_rphi (KalFitTrack &track, int index) |
virtual void | updateTrack_rphi (KalFitTrack &track, int index) |
Static Public Member Functions | |
void | loss (int i) |
int | loss (void) |
void | loss (int i) |
int | loss (void) |
void | muls (int i) |
int | muls (void) |
void | muls (int i) |
int | muls (void) |
Protected Attributes | |
const KalFitMaterial * | material_ |
Material of this element. | |
const KalFitMaterial * | material_ |
Material of this element. | |
double | ri_ |
double | ro_ |
double | zb_ |
double | zf_ |
Static Protected Attributes | |
int | loss_ |
int | muls_ |
Flags. |
|
Constructor.
00033 : KalFitElement(material) 00034 { 00035 ri_ = radius; 00036 ro_ = radius + thick; 00037 zf_ = z0 + length * .5; 00038 zb_ = z0 - length * .5; 00039 }
|
|
Constructor.
00033 : KalFitElement(material) 00034 { 00035 ri_ = radius; 00036 ro_ = radius + thick; 00037 zf_ = z0 + length * .5; 00038 zb_ = z0 - length * .5; 00039 }
|
|
|
|
|
|
00091 {}
|
|
00088 {}
|
|
Implements KalFitElement. |
|
Find intersection with Helix.
Implements KalFitElement. |
|
Implements KalFitElement. 00054 { 00055 00056 const double ro = sqrt(point.x()*point.x()+point.y()*point.y()); 00057 00058 //std::cout<<" ro: "<<ro<<std::endl; 00059 00060 double dPhi[4]; 00061 dPhi[0] = track.intersect_cylinder(ro); 00062 if(dPhi[0] == 0) return -1; 00063 dPhi[1] = track.intersect_cylinder(ri_); 00064 if(dPhi[1] == 0) return -1; 00065 dPhi[2] = track.intersect_xy_plane(zf_); 00066 dPhi[3] = track.intersect_xy_plane(zb_); 00067 00068 //for(int ii=0; ii<4; ii++) 00069 //std::cout<<"dPhi["<<ii<<"]"<<dPhi[ii]<<std::endl; 00070 00071 int n[2]; 00072 int j = 0; 00073 for(int i = 0; i < 4 && j < 2; i++){ 00074 HepPoint3D xx = track.x(dPhi[i]); 00075 if(isInside(xx)) n[j++] = i; 00076 } 00077 00078 if(j < 2) return -1; 00079 00080 x = track.x((dPhi[n[0]] + dPhi[n[1]]) * .5); 00081 00082 double tanl = track.tanl(); 00083 00084 return fabs(track.radius() * (dPhi[n[0]] - dPhi[n[1]]) 00085 * sqrt(1 + tanl * tanl)); 00086 }
|
|
Find intersection with Helix.
Implements KalFitElement. 00025 { 00026 double dPhi[4]; 00027 dPhi[0] = track.intersect_cylinder(ro_); 00028 if(dPhi[0] == 0) return -1; 00029 dPhi[1] = track.intersect_cylinder(ri_); 00030 if(dPhi[1] == 0) return -1; 00031 dPhi[2] = track.intersect_xy_plane(zf_); 00032 dPhi[3] = track.intersect_xy_plane(zb_); 00033 00034 int n[2]; 00035 int j = 0; 00036 for(int i = 0; i < 4 && j < 2; i++){ 00037 HepPoint3D xx = track.x(dPhi[i]); 00038 if(isInside(xx)) n[j++] = i; 00039 } 00040 if(j < 2) return -1; 00041 00042 x = track.x((dPhi[n[0]] + dPhi[n[1]]) * .5); 00043 00044 double tanl = track.tanl(); 00045 //cout<<"KalFitCylinder: track radius"<<track.radius()<<" dphi0 " 00046 // <<dPhi[n[0]]<<" dphi1 "<<dPhi[n[1]]<<" tanl "<<tanl<<endl; 00047 return fabs(track.radius() * (dPhi[n[0]] - dPhi[n[1]]) 00048 * sqrt(1 + tanl * tanl)); 00049 }
|
|
Check if the position x is inside the current cylinder.
|
|
Check if the position x is inside the current cylinder.
00092 { 00093 double r = x.perp(); 00094 double z = x.z(); 00095 //std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf: "<<zf_<<std::endl; 00096 00097 return (r >= ri_ - FLT_EPSILON && 00098 r <= ro_ + FLT_EPSILON && 00099 z >= zb_ - FLT_EPSILON && 00100 z <= zf_ + FLT_EPSILON); 00101 }
|
|
|
|
00105 { 00106 double r = x.perp(); 00107 double z = x.z(); 00108 //std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf: "<<zf_<<std::endl; 00109 00110 return (r <= ro_ + FLT_EPSILON && 00111 z >= zb_ - FLT_EPSILON && 00112 z <= zf_ + FLT_EPSILON); 00113 }
|
|
|
|
|
|
00099 { 00100 loss_ = i; 00101 }
|
|
00109 {
00110 return loss_;
00111 }
|
|
Return Material of which Element is made.
00053 {
00054 return *material_;
00055 }
|
|
Return Material of which Element is made.
00053 {
00054 return *material_;
00055 }
|
|
|
|
|
|
00094 { 00095 muls_ = i; 00096 }
|
|
00104 {
00105 return muls_;
00106 }
|
|
Operator.
|
|
Operator.
|
|
Extract radius of the cylinder.
Implements KalFitElement. 00053 { return ro_; }
|
|
Extract radius of the cylinder.
Implements KalFitElement. 00053 { return ro_; }
|
|
Update track according the material properties of the current element.
|
|
Update track according the material properties of the current element.
00026 { 00027 00028 HepPoint3D x; 00029 double path = intersect(track, x); 00030 00031 //cout<<"KalFitElement: path= "<<path<<" intersect x "<<x<<endl; 00032 00033 if(path > 0){ 00034 // move pivot 00035 00036 //std::cout<<"KalFitElement: track helix1= "<<track.a()<<std::endl; 00037 //std::cout<<" KalFitTrack::numf_: "<<KalFitTrack::numf_<<std::endl; 00038 //std::cout<<" KalFitTrack::muls_: "<<muls_<<std::endl; 00039 //std::cout<<" KalFitTrack::loss_: "<<loss_<<std::endl; 00040 00041 track.pivot_numf(x); 00042 00043 //std::cout<<"KalFitElement: track helix2= "<<track.a()<<std::endl; 00044 00045 00046 // multiple scattering and energy loss 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 //cout<<"KalFitElement: track helix3= "<<track.a()<<endl; 00053 } 00054 //cout<<"KalfitElement: track helix2= "<<track.a()<<endl; 00055 }
|
|
|
|
00073 { 00074 HepPoint3D x; 00075 double path = intersect(track, x); 00076 if(path > 0){ 00077 // move pivot 00078 track.pivot_numf(x); 00079 00080 // multiple scattering and energy loss 00081 if(muls_) track.ms(path, *material_, index); 00082 if(loss_) track.eloss(path, *material_, index); 00083 } 00084 }
|
|
|
|
00058 { 00059 HepPoint3D x; 00060 double path = intersect(track, x); 00061 if(path > 0){ 00062 // move pivot 00063 track.pivot_numf(x); 00064 00065 // multiple scattering and energy loss 00066 if(muls_) track.ms(path, *material_, index); 00067 if(loss_) track.eloss(path, *material_, index); 00068 } 00069 }
|
|
|
|
Material of this element.
|
|
Material of this element.
|
|
Flags.
|
|
|
|
|
|
|
|
|