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

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

#include <KalFitCylinder.h>

Inheritance diagram for KalFitCylinder:

Public Member Functions

 KalFitCylinder (const KalFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
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
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.
 KalFitCylinder (const KalFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
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
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.
 KalFitCylinder (const KalFitMaterial *material, double radius, double thick, double length, double z0)
 Constructor.
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
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 Member Functions inherited from KalFitElement
 KalFitElement (const KalFitMaterial *material)
 Constructor.
virtual ~KalFitElement ()
 Destructor.
const KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
virtual void updateTrack (KalFitTrack &track, int index)
 Update track according the material properties of the current element.
virtual void updateTrack_rphi (KalFitTrack &track, int index)
virtual void updateTrack_alreadyfound (KalFitTrack &track, int index)
virtual void asso_rphi (KalmanFit::Lpav &circ, KalFitTrack &track)
virtual void asso_rphi (KalFitTrack &track)
bool operator< (const KalFitElement &a) const
 Operator.
 KalFitElement (const KalFitMaterial *material)
 Constructor.
virtual ~KalFitElement ()
 Destructor.
const KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
virtual void updateTrack (KalFitTrack &track, int index)
 Update track according the material properties of the current element.
virtual void updateTrack_rphi (KalFitTrack &track, int index)
virtual void updateTrack_alreadyfound (KalFitTrack &track, int index)
virtual void asso_rphi (KalmanFit::Lpav &circ, KalFitTrack &track)
virtual void asso_rphi (KalFitTrack &track)
bool operator< (const KalFitElement &a) const
 Operator.
 KalFitElement (const KalFitMaterial *material)
 Constructor.
virtual ~KalFitElement ()
 Destructor.
const KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
virtual void updateTrack (KalFitTrack &track, int index)
 Update track according the material properties of the current element.
virtual void updateTrack_rphi (KalFitTrack &track, int index)
virtual void updateTrack_alreadyfound (KalFitTrack &track, int index)
virtual void asso_rphi (KalmanFit::Lpav &circ, KalFitTrack &track)
virtual void asso_rphi (KalFitTrack &track)
bool operator< (const KalFitElement &a) const
 Operator.

Protected Attributes

double ro_
double ri_
double zf_
double zb_
Protected Attributes inherited from KalFitElement
const KalFitMaterialmaterial_
 Material of this element.

Additional Inherited Members

Static Public Member Functions inherited from KalFitElement
static int muls (void)
static int loss (void)
static void muls (int i)
static void loss (int i)
static int muls (void)
static int loss (void)
static void muls (int i)
static void loss (int i)
static int muls (void)
static int loss (void)
static void muls (int i)
static void loss (int i)
Static Protected Attributes inherited from KalFitElement
static int muls_
 Flags.
static int loss_

Detailed Description

Cylinder is an Element whose shape is a cylinder.

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

Constructor & Destructor Documentation

◆ KalFitCylinder() [1/3]

KalFitCylinder::KalFitCylinder ( const KalFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

◆ KalFitCylinder() [2/3]

KalFitCylinder::KalFitCylinder ( const KalFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

Constructor.

Definition at line 30 of file InstallArea/x86_64-el9-gcc13-opt/include/KalFitAlg/KalFitCylinder.h.

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

◆ KalFitCylinder() [3/3]

KalFitCylinder::KalFitCylinder ( const KalFitMaterial * material,
double radius,
double thick,
double length,
double z0 )
inline

Constructor.

Definition at line 30 of file Reconstruction/KalFitAlg/include/KalFitAlg/KalFitCylinder.h.

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

Member Function Documentation

◆ intersect() [1/6]

double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x ) const
virtual

Find intersection with Helix.

Implements KalFitElement.

Definition at line 23 of file KalFitCylinder.cxx.

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

◆ intersect() [2/6]

virtual double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x ) const
virtual

Find intersection with Helix.

Implements KalFitElement.

◆ intersect() [3/6]

virtual double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x ) const
virtual

Find intersection with Helix.

Implements KalFitElement.

◆ intersect() [4/6]

double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x,
const HepPoint3D & point ) const
virtual

Implements KalFitElement.

Definition at line 49 of file KalFitCylinder.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.x( dPhi[i] );
72 if ( isInside( xx ) ) n[j++] = i;
73 }
74
75 if ( j < 2 ) return -1;
76
77 x = track.x( ( dPhi[n[0]] + dPhi[n[1]] ) * .5 );
78
79 double tanl = track.tanl();
80
81 return fabs( track.radius() * ( dPhi[n[0]] - dPhi[n[1]] ) * sqrt( 1 + tanl * tanl ) );
82}

◆ intersect() [5/6]

virtual double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x,
const HepPoint3D & point ) const
virtual

Implements KalFitElement.

◆ intersect() [6/6]

virtual double KalFitCylinder::intersect ( const KalFitTrack & track,
HepPoint3D & x,
const HepPoint3D & point ) const
virtual

Implements KalFitElement.

◆ isInside() [1/3]

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

Check if the position x is inside the current cylinder.

Definition at line 84 of file KalFitCylinder.cxx.

84 {
85 double r = x.perp();
86 double z = x.z();
87 // std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf:
88 // "<<zf_<<std::endl;
89
90 return ( r >= ri_ - FLT_EPSILON && r <= ro_ + FLT_EPSILON && z >= zb_ - FLT_EPSILON &&
91 z <= zf_ + FLT_EPSILON );
92}

Referenced by intersect(), and intersect().

◆ isInside() [2/3]

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

Check if the position x is inside the current cylinder.

◆ isInside() [3/3]

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

Check if the position x is inside the current cylinder.

◆ isInside2() [1/3]

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

Definition at line 94 of file KalFitCylinder.cxx.

94 {
95 double r = x.perp();
96 double z = x.z();
97 // std::cout<<"r: "<<r<<" z: "<<z<<" ri: "<<ri_<<" ro: "<<ro_<<" zb_: "<<zb_<<"zf:
98 // "<<zf_<<std::endl;
99
100 return ( r <= ro_ + FLT_EPSILON && z >= zb_ - FLT_EPSILON && z <= zf_ + FLT_EPSILON );
101}

◆ isInside2() [2/3]

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

◆ isInside2() [3/3]

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

◆ radius() [1/3]

virtual double KalFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Implements KalFitElement.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-dbg/include/KalFitAlg/KalFitCylinder.h.

50{ return ro_; }

Referenced by KalFitCylinder().

◆ radius() [2/3]

virtual double KalFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Implements KalFitElement.

Definition at line 50 of file InstallArea/x86_64-el9-gcc13-opt/include/KalFitAlg/KalFitCylinder.h.

50{ return ro_; }

◆ radius() [3/3]

virtual double KalFitCylinder::radius ( void ) const
inlinevirtual

Extract radius of the cylinder.

Implements KalFitElement.

Definition at line 50 of file Reconstruction/KalFitAlg/include/KalFitAlg/KalFitCylinder.h.

50{ return ro_; }

Member Data Documentation

◆ ri_

double KalFitCylinder::ri_
protected

◆ ro_

double KalFitCylinder::ro_
protected

◆ zb_

double KalFitCylinder::zb_
protected

◆ zf_

double KalFitCylinder::zf_
protected

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