BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
MdcID Class Reference

#include <MdcID.h>

Inheritance diagram for MdcID:

Public Types

typedef Identifier::size_type size_type
typedef Identifier::value_type value_type
typedef Identifier::size_type size_type
typedef Identifier::value_type value_type
typedef Identifier::size_type size_type
typedef Identifier::value_type value_type

Public Member Functions

 MdcID ()
 constructor
 ~MdcID ()
 destructor
bool is_axial (const Identifier &id)
 Test for axial and stereo wire.
int layer_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
int wire_max (const Identifier &id)
 MdcID ()
 constructor
 ~MdcID ()
 destructor
bool is_axial (const Identifier &id)
 Test for axial and stereo wire.
int layer_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
int wire_max (const Identifier &id)
 MdcID ()
 constructor
 ~MdcID ()
 destructor
bool is_axial (const Identifier &id)
 Test for axial and stereo wire.
int layer_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
int wire_max (const Identifier &id)
Public Member Functions inherited from BesDetectorID
 BesDetectorID (void)
 ~BesDetectorID (void)
Identifier mdc (void) const
Identifier tof (void) const
Identifier emc (void) const
Identifier muc (void) const
Identifier hlt (void) const
Identifier mrpc (void) const
bool is_mdc (const Identifier &id) const
bool is_tof (const Identifier &id) const
bool is_emc (const Identifier &id) const
bool is_muc (const Identifier &id) const
bool is_hlt (const Identifier &id) const
bool is_mrpc (const Identifier &id) const
 BesDetectorID (void)
 ~BesDetectorID (void)
Identifier mdc (void) const
Identifier tof (void) const
Identifier emc (void) const
Identifier muc (void) const
Identifier hlt (void) const
Identifier mrpc (void) const
bool is_mdc (const Identifier &id) const
bool is_tof (const Identifier &id) const
bool is_emc (const Identifier &id) const
bool is_muc (const Identifier &id) const
bool is_hlt (const Identifier &id) const
bool is_mrpc (const Identifier &id) const
 BesDetectorID (void)
 ~BesDetectorID (void)
Identifier mdc (void) const
Identifier tof (void) const
Identifier emc (void) const
Identifier muc (void) const
Identifier hlt (void) const
Identifier mrpc (void) const
bool is_mdc (const Identifier &id) const
bool is_tof (const Identifier &id) const
bool is_emc (const Identifier &id) const
bool is_muc (const Identifier &id) const
bool is_hlt (const Identifier &id) const
bool is_mrpc (const Identifier &id) const

Static Public Member Functions

static Identifier wire_id (int wireType, int layer, int wire)
 For a single wire.
static Identifier wire_id (int layer, int wire)
static value_type getIntID (unsigned int wireType, unsigned int layer, unsigned int wire)
static value_type getIntID (unsigned int layer, unsigned int wire)
static value_type getAXIAL_LAYER_MAX ()
static value_type getSTEREO_LAYER_MAX ()
static value_type getAXIAL_WIRE_MAX ()
static value_type getSTEREO_WIRE_MAX ()
static value_type getAXIAL_WIRE ()
static value_type getSTEREO_WIRE ()
static bool values_ok (const unsigned int wireType, const unsigned int layer, const unsigned int wire)
static int layer (const Identifier &id)
 Values of different levels (failure returns 0).
static int wire (const Identifier &id)
static Identifier wire_id (int wireType, int layer, int wire)
 For a single wire.
static Identifier wire_id (int layer, int wire)
static value_type getIntID (unsigned int wireType, unsigned int layer, unsigned int wire)
static value_type getIntID (unsigned int layer, unsigned int wire)
static value_type getAXIAL_LAYER_MAX ()
static value_type getSTEREO_LAYER_MAX ()
static value_type getAXIAL_WIRE_MAX ()
static value_type getSTEREO_WIRE_MAX ()
static value_type getAXIAL_WIRE ()
static value_type getSTEREO_WIRE ()
static bool values_ok (const unsigned int wireType, const unsigned int layer, const unsigned int wire)
static int layer (const Identifier &id)
 Values of different levels (failure returns 0).
static int wire (const Identifier &id)
static Identifier wire_id (int wireType, int layer, int wire)
 For a single wire.
static Identifier wire_id (int layer, int wire)
static value_type getIntID (unsigned int wireType, unsigned int layer, unsigned int wire)
static value_type getIntID (unsigned int layer, unsigned int wire)
static value_type getAXIAL_LAYER_MAX ()
static value_type getSTEREO_LAYER_MAX ()
static value_type getAXIAL_WIRE_MAX ()
static value_type getSTEREO_WIRE_MAX ()
static value_type getAXIAL_WIRE ()
static value_type getSTEREO_WIRE ()
static bool values_ok (const unsigned int wireType, const unsigned int layer, const unsigned int wire)
static int layer (const Identifier &id)
 Values of different levels (failure returns 0).
static int wire (const Identifier &id)

Additional Inherited Members

Protected Member Functions inherited from BesDetectorID
int mdc_field_value () const
 Provide efficient access to individual field values.
int tof_field_value () const
int emc_field_value () const
int muc_field_value () const
int hlt_field_value () const
int mrpc_field_value () const
int get_detectorID (const Identifier &id) const
int mdc_field_value () const
 Provide efficient access to individual field values.
int tof_field_value () const
int emc_field_value () const
int muc_field_value () const
int hlt_field_value () const
int mrpc_field_value () const
int get_detectorID (const Identifier &id) const
int mdc_field_value () const
 Provide efficient access to individual field values.
int tof_field_value () const
int emc_field_value () const
int muc_field_value () const
int hlt_field_value () const
int mrpc_field_value () const
int get_detectorID (const Identifier &id) const
Static Protected Attributes inherited from BesDetectorID
static const unsigned int MDC_ID = 0x10
static const unsigned int MDC_INDEX = 24
static const unsigned int MDC_MASK = 0xFF000000
static const unsigned int TOF_ID = 0x20
static const unsigned int TOF_INDEX = 24
static const unsigned int TOF_MASK = 0xFF000000
static const unsigned int EMC_ID = 0x30
static const unsigned int EMC_INDEX = 24
static const unsigned int EMC_MASK = 0xFF000000
static const unsigned int MUC_ID = 0x40
static const unsigned int MUC_INDEX = 24
static const unsigned int MUC_MASK = 0xFF000000
static const unsigned int HLT_ID = 0x50
static const unsigned int HLT_INDEX = 24
static const unsigned int HLT_MASK = 0xFF000000
static const unsigned int MRPC_ID = 0x70
static const unsigned int MRPC_INDEX = 24
static const unsigned int MRPC_MASK = 0xFF000000

Detailed Description

Member Typedef Documentation

◆ size_type [1/3]

◆ size_type [2/3]

◆ size_type [3/3]

◆ value_type [1/3]

◆ value_type [2/3]

◆ value_type [3/3]

Constructor & Destructor Documentation

◆ MdcID() [1/3]

MdcID::MdcID ( void )

constructor

Definition at line 5 of file MdcID.cxx.

5{}

◆ ~MdcID() [1/3]

MdcID::~MdcID ( void )

destructor

Definition at line 7 of file MdcID.cxx.

7{}

◆ MdcID() [2/3]

MdcID::MdcID ( )

constructor

◆ ~MdcID() [2/3]

MdcID::~MdcID ( )

destructor

◆ MdcID() [3/3]

MdcID::MdcID ( )

constructor

◆ ~MdcID() [3/3]

MdcID::~MdcID ( )

destructor

Member Function Documentation

◆ getAXIAL_LAYER_MAX() [1/3]

unsigned int MdcID::getAXIAL_LAYER_MAX ( )
static

Definition at line 110 of file MdcID.cxx.

