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

#include <FTWire.h>

Public Member Functions

 FTWire (const float x, const float y, const float dx, const float dy, const FTLayer &, const int localID, FTWire *const vt)
 constructors
 
 FTWire ()
 
 ~FTWire ()
 destructor
 
void initNeighbor (void)
 initNeighbor
 
const float x (void) const
 returns position x
 
const float y (void) const
 returns position y
 
float phi (void) const
 returns phi
 
const int localId (void) const
 returns local ID
 
const FTLayerlayer (void) const
 returns layer
 
FTWire ** neighborPtr (void)
 returns pointer of neighbor array
 
float distance (void) const
 returns drift distance
 
float distance_z (void) const
 returns z_distance from the center of wire by drift distance
 
float t0 (void) const
 returns t0 read at begin run
 
float pedestal (void) const
 returns pedestal read at begin run
 
unsigned state (void) const
 returns state
 
unsigned stateAND (const unsigned mask) const
 returns state bit
 
int z (const Lpav &la, double &z) const
 returns z for track la
 
float time (void) const
 rerurns TDC time(after t0 subtraction)
 
float getAdc (void) const
 
float getChi2 (void) const
 
void clear (void)
 clear
 
float distance (const float distance)
 set drift distance
 
float t0 (const float t0)
 set t0 at begin-run
 
float pedestal (const float ped)
 set pedestal at begin-run
 
unsigned state (const unsigned state)
 set state
 
void stateOR (const unsigned mask)
 set state bit
 
void stateXOR (const unsigned mask)
 invert state bit
 
void stateORXOR (const unsigned mask)
 reset state bit
 
void chk_left_and_right (void)
 check neighbors of phi-side and raise invalid flag if both hits
 
float time (float t)
 reset time
 
void wireId (int wireID)
 set wireId
 
int getWireId (void)
 get wireId
 
void setAdc (float adc)
 wangdy add:set Adc value
 
void setChi2 (float chi2)
 set residual fit chi2
 
 FTWire (const float x, const float y, const float dx, const float dy, const FTLayer &, const int localID, FTWire *const vt)
 constructors
 
 FTWire ()
 
 ~FTWire ()
 destructor
 
void initNeighbor (void)
 initNeighbor
 
const float x (void) const
 returns position x
 
const float y (void) const
 returns position y
 
float phi (void) const
 returns phi
 
const int localId (void) const
 returns local ID
 
const FTLayerlayer (void) const
 returns layer
 
FTWire ** neighborPtr (void)
 returns pointer of neighbor array
 
float distance (void) const
 returns drift distance
 
float distance_z (void) const
 returns z_distance from the center of wire by drift distance
 
float t0 (void) const
 returns t0 read at begin run
 
float pedestal (void) const
 returns pedestal read at begin run
 
unsigned state (void) const
 returns state
 
unsigned stateAND (const unsigned mask) const
 returns state bit
 
int z (const Lpav &la, double &z) const
 returns z for track la
 
float time (void) const
 rerurns TDC time(after t0 subtraction)
 
float getAdc (void) const
 
float getChi2 (void) const
 
void clear (void)
 clear
 
float distance (const float distance)
 set drift distance
 
float t0 (const float t0)
 set t0 at begin-run
 
float pedestal (const float ped)
 set pedestal at begin-run
 
unsigned state (const unsigned state)
 set state
 
void stateOR (const unsigned mask)
 set state bit
 
void stateXOR (const unsigned mask)
 invert state bit
 
void stateORXOR (const unsigned mask)
 reset state bit
 
void chk_left_and_right (void)
 check neighbors of phi-side and raise invalid flag if both hits
 
float time (float t)
 reset time
 
void wireId (int wireID)
 set wireId
 
int getWireId (void)
 get wireId
 
void setAdc (float adc)
 wangdy add:set Adc value
 
void setChi2 (float chi2)
 set residual fit chi2
 

Detailed Description

Constructor & Destructor Documentation

◆ FTWire() [1/4]

FTWire::FTWire ( const float  x,
const float  y,
const float  dx,
const float  dy,
const FTLayer layer,
const int  localID,
FTWire *const  vt 
)
inline

constructors

Definition at line 199 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

202 : _x(x), // x position in z = 0;
203 _y(y), // y position in z = 0;
204 _dx(dx),
205 _dy(dy),
206 _layer(layer),
207 _wire(vt),
208 _localId(localID),
209 _phi((const float)2*M_PI*_localId/(float)_layer.NWire()+_layer.offset()),
210 //_wireId(wireID),
211 //_hep(NULL),
212 _distance(0),
213 _t0(0),
214 _time(0),
215 m_adc(0),
216 _pedestal(0),
217 _state(FTWireHitInvalid)
218{
219 getMidNeighbor();
220}
const int NWire(void) const
returns the number of wire
const float offset(void) const
returns offset of numbering(local ID)
const float y(void) const
returns position y
const FTLayer & layer(void) const
returns layer
const float x(void) const
returns position x

◆ FTWire() [2/4]

FTWire::FTWire ( )
inline

Definition at line 223 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

224 : _x(0),
225 _y(0),
226 _dx(0),
227 _dy(0),
228 _layer(*(FTLayer *)NULL),
229 _wire(NULL),
230 _localId(0),
231 //_wireId(0),
232 _phi(0),
233 _distance(0),
234 _t0(0),
235 _time(0),
236 m_adc(0),
237 _pedestal(0),
238 _state(FTWireHitInvalid)
239{
240 _neighbor[0] = NULL;
241 _neighbor[1] = NULL;
242 _neighbor[2] = NULL;
243 _neighbor[3] = NULL;
244 _neighbor[4] = NULL;
245 _neighbor[5] = NULL;
246}

◆ ~FTWire() [1/2]

FTWire::~FTWire ( )
inline

destructor

Definition at line 249 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

250{
251}

◆ FTWire() [3/4]

FTWire::FTWire ( const float  x,
const float  y,
const float  dx,
const float  dy,
const FTLayer ,
const int  localID,
FTWire *const  vt 
)

constructors

◆ FTWire() [4/4]

FTWire::FTWire ( )

◆ ~FTWire() [2/2]

FTWire::~FTWire ( )

destructor

Member Function Documentation

◆ chk_left_and_right() [1/2]

void FTWire::chk_left_and_right ( void  )
inline

check neighbors of phi-side and raise invalid flag if both hits

Definition at line 552 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

552 {
553 if (((**(_neighbor+2))._state&FTWireHit) &&
554 ((**(_neighbor+3))._state&FTWireHit)){
555 _state |= FTWireHitInvalid;
556 (**(_neighbor+2))._state |= FTWireHitInvalid;
557 (**(_neighbor+3))._state |= FTWireHitInvalid;
558 }
559}

◆ chk_left_and_right() [2/2]

void FTWire::chk_left_and_right ( void  )

check neighbors of phi-side and raise invalid flag if both hits

◆ clear() [1/2]

void FTWire::clear ( void  )
inline

clear

Definition at line 347 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

348{
349 _distance = 0.;
350 _time = 0.;
351 _t0 = 0.;
352 m_adc = 0.0;
353 _pedestal = 0.;
354 _state = FTWireHitInvalid;
355}

◆ clear() [2/2]

void FTWire::clear ( void  )

clear

◆ distance() [1/4]

float FTWire::distance ( const float  distance)
inline

set drift distance

Definition at line 415 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

416{
417 return _distance = distance;
418}
float distance(void) const
returns drift distance

◆ distance() [2/4]

float FTWire::distance ( const float  distance)

set drift distance

◆ distance() [3/4]

float FTWire::distance ( void  ) const
inline

◆ distance() [4/4]

float FTWire::distance ( void  ) const

returns drift distance

◆ distance_z() [1/2]

float FTWire::distance_z ( void  ) const
inline

returns z_distance from the center of wire by drift distance

Definition at line 408 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

409{
410 return _distance * std::fabs(_layer.tanSlant());
411}
const float tanSlant(void) const
returns tangent of slant angle

◆ distance_z() [2/2]

float FTWire::distance_z ( void  ) const

returns z_distance from the center of wire by drift distance

◆ getAdc() [1/2]

float FTWire::getAdc ( void  ) const
inline

Definition at line 591 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

591 {
592 return m_adc;
593}

◆ getAdc() [2/2]

float FTWire::getAdc ( void  ) const

◆ getChi2() [1/2]

float FTWire::getChi2 ( void  ) const
inline

Definition at line 600 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

600 {
601 return m_chi2;
602}

