#include <KalFitWire.h>
Public Member Functions | |
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 (void) | |
destructor | |
unsigned int | localId (void) const |
Extractor :. | |
const KalFitLayer_Mdc & | layer (void) const |
KalFitWire ** | neighborPtr (void) |
unsigned int | state (void) const |
unsigned | stateAND (const unsigned mask) const |
unsigned int | geoID (void) const |
unsigned int | stereo (void) const |
double | distance (void) const |
returns drift distance | |
double | distance_z (void) const |
returns z_distance from the center of wire by drift distance | |
void | state (const unsigned int i) |
void | stateOR (const unsigned mask) |
void | stateXOR (const unsigned mask) |
void | stateORXOR (const unsigned mask) |
void | sagcoef (void) |
void | ddl (const double d) |
void | ddr (const double d) |
HepPoint3D | fwd (void) const |
Geometry :. | |
HepPoint3D | bck (void) const |
HepPoint3D | xyPosition (void) const |
double | Acoef (void) const |
double | lzx (void) const |
void | chk_left_and_right (void) |
double | x (void) const |
double | y (void) const |
int | z (const Lpav &la, double &z) const |
returns z for track la | |
double | phi (void) const |
double | distance (const double distance) |
set drift distance | |
Private Types | |
NREGION = 3 | |
NLAYER = 50 | |
enum | { NREGION = 3 } |
enum | { NLAYER = 50 } |
Private Member Functions | |
const KalFitWire * | left (void) const |
const KalFitWire * | right (void) const |
const KalFitWire * | innerLeft (KalFitWire *const vtWire) const |
const KalFitWire * | innerRight (KalFitWire *const vtWire) const |
const KalFitWire * | outerLeft (KalFitWire *const vtWire) const |
const KalFitWire * | outerRight (KalFitWire *const vtWire) const |
Private Attributes | |
int | localId_ |
double | A_ |
double | lzx_ |
HepPoint3D | fwd_ |
HepPoint3D | bck_ |
const KalFitLayer_Mdc & | layer_ |
HepPoint3D | xyPosition_ |
unsigned int | state_ |
KalFitWire * | neighbor_ [6] |
unsigned int | geoID_ |
unsigned int | stereo_ |
double | ddl_ |
double | ddr_ |
double | distance_ |
double | x_ |
double | y_ |
double | dx_ |
double | dy_ |
Static Private Attributes | |
static const double | A [NREGION] |
static const double | F [NLAYER] |
Definition at line 46 of file KalFitWire.h.
anonymous enum [private] |
anonymous enum [private] |
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
Definition at line 30 of file KalFitWire.cxx.
References A, A_, bck_, dx_, dy_, F, fwd_, innerLeft(), innerRight(), L49_2, layer_, KalFitLayer_Mdc::layerId(), left(), lzx_, neighbor_, outerLeft(), outerRight(), right(), stereo_, x_, xyPosition_, and y_.
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 | ( | ) |
Definition at line 86 of file KalFitWire.cxx.
References neighbor_.
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 | ) |
double KalFitWire::Acoef | ( | void | ) | const [inline] |
HepPoint3D KalFitWire::bck | ( | void | ) | const [inline] |
Definition at line 93 of file KalFitWire.h.
References bck_.
Referenced by KalFitTrack::chi2_next(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitTrack::getDriftTime(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().
00093 { return bck_; }
void KalFitWire::chk_left_and_right | ( | void | ) |
Definition at line 192 of file KalFitWire.cxx.
References neighbor_, state_, WireHit, and WireHitInvalid.
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] |
void KalFitWire::ddr | ( | const double | d | ) | [inline] |
double KalFitWire::distance | ( | const double | distance | ) | [inline] |
double KalFitWire::distance | ( | void | ) | const [inline] |
returns drift distance
Definition at line 184 of file KalFitWire.h.
References distance_.
00185 { 00186 return distance_; 00187 }
double KalFitWire::distance_z | ( | void | ) | const [inline] |
returns z_distance from the center of wire by drift distance
Definition at line 191 of file KalFitWire.h.
References distance_, layer_, and KalFitLayer_Mdc::tanSlant().
HepPoint3D KalFitWire::fwd | ( | void | ) | const [inline] |
Geometry :.
Definition at line 92 of file KalFitWire.h.
References fwd_.
Referenced by KalFitTrack::chi2_next(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitTrack::getDriftTime(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().
00092 { return fwd_; }
unsigned int KalFitWire::geoID | ( | void | ) | const [inline] |
Definition at line 74 of file KalFitWire.h.
References geoID_.
Referenced by KalFitTrack::chi2_next(), KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitTrack::getDriftTime(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().
00074 { return geoID_; }
const KalFitWire * KalFitWire::innerLeft | ( | KalFitWire *const | vtWire | ) | const [private] |
Definition at line 138 of file KalFitWire.cxx.
References layer_, localId_, KalFitLayer_Mdc::localLayerId(), KalFitSuper_Mdc::nWire(), KalFitLayer_Mdc::offset(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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] |
Definition at line 151 of file KalFitWire.cxx.
References layer_, localId_, KalFitLayer_Mdc::localLayerId(), KalFitSuper_Mdc::localMaxId(), KalFitSuper_Mdc::nWire(), KalFitLayer_Mdc::offset(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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] |
Definition at line 70 of file KalFitWire.h.
References layer_.
Referenced by KalFitTrack::chi2_next(), KalFitAlg::filter_fwd_anal(), KalFitTrack::getDriftDist(), KalFitTrack::getDriftTime(), KalFitTrack::getSigma(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().
00070 { return layer_; }
const KalFitWire * KalFitWire::left | ( | void | ) | const [private] |
Definition at line 124 of file KalFitWire.cxx.
References layer_, localId_, KalFitSuper_Mdc::nWire(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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 :.
Definition at line 69 of file KalFitWire.h.
References localId_.
00069 { return localId_; }
double KalFitWire::lzx | ( | void | ) | const [inline] |
Definition at line 96 of file KalFitWire.h.
References lzx_.
Referenced by KalFitAlg::filter_fwd_anal(), KalFitAlg::filter_fwd_calib(), KalFitAlg::smoother_anal(), and KalFitAlg::smoother_calib().
00096 { return lzx_; }
KalFitWire** KalFitWire::neighborPtr | ( | void | ) | [inline] |
const KalFitWire * KalFitWire::outerLeft | ( | KalFitWire *const | vtWire | ) | const [private] |
Definition at line 165 of file KalFitWire.cxx.
References layer_, KalFitSuper_Mdc::layerMaxId(), localId_, KalFitLayer_Mdc::localLayerId(), KalFitSuper_Mdc::nWire(), KalFitLayer_Mdc::offset(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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] |
Definition at line 177 of file KalFitWire.cxx.
References layer_, KalFitSuper_Mdc::layerMaxId(), localId_, KalFitLayer_Mdc::localLayerId(), KalFitSuper_Mdc::localMaxId(), KalFitSuper_Mdc::nWire(), KalFitLayer_Mdc::offset(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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 [inline] |
Definition at line 177 of file KalFitWire.h.
References layer_, localId_, M_PI, KalFitSuper_Mdc::nWire(), KalFitLayer_Mdc::offset(), and KalFitLayer_Mdc::superLayer().
const KalFitWire * KalFitWire::right | ( | void | ) | const [private] |
Definition at line 130 of file KalFitWire.cxx.
References layer_, localId_, KalFitSuper_Mdc::localMaxId(), KalFitSuper_Mdc::nWire(), and KalFitLayer_Mdc::superLayer().
Referenced by KalFitWire().
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 | ) |
Definition at line 103 of file KalFitWire.cxx.
References A, A_, bck_, F, fwd_, L49_2, layer_, and KalFitLayer_Mdc::layerId().
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] |
unsigned int KalFitWire::state | ( | void | ) | const [inline] |
Definition at line 72 of file KalFitWire.h.
References state_.
Referenced by KalFitSuper_Mdc::clear().
00072 { return state_; }
unsigned KalFitWire::stateAND | ( | const unsigned | mask | ) | const [inline] |
Definition at line 149 of file KalFitWire.h.
References state_.
00150 { 00151 return state_&mask; 00152 }
void KalFitWire::stateOR | ( | const unsigned | mask | ) | [inline] |
void KalFitWire::stateORXOR | ( | const unsigned | mask | ) | [inline] |
void KalFitWire::stateXOR | ( | const unsigned | mask | ) | [inline] |
unsigned int KalFitWire::stereo | ( | void | ) | const [inline] |
double KalFitWire::x | ( | void | ) | const [inline] |
HepPoint3D KalFitWire::xyPosition | ( | void | ) | const [inline] |
double KalFitWire::y | ( | void | ) | const [inline] |
Definition at line 101 of file KalFitWire.h.
References y_.
Referenced by KalFitTrack::chi2_next().
00101 { return y_;}
int KalFitWire::z | ( | const Lpav & | la, | |
double & | z | |||
) | const [inline] |
returns z for track la
Definition at line 205 of file KalFitWire.h.
References Lpar::center(), dx_, dy_, layer_, Lpar::radius(), x_, y_, KalFitLayer_Mdc::zb(), and KalFitLayer_Mdc::zf().
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 }
const double KalFitWire::A [static, private] |
Initial value:
{ 8.5265E-7, 1.1368E-6, 1.2402E-6}
Definition at line 49 of file KalFitWire.h.
Referenced by KalFitWire(), and sagcoef().
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}
Definition at line 51 of file KalFitWire.h.
Referenced by KalFitWire(), and sagcoef().
HepPoint3D KalFitWire::fwd_ [private] |
unsigned int KalFitWire::geoID_ [private] |
const KalFitLayer_Mdc& KalFitWire::layer_ [private] |
Definition at line 125 of file KalFitWire.h.
Referenced by distance_z(), innerLeft(), innerRight(), KalFitWire(), layer(), left(), outerLeft(), outerRight(), phi(), right(), sagcoef(), and z().
int KalFitWire::localId_ [private] |
Definition at line 120 of file KalFitWire.h.
Referenced by innerLeft(), innerRight(), left(), localId(), outerLeft(), outerRight(), phi(), and right().
double KalFitWire::lzx_ [private] |
KalFitWire* KalFitWire::neighbor_[6] [private] |
Definition at line 128 of file KalFitWire.h.
Referenced by chk_left_and_right(), KalFitWire(), and neighborPtr().
unsigned int KalFitWire::state_ [private] |
Definition at line 127 of file KalFitWire.h.
Referenced by chk_left_and_right(), state(), stateAND(), stateOR(), stateORXOR(), and stateXOR().
unsigned int KalFitWire::stereo_ [private] |
double KalFitWire::x_ [private] |
HepPoint3D KalFitWire::xyPosition_ [private] |
double KalFitWire::y_ [private] |