10#ifndef _DEFINE_WIRE_H_
11#define _DEFINE_WIRE_H_
14#define WireHitInvalid 2
15#define WireHitAppended 4
16#define WireHitAppendedorInvalid 6
17#define WireNeighbor0 8
18#define WireNeighbor1 16
19#define WireNeighbor2 32
20#define WireNeighbor3 64
21#define WireNeighbor4 128
22#define WireNeighbor5 256
25#define M_PI 3.14159265358979323846
28#include "KalFitAlg/lpav/Lpav.h"
31#include "CLHEP/Geometry/Point3D.h"
32#ifndef ENABLE_BACKWARDS_COMPATIBILITY
36#include "KalFitAlg/KalFitLayer_Mdc.h"
38 using CLHEP::HepVector;
39 using CLHEP::Hep3Vector;
40 using CLHEP::HepMatrix;
41 using CLHEP::HepSymMatrix;
43 using namespace CLHEP;
49 static const double A[NREGION];
51 static const double F[NLAYER];
69 unsigned int localId(
void)
const {
return localId_; }
72 unsigned int state(
void)
const {
return state_; }
73 unsigned stateAND(
const unsigned mask)
const;
74 unsigned int geoID(
void)
const {
return geoID_; }
75 unsigned int stereo(
void)
const {
return stereo_; }
83 void state(
const unsigned int i) { state_=i; }
84 void stateOR(
const unsigned mask);
88 void ddl(
const double d) { ddl_ = d; }
89 void ddr(
const double d) { ddr_ = d; }
95 double Acoef(
void)
const {
return A_; }
96 double lzx(
void)
const {
return lzx_; }
100 double x(
void)
const {
return x_;}
101 double y(
void)
const {
return y_;}
104 int z(
const Lpav & la,
double &
z)
const;
106 double phi(
void)
const;
130 unsigned int stereo_;
140#ifdef KalFitWire_NO_INLINE
144#define KalFitWire_INLINE_DEFINE_HERE
147#ifdef KalFitWire_INLINE_DEFINE_HERE
172 state_=(state_|mask)^mask;
193 return distance_ * fabs(layer_.
tanSlant());
206 HepVector center = la.
center();
208 double dx2 = center(1) - x_;
209 double dy2 = center(2) - y_;
210 double par1 = dx_*dx_ + dy_*dy_;
211 double par2 = (dx_*dx2 + dy_*dy2)/par1;
212 double par3 = dx_*dy2 - dy_*dx2;
213 double par4 = rho*rho*par1 - par3*par3;
214 if (par4<0.)
return 0;
215 par4 = sqrt(par4)/par1;
216 double delta = par2 + par4;
217 if (delta>=0. && delta<1.){
218 z = layer_.
zb()+delta*(layer_.
zf()-layer_.
zb());
222 if (delta>=0. && delta<1.){
223 z = layer_.
zb()+delta*(layer_.
zf()-layer_.
zb());
HepGeom::Point3D< double > HepPoint3D
const double tanSlant(void) const
returns tangent of slant angle
const double zb(void) const
returns z of backward end-plate
const double zf(void) const
returns z of forward end-plate
const KalFitSuper_Mdc & superLayer(void) const
returns super-layer
const int offset(void) const
returns offset of numbering(local ID)
const int nWire(void) const
returns number of wires
Description of a Wire class.
unsigned int geoID(void) const
~KalFitWire(void)
destructor
double distance_z(void) const
returns z_distance from the center of wire by drift distance
void stateORXOR(const unsigned mask)
double distance(void) const
returns drift distance
HepPoint3D xyPosition(void) const
KalFitWire ** neighborPtr(void)
void stateXOR(const unsigned mask)
void stateOR(const unsigned mask)
void state(const unsigned int i)
unsigned int localId(void) const
Extractor :
HepPoint3D bck(void) const
HepPoint3D fwd(void) const
Geometry :
int z(const Lpav &la, double &z) const
returns z for track la
unsigned stateAND(const unsigned mask) const
void chk_left_and_right(void)
const KalFitLayer_Mdc & layer(void) const
unsigned int state(void) const
unsigned int stereo(void) const