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

KalFitWire Class Reference

Description of a Wire class. More...

#include <KalFitWire.h>

List of all members.

Public Member Functions

double Acoef (void) const
double Acoef (void) const
HepPoint3D bck (void) const
HepPoint3D bck (void) const
void chk_left_and_right (void)
void chk_left_and_right (void)
void ddl (const double d)
void ddl (const double d)
void ddr (const double d)
void ddr (const double d)
double distance (const double distance)
 set drift distance
double distance (void) const
 returns drift distance
double distance (const double distance)
 set drift distance
double distance (void) const
 returns drift distance
double distance_z (void) const
 returns z_distance from the center of wire by drift distance
double distance_z (void) const
 returns z_distance from the center of wire by drift distance
HepPoint3D fwd (void) const
 Geometry :.
HepPoint3D fwd (void) const
 Geometry :.
unsigned int geoID (void) const
unsigned int geoID (void) const
 KalFitWire ()
 KalFitWire (const int localID, const KalFitLayer_Mdc &layer, const HepPoint3D &fwd, const HepPoint3D &bck, KalFitWire *const vt, unsigned int geoID, unsigned int stereo)
 constructor
 KalFitWire ()
 KalFitWire (const int localID, const KalFitLayer_Mdc &layer, const HepPoint3D &fwd, const HepPoint3D &bck, KalFitWire *const vt, unsigned int geoID, unsigned int stereo)
 constructor
const KalFitLayer_Mdclayer (void) const
const KalFitLayer_Mdclayer (void) const
unsigned int localId (void) const
 Extractor :.
unsigned int localId (void) const
 Extractor :.
double lzx (void) const
double lzx (void) const
KalFitWire ** neighborPtr (void)
KalFitWire ** neighborPtr (void)
double phi (void) const
double phi (void) const
void sagcoef (void)
void sagcoef (void)
void state (const unsigned int i)
unsigned int state (void) const
void state (const unsigned int i)
unsigned int state (void) const
unsigned stateAND (const unsigned mask) const
unsigned stateAND (const unsigned mask) const
void stateOR (const unsigned mask)
void stateOR (const unsigned mask)
void stateORXOR (const unsigned mask)
void stateORXOR (const unsigned mask)
void stateXOR (const unsigned mask)
void stateXOR (const unsigned mask)
unsigned int stereo (void) const
unsigned int stereo (void) const
double x (void) const
double x (void) const
HepPoint3D xyPosition (void) const
HepPoint3D xyPosition (void) const
double y (void) const
double y (void) const
int z (const Lpav &la, double &z) const
 returns z for track la
int z (const Lpav &la, double &z) const
 returns z for track la
 ~KalFitWire (void)
 destructor
 ~KalFitWire (void)
 destructor

Private Types

enum  { NREGION = 3 }
enum  { NLAYER = 50 }
enum  { NREGION = 3 }
enum  { NLAYER = 50 }

Private Member Functions

const KalFitWireinnerLeft (KalFitWire *const vtWire) const
const KalFitWireinnerLeft (KalFitWire *const vtWire) const
const KalFitWireinnerRight (KalFitWire *const vtWire) const
const KalFitWireinnerRight (KalFitWire *const vtWire) const
const KalFitWireleft (void) const
const KalFitWireleft (void) const
const KalFitWireouterLeft (KalFitWire *const vtWire) const
const KalFitWireouterLeft (KalFitWire *const vtWire) const
const KalFitWireouterRight (KalFitWire *const vtWire) const
const KalFitWireouterRight (KalFitWire *const vtWire) const
const KalFitWireright (void) const
const KalFitWireright (void) const

Private Attributes

double A_
HepPoint3D bck_
double ddl_
double ddr_
double distance_
double dx_
double dy_
HepPoint3D fwd_
unsigned int geoID_
const KalFitLayer_Mdclayer_
const KalFitLayer_Mdclayer_
int localId_
double lzx_
KalFitWireneighbor_ [6]
KalFitWireneighbor_ [6]
unsigned int state_
unsigned int stereo_
double x_
HepPoint3D xyPosition_
double y_

Static Private Attributes

const double A [NREGION]
const double F [NLAYER]


Detailed Description

Description of a Wire class.


Member Enumeration Documentation

anonymous enum [private]
 

Enumeration values:
NREGION 
00048 { NREGION = 3 };

anonymous enum [private]
 

Enumeration values:
NLAYER 
00050 { NLAYER = 50 };

anonymous enum [private]
 

Enumeration values:
NREGION 
00048 { NREGION = 3 };

anonymous enum [private]
 

Enumeration values:
NLAYER 
00050 { NLAYER = 50 };


Constructor & Destructor Documentation

KalFitWire::KalFitWire const int  localID,
const KalFitLayer_Mdc layer,
const HepPoint3D fwd,
const HepPoint3D bck,
KalFitWire *const   vt,
unsigned int  geoID,
unsigned int  stereo
 

constructor

00036                                        :
00037   localId_(localID), fwd_(fwd), bck_(bck), layer_(layer), 
00038   state_(WireHitInvalid), geoID_(geoID), stereo_(stereo), 
00039   ddl_(0), ddr_(0), distance_(0) {
00040 
00041   int layer_ID = layer_.layerId();
00042   xyPosition_ = 0.5 * (fwd_+bck_);
00043   if (!stereo_){
00044     dx_ = 0;
00045     dy_ = 0;
00046     x_ = xyPosition_.x();
00047     y_ = xyPosition_.y();
00048   } else {
00049     dx_ = (double)fwd_.x() - (double)bck_.x();
00050     dy_ = (double)fwd_.y() - (double)bck_.y();
00051     x_ = bck_.x();
00052     y_ = bck_.y();
00053   }
00054   // Wire sag coeff
00055   Hep3Vector wire_;
00056   wire_ = (CLHEP::Hep3Vector)fwd - (CLHEP::Hep3Vector)bck;
00057   lzx_ = sqrt(wire_.z()*wire_.z()+wire_.x()*wire_.x());
00058 
00059   // problem with layer_ and its id inside sagcoef ?!!
00060   //  sagcoef();
00061   if (layer_ID < 3)
00062     A_ = A[0];
00063   else {
00064     if (layer_ID< 14)
00065       A_ = A[1];
00066     else if (layer_ID < 50){
00067       double f_current(F[layer_ID]);
00068       double l(wire_.mag());
00069       A_ = A[2]*F[49]*F[49]*L49_2/(f_current*f_current*l*l);
00070     } else
00071       std::cout << "*** PROBLEM WIRE !!!!! " << std::endl;
00072   }
00073 
00074   // Neighbor :
00075   neighbor_[0] = (KalFitWire *) innerLeft(vt);
00076   neighbor_[1] = (KalFitWire *) innerRight(vt);
00077 
00078   neighbor_[2] = (KalFitWire *) left();
00079   neighbor_[3] = (KalFitWire *) right();
00080 
00081   neighbor_[4] = (KalFitWire *) outerLeft(vt);
00082   neighbor_[5] = (KalFitWire *) outerRight(vt);
00083 
00084 }

KalFitWire::KalFitWire  ) 
 

00086                       :
00087   localId_(0), fwd_(0,0,0), bck_(0,0,0), layer_(*(KalFitLayer_Mdc *)NULL), 
00088   state_(WireHitInvalid), x_(0), y_(0), dx_(0), dy_(0)
00089 {
00090   // Neighbor :
00091   neighbor_[0] = NULL;
00092   neighbor_[1] = NULL;
00093   neighbor_[2] = NULL;
00094   neighbor_[3] = NULL;
00095   neighbor_[4] = NULL;
00096   neighbor_[5] = NULL;
00097 }

KalFitWire::~KalFitWire void   ) 
 

destructor

00100 {}

KalFitWire::KalFitWire const int  localID,
const KalFitLayer_Mdc layer,
const HepPoint3D fwd,
const HepPoint3D bck,
KalFitWire *const   vt,
unsigned int  geoID,
unsigned int  stereo
 

constructor

KalFitWire::KalFitWire  ) 
 

KalFitWire::~KalFitWire void   ) 
 

destructor


Member Function Documentation

double KalFitWire::Acoef void   )  const [inline]
 

00095 {  return A_; }

double KalFitWire::Acoef void   )  const [inline]
 

00095 {  return A_; }

HepPoint3D KalFitWire::bck void   )  const [inline]
 

00093 { return bck_; }

HepPoint3D KalFitWire::bck void   )  const [inline]
 

00093 { return bck_; }

void KalFitWire::chk_left_and_right void   ) 
 

void KalFitWire::chk_left_and_right void   ) 
 

00192                                         {
00193   if (((**(neighbor_+2)).state_&WireHit)&&
00194       ((**(neighbor_+3)).state_&WireHit)){
00195     state_ |= WireHitInvalid;
00196     (**(neighbor_+2)).state_ |= WireHitInvalid;
00197     (**(neighbor_+3)).state_ |= WireHitInvalid;
00198   }
00199 }

void KalFitWire::ddl const double  d  )  [inline]
 

00088 { ddl_ = d;  }  

void KalFitWire::ddl const double  d  )  [inline]
 

00088 { ddl_ = d;  }  

void KalFitWire::ddr const double  d  )  [inline]
 

00089 { ddr_ = d;  }  

void KalFitWire::ddr const double  d  )  [inline]
 

00089 { ddr_ = d;  }  

double KalFitWire::distance const double  distance  ) 
 

set drift distance

double KalFitWire::distance void   )  const
 

returns drift distance

double KalFitWire::distance const double  distance  )  [inline]
 

set drift distance

00199 {
00200   return distance_ = distance;
00201 }

double KalFitWire::distance void   )  const [inline]
 

returns drift distance

00185 {
00186   return distance_;
00187 }

double KalFitWire::distance_z void   )  const
 

returns z_distance from the center of wire by drift distance

double KalFitWire::distance_z void   )  const [inline]
 

returns z_distance from the center of wire by drift distance

00192 {
00193   return distance_ * fabs(layer_.tanSlant());
00194 }

HepPoint3D KalFitWire::fwd void   )  const [inline]
 

Geometry :.

00092 { return fwd_; }

HepPoint3D KalFitWire::fwd void   )  const [inline]
 

Geometry :.

00092 { return fwd_; }

unsigned int KalFitWire::geoID void   )  const [inline]
 

00074 { return geoID_; }

unsigned int KalFitWire::geoID void   )  const [inline]
 

00074 { return geoID_; }

const KalFitWire* KalFitWire::innerLeft KalFitWire *const   vtWire  )  const [private]
 

const KalFitWire * KalFitWire::innerLeft KalFitWire *const   vtWire  )  const [private]
 

00138                                                                        {
00139 
00140   if (!layer_.localLayerId()) return vtWire;
00141   const KalFitWire * tmp = this;
00142   if (layer_.offset()&1){
00143     tmp -= layer_.superLayer().nWire();
00144   }else{
00145     if (localId_) tmp -= layer_.superLayer().nWire();
00146     --tmp;
00147   }
00148   return tmp; 
00149 }

const KalFitWire* KalFitWire::innerRight KalFitWire *const   vtWire  )  const [private]
 

const KalFitWire * KalFitWire::innerRight KalFitWire *const   vtWire  )  const [private]
 

00151                                                                         {
00152    if (!layer_.localLayerId()) return vtWire;
00153   const KalFitWire * tmp = this;
00154   if (layer_.offset()&1){
00155     if (localId_==layer_.superLayer().localMaxId()){
00156       tmp -= layer_.superLayer().nWire();
00157     }
00158     tmp -= (layer_.superLayer().nWire()-1);
00159   }else{
00160     tmp -= layer_.superLayer().nWire();
00161   }
00162   return tmp; 
00163 }

const KalFitLayer_Mdc& KalFitWire::layer void   )  const [inline]
 

00070 { return layer_; }

const KalFitLayer_Mdc& KalFitWire::layer void   )  const [inline]
 

00070 { return layer_; }

const KalFitWire* KalFitWire::left void   )  const [private]
 

const KalFitWire * KalFitWire::left void   )  const [private]
 

00124                                              {
00125   const KalFitWire * tmp = this;
00126   if (!localId_) tmp += layer_.superLayer().nWire();
00127   return --tmp;
00128 }

