BOSS 7.0.6
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
 

Detailed Description

Description of a Wire class.

Definition at line 46 of file KalFitWire.h.

Constructor & Destructor Documentation

◆ KalFitWire() [1/2]

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
#define WireHitInvalid
Definition: KalFitWire.h:14
const int layerId(void) const
returns layer ID
Description of a Wire class.
Definition: KalFitWire.h:46
unsigned int geoID(void) const
Definition: KalFitWire.h:74
HepPoint3D bck(void) const
Definition: KalFitWire.h:93
HepPoint3D fwd(void) const
Geometry :
Definition: KalFitWire.h:92
const KalFitLayer_Mdc & layer(void) const
Definition: KalFitWire.h:70
unsigned int stereo(void) const
Definition: KalFitWire.h:75

◆ KalFitWire() [2/2]

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()

KalFitWire::~KalFitWire ( void  )

destructor

Definition at line 100 of file KalFitWire.cxx.

100{}

Member Function Documentation

◆ Acoef()

double KalFitWire::Acoef ( void  ) const
inline

Definition at line 95 of file KalFitWire.h.

95{ return A_; }

◆ bck()

◆ chk_left_and_right()

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}
#define WireHit
Definition: KalFitWire.h:13

◆ ddl()

void KalFitWire::ddl ( const double  d)
inline

Definition at line 88 of file KalFitWire.h.

88{ ddl_ = d; }

◆ ddr()

void KalFitWire::ddr ( const double  d)
inline

Definition at line 89 of file KalFitWire.h.

89{ ddr_ = d; }

◆ distance() [1/2]

double KalFitWire::distance ( const double  distance)
inline

set drift distance

Definition at line 198 of file KalFitWire.h.

199{
200 return distance_ = distance;
201}
double distance(void) const
returns drift distance
Definition: KalFitWire.h:184

◆ distance() [2/2]

double KalFitWire::distance ( void  ) const
inline

returns drift distance

Definition at line 184 of file KalFitWire.h.

185{
186 return distance_;
187}

Referenced by distance().

◆ distance_z()

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.

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

◆ fwd()

HepPoint3D KalFitWire::fwd ( void  ) const
inline

◆ geoID()

◆ layer()

◆ localId()

unsigned int KalFitWire::localId ( void  ) const
inline

Extractor :

Definition at line 69 of file KalFitWire.h.

69{ return localId_; }

Referenced by KalFitAlg::filter_fwd_calib().

◆ lzx()

double KalFitWire::lzx ( void  ) const
inline

◆ neighborPtr()

KalFitWire ** KalFitWire::neighborPtr ( void  )
inline

Definition at line 71 of file KalFitWire.h.

71{return neighbor_;}

◆ phi()

double KalFitWire::phi ( void  ) const
inline

Definition at line 177 of file KalFitWire.h.

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

◆ sagcoef()

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}

◆ state() [1/2]

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

Definition at line 83 of file KalFitWire.h.

83{ state_=i; }

◆ state() [2/2]

unsigned int KalFitWire::state ( void  ) const
inline

Definition at line 72 of file KalFitWire.h.

72{ return state_; }

Referenced by KalFitSuper_Mdc::clear().

◆ stateAND()

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

Definition at line 149 of file KalFitWire.h.

150{
151 return state_&mask;
152}

◆ stateOR()

void KalFitWire::stateOR ( const unsigned  mask)
inline

Definition at line 156 of file KalFitWire.h.

157{
158 state_|=mask;
159}

◆ stateORXOR()

void KalFitWire::stateORXOR ( const unsigned  mask)
inline

Definition at line 170 of file KalFitWire.h.

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

◆ stateXOR()

void KalFitWire::stateXOR ( const unsigned  mask)
inline

Definition at line 163 of file KalFitWire.h.

164{
165 state_^=mask;
166}

◆ stereo()

unsigned int KalFitWire::stereo ( void  ) const
inline

Definition at line 75 of file KalFitWire.h.

75{ return stereo_; }

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

◆ x()

double KalFitWire::x ( void  ) const
inline

Definition at line 100 of file KalFitWire.h.

100{ return x_;}

◆ xyPosition()

HepPoint3D KalFitWire::xyPosition ( void  ) const
inline

Definition at line 94 of file KalFitWire.h.

94{ return xyPosition_; }

◆ y()

double KalFitWire::y ( void  ) const
inline

Definition at line 101 of file KalFitWire.h.

101{ return y_;}

Referenced by KalFitTrack::chi2_next().

◆ z()

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

returns z for track la

Definition at line 205 of file 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 delta
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
Definition: KalFitWire.h:205

Referenced by z().


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