CGEM BOSS 6.6.5.g
BESIII Offline Software System
Loading...
Searching...
No Matches
TofHitStatus Class Reference

#include <TofHitStatus.h>

Public Member Functions

 TofHitStatus ()
 
virtual ~TofHitStatus ()
 
void init ()
 
TofHitStatusoperator= (const DstTofTrack &source)
 
TofHitStatusoperator= (const TofHitStatus &source)
 
unsigned int value () const
 
bool is_raw () const
 
bool is_readout () const
 
bool is_counter () const
 
bool is_cluster () const
 
bool is_barrel () const
 
bool is_east () const
 
unsigned int layer () const
 
bool is_overflow () const
 
bool is_multihit () const
 
unsigned int ncounter () const
 
unsigned int neast () const
 
unsigned int nwest () const
 
void setStatus (unsigned int status)
 
void setRaw (bool raw)
 
void setReadout (bool readout)
 
void setCounter (bool counter)
 
void setCluster (bool cluster)
 
void setBarrel (bool barrel)
 
void setEast (bool east)
 
void setLayer (unsigned int layer)
 
void setOverflow (bool overflow)
 
void setMultihit (bool multihit)
 
void setNCounter (unsigned int ncounter)
 
void setNEast (unsigned int neast)
 
void setNWest (unsigned int nwest)
 
void setBarrelCluster (unsigned int layer)
 
void setBarrelCounter (unsigned int layer)
 
void setBarrelReadout (unsigned int layer, bool east)
 
void setBarrelRaw (unsigned int layer, bool east)
 
void setEndcapCluster (bool east)
 
void setEndcapRaw (bool east)
 
void setNoHit ()
 

Static Public Member Functions

static bool is_raw (unsigned int status)
 
static bool is_readout (unsigned int status)
 
static bool is_counter (unsigned int status)
 
static bool is_cluster (unsigned int status)
 
static bool is_barrel (unsigned int status)
 
static bool is_east (unsigned int status)
 
static unsigned int layer (unsigned int status)
 
static bool is_overflow (unsigned int status)
 
static bool is_multihit (unsigned int status)
 
static unsigned int ncounter (unsigned int status)
 
static unsigned int neast (unsigned int status)
 
static unsigned int nwest (unsigned int status)
 
static unsigned int part (unsigned int status)
 

Detailed Description

Definition at line 6 of file TofHitStatus.h.

Constructor & Destructor Documentation

◆ TofHitStatus()

TofHitStatus::TofHitStatus ( )

Definition at line 5 of file TofHitStatus.cxx.

5 {
6 m_status = 0;
7 m_raw = false;
8 m_readout = false;
9 m_counter = false;
10 m_cluster = false;
11 m_barrel = false;
12 m_east = false;
13 m_layer = 0;
14 m_overflow = false;
15 m_multihit = false;
16 m_ncounter = 0;
17 m_neast = 0;
18 m_nwest = 0;
19}

◆ ~TofHitStatus()

virtual TofHitStatus::~TofHitStatus ( )
inlinevirtual

Definition at line 11 of file TofHitStatus.h.

11{}

Member Function Documentation

◆ init()

void TofHitStatus::init ( )

Definition at line 22 of file TofHitStatus.cxx.

22 {
23 m_status = 0;
24 m_raw = false;
25 m_readout = false;
26 m_counter = false;
27 m_cluster = false;
28 m_barrel = false;
29 m_east = false;
30 m_layer = 0;
31 m_overflow = false;
32 m_multihit = false;
33 m_ncounter = 0;
34 m_neast = 0;
35 m_nwest = 0;
36}

◆ is_barrel() [1/2]

◆ is_barrel() [2/2]

bool TofHitStatus::is_barrel ( unsigned int  status)
static

Definition at line 86 of file TofHitStatus.cxx.

86 {
87 return ((status & Barrel_Mask) >> Barrel_Index ) ? true : false;
88}

◆ is_cluster() [1/2]

◆ is_cluster() [2/2]

bool TofHitStatus::is_cluster ( unsigned int  status)
static

Definition at line 81 of file TofHitStatus.cxx.

81 {
82 return ((status & Cluster_Mask) >> Cluster_Index ) ? true : false;
83}

◆ is_counter() [1/2]

◆ is_counter() [2/2]

bool TofHitStatus::is_counter ( unsigned int  status)
static

Definition at line 76 of file TofHitStatus.cxx.

76 {
77 return ((status & Counter_Mask) >> Counter_Index ) ? true : false;
78}

◆ is_east() [1/2]

◆ is_east() [2/2]

bool TofHitStatus::is_east ( unsigned int  status)
static

Definition at line 91 of file TofHitStatus.cxx.

91 {
92 return ((status & East_Mask) >> East_Index ) ? true : false;
93}

◆ is_multihit() [1/2]

bool TofHitStatus::is_multihit ( ) const
inline

Definition at line 30 of file TofHitStatus.h.

30{ return m_multihit; }

Referenced by TofCheckData::Fill().

◆ is_multihit() [2/2]

bool TofHitStatus::is_multihit ( unsigned int  status)
static

Definition at line 106 of file TofHitStatus.cxx.

106 {
107 return ((status & Multihit_Mask) >> Multihit_Index ) ? true : false;
108}

◆ is_overflow() [1/2]

bool TofHitStatus::is_overflow ( ) const
inline

Definition at line 29 of file TofHitStatus.h.

29{ return m_overflow; }

Referenced by TofCheckData::Fill().

◆ is_overflow() [2/2]

bool TofHitStatus::is_overflow ( unsigned int  status)
static

Definition at line 101 of file TofHitStatus.cxx.

101 {
102 return ((status & Overflow_Mask) >> Overflow_Index ) ? true : false;
103}

◆ is_raw() [1/2]

bool TofHitStatus::is_raw ( ) const
inline

Definition at line 22 of file TofHitStatus.h.

22{ return m_raw; }

Referenced by ValidRecTofTrackAlg::execute(), TofCheckData::Fill(), and TofCorrPID::particleIDCalculation().

◆ is_raw() [2/2]

bool TofHitStatus::is_raw ( unsigned int  status)
static

Definition at line 66 of file TofHitStatus.cxx.

66 {
67 return ((status & Raw_Mask) >> Raw_Index ) ? true : false;
68}

◆ is_readout() [1/2]

bool TofHitStatus::is_readout ( ) const
inline

◆ is_readout() [2/2]

bool TofHitStatus::is_readout ( unsigned int  status)
static

Definition at line 71 of file TofHitStatus.cxx.

71 {
72 return ((status & Readout_Mask) >> Readout_Index ) ? true : false;
73}

◆ layer() [1/2]

◆ layer() [2/2]

unsigned int TofHitStatus::layer ( unsigned int  status)
static

Definition at line 96 of file TofHitStatus.cxx.

96 {
97 return (status & Layer_Mask) >> Layer_Index;
98}

◆ ncounter() [1/2]

unsigned int TofHitStatus::ncounter ( ) const
inline

Definition at line 31 of file TofHitStatus.h.

31{ return m_ncounter; }

Referenced by ValidRecTofTrackAlg::execute(), TofCheckData::Fill(), and setNCounter().

◆ ncounter() [2/2]

unsigned int TofHitStatus::ncounter ( unsigned int  status)
static

Definition at line 111 of file TofHitStatus.cxx.

111 {
112 return (status >> Ncounter_Index ) & N_Mask;
113}

◆ neast() [1/2]

unsigned int TofHitStatus::neast ( ) const
inline

Definition at line 32 of file TofHitStatus.h.

32{ return m_neast; }

Referenced by ValidRecTofTrackAlg::execute(), TofCheckData::Fill(), and setNEast().

◆ neast() [2/2]

unsigned int TofHitStatus::neast ( unsigned int  status)
static

Definition at line 116 of file TofHitStatus.cxx.

116 {
117 return (status >> Neast_Index ) & N_Mask;
118}

◆ nwest() [1/2]

unsigned int TofHitStatus::nwest ( ) const
inline

Definition at line 33 of file TofHitStatus.h.

33{ return m_nwest; }

Referenced by ValidRecTofTrackAlg::execute(), TofCheckData::Fill(), and setNWest().

◆ nwest() [2/2]

unsigned int TofHitStatus::nwest ( unsigned int  status)
static

Definition at line 121 of file TofHitStatus.cxx.

121 {
122 return (status >> Nwest_Index ) & N_Mask;
123}

◆ operator=() [1/2]

TofHitStatus & TofHitStatus::operator= ( const DstTofTrack source)

Definition at line 40 of file TofHitStatus.cxx.

40 {
41 m_status = source.status();
42 m_raw = ((m_status & Raw_Mask) >> Raw_Index ) ? true : false;
43 m_readout = ((m_status & Readout_Mask) >> Readout_Index ) ? true : false;
44 m_counter = ((m_status & Counter_Mask) >> Counter_Index ) ? true : false;
45 m_cluster = ((m_status & Cluster_Mask) >> Cluster_Index ) ? true : false;
46 m_barrel = ((m_status & Barrel_Mask) >> Barrel_Index ) ? true : false;
47 m_east = ((m_status & East_Mask) >> East_Index ) ? true : false;
48 m_layer = (m_status & Layer_Mask) >> Layer_Index;
49 m_overflow = ((m_status & Overflow_Mask) >> Overflow_Index ) ? true : false;
50 m_multihit = ((m_status & Multihit_Mask) >> Multihit_Index ) ? true : false;
51 m_ncounter = (m_status >> Ncounter_Index ) & N_Mask;
52 m_neast = (m_status >> Neast_Index ) & N_Mask;
53 m_nwest = (m_status >> Nwest_Index ) & N_Mask;
54
55 return *this;
56}
unsigned int status() const
Definition: DstTofTrack.h:44

◆ operator=() [2/2]

TofHitStatus & TofHitStatus::operator= ( const TofHitStatus source)

Definition at line 60 of file TofHitStatus.cxx.

60 {
61 m_status = source.m_status;
62 return *this;
63}

◆ part()

static unsigned int TofHitStatus::part ( unsigned int  status)
static

◆ setBarrel()

void TofHitStatus::setBarrel ( bool  barrel)

Definition at line 171 of file TofHitStatus.cxx.

171 {
172 m_barrel = barrel;
173 if( barrel ) { m_status |= Barrel_Mask; }
174 else { m_status &= (~Barrel_Mask); }
175}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setBarrelCluster()

void TofHitStatus::setBarrelCluster ( unsigned int  layer)

Definition at line 230 of file TofHitStatus.cxx.

230 {
231 TofHitStatus::setRaw( false );
236
237 if( layer == 3 ) {
240 TofHitStatus::setEast( false );
245 }
246 else if( layer == 1 || layer == 2 ) {
249 TofHitStatus::setEast( false );
254 }
255 else if( layer == 11 || layer == 12 || layer == 21 || layer == 22 ) {
259 if( layer%10 == 1 ) {
260 TofHitStatus::setEast( true );
263 }
264 else {
265 TofHitStatus::setEast( false );
268 }
269 if( static_cast<int>(layer/10) == 1 ) {
271 }
272 else {
274 }
275 }
276 else{
277 cout << "TofRec TofHitStatus::setBarrelCounter layer = " << layer << endl;
278 return;
279 }
280
281 return;
282}
unsigned int layer() const
Definition: TofHitStatus.h:28
void setNWest(unsigned int nwest)
void setLayer(unsigned int layer)
void setCounter(bool counter)
void setMultihit(bool multihit)
void setBarrel(bool barrel)
void setCluster(bool cluster)
void setEast(bool east)
void setOverflow(bool overflow)
void setNCounter(unsigned int ncounter)
void setNEast(unsigned int neast)
void setReadout(bool readout)
void setRaw(bool raw)

