4#define FTWireHitInvalid 2
5#define FTWireHitAppended 4
6#define FTWireHitAppendedOrInvalid 6
7#define FTWireNeighbor0 8
8#define FTWireNeighbor1 16
9#define FTWireNeighbor2 32
10#define FTWireNeighbor3 64
11#define FTWireNeighbor4 128
12#define FTWireNeighbor5 256
13#define FTWireHitSegment 16384
14#define FTWireHitRight 32768
15#define FTWireHitLeft 65536
16#define FTWireHitLinked 131072
17#define FTWireFittingInvalid 0x10000000
18#define FTWireInvalid 0x20000000
19#define FTWireStateMask 0xf0000000
22# define M_PI 3.14159265358979323846
26#include "TrackUtil/Lpav.h"
36 FTWire(
const float x,
const float y,
const float dx,
const float dy,
const int wireId,
48 const float x()
const {
return _x; }
51 const float y()
const {
return _y; }
54 float phi()
const {
return _phi; }
72 float t0()
const {
return _t0; }
78 unsigned state()
const {
return _state; }
81 unsigned stateAND(
const unsigned mask )
const {
return _state & mask; }
84 int z(
const Lpav& la,
double&
z )
const;
87 float time()
const {
return _time; }
90 float getAdc()
const {
return m_adc; }
103 float t0(
const float t0 ) {
return _t0 =
t0; }
106 float pedestal(
const float ped ) {
return _pedestal = ped; }
117 void stateOR(
const unsigned mask ) { _state |= mask; }
120 void stateXOR(
const unsigned mask ) { _state ^= mask; }
123 void stateORXOR(
const unsigned mask ) { _state = ( _state | mask ) ^ mask; }
129 float time(
float t ) {
return _time =
t; }
132 void wireId(
int wireID ) { _wireId = wireID; }
138 void setAdc(
float adc ) { m_adc = adc; }
145 const FTWire* left()
const;
148 const FTWire* right()
const;
151 void getInnerNeighbor();
154 void getOuterNeighbor();
157 void getMidNeighbor();
178 array<FTWire*, 6> _neighbor;
NTuple::Array< double > m_adc
NTuple::Item< double > m_chi2
const int localId() const
returns local ID
void initNeighbor()
initNeighbor
int getWireId()
get wireId
float pedestal(const float ped)
set pedestal at begin-run
int z(const Lpav &la, double &z) const
returns z for track la
float time() const
rerurns TDC time(after t0 subtraction)
unsigned stateAND(const unsigned mask) const
returns state bit
array< FTWire *, 6 > & getNeighbors()
returns pointer of neighbor array
float distance(const float distance)
set drift distance
void chk_left_and_right()
check neighbors of phi-side and raise invalid flag if both hits
FTLayer * layer() const
returns layer
float t0() const
returns t0 read at begin run
void stateORXOR(const unsigned mask)
reset state bit
void setAdc(float adc)
wangdy add:set Adc value
FTWire(const float x, const float y, const float dx, const float dy, const int wireId, FTLayer *layer, const float phi)
constructors
float t0(const float t0)
set t0 at begin-run
float pedestal() const
returns pedestal read at begin run
void wireId(int wireID)
set wireId
float distance_z() const
returns z_distance from the center of wire by drift distance
void stateXOR(const unsigned mask)
invert state bit
void stateOR(const unsigned mask)
set state bit
unsigned state(const unsigned state)
set state
const float x() const
returns position x
void setState(const unsigned state)
set state directly
float distance() const
returns drift distance
unsigned state() const
returns state
float time(float t)
reset time
float phi() const
returns phi
void setChi2(float chi2)
set residual fit chi2
const float y() const
returns position y