CGEM BOSS
6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcSegUsage.h
Go to the documentation of this file.
1
//--------------------------------------------------------------------------
2
// File and Version Information:
3
// $Id: MdcSegUsage.h,v 1.1.1.1 2017/07/13 00:11:01 huangzhen Exp $
4
//
5
// Description:
6
// Records usage of a single hit in one of my segments. Association
7
// with hit must be maintained externally.
8
//
9
// Environment:
10
// Software developed for the BaBar Detector at the SLAC B-Factory.
11
//
12
// Author(s):
13
// Steve Schaffner
14
// Zhang Yao(
[email protected]
) Migrate to BESIII
15
//------------------------------------------------------------------------
16
#ifndef MDCSEGUSAGE_H
17
#define MDCSEGUSAGE_H
18
19
class
MdcSegUsage
{
20
public
:
21
MdcSegUsage
();
22
virtual
~MdcSegUsage
();
23
24
inline
bool
usedSeg
()
const
;
25
inline
bool
usedAmbig
(
int
i)
const
;
26
inline
void
setUsedAmbig
(
int
i);
27
void
killHit
();
28
bool
deadHit
()
const
{
return
((segUse & deadFlag()) != 0);}
29
30
private
:
31
// Bit-mapping definitions for segment hit use word
32
unsigned
usedNegAmb()
const
{
return
1u;}
33
unsigned
usedPosAmb()
const
{
return
2u;}
34
unsigned
deadFlag()
const
{
return
4u;}
35
36
unsigned
segUse;
37
38
// Preempt
39
MdcSegUsage
& operator= (
const
MdcSegUsage
&);
40
MdcSegUsage
(
const
MdcSegUsage
&);
41
};
42
43
// inline functs:
44
bool
45
MdcSegUsage::usedSeg
(
void
)
const
{
46
return
( (segUse & (usedNegAmb() | usedPosAmb())) != 0);
47
}
48
49
void
MdcSegUsage::setUsedAmbig
(
int
i) {
50
if
(i <= 0) { segUse |= usedNegAmb(); }
51
else
{ segUse |= usedPosAmb(); }
52
}
53
54
bool
55
MdcSegUsage::usedAmbig
(
int
ambig)
const
{
56
if
(ambig <= 0) {
57
return
(usedNegAmb() & segUse) != 0;
58
}
59
else
{
60
return
(usedPosAmb() & segUse) != 0;
61
}
62
}
63
64
#endif
65
MdcSegUsage
Definition
MdcSegUsage.h:19
MdcSegUsage::setUsedAmbig
void setUsedAmbig(int i)
Definition
MdcSegUsage.h:49
MdcSegUsage::MdcSegUsage
MdcSegUsage()
Definition
MdcSegUsage.cxx:10
MdcSegUsage::~MdcSegUsage
virtual ~MdcSegUsage()
Definition
MdcSegUsage.cxx:16
MdcSegUsage::deadHit
bool deadHit() const
Definition
MdcSegUsage.h:28
MdcSegUsage::killHit
void killHit()
Definition
MdcSegUsage.cxx:21
MdcSegUsage::usedAmbig
bool usedAmbig(int i) const
Definition
MdcSegUsage.h:55
MdcSegUsage::usedSeg
bool usedSeg() const
Definition
MdcSegUsage.h:45
6.6.5.i
Reconstruction
MdcPatRec
MdcTrkRecon
MdcTrkRecon-00-03-49
MdcTrkRecon
MdcSegUsage.h
Generated by
1.12.0