110{ return AXIAL_LAYER_MAX; }

Referenced by MdcBuilder::initialize().

◆ getAXIAL_LAYER_MAX() [2/3]

value_type MdcID::getAXIAL_LAYER_MAX ( )
static

◆ getAXIAL_LAYER_MAX() [3/3]

value_type MdcID::getAXIAL_LAYER_MAX ( )
static

◆ getAXIAL_WIRE() [1/3]

unsigned int MdcID::getAXIAL_WIRE ( )
static

Definition at line 115 of file MdcID.cxx.

115{ return AXIAL_WIRE; }

◆ getAXIAL_WIRE() [2/3]

value_type MdcID::getAXIAL_WIRE ( )
static

◆ getAXIAL_WIRE() [3/3]

value_type MdcID::getAXIAL_WIRE ( )
static

◆ getAXIAL_WIRE_MAX() [1/3]

unsigned int MdcID::getAXIAL_WIRE_MAX ( )
static

Definition at line 112 of file MdcID.cxx.

112{ return AXIAL_WIRE_MAX; }

Referenced by MdcBuilder::initialize().

◆ getAXIAL_WIRE_MAX() [2/3]

value_type MdcID::getAXIAL_WIRE_MAX ( )
static

◆ getAXIAL_WIRE_MAX() [3/3]

value_type MdcID::getAXIAL_WIRE_MAX ( )
static

◆ getIntID() [1/6]

unsigned int MdcID::getIntID ( unsigned int layer,
unsigned int wire )
static

Definition at line 85 of file MdcID.cxx.

85 {
86 unsigned int value;
87 unsigned int wireType;
88
89 if ( layer < INNER_STEREO_LAYER_MAX ||
90 layer < ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX ) &&
91 layer >= ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) )
92 wireType = STEREO_WIRE;
93 else wireType = AXIAL_WIRE;
94
95 value = ( ( BesDetectorID::MDC_ID << MDC_INDEX ) & MDC_MASK ) |
96 ( ( wireType << WIRETYPE_INDEX ) & WIRETYPE_MASK ) |
97 ( ( layer << LAYER_INDEX ) & LAYER_MASK ) | ( ( wire << WIRE_INDEX ) & WIRE_MASK );
98
99 return value;
100}
static int layer(const Identifier &id)
Values of different levels (failure returns 0).
Definition MdcID.cxx:47
static int wire(const Identifier &id)
Definition MdcID.cxx:52

◆ getIntID() [2/6]

value_type MdcID::getIntID ( unsigned int layer,
unsigned int wire )
static

◆ getIntID() [3/6]

value_type MdcID::getIntID ( unsigned int layer,
unsigned int wire )
static

◆ getIntID() [4/6]

unsigned int MdcID::getIntID ( unsigned int wireType,
unsigned int layer,
unsigned int wire )
static

Definition at line 102 of file MdcID.cxx.

102 {
103 unsigned int value = ( ( BesDetectorID::MDC_ID << MDC_INDEX ) & MDC_MASK ) |
104 ( ( wireType << WIRETYPE_INDEX ) & WIRETYPE_MASK ) |
105 ( ( layer << LAYER_INDEX ) & LAYER_MASK ) |
106 ( ( wire << WIRE_INDEX ) & WIRE_MASK );
107 return value;
108}

Referenced by MdcBuilder::initialize(), and MdcBuilder::pack().

◆ getIntID() [5/6]

value_type MdcID::getIntID ( unsigned int wireType,
unsigned int layer,
unsigned int wire )
static

◆ getIntID() [6/6]

value_type MdcID::getIntID ( unsigned int wireType,
unsigned int layer,
unsigned int wire )
static

◆ getSTEREO_LAYER_MAX() [1/3]

unsigned int MdcID::getSTEREO_LAYER_MAX ( )
static

Definition at line 111 of file MdcID.cxx.

111{ return STEREO_LAYER_MAX; }

Referenced by MdcBuilder::initialize().

◆ getSTEREO_LAYER_MAX() [2/3]

value_type MdcID::getSTEREO_LAYER_MAX ( )
static

◆ getSTEREO_LAYER_MAX() [3/3]

value_type MdcID::getSTEREO_LAYER_MAX ( )
static

◆ getSTEREO_WIRE() [1/3]

unsigned int MdcID::getSTEREO_WIRE ( )
static

Definition at line 117 of file MdcID.cxx.

117{ return STEREO_WIRE; }

◆ getSTEREO_WIRE() [2/3]

value_type MdcID::getSTEREO_WIRE ( )
static

◆ getSTEREO_WIRE() [3/3]

value_type MdcID::getSTEREO_WIRE ( )
static

◆ getSTEREO_WIRE_MAX() [1/3]

unsigned int MdcID::getSTEREO_WIRE_MAX ( )
static

Definition at line 113 of file MdcID.cxx.

113{ return STEREO_WIRE_MAX; }

◆ getSTEREO_WIRE_MAX() [2/3]

value_type MdcID::getSTEREO_WIRE_MAX ( )
static

◆ getSTEREO_WIRE_MAX() [3/3]

value_type MdcID::getSTEREO_WIRE_MAX ( )
static

◆ is_axial() [1/3]

bool MdcID::is_axial ( const Identifier & id)

Test for axial and stereo wire.

Definition at line 41 of file MdcID.cxx.

41 {
42 unsigned int type = ( id.get_value() & MdcID::WIRETYPE_MASK ) >> MdcID::WIRETYPE_INDEX;
43 return ( type == AXIAL_WIRE ) ? true : false;
44}

Referenced by layer_max(), and wire_max().

◆ is_axial() [2/3]

bool MdcID::is_axial ( const Identifier & id)

Test for axial and stereo wire.

◆ is_axial() [3/3]

bool MdcID::is_axial ( const Identifier & id)

Test for axial and stereo wire.

◆ layer() [1/3]

int MdcID::layer ( const Identifier & id)
static

Values of different levels (failure returns 0).

Definition at line 47 of file MdcID.cxx.

47 {
48 return ( id.get_value() & MdcID::LAYER_MASK ) >> MdcID::LAYER_INDEX;
49}

Referenced by HoughHitList::addTruthInfo(), BesEvent::ConstructMdcTrackFromRec(), MdcMergeDups::doMergeCurl(), MdcTrkRecon::dumpDigi(), MdcMergeDups::dumpRecMdcTrack(), MdcTrkRecon::dumpTdsTrack(), BesTrigL1::execute(), BhabhaPreSelect::execute(), EFSectorHits::execute(), EsTimeAlg::execute(), EventPreSelectAlg::execute(), KalFitAlg::execute(), MdcDedxRecon::execute(), MdcxCosmicSewer::execute(), TrkReco::execute(), ValidRecMdcTrackAlg::execute(), MdcCalRecTrk::fgNoiseRatio(), MdcTrkRecon::fillEvent(), IniMdcCalib::fillHist(), PreXtMdcCalib::fillHist(), MdcTrkRecon::fillMcTruth(), Hough2D::fit(), Hough3D::fit(), DedxCalibEvent::genNtuple(), getIntID(), getIntID(), MdcRawDataProvider::getMdcDigiVec(), MdcUtilitySvc::getMdcMCAssoiciation(), HoughHit::HoughHit(), MdcROOTGeo::IsHit(), MdcDedxRecon::kaltrackrec(), MdcDetector::Layer(), TTrackManager::makeTds(), MdcHit::MdcHit(), MdcDedxRecon::mdctrackrec(), MdcxCosmicSewer::MdcxHitsToHots(), MdcBuilder::pack(), MdcPrintSvc::printDigi(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), MdcPrintSvc::printMdcMcHitCol(), MdcPrintSvc::printRecMdcTrack(), MdcxHit::process(), McTestAlg::RetrieveMdc(), MdcROOTGeo::SetHits(), MdcAliRecHit::setKalHit(), MdcCalRecHit::setKalHit(), MdcAliRecHit::setRecHit(), MdcCalRecHit::setRecHit(), MdcMergeDups::testByOverlapHit(), RecMdcDedxCnv::TObjectToDataObject(), RecMdcKalTrackCnv::TObjectToDataObject(), RecMdcTrackCnv::TObjectToDataObject(), values_ok(), MdcDetector::Wire(), wire_id(), and wire_id().

◆ layer() [2/3]

int MdcID::layer ( const Identifier & id)
static

Values of different levels (failure returns 0).

◆ layer() [3/3]

int MdcID::layer ( const Identifier & id)
static

Values of different levels (failure returns 0).

◆ layer_max() [1/3]

int MdcID::layer_max ( const Identifier & id)

Max/Min values for each field (error returns -999).

Definition at line 57 of file MdcID.cxx.

57 {
58 if ( is_axial( id ) ) { return AXIAL_LAYER_MAX; }
59 else { return STEREO_LAYER_MAX; }
60}
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
Definition MdcID.cxx:41

◆ layer_max() [2/3]

int MdcID::layer_max ( const Identifier & id)

Max/Min values for each field (error returns -999).

◆ layer_max() [3/3]

int MdcID::layer_max ( const Identifier & id)

Max/Min values for each field (error returns -999).

◆ values_ok() [1/3]

bool MdcID::values_ok ( const unsigned int wireType,
const unsigned int layer,
const unsigned int wire )
static

Definition at line 10 of file MdcID.cxx.

11 {
12 // Check values
13 if ( wireType != AXIAL_WIRE && wireType != STEREO_WIRE ) return false;
14
15 if ( wireType == STEREO_WIRE )
16 {
17 if ( layer < INNER_STEREO_LAYER_MAX ||
18 layer < ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX ) &&
19 layer >= ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) )
20 return true;
21 }
22
23 if ( wireType == AXIAL_WIRE )
24 {
25 if ( layer >= INNER_STEREO_LAYER_MAX &&
26 layer < ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) ||
27 layer >=
28 ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX ) &&
29 layer < LAYER_MAX )
30
31 return true;
32 }
33
34 std::cout << " ++ MdcID::values_ok++ wiretype = " << wireType << " layer = " << layer
35 << " wire = " << wire << std::endl;
36
37 return false;
38}

Referenced by wire_id().

◆ values_ok() [2/3]

bool MdcID::values_ok ( const unsigned int wireType,
const unsigned int layer,
const unsigned int wire )
static

◆ values_ok() [3/3]

bool MdcID::values_ok ( const unsigned int wireType,
const unsigned int layer,
const unsigned int wire )
static

◆ wire() [1/3]

int MdcID::wire ( const Identifier & id)
static

Definition at line 52 of file MdcID.cxx.

52 {
53 return ( id.get_value() & MdcID::WIRE_MASK ) >> MdcID::WIRE_INDEX;
54}

Referenced by HoughHitList::addTruthInfo(), BesEvent::ConstructMdcTrackFromRec(), MdcTrkRecon::dumpDigi(), MdcMergeDups::dumpRecMdcTrack(), MdcTrkRecon::dumpTdsTrack(), BesTrigL1::execute(), BhabhaPreSelect::execute(), EFSectorHits::execute(), EsTimeAlg::execute(), EventPreSelectAlg::execute(), KalFitAlg::execute(), MdcDedxRecon::execute(), MdcxCosmicSewer::execute(), TrkReco::execute(), ValidRecMdcTrackAlg::execute(), MdcCalRecTrk::fgNoiseRatio(), MdcTrkRecon::fillEvent(), IniMdcCalib::fillHist(), MdcTrkRecon::fillMcTruth(), Hough2D::fit(), Hough3D::fit(), DedxCalibEvent::genNtuple(), KalFitTrack::getDriftDist(), getIntID(), getIntID(), MdcRawDataProvider::getMdcDigiVec(), MdcUtilitySvc::getMdcMCAssoiciation(), HoughHit::HoughHit(), MdcROOTGeo::IsHit(), MdcDedxRecon::kaltrackrec(), TTrackManager::makeTds(), MdcHit::MdcHit(), MdcDedxRecon::mdctrackrec(), MdcxCosmicSewer::MdcxHitsToHots(), MdcBuilder::pack(), MdcPrintSvc::printDigi(), PrintMcInfo::printDigi(), PrintMcInfo::printHit(), MdcPrintSvc::printMdcMcHitCol(), MdcPrintSvc::printRecMdcTrack(), MdcxHit::process(), McTestAlg::RetrieveMdc(), MdcROOTGeo::SetHits(), MdcAliRecHit::setKalHit(), MdcCalRecHit::setKalHit(), MdcAliRecHit::setRecHit(), MdcCalRecHit::setRecHit(), RecMdcDedxCnv::TObjectToDataObject(), RecMdcKalTrackCnv::TObjectToDataObject(), RecMdcTrackCnv::TObjectToDataObject(), values_ok(), MdcDetector::Wire(), wire_id(), and wire_id().

◆ wire() [2/3]

int MdcID::wire ( const Identifier & id)
static

◆ wire() [3/3]

int MdcID::wire ( const Identifier & id)
static

◆ wire_id() [1/6]

Identifier MdcID::wire_id ( int layer,
int wire )
static

Definition at line 77 of file MdcID.cxx.

77 {
78 if ( layer < INNER_STEREO_LAYER_MAX ||
79 layer < ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX ) &&
80 layer >= ( INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX ) )
81 return MdcID::wire_id( STEREO_WIRE, layer, wire );
82 else return MdcID::wire_id( AXIAL_WIRE, layer, wire );
83}
static Identifier wire_id(int wireType, int layer, int wire)
For a single wire.
Definition MdcID.cxx:69

◆ wire_id() [2/6]

Identifier MdcID::wire_id ( int layer,
int wire )
static

◆ wire_id() [3/6]

Identifier MdcID::wire_id ( int layer,
int wire )
static

◆ wire_id() [4/6]

Identifier MdcID::wire_id ( int wireType,
int layer,
int wire )
static

For a single wire.

Definition at line 69 of file MdcID.cxx.

69 {
70 assert( values_ok( wireType, layer, wire ) );
71 int value = ( BesDetectorID::MDC_ID << MDC_INDEX ) | ( wireType << WIRETYPE_INDEX ) |
72 ( layer << LAYER_INDEX ) | ( wire << WIRE_INDEX );
73 return Identifier( value );
74}
static bool values_ok(const unsigned int wireType, const unsigned int layer, const unsigned int wire)
Definition MdcID.cxx:10

Referenced by RawDataMdcMcHitCnv::createObj(), TTrackManager::makeTds(), BesRawDataWriter::SaveMdcDigits(), BesMcTruthWriter::SaveMdcTruth(), and wire_id().

◆ wire_id() [5/6]

Identifier MdcID::wire_id ( int wireType,
int layer,
int wire )
static

For a single wire.

◆ wire_id() [6/6]

Identifier MdcID::wire_id ( int wireType,
int layer,
int wire )
static

For a single wire.

◆ wire_max() [1/3]

int MdcID::wire_max ( const Identifier & id)

Definition at line 63 of file MdcID.cxx.

63 {
64 if ( is_axial( id ) ) { return AXIAL_WIRE_MAX; }
65 else { return STEREO_WIRE_MAX; }
66}

◆ wire_max() [2/3]

int MdcID::wire_max ( const Identifier & id)

◆ wire_max() [3/3]

int MdcID::wire_max ( const Identifier & id)

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