unsigned int KalFitWire::localId void   )  const [inline]
 

Extractor :.

00069 { return localId_; }

unsigned int KalFitWire::localId void   )  const [inline]
 

Extractor :.

00069 { return localId_; }

double KalFitWire::lzx void   )  const [inline]
 

00096 {  return lzx_; }

double KalFitWire::lzx void   )  const [inline]
 

00096 {  return lzx_; }

KalFitWire** KalFitWire::neighborPtr void   )  [inline]
 

00071 {return neighbor_;}

KalFitWire** KalFitWire::neighborPtr void   )  [inline]
 

00071 {return neighbor_;}

const KalFitWire* KalFitWire::outerLeft KalFitWire *const   vtWire  )  const [private]
 

const KalFitWire * KalFitWire::outerLeft KalFitWire *const   vtWire  )  const [private]
 

00165                                                                        {
00166   if (layer_.localLayerId()==layer_.superLayer().layerMaxId()) return vtWire;
00167   const KalFitWire * tmp = this;
00168   if (layer_.offset()&1){
00169     tmp += layer_.superLayer().nWire();
00170   }else{
00171     if (!localId_) tmp += layer_.superLayer().nWire();
00172     tmp += (layer_.superLayer().nWire()-1);
00173   }
00174   return tmp;  
00175 }

const KalFitWire* KalFitWire::outerRight KalFitWire *const   vtWire  )  const [private]
 

const KalFitWire * KalFitWire::outerRight KalFitWire *const   vtWire  )  const [private]
 

00177                                                                         {
00178   if (layer_.localLayerId()==layer_.superLayer().layerMaxId()) return vtWire;
00179   const KalFitWire * tmp = this;
00180   if (layer_.offset()&1){
00181     if (localId_^layer_.superLayer().localMaxId()){
00182       tmp += layer_.superLayer().nWire();
00183     }
00184     tmp++;
00185   }else{
00186     tmp += layer_.superLayer().nWire();
00187   }
00188   return tmp;
00189 }

double KalFitWire::phi void   )  const
 

double KalFitWire::phi void   )  const [inline]
 

00178 {
00179   return M_PI*(layer_.offset()+2*localId_)/(double)layer_.superLayer().nWire();  
00180 }

const KalFitWire* KalFitWire::right void   )  const [private]
 

const KalFitWire * KalFitWire::right void   )  const [private]
 

00130                                               {
00131   const KalFitWire * tmp = this;
00132   if (localId_==layer_.superLayer().localMaxId()){
00133     tmp -= layer_.superLayer().nWire();
00134   }
00135   return ++tmp;
00136 }

void KalFitWire::sagcoef void   ) 
 

void KalFitWire::sagcoef void   ) 
 

00103                             {
00104 
00105   Hep3Vector wire_;
00106   wire_ =(CLHEP::Hep3Vector)fwd_ - (CLHEP::Hep3Vector)bck_;
00107   int layer_ID = layer_.layerId();
00108 
00109   if (layer_ID < 3){
00110     A_ = A[0];
00111   } else {
00112     if (layer_ID< 14){
00113       A_ = A[1];
00114     } else if (layer_ID < 50){
00115       double f_current(F[layer_ID]);
00116       double l(wire_.mag());
00117       A_ = A[2]*F[49]*F[49]*L49_2/(f_current*f_current*l*l);
00118     } else {
00119       std::cout << "*** PROBLEM WIRE !!!!! " << std::endl;
00120     }
00121   }
00122 }

void KalFitWire::state const unsigned int  i  )  [inline]
 

00083 { state_=i; }

unsigned int KalFitWire::state void   )  const [inline]
 

00072 { return state_; }

void KalFitWire::state const unsigned int  i  )  [inline]
 

00083 { state_=i; }

unsigned int KalFitWire::state void   )  const [inline]
 

00072 { return state_; }

unsigned KalFitWire::stateAND const unsigned  mask  )  const
 

unsigned KalFitWire::stateAND const unsigned  mask  )  const [inline]
 

00150 {
00151   return state_&mask;
00152 }

void KalFitWire::stateOR const unsigned  mask  ) 
 

