BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
RkFitCylinder Class Reference

Cylinder is an Element whose shape is a cylinder. More...

#include <RkFitCylinder.h>

Public Member Functions

 RkFitCylinder (const RkFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
double intersect (TRunge &track, HepPoint3D &x) const
 Find intersection with Helix.
double intersect (TRunge &track, HepPoint3D &x, const HepPoint3D &point) const
void updateTrack (TRunge &track, double y[6]) const
bool isInside (const HepPoint3D &x) const
 Check if the position x is inside the current cylinder.
bool isInside2 (const HepPoint3D &x) const
virtual double radius (void) const
 Extract radius of the cylinder.
 RkFitCylinder (const RkFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
double intersect (TRunge &track, HepPoint3D &x) const
 Find intersection with Helix.
double intersect (TRunge &track, HepPoint3D &x, const HepPoint3D &point) const
void updateTrack (TRunge &track, double y[6]) const
bool isInside (const HepPoint3D &x) const
 Check if the position x is inside the current cylinder.
bool isInside2 (const HepPoint3D &x) const
virtual double radius (void) const
 Extract radius of the cylinder.
 RkFitCylinder (const RkFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
double intersect (TRunge &track, HepPoint3D &x) const
 Find intersection with Helix.
double intersect (TRunge &track, HepPoint3D &x, const HepPoint3D &point) const
void updateTrack (TRunge &track, double y[6]) const
bool isInside (const HepPoint3D &x) const
 Check if the position x is inside the current cylinder.
bool isInside2 (const HepPoint3D &x) const
virtual double radius (void) const
 Extract radius of the cylinder.

Public Attributes

const RkFitMaterialmaterial_

Protected Attributes

double ro_
double ri_
double zf_
double zb_

Detailed Description

Cylinder is an Element whose shape is a cylinder.

Definition at line 21 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/RkFitCylinder.h.

Constructor & Destructor Documentation

◆ RkFitCylinder() [1/3]

RkFitCylinder::RkFitCylinder ( const RkFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

◆ RkFitCylinder() [2/3]

RkFitCylinder::RkFitCylinder ( const RkFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

Constructor.

Definition at line 31 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkReco/RkFitCylinder.h.

32 {
33 material_ = material;
34 ri_ = radius;
35 ro_ = radius + thick;
36 zf_ = z0 + length * .5;
37 zb_ = z0 - length * .5;
38 }

◆ RkFitCylinder() [3/3]

RkFitCylinder::RkFitCylinder ( const RkFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

Constructor.

Definition at line 31 of file Reconstruction/TrkReco/include/TrkReco/RkFitCylinder.h.

32 {
33 material_ = material;
34 ri_ = radius;
35 ro_ = radius + thick;
36 zf_ = z0 + length * .5;
37 zb_ = z0 - length * .5;
38 }

Member Function Documentation

◆ intersect() [1/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x ) const

Find intersection with Helix.

Definition at line 21 of file RkFitCylinder.cxx.

21 {
22 double dPhi[4];
23 dPhi[0] = track.intersect_cylinder( ro_ );
24 if ( dPhi[0] == 0 ) return -1;
25 dPhi[1] = track.intersect_cylinder( ri_ );
26 if ( dPhi[1] == 0 ) return -1;
27 dPhi[2] = track.intersect_xy_plane( zf_ );
28 dPhi[3] = track.intersect_xy_plane( zb_ );
29
30 int n[2];
31 int j = 0;
32 for ( int i = 0; i < 4 && j < 2; i++ )
33 {
34 HepPoint3D xx = track.helix().x( dPhi[i] );
35 if ( isInside( xx ) ) n[j++] = i;
36 }
37 if ( j < 2 ) return -1;
38
39 x = track.helix().x( ( dPhi[n[0]] + dPhi[n[1]] ) * .5 );
40
41 double tanl = track.helix().tanl();
42 // cout<<"RkFitCylinder: track radius"<<track.radius()<<" dphi0 "
43 // <<dPhi[n[0]]<<" dphi1 "<<dPhi[n[1]]<<" tanl "<<tanl<<endl;
44 return fabs( track.helix().radius() * ( dPhi[n[0]] - dPhi[n[1]] ) *
45 sqrt( 1 + tanl * tanl ) );
46 // return 0;
47}
const Int_t n
Double_t x[10]
HepGeom::Point3D< double > HepPoint3D
HepPoint3D x(double dPhi=0.) const
returns position after rotating angle dPhi in phi direction.
double radius(void) const
returns radious of helix.
bool isInside(const HepPoint3D &x) const
Check if the position x is inside the current cylinder.
Helix helix(void) const
returns helix class
Definition TRunge.cxx:253
double intersect_xy_plane(double z) const
Definition TRunge.cxx:1380
double intersect_cylinder(double r) const
Definition TRunge.cxx:1338

Referenced by updateTrack().

◆ intersect() [2/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x ) const

Find intersection with Helix.

◆ intersect() [3/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x ) const

Find intersection with Helix.

◆ intersect() [4/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x,
const HepPoint3D & point ) const

Definition at line 49 of file RkFitCylinder.cxx.

50 {
51
52 const double ro = sqrt( point.x() * point.x() + point.y() * point.y() );
53
54 // std::cout<<" ro: "<<ro<<std::endl;
55
56 double dPhi[4];
57 dPhi[0] = track.intersect_cylinder( ro );
58 if ( dPhi[0] == 0 ) return -1;
59 dPhi[1] = track.intersect_cylinder( ri_ );
60 if ( dPhi[1] == 0 ) return -1;
61 dPhi[2] = track.intersect_xy_plane( zf_ );
62 dPhi[3] = track.intersect_xy_plane( zb_ );
63
64 // for(int ii=0; ii<4; ii++)
65 // std::cout<<"dPhi["<<ii<<"]"<<dPhi[ii]<<std::endl;
66
67 int n[2];
68 int j = 0;
69 for ( int i = 0; i < 4 && j < 2; i++ )
70 {
71 HepPoint3D xx = track.helix().x( dPhi[i] );
72 if ( isInside( xx ) ) n[j++] = i;
73 }
74
75 if ( j < 2 ) return -1;
76
77 x = track.helix().x( ( dPhi[n[0]] + dPhi[n[1]] ) * .5 );
78
79 double tanl = track.helix().tanl();
80
81 return fabs( track.helix().radius() * ( dPhi[n[0]] - dPhi[n[1]] ) *
82 sqrt( 1 + tanl * tanl ) );
83}

◆ intersect() [5/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x,
const HepPoint3D & point ) const

◆ intersect() [6/6]

double RkFitCylinder::intersect ( TRunge & track,
HepPoint3D & x,
const HepPoint3D & point ) const

◆ isInside() [1/3]

bool RkFitCylinder::isInside ( const HepPoint3D & x) const

Check if the position x is inside the current cylinder.

Definition at line 99 of file RkFitCylinder.cxx.

99 {
100 double r = x.perp();
101 double z = x.z();
102 // std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf:
103 // "<<zf_<<std::endl;
104
105 return ( r >= ri_ - FLT_EPSILON && r <= ro_ + FLT_EPSILON && z >= zb_ - FLT_EPSILON &&
106 z <= zf_ + FLT_EPSILON );
107}

Referenced by intersect(), and intersect().

◆ isInside() [2/3]

bool RkFitCylinder::isInside ( const HepPoint3D & x) const

Check if the position x is inside the current cylinder.

◆ isInside() [3/3]

bool RkFitCylinder::isInside ( const HepPoint3D & x) const

Check if the position x is inside the current cylinder.

◆ isInside2() [1/3]

bool RkFitCylinder::isInside2 ( const HepPoint3D & x) const

Definition at line 109 of file RkFitCylinder.cxx.

109 {
110 double r = x.perp();
111 double z = x.z();
112 // std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf:
113 // "<<zf_<<std::endl;
114
115 return ( r <= ro_ + FLT_EPSILON && z >= zb_ - FLT_EPSILON && z <= zf_ + FLT_EPSILON );
116}

◆ isInside2() [2/3]

bool RkFitCylinder::isInside2 ( const HepPoint3D & x) const

◆ isInside2() [3/3]

bool RkFitCylinder::isInside2 ( const HepPoint3D & x) const

◆ radius() [1/3]

virtual double RkFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Definition at line 51 of file InstallArea/x86_64-el9-gcc13-dbg/include/TrkReco/RkFitCylinder.h.

51{ return ro_; }

Referenced by RkFitCylinder().

◆ radius() [2/3]

virtual double RkFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Definition at line 51 of file InstallArea/x86_64-el9-gcc13-opt/include/TrkReco/RkFitCylinder.h.

51{ return ro_; }

◆ radius() [3/3]

virtual double RkFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Definition at line 51 of file Reconstruction/TrkReco/include/TrkReco/RkFitCylinder.h.

51{ return ro_; }

◆ updateTrack() [1/3]

void RkFitCylinder::updateTrack ( TRunge & track,
double y[6] ) const

Definition at line 85 of file RkFitCylinder.cxx.

85 {
87 double path = intersect( track, x );
88 double mass = 0.000511;
89 if ( path > 0 )
90 {
91 // move pivot
92 // multiple scattering and energy loss
93 // if(muls_) track.ms(path, *material_, index_element);
94 track.eloss( path, material_, mass, y, 1 );
95 // track.Propagate(path,y);
96 }
97}
double mass
double intersect(TRunge &track, HepPoint3D &x) const
Find intersection with Helix.
void eloss(double path, const RkFitMaterial *material, double mass, double y[6], int index) const
Definition TRunge.cxx:1322

◆ updateTrack() [2/3]

void RkFitCylinder::updateTrack ( TRunge & track,
double y[6] ) const

◆ updateTrack() [3/3]

void RkFitCylinder::updateTrack ( TRunge & track,
double y[6] ) const

Member Data Documentation

◆ material_

const RkFitMaterial * RkFitCylinder::material_

◆ ri_

double RkFitCylinder::ri_
protected

◆ ro_

double RkFitCylinder::ro_
protected

◆ zb_

double RkFitCylinder::zb_
protected

◆ zf_

double RkFitCylinder::zf_
protected

The documentation for this class was generated from the following files: