CGEM BOSS 6.6.5.f
BESIII Offline Software System
Loading...
Searching...
No Matches
KalFitWire Class Reference

Description of a Wire class. More...

#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_Mdclayer (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
 
 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_Mdclayer (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
 

Detailed Description

Description of a Wire class.

Definition at line 46 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

Constructor & Destructor Documentation

◆ KalFitWire() [1/4]

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.

36 :
37 localId_(localID), fwd_(fwd), bck_(bck), layer_(layer),
38 state_(WireHitInvalid), geoID_(geoID), stereo_(stereo),
39 ddl_(0), ddr_(0), distance_(0) {
40
41 int layer_ID = layer_.layerId();
42 xyPosition_ = 0.5 * (fwd_+bck_);
43 if (!stereo_){
44 dx_ = 0;
45 dy_ = 0;
46 x_ = xyPosition_.x();
47 y_ = xyPosition_.y();
48 } else {
49 dx_ = (double)fwd_.x() - (double)bck_.x();
50 dy_ = (double)fwd_.y() - (double)bck_.y();
51 x_ = bck_.x();
52 y_ = bck_.y();
53 }
54 // Wire sag coeff
55 Hep3Vector wire_;
56 wire_ = (CLHEP::Hep3Vector)fwd - (CLHEP::Hep3Vector)bck;
57 lzx_ = sqrt(wire_.z()*wire_.z()+wire_.x()*wire_.x());
58
59 // problem with layer_ and its id inside sagcoef ?!!
60 // sagcoef();
61 if (layer_ID < 3)
62 A_ = A[0];
63 else {
64 if (layer_ID< 14)
65 A_ = A[1];
66 else if (layer_ID < 50){
67 double f_current(F[layer_ID]);
68 double l(wire_.mag());
69 A_ = A[2]*F[49]*F[49]*L49_2/(f_current*f_current*l*l);
70 } else
71 std::cout << "*** PROBLEM WIRE !!!!! " << std::endl;
72 }
73
74 // Neighbor :
75 neighbor_[0] = (KalFitWire *) innerLeft(vt);
76 neighbor_[1] = (KalFitWire *) innerRight(vt);
77
78 neighbor_[2] = (KalFitWire *) left();
79 neighbor_[3] = (KalFitWire *) right();
80
81 neighbor_[4] = (KalFitWire *) outerLeft(vt);
82 neighbor_[5] = (KalFitWire *) outerRight(vt);
83
84}
const double L49_2
Definition: KalFitWire.cxx:27
const int layerId(void) const
returns layer ID
HepPoint3D fwd(void) const
Geometry :
const KalFitLayer_Mdc & layer(void) const

◆ KalFitWire() [2/4]

KalFitWire::KalFitWire ( )

Definition at line 86 of file KalFitWire.cxx.

86 :
87 localId_(0), fwd_(0,0,0), bck_(0,0,0), layer_(*(KalFitLayer_Mdc *)NULL),
88 state_(WireHitInvalid), x_(0), y_(0), dx_(0), dy_(0)
89{
90 // Neighbor :
91 neighbor_[0] = NULL;
92 neighbor_[1] = NULL;
93 neighbor_[2] = NULL;
94 neighbor_[3] = NULL;
95 neighbor_[4] = NULL;
96 neighbor_[5] = NULL;
97}

◆ ~KalFitWire() [1/2]

KalFitWire::~KalFitWire ( void  )

destructor

Definition at line 100 of file KalFitWire.cxx.

100{}

◆ KalFitWire() [3/4]

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() [4/4]

KalFitWire::KalFitWire ( )

◆ ~KalFitWire() [2/2]

KalFitWire::~KalFitWire ( void  )

destructor

Member Function Documentation

◆ Acoef() [1/2]

double KalFitWire::Acoef ( void  ) const
inline

Definition at line 95 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

95{ return A_; }

◆ Acoef() [2/2]

double KalFitWire::Acoef ( void  ) const
inline

Definition at line 95 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

95{ return A_; }

◆ bck() [1/2]

◆ bck() [2/2]

HepPoint3D KalFitWire::bck ( void  ) const
inline

Definition at line 93 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

93{ return bck_; }

◆ chk_left_and_right() [1/2]

void KalFitWire::chk_left_and_right ( void  )

Definition at line 192 of file KalFitWire.cxx.

192 {
193 if (((**(neighbor_+2)).state_&WireHit)&&
194 ((**(neighbor_+3)).state_&WireHit)){
195 state_ |= WireHitInvalid;
196 (**(neighbor_+2)).state_ |= WireHitInvalid;
197 (**(neighbor_+3)).state_ |= WireHitInvalid;
198 }
199}

◆ chk_left_and_right() [2/2]

void KalFitWire::chk_left_and_right ( void  )

◆ ddl() [1/2]

void KalFitWire::ddl ( const double  d)
inline

Definition at line 88 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

88{ ddl_ = d; }

◆ ddl() [2/2]

void KalFitWire::ddl ( const double  d)
inline

Definition at line 88 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

88{ ddl_ = d; }

◆ ddr() [1/2]

void KalFitWire::ddr ( const double  d)
inline

Definition at line 89 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

89{ ddr_ = d; }

◆ ddr() [2/2]

void KalFitWire::ddr ( const double  d)
inline

Definition at line 89 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

89{ ddr_ = d; }

◆ distance() [1/4]

double KalFitWire::distance ( const double  distance)
inline

set drift distance

Definition at line 198 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

199{
200 return distance_ = distance;
201}
double distance(void) const
returns drift distance

◆ distance() [2/4]

double KalFitWire::distance ( const double  distance)

set drift distance

◆ distance() [3/4]

double KalFitWire::distance ( void  ) const
inline

returns drift distance

Definition at line 184 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

185{
186 return distance_;
187}

Referenced by distance().

◆ distance() [4/4]

double KalFitWire::distance ( void  ) const

returns drift distance

◆ distance_z() [1/2]

double KalFitWire::distance_z ( void  ) const
inline

returns z_distance from the center of wire by drift distance

Definition at line 191 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

192{
193 return distance_ * fabs(layer_.tanSlant());
194}
const double tanSlant(void) const
returns tangent of slant angle

◆ distance_z() [2/2]

double KalFitWire::distance_z ( void  ) const

returns z_distance from the center of wire by drift distance

◆ fwd() [1/2]

◆ fwd() [2/2]

HepPoint3D KalFitWire::fwd ( void  ) const
inline

Geometry :

Definition at line 92 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

92{ return fwd_; }

◆ geoID() [1/2]

◆ geoID() [2/2]

unsigned int KalFitWire::geoID ( void  ) const
inline

Definition at line 74 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

74{ return geoID_; }

◆ layer() [1/2]

◆ layer() [2/2]

const KalFitLayer_Mdc & KalFitWire::layer ( void  ) const
inline

Definition at line 70 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

70{ return layer_; }

◆ localId() [1/2]

unsigned int KalFitWire::localId ( void  ) const
inline

Extractor :

Definition at line 69 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

69{ return localId_; }

Referenced by KalFitAlg::filter_fwd_calib().

◆ localId() [2/2]

unsigned int KalFitWire::localId ( void  ) const
inline

Extractor :

Definition at line 69 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

69{ return localId_; }

◆ lzx() [1/2]

double KalFitWire::lzx ( void  ) const
inline

◆ lzx() [2/2]

double KalFitWire::lzx ( void  ) const
inline

Definition at line 96 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

96{ return lzx_; }

◆ neighborPtr() [1/2]

KalFitWire ** KalFitWire::neighborPtr ( void  )
inline

Definition at line 71 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

71{return neighbor_;}

◆ neighborPtr() [2/2]

KalFitWire ** KalFitWire::neighborPtr ( void  )
inline

Definition at line 71 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

71{return neighbor_;}

◆ phi() [1/2]

double KalFitWire::phi ( void  ) const
inline

Definition at line 177 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

178{
179 return M_PI*(layer_.offset()+2*localId_)/(double)layer_.superLayer().nWire();
180}
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

◆ phi() [2/2]

double KalFitWire::phi ( void  ) const

◆ sagcoef() [1/2]

void KalFitWire::sagcoef ( void  )

Definition at line 103 of file KalFitWire.cxx.

103 {
104
105 Hep3Vector wire_;
106 wire_ =(CLHEP::Hep3Vector)fwd_ - (CLHEP::Hep3Vector)bck_;
107 int layer_ID = layer_.layerId();
108
109 if (layer_ID < 3){
110 A_ = A[0];
111 } else {
112 if (layer_ID< 14){
113 A_ = A[1];
114 } else if (layer_ID < 50){
115 double f_current(F[layer_ID]);
116 double l(wire_.mag());
117 A_ = A[2]*F[49]*F[49]*L49_2/(f_current*f_current*l*l);
118 } else {
119 std::cout << "*** PROBLEM WIRE !!!!! " << std::endl;
120 }
121 }
122}

◆ sagcoef() [2/2]

void KalFitWire::sagcoef ( void  )

◆ state() [1/4]

void KalFitWire::state ( const unsigned int  i)
inline

Definition at line 83 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

83{ state_=i; }

◆ state() [2/4]

void KalFitWire::state ( const unsigned int  i)
inline

Definition at line 83 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

83{ state_=i; }

◆ state() [3/4]

unsigned int KalFitWire::state ( void  ) const
inline

Definition at line 72 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

72{ return state_; }

Referenced by KalFitSuper_Mdc::clear().

◆ state() [4/4]

unsigned int KalFitWire::state ( void  ) const
inline

Definition at line 72 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

72{ return state_; }

◆ stateAND() [1/2]

unsigned KalFitWire::stateAND ( const unsigned  mask) const
inline

Definition at line 149 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

150{
151 return state_&mask;
152}

◆ stateAND() [2/2]

unsigned KalFitWire::stateAND ( const unsigned  mask) const

◆ stateOR() [1/2]

void KalFitWire::stateOR ( const unsigned  mask)
inline

Definition at line 156 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

157{
158 state_|=mask;
159}

◆ stateOR() [2/2]

void KalFitWire::stateOR ( const unsigned  mask)

◆ stateORXOR() [1/2]

void KalFitWire::stateORXOR ( const unsigned  mask)
inline

Definition at line 170 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

171{
172 state_=(state_|mask)^mask;
173}

◆ stateORXOR() [2/2]

void KalFitWire::stateORXOR ( const unsigned  mask)

◆ stateXOR() [1/2]

void KalFitWire::stateXOR ( const unsigned  mask)
inline

Definition at line 163 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

164{
165 state_^=mask;
166}

◆ stateXOR() [2/2]

void KalFitWire::stateXOR ( const unsigned  mask)

◆ stereo() [1/2]

unsigned int KalFitWire::stereo ( void  ) const
inline

Definition at line 75 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

75{ return stereo_; }

Referenced by KalFitAlg::filter_fwd_calib(), and KalFitAlg::start_seed().

◆ stereo() [2/2]

unsigned int KalFitWire::stereo ( void  ) const
inline

Definition at line 75 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

75{ return stereo_; }

◆ x() [1/2]

double KalFitWire::x ( void  ) const
inline

Definition at line 100 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

100{ return x_;}

◆ x() [2/2]

double KalFitWire::x ( void  ) const
inline

Definition at line 100 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

100{ return x_;}

◆ xyPosition() [1/2]

HepPoint3D KalFitWire::xyPosition ( void  ) const
inline

Definition at line 94 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

94{ return xyPosition_; }

◆ xyPosition() [2/2]

HepPoint3D KalFitWire::xyPosition ( void  ) const
inline

Definition at line 94 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

94{ return xyPosition_; }

◆ y() [1/2]

double KalFitWire::y ( void  ) const
inline

Definition at line 101 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

101{ return y_;}

Referenced by KalFitTrack::chi2_next().

◆ y() [2/2]

double KalFitWire::y ( void  ) const
inline

Definition at line 101 of file Reconstruction/KalFitAlg/KalFitAlg-00-15-08/KalFitAlg/KalFitWire.h.

101{ return y_;}

◆ z() [1/2]

int KalFitWire::z ( const Lpav la,
double &  z 
) const
inline

returns z for track la

Definition at line 205 of file InstallArea/include/KalFitAlg/KalFitAlg/KalFitWire.h.

205 {
206 HepVector center = la.center();
207 double rho = la.radius();
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());
219 return 1;
220 }else{
221 delta = par2 - par4;
222 if (delta>=0. && delta<1.){
223 z = layer_.zb()+delta*(layer_.zf()-layer_.zb());
224 return 1;
225 }
226 }
227 return 0;
228}
const double zb(void) const
returns z of backward end-plate
const double zf(void) const
returns z of forward end-plate
int z(const Lpav &la, double &z) const
returns z for track la

Referenced by z().

◆ z() [2/2]

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

returns z for track la


The documentation for this class was generated from the following files: