10#include "CLHEP/Geometry/Point3D.h"
11#ifndef ENABLE_BACKWARDS_COMPATIBILITY
14#include "KalFitAlg/KalFitLayer_Mdc.h"
15#include "KalFitAlg/KalFitSuper_Mdc.h"
16#include "KalFitAlg/KalFitWire.h"
18const double KalFitWire::A[NREGION] = { 8.5265E-7, 1.1368E-6, 1.2402E-6 };
19const double KalFitWire::F[
NLAYER] = {
20 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
21 0, 47.2, 46.6, 47.0, 46, 45, 46.7, 46, 45, 44.6, 45.9, 45.9, 45.3,
22 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,
23 42.2, 41, 42, 42, 42, 41.4, 42.5, 43.0, 43.2, 43.4, 43.4 };
24const double L49_2 = 220.4 * 220.4;
41 int layer_ID = layer_.layerId();
42 xyPosition_ = 0.5 * ( fwd_ + bck_ );
52 dx_ = (double)fwd_.x() - (double)bck_.x();
53 dy_ = (double)fwd_.y() - (double)bck_.y();
59 wire_ = (CLHEP::Hep3Vector)
fwd - (CLHEP::Hep3Vector)
bck;
60 lzx_ = sqrt( wire_.z() * wire_.z() + wire_.x() * wire_.x() );
64 if ( layer_ID < 3 ) A_ = A[0];
67 if ( layer_ID < 14 ) A_ = A[1];
68 else if ( layer_ID < 50 )
70 double f_current( F[layer_ID] );
71 double l( wire_.mag() );
72 A_ = A[2] * F[49] * F[49] *
L49_2 / ( f_current * f_current * l * l );
74 else std::cout <<
"*** PROBLEM WIRE !!!!! " << std::endl;
114 wire_ = (CLHEP::Hep3Vector)fwd_ - (CLHEP::Hep3Vector)bck_;
115 int layer_ID = layer_.layerId();
117 if ( layer_ID < 3 ) { A_ = A[0]; }
120 if ( layer_ID < 14 ) { A_ = A[1]; }
121 else if ( layer_ID < 50 )
123 double f_current( F[layer_ID] );
124 double l( wire_.mag() );
125 A_ = A[2] * F[49] * F[49] *
L49_2 / ( f_current * f_current * l * l );
127 else { std::cout <<
"*** PROBLEM WIRE !!!!! " << std::endl; }
131const KalFitWire* KalFitWire::left(
void )
const {
137const KalFitWire* KalFitWire::right(
void )
const {
139 if ( localId_ == layer_.superLayer().localMaxId() ) { tmp -= layer_.superLayer().nWire(); }
145 if ( !layer_.localLayerId() )
return vtWire;
147 if ( layer_.offset() & 1 ) { tmp -= layer_.superLayer().nWire(); }
150 if ( localId_ ) tmp -= layer_.superLayer().nWire();
157 if ( !layer_.localLayerId() )
return vtWire;
159 if ( layer_.offset() & 1 )
161 if ( localId_ == layer_.superLayer().localMaxId() ) { tmp -= layer_.superLayer().nWire(); }
162 tmp -= ( layer_.superLayer().nWire() - 1 );
164 else { tmp -= layer_.superLayer().nWire(); }
169 if ( layer_.localLayerId() == layer_.superLayer().layerMaxId() )
return vtWire;
171 if ( layer_.offset() & 1 ) { tmp += layer_.superLayer().nWire(); }
174 if ( !localId_ ) tmp += layer_.superLayer().nWire();
175 tmp += ( layer_.superLayer().nWire() - 1 );
181 if ( layer_.localLayerId() == layer_.superLayer().layerMaxId() )
return vtWire;
183 if ( layer_.offset() & 1 )
185 if ( localId_ ^ layer_.superLayer().localMaxId() ) { tmp += layer_.superLayer().nWire(); }
188 else { tmp += layer_.superLayer().nWire(); }
194 if ( ( ( **( neighbor_ + 2 ) ).state_ &
WireHit ) &&
195 ( ( **( neighbor_ + 3 ) ).state_ &
WireHit ) )
HepGeom::Point3D< double > HepPoint3D
HepGeom::Point3D< double > HepPoint3D
const KalFitSuper_Mdc & superLayer(void) const
returns super-layer
const int nWire(void) const
returns number of wires
Description of a Wire class.
unsigned int geoID(void) const
~KalFitWire(void)
destructor
KalFitWire(const int localID, const KalFitLayer_Mdc &layer, const HepPoint3D &fwd, const HepPoint3D &bck, KalFitWire *const vt, unsigned int geoID, unsigned int stereo)
constructor
HepPoint3D bck(void) const
HepPoint3D fwd(void) const
Geometry :
void chk_left_and_right(void)
const KalFitLayer_Mdc & layer(void) const
unsigned int stereo(void) const