BOSS 7.0.5
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.
 
- Public Member Functions inherited from KalFitElement
 KalFitElement (const KalFitMaterial *material)
 Constructor.
 
virtual ~KalFitElement ()
 Destructor.
 
virtual double intersect (const KalFitTrack &track, HepPoint3D &x) const =0
 Find intersection with Helix.
 
virtual double intersect (const KalFitTrack &track, HepPoint3D &x, const HepPoint3D &point) const =0
 
const KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
 
virtual double radius (void) const =0
 Return distance in r-phi plane.
 
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 (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.
 
virtual double intersect (const KalFitTrack &track, HepPoint3D &x) const =0
 Find intersection with Helix.
 
virtual double intersect (const KalFitTrack &track, HepPoint3D &x, const HepPoint3D &point) const =0
 
const KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
 
virtual double radius (void) const =0
 Return distance in r-phi plane.
 
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 (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 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/include/KalFitAlg/KalFitAlg/KalFitCylinder.h.

Constructor & Destructor Documentation

◆ KalFitCylinder() [1/2]

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

◆ KalFitCylinder() [2/2]

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

Constructor.

Definition at line 30 of file Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/KalFitCylinder.h.

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

Member Function Documentation

◆ intersect() [1/4]

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

Find intersection with Helix.

Implements KalFitElement.

Definition at line 23 of file KalFitCylinder.cxx.

25{
26 double dPhi[4];
27 dPhi[0] = track.intersect_cylinder(ro_);
28 if(dPhi[0] == 0) return -1;
29 dPhi[1] = track.intersect_cylinder(ri_);
30 if(dPhi[1] == 0) return -1;
31 dPhi[2] = track.intersect_xy_plane(zf_);
32 dPhi[3] = track.intersect_xy_plane(zb_);
33
34 int n[2];
35 int j = 0;
36 for(int i = 0; i < 4 && j < 2; i++){
37 HepPoint3D xx = track.x(dPhi[i]);
38 if(isInside(xx)) n[j++] = i;
39 }
40 if(j < 2) return -1;
41
42 x = track.x((dPhi[n[0]] + dPhi[n[1]]) * .5);
43
44 double tanl = track.tanl();
45 //cout<<"KalFitCylinder: track radius"<<track.radius()<<" dphi0 "
46 // <<dPhi[n[0]]<<" dphi1 "<<dPhi[n[1]]<<" tanl "<<tanl<<endl;
47 return fabs(track.radius() * (dPhi[n[0]] - dPhi[n[1]])
48 * sqrt(1 + tanl * tanl));
49}
const Int_t n
Double_t x[10]
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.
double radius(void) const
returns radious of helix.

◆ intersect() [2/4]

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

Find intersection with Helix.

Implements KalFitElement.

◆ intersect() [3/4]

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

Implements KalFitElement.

Definition at line 52 of file KalFitCylinder.cxx.

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

◆ intersect() [4/4]

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

Implements KalFitElement.

◆ isInside() [1/2]

bool KalFitCylinder::isInside ( const HepPoint3D x) const

Check if the position x is inside the current cylinder.

Definition at line 91 of file KalFitCylinder.cxx.

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

Referenced by intersect().

◆ isInside() [2/2]

bool KalFitCylinder::isInside ( const HepPoint3D x) const

Check if the position x is inside the current cylinder.

◆ isInside2() [1/2]

bool KalFitCylinder::isInside2 ( const HepPoint3D x) const

Definition at line 104 of file KalFitCylinder.cxx.

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

◆ isInside2() [2/2]

bool KalFitCylinder::isInside2 ( const HepPoint3D x) const

◆ radius() [1/2]

virtual double KalFitCylinder::radius ( void  ) const
inlinevirtual

Extract radius of the cylinder.

Implements KalFitElement.

Definition at line 53 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitCylinder.h.

53{ return ro_; }

Referenced by KalFitCylinder().

◆ radius() [2/2]

virtual double KalFitCylinder::radius ( void  ) const
inlinevirtual

Extract radius of the cylinder.

Implements KalFitElement.

Definition at line 53 of file Reconstruction/KalFitAlg/KalFitAlg-00-07-55-p03/KalFitAlg/KalFitCylinder.h.

53{ 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: