Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

KalFitCylinder Class Reference

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

#include <KalFitCylinder.h>

Inheritance diagram for KalFitCylinder:

KalFitElement KalFitElement List of all members.

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 KalFitMaterialmaterial (void) const
 Return Material of which Element is made.
const KalFitMaterialmaterial (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 KalFitMaterialmaterial_
 Material of this element.
const KalFitMaterialmaterial_
 Material of this element.
double ri_
double ro_
double zb_
double zf_

Static Protected Attributes

int loss_
int muls_
 Flags.

Detailed Description

Cylinder is an Element whose shape is a cylinder.


Constructor & Destructor Documentation

KalFitCylinder::KalFitCylinder const KalFitMaterial material,
double  radius,
double  thick,
double  length,
double  z0
[inline]
 

Constructor.

00033     : KalFitElement(material)
00034   {
00035     ri_ = radius;
00036     ro_ = radius + thick;
00037     zf_ = z0 + length * .5;
00038     zb_ = z0 - length * .5;
00039   }

KalFitCylinder::KalFitCylinder const KalFitMaterial material,
double  radius,
double  thick,
double  length,
double  z0
[inline]
 

Constructor.

00033     : KalFitElement(material)
00034   {
00035     ri_ = radius;
00036     ro_ = radius + thick;
00037     zf_ = z0 + length * .5;
00038     zb_ = z0 - length * .5;
00039   }


Member Function Documentation

virtual void KalFitElement::asso_rphi KalFitTrack track  )  [virtual, inherited]
 

virtual void KalFitElement::asso_rphi Lpav circ,
KalFitTrack track
[virtual, inherited]
 

void KalFitElement::asso_rphi KalFitTrack track  )  [virtual, inherited]
 

00091 {}

void KalFitElement::asso_rphi Lpav circ,
KalFitTrack track
[virtual, inherited]
 

00088 {}

virtual double KalFitCylinder::intersect const KalFitTrack track,
HepPoint3D x,
const HepPoint3D point
const [virtual]
 

Implements KalFitElement.

virtual double KalFitCylinder::intersect const KalFitTrack track,
HepPoint3D x
const [virtual]
 

Find intersection with Helix.

Implements KalFitElement.

double KalFitCylinder::intersect const KalFitTrack track,
HepPoint3D x,
const HepPoint3D point
const [virtual]
 

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  }

double KalFitCylinder::intersect const KalFitTrack track,
HepPoint3D x
const [virtual]
 

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 }

bool KalFitCylinder::isInside const HepPoint3D x  )  const
 

Check if the position x is inside the current cylinder.

bool KalFitCylinder::isInside const HepPoint3D x  )  const
 

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 }

bool KalFitCylinder::isInside2 const HepPoint3D x  )  const
 

bool KalFitCylinder::isInside2 const HepPoint3D x  )  const
 

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 }

void KalFitElement::loss int  i  )  [static, inherited]
 

int KalFitElement::loss void   )  [static, inherited]
 

void KalFitElement::loss int  i  )  [static, inherited]
 

00099 {
00100   loss_ = i;
00101 }

int KalFitElement::loss void   )  [static, inherited]
 

00109 {
00110   return loss_;
00111 }

const KalFitMaterial& KalFitElement::material void   )  const [inline, inherited]
 

Return Material of which Element is made.

00053   {
00054     return *material_;
00055   }

const KalFitMaterial& KalFitElement::material void   )  const [inline, inherited]
 

Return Material of which Element is made.

00053   {
00054     return *material_;
00055   }

void KalFitElement::muls int  i  )  [static, inherited]
 

int KalFitElement::muls void   )  [static, inherited]
 

void KalFitElement::muls int  i  )  [static, inherited]
 

00094 {
00095   muls_ = i;
00096 }

int KalFitElement::muls void   )  [static, inherited]
 

00104 {
00105   return muls_;
00106 }

bool KalFitElement::operator< const KalFitElement a  )  const [inline, inherited]
 

Operator.

00072   {
00073     return radius() < a.radius();
00074   }

bool KalFitElement::operator< const KalFitElement a  )  const [inline, inherited]
 

Operator.

00072   {
00073     return radius() < a.radius();
00074   }

virtual double KalFitCylinder::radius void   )  const [inline, virtual]
 

Extract radius of the cylinder.

Implements KalFitElement.

00053 { return ro_; }

virtual double KalFitCylinder::radius void   )  const [inline, virtual]
 

Extract radius of the cylinder.

Implements KalFitElement.

00053 { return ro_; }

virtual void KalFitElement::updateTrack KalFitTrack track,
int  index
[virtual, inherited]
 

Update track according the material properties of the current element.

void KalFitElement::updateTrack KalFitTrack track,
int  index
[virtual, inherited]
 

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 }

virtual void KalFitElement::updateTrack_alreadyfound KalFitTrack track,
int  index
[virtual, inherited]
 

void KalFitElement::updateTrack_alreadyfound KalFitTrack track,
int  index
[virtual, inherited]
 

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 }

virtual void KalFitElement::updateTrack_rphi KalFitTrack track,
int  index
[virtual, inherited]
 

void KalFitElement::updateTrack_rphi KalFitTrack track,
int  index
[virtual, inherited]
 

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 }


Member Data Documentation

int KalFitElement::loss_ [static, protected, inherited]
 

const KalFitMaterial* KalFitElement::material_ [protected, inherited]
 

Material of this element.

const KalFitMaterial* KalFitElement::material_ [protected, inherited]
 

Material of this element.

int KalFitElement::muls_ [static, protected, inherited]
 

Flags.

double KalFitCylinder::ri_ [protected]
 

double KalFitCylinder::ro_ [protected]
 

double KalFitCylinder::zb_ [protected]
 

double KalFitCylinder::zf_ [protected]
 


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 16:19:43 2011 for BOSS6.5.5 by  doxygen 1.3.9.1