void KalFitWire::stateOR const unsigned  mask  )  [inline]
 

00157 {
00158   state_|=mask;
00159 }

void KalFitWire::stateORXOR const unsigned  mask  ) 
 

void KalFitWire::stateORXOR const unsigned  mask  )  [inline]
 

00171 {
00172   state_=(state_|mask)^mask;
00173 }

void KalFitWire::stateXOR const unsigned  mask  ) 
 

void KalFitWire::stateXOR const unsigned  mask  )  [inline]
 

00164 {
00165   state_^=mask;
00166 }

unsigned int KalFitWire::stereo void   )  const [inline]
 

00075 { return stereo_; }

unsigned int KalFitWire::stereo void   )  const [inline]
 

00075 { return stereo_; }

double KalFitWire::x void   )  const [inline]
 

00100 { return x_;}

double KalFitWire::x void   )  const [inline]
 

00100 { return x_;}

HepPoint3D KalFitWire::xyPosition void   )  const [inline]
 

00094 { return xyPosition_; }

HepPoint3D KalFitWire::xyPosition void   )  const [inline]
 

00094 { return xyPosition_; }

double KalFitWire::y void   )  const [inline]
 

00101 { return y_;}

double KalFitWire::y void   )  const [inline]
 

00101 { return y_;}

int KalFitWire::z const Lpav la,
double &  z
const
 

returns z for track la

int KalFitWire::z const Lpav la,
double &  z
const [inline]
 

returns z for track la

00205                                                {
00206   HepVector center = la.center();
00207   double rho = la.radius();
00208   double dx2 = center(1) - x_;
00209   double dy2 = center(2) - y_;
00210   double par1 = dx_*dx_ + dy_*dy_;
00211   double par2 = (dx_*dx2 + dy_*dy2)/par1;
00212   double par3 = dx_*dy2 - dy_*dx2;
00213   double par4 = rho*rho*par1 -  par3*par3;
00214   if (par4<0.) return 0;
00215   par4 = sqrt(par4)/par1;
00216   double delta = par2 + par4;
00217   if (delta>=0. && delta<1.){
00218     z = layer_.zb()+delta*(layer_.zf()-layer_.zb());
00219     return 1;
00220   }else{
00221     delta = par2 - par4;
00222     if (delta>=0. && delta<1.){
00223       z = layer_.zb()+delta*(layer_.zf()-layer_.zb());
00224       return 1;
00225     }
00226   }
00227   return 0;
00228 }


Member Data Documentation

const double KalFitWire::A [static, private]
 

Initial value:

 { 8.5265E-7, 
                                      1.1368E-6, 
                                      1.2402E-6}

double KalFitWire::A_ [private]
 

HepPoint3D KalFitWire::bck_ [private]
 

double KalFitWire::ddl_ [private]
 

double KalFitWire::ddr_ [private]
 

double KalFitWire::distance_ [private]
 

double KalFitWire::dx_ [private]
 

double KalFitWire::dy_ [private]
 

const double KalFitWire::F [static, private]
 

Initial value:

 { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,
                                    47.2,46.6,47.0,46,45,46.7,46,45,44.6,
                                    45.9,45.9,45.3,44.5,44.0,46.0,45.6,
                                    44.2,43.6,44.0,43.5,43.1,42.9,42.4,
                                    42.7,42.5,42.2,41,42,42,42,41.4,42.5,
                                    43.0,43.2,43.4,43.4}

HepPoint3D KalFitWire::fwd_ [private]
 

unsigned int KalFitWire::geoID_ [private]
 

const KalFitLayer_Mdc& KalFitWire::layer_ [private]
 

const KalFitLayer_Mdc& KalFitWire::layer_ [private]
 

int KalFitWire::localId_ [private]
 

double KalFitWire::lzx_ [private]
 

KalFitWire* KalFitWire::neighbor_[6] [private]
 

KalFitWire* KalFitWire::neighbor_[6] [private]
 

unsigned int KalFitWire::state_ [private]
 

unsigned int KalFitWire::stereo_ [private]
 

double KalFitWire::x_ [private]
 

HepPoint3D KalFitWire::xyPosition_ [private]
 

double KalFitWire::y_ [private]
 


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