◆ getChi2() [2/2]

float FTWire::getChi2 ( void  ) const

◆ getWireId() [1/2]

int FTWire::getWireId ( void  )
inline

get wireId

Definition at line 585 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

585 {
586 return _wireId;
587}

◆ getWireId() [2/2]

int FTWire::getWireId ( void  )

get wireId

◆ initNeighbor() [1/2]

void FTWire::initNeighbor ( void  )
inline

initNeighbor

Definition at line 255 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

256{
257 getInnerNeighbor(_wire);
258 getOuterNeighbor(_wire);
259 /*cout << "_layer.layerId()::" << _layer.layerId() << endl;
260 cout << "The WireId ::" << _localId << endl;
261 cout << "Its neighbor 0 ::" << _neighbor[0]->localId() << endl;
262 cout << "Its neighbor 1 ::" << _neighbor[1]->localId() << endl;
263 cout << "Its neighbor 2 ::" << _neighbor[2]->localId() << endl;
264 cout << "Its neighbor 3 ::" << _neighbor[3]->localId() << endl;
265 cout << "Its neighbor 4 ::" << _neighbor[4]->localId() << endl;
266 cout << "Its neighbor 5 ::" << _neighbor[5]->localId() << endl;*/
267}

Referenced by FTFinder::begin_run().

◆ initNeighbor() [2/2]

void FTWire::initNeighbor ( void  )

initNeighbor

◆ layer() [1/2]

◆ layer() [2/2]

const FTLayer & FTWire::layer ( void  ) const

returns layer

◆ localId() [1/2]

const int FTWire::localId ( void  ) const
inline

returns local ID

Definition at line 380 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

381{
382 return _localId;
383}

Referenced by FTSuperLayer::reduce_noise().

◆ localId() [2/2]

const int FTWire::localId ( void  ) const

returns local ID

◆ neighborPtr() [1/2]

FTWire ** FTWire::neighborPtr ( void  )
inline

returns pointer of neighbor array

Definition at line 387 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

388{
389 return _neighbor;
390}

◆ neighborPtr() [2/2]

FTWire ** FTWire::neighborPtr ( void  )

returns pointer of neighbor array

◆ pedestal() [1/4]

float FTWire::pedestal ( const float  ped)
inline

set pedestal at begin-run

Definition at line 443 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

444{
445 return _pedestal = ped;
446}

◆ pedestal() [2/4]

float FTWire::pedestal ( const float  ped)

set pedestal at begin-run

◆ pedestal() [3/4]

float FTWire::pedestal ( void  ) const
inline

returns pedestal read at begin run

Definition at line 436 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

437{
438 return _pedestal;
439}

◆ pedestal() [4/4]

float FTWire::pedestal ( void  ) const

returns pedestal read at begin run

◆ phi() [1/2]

float FTWire::phi ( void  ) const
inline

returns phi

Definition at line 394 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

395{
396 return _phi;
397}

Referenced by FTSegment::printout(), and FTSuperLayer::reduce_noise().

◆ phi() [2/2]

float FTWire::phi ( void  ) const

returns phi

◆ setAdc() [1/2]

void FTWire::setAdc ( float  adc)
inline

wangdy add:set Adc value

Definition at line 595 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

595 {
596 m_adc = adc;
597}

◆ setAdc() [2/2]

void FTWire::setAdc ( float  adc)

wangdy add:set Adc value

◆ setChi2() [1/2]

void FTWire::setChi2 ( float  chi2)
inline

set residual fit chi2

Definition at line 604 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

604 {
605 m_chi2 = chi2;
606}

Referenced by FTTrack::r_phi4Fit(), and FTTrack::r_phiReFit().

◆ setChi2() [2/2]

void FTWire::setChi2 ( float  chi2)

set residual fit chi2

◆ state() [1/4]

unsigned FTWire::state ( const unsigned  state)
inline

set state

Definition at line 487 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

488{
489 return _state = (_state&FTWireStateMask)|state;
490}
unsigned state(void) const
returns state

◆ state() [2/4]

unsigned FTWire::state ( const unsigned  state)

set state

◆ state() [3/4]

unsigned FTWire::state ( void  ) const
inline

returns state

Definition at line 480 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

481{
482 return _state;
483}

Referenced by FTSuperLayer::clear(), and state().

◆ state() [4/4]

unsigned FTWire::state ( void  ) const

returns state

◆ stateAND() [1/2]

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

returns state bit

Definition at line 494 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

495{
496 return _state&mask;
497}

Referenced by FTTrack::r_phiFit().

◆ stateAND() [2/2]

unsigned FTWire::stateAND ( const unsigned  mask) const

returns state bit

◆ stateOR() [1/2]

void FTWire::stateOR ( const unsigned  mask)
inline

◆ stateOR() [2/2]

void FTWire::stateOR ( const unsigned  mask)

set state bit

◆ stateORXOR() [1/2]

void FTWire::stateORXOR ( const unsigned  mask)
inline

reset state bit

Definition at line 515 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

516{
517 _state=(_state|mask)^mask;
518}

◆ stateORXOR() [2/2]

void FTWire::stateORXOR ( const unsigned  mask)

reset state bit

◆ stateXOR() [1/2]

void FTWire::stateXOR ( const unsigned  mask)
inline

invert state bit

Definition at line 508 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

509{
510 _state^=mask;
511}

◆ stateXOR() [2/2]

void FTWire::stateXOR ( const unsigned  mask)

invert state bit

◆ t0() [1/4]

float FTWire::t0 ( const float  t0)
inline

set t0 at begin-run

Definition at line 429 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

430{
431 return _t0 = t0;
432}
float t0(void) const
returns t0 read at begin run

◆ t0() [2/4]

float FTWire::t0 ( const float  t0)

set t0 at begin-run

◆ t0() [3/4]

float FTWire::t0 ( void  ) const
inline

returns t0 read at begin run

Definition at line 422 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

423{
424 return _t0;
425}

Referenced by t0().

◆ t0() [4/4]

float FTWire::t0 ( void  ) const

returns t0 read at begin run

◆ time() [1/4]

float FTWire::time ( float  t)
inline

reset time

Definition at line 450 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

451{
452 return _time = t;
453}
int t()
Definition: t.c:1

◆ time() [2/4]

float FTWire::time ( float  t)

reset time

◆ time() [3/4]

float FTWire::time ( void  ) const
inline

◆ time() [4/4]

float FTWire::time ( void  ) const

◆ wireId() [1/2]

void FTWire::wireId ( int  wireID)
inline

set wireId

Definition at line 580 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

580 {
581 _wireId = wireID;
582}

◆ wireId() [2/2]

void FTWire::wireId ( int  wireID)

set wireId

◆ x() [1/2]

const float FTWire::x ( void  ) const
inline

◆ x() [2/2]

const float FTWire::x ( void  ) const

returns position x

◆ y() [1/2]

const float FTWire::y ( void  ) const
inline

◆ y() [2/2]

const float FTWire::y ( void  ) const

returns position y

◆ z() [1/2]

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

returns z for track la

Definition at line 522 of file InstallArea/include/MdcFastTrkAlg/MdcFastTrkAlg/FTWire.h.

522 {
523 HepVector center = la.center();
524 double rho = la.radius();
525 double dx2 = center(1) - _x;
526 double dy2 = center(2) - _y;
527 double par1 = _dx*_dx + _dy*_dy;
528 double par2 = (_dx*dx2 + _dy*dy2)/par1;
529 double par3 = _dx*dy2 - _dy*dx2;
530 double par4 = rho*rho*par1 - par3*par3;
531 if (par4<0.) return 0;
532 par4 = std::sqrt(par4)/par1;
533 double delta = par2 + par4;
534 //double delta = 0.5;
535 if (delta>=0. && delta<1.){
536 //z = _layer.zb()+delta*(_layer.zf()-_layer.zb());
537 z = _layer.zf()+delta*(_layer.zb()-_layer.zf());
538 return 1;
539 }else{
540 delta = par2 - par4;
541 if (delta>=0. && delta<1.){
542 //z = _layer.zb()+delta*(_layer.zf()-_layer.zb());
543 z = _layer.zf()+delta*(_layer.zb()-_layer.zf());
544 return 1;
545 }
546 }
547 return 0;
548}
const float zf(void) const
returns z of forward end-plate
const float zb(void) const
returns z of backward end-plate
int z(const Lpav &la, double &z) const
returns z for track la

Referenced by FTTrack::s_zFit(), and z().

◆ z() [2/2]

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

returns z for track la


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