Referenced by MrpcTrack::convert2RecTofTrackCol(), MrpcDBSTrack::convert2RecTofTrackCol(), and TofTrack::convert2RecTofTrackCol().

◆ setBarrelCounter()

void TofHitStatus::setBarrelCounter ( unsigned int  layer)

Definition at line 285 of file TofHitStatus.cxx.

285 {
286
287 TofHitStatus::setRaw( false );
293
294 if( layer == 1 || layer == 2 ) {
296 TofHitStatus::setEast( false );
301 }
302 if( layer == 11 || layer == 12 || layer == 21 || layer == 22 ) {
305 if( layer%10 == 1 ) {
306 TofHitStatus::setEast( true );
309 }
310 else {
311 TofHitStatus::setEast( false );
314 }
315 if( static_cast<int>(layer/10) == 1 ) {
317 }
318 else {
320 }
321 }
322
323 return;
324}

Referenced by MrpcTrack::convert2RecTofTrackCol(), MrpcDBSTrack::convert2RecTofTrackCol(), and TofTrack::convert2RecTofTrackCol().

◆ setBarrelRaw()

void TofHitStatus::setBarrelRaw ( unsigned int  layer,
bool  east 
)

Definition at line 350 of file TofHitStatus.cxx.

350 {
351 TofHitStatus::setRaw( true );
356 TofHitStatus::setEast( east );
361 if( east ){
364 }
365 else{
368 }
369 return;
370}

◆ setBarrelReadout()

void TofHitStatus::setBarrelReadout ( unsigned int  layer,
bool  east 
)

◆ setCluster()

void TofHitStatus::setCluster ( bool  cluster)

Definition at line 164 of file TofHitStatus.cxx.

164 {
165 m_cluster = cluster;
166 if( cluster ) { m_status |= Cluster_Mask; }
167 else { m_status &= (~Cluster_Mask); }
168}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setCounter()

void TofHitStatus::setCounter ( bool  counter)

Definition at line 157 of file TofHitStatus.cxx.

157 {
158 m_counter = counter;
159 if( counter ) { m_status |= Counter_Mask; }
160 else { m_status &= (~Counter_Mask); }
161}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setEast()

void TofHitStatus::setEast ( bool  east)

Definition at line 178 of file TofHitStatus.cxx.

178 {
179 m_east = east;
180 if( east ) { m_status |= East_Mask; }
181 else { m_status &= (~East_Mask); }
182}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setEndcapCluster()

void TofHitStatus::setEndcapCluster ( bool  east)

◆ setEndcapRaw()

void TofHitStatus::setEndcapRaw ( bool  east)

Definition at line 390 of file TofHitStatus.cxx.

390 {
391 TofHitStatus::setRaw( true );
396 TofHitStatus::setEast( east );
403 return;
404}

◆ setLayer()

void TofHitStatus::setLayer ( unsigned int  layer)

Definition at line 185 of file TofHitStatus.cxx.

185 {
186 assert(layer<=3);
187 m_layer = layer;
188 m_status |= (layer << Layer_Index);
189}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setMultihit()

void TofHitStatus::setMultihit ( bool  multihit)

Definition at line 199 of file TofHitStatus.cxx.

199 {
200 m_multihit = multihit;
201 if( multihit ) { m_status |= Multihit_Mask; }
202 else { m_status &= (~Multihit_Mask); }
203}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setNCounter()

void TofHitStatus::setNCounter ( unsigned int  ncounter)

Definition at line 206 of file TofHitStatus.cxx.

206 {
207 if( m_barrel ) assert(ncounter<=176);
208 else assert(ncounter<=96);
209 m_ncounter = ncounter;
210 m_status |= (ncounter << Ncounter_Index);
211}
unsigned int ncounter() const
Definition: TofHitStatus.h:31

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setNEast()

void TofHitStatus::setNEast ( unsigned int  neast)

Definition at line 214 of file TofHitStatus.cxx.

214 {
215 if( m_barrel ) assert(neast<=176);
216 else assert(neast<=96);
217 m_neast = neast;
218 m_status |= (neast << Neast_Index);
219}
unsigned int neast() const
Definition: TofHitStatus.h:32

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setNoHit()

void TofHitStatus::setNoHit ( )

◆ setNWest()

void TofHitStatus::setNWest ( unsigned int  nwest)

Definition at line 222 of file TofHitStatus.cxx.

222 {
223 if( m_barrel ) assert(nwest<=176);
224 else assert(nwest<=96);
225 m_nwest = nwest;
226 m_status |= (nwest << Nwest_Index);
227}
unsigned int nwest() const
Definition: TofHitStatus.h:33

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setOverflow()

void TofHitStatus::setOverflow ( bool  overflow)

Definition at line 192 of file TofHitStatus.cxx.

192 {
193 m_overflow = overflow;
194 if( overflow ) { m_status |= Overflow_Mask; }
195 else { m_status &= (~Overflow_Mask); }
196}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setRaw()

void TofHitStatus::setRaw ( bool  raw)

Definition at line 143 of file TofHitStatus.cxx.

143 {
144 m_raw = raw;
145 if( raw ) { m_status |= Raw_Mask; }
146 else { m_status &= (~Raw_Mask); }
147}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setReadout()

void TofHitStatus::setReadout ( bool  readout)

Definition at line 150 of file TofHitStatus.cxx.

150 {
151 m_readout = readout;
152 if( readout ) { m_status |= Readout_Mask; }
153 else { m_status &= (~Readout_Mask); }
154}

Referenced by setBarrelCluster(), setBarrelCounter(), setBarrelRaw(), setBarrelReadout(), setEndcapCluster(), setEndcapRaw(), and setNoHit().

◆ setStatus()

void TofHitStatus::setStatus ( unsigned int  status)

Definition at line 126 of file TofHitStatus.cxx.

126 {
127 m_status = status;
128 m_raw = ((m_status & Raw_Mask) >> Raw_Index ) ? true : false;
129 m_readout = ((m_status & Readout_Mask) >> Readout_Index ) ? true : false;
130 m_counter = ((m_status & Counter_Mask) >> Counter_Index ) ? true : false;
131 m_cluster = ((m_status & Cluster_Mask) >> Cluster_Index ) ? true : false;
132 m_barrel = ((m_status & Barrel_Mask) >> Barrel_Index ) ? true : false;
133 m_east = ((m_status & East_Mask) >> East_Index ) ? true : false;
134 m_layer = (m_status & Layer_Mask) >> Layer_Index;
135 m_overflow = ((m_status & Overflow_Mask) >> Overflow_Index ) ? true : false;
136 m_multihit = ((m_status & Multihit_Mask) >> Multihit_Index ) ? true : false;
137 m_ncounter = (m_status >> Ncounter_Index ) & N_Mask;
138 m_neast = (m_status >> Neast_Index ) & N_Mask;
139 m_nwest = (m_status >> Nwest_Index ) & N_Mask;
140}

Referenced by DTagTool::cosmicandleptonVeto(), MucCalibMgr::DimuSelect(), TofShower::energyCalib(), Gam4pikp::execute(), PipiJpsi::execute(), Rhopi::execute(), DQA_TOF::execute(), DQADtag::execute(), DQAJpsi2PPbarAlg::execute(), DQAKsKpi::execute(), DQARhopi::execute(), DQASelBhabha::execute(), DQASelDimu::execute(), DQASelHadron::execute(), CalibEventSelect::execute(), DimuPreSelect::execute(), FarmMonitorAlg::execute(), ValidRecTofTrackAlg::execute(), TofCheckData::Fill(), TofShower::findShower(), DimuPreSelect::IsDimu(), MrpcPID::particleIDCalculation(), Tof1PID::particleIDCalculation(), Tof2PID::particleIDCalculation(), TofCorrPID::particleIDCalculation(), TofCPID::particleIDCalculation(), and TofEPID::particleIDCalculation().

◆ value()

unsigned int TofHitStatus::value ( ) const
inline

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