BOSS 7.0.3
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
 

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)
 
- 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
 

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)
 

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
 
- 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/2]

◆ size_type [2/2]

◆ value_type [1/2]

◆ value_type [2/2]

Constructor & Destructor Documentation

◆ MdcID() [1/2]

MdcID::MdcID ( void  )

constructor

Definition at line 5 of file MdcID.cxx.

5 {
6}

◆ ~MdcID() [1/2]

MdcID::~MdcID ( void  )

destructor

Definition at line 8 of file MdcID.cxx.

8 {
9}

◆ MdcID() [2/2]

MdcID::MdcID ( )

constructor

◆ ~MdcID() [2/2]

MdcID::~MdcID ( )

destructor

Member Function Documentation

◆ getAXIAL_LAYER_MAX() [1/2]

unsigned int MdcID::getAXIAL_LAYER_MAX ( )
static

Definition at line 138 of file MdcID.cxx.

139{
140 return AXIAL_LAYER_MAX;
141}

Referenced by MdcBuilder::initialize().

◆ getAXIAL_LAYER_MAX() [2/2]

static value_type MdcID::getAXIAL_LAYER_MAX ( )
static

◆ getAXIAL_WIRE() [1/2]

unsigned int MdcID::getAXIAL_WIRE ( )
static

Definition at line 155 of file MdcID.cxx.

156{
157 return AXIAL_WIRE;
158}

◆ getAXIAL_WIRE() [2/2]

static value_type MdcID::getAXIAL_WIRE ( )
static

◆ getAXIAL_WIRE_MAX() [1/2]

unsigned int MdcID::getAXIAL_WIRE_MAX ( )
static

Definition at line 146 of file MdcID.cxx.

147{
148 return AXIAL_WIRE_MAX;
149}

Referenced by MdcBuilder::initialize().

◆ getAXIAL_WIRE_MAX() [2/2]

static value_type MdcID::getAXIAL_WIRE_MAX ( )
static

◆ getIntID() [1/4]

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

Definition at line 102 of file MdcID.cxx.

104{
105 unsigned int value;
106 unsigned int wireType;
107
108 if ( layer < INNER_STEREO_LAYER_MAX
109 || layer < (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX)
110 && layer >= (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX )
111 )
112 wireType = STEREO_WIRE;
113 else wireType = AXIAL_WIRE;
114
116 ((wireType << WIRETYPE_INDEX)&WIRETYPE_MASK) |
117 ((layer << LAYER_INDEX)&LAYER_MASK) |
118 ((wire << WIRE_INDEX)&WIRE_MASK);
119
120 return value;
121
122}
static int layer(const Identifier &id)
Values of different levels (failure returns 0)
Definition: MdcID.cxx:49
static int wire(const Identifier &id)
Definition: MdcID.cxx:54

◆ getIntID() [2/4]

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

◆ getIntID() [3/4]

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

Definition at line 124 of file MdcID.cxx.

127{
128 unsigned int value = ((BesDetectorID::MDC_ID << MDC_INDEX)&MDC_MASK) |
129 ((wireType << WIRETYPE_INDEX)&WIRETYPE_MASK) |
130 ((layer << LAYER_INDEX)&LAYER_MASK) |
131 ((wire << WIRE_INDEX)&WIRE_MASK);
132 return value;
133
134}

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

◆ getIntID() [4/4]

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

◆ getSTEREO_LAYER_MAX() [1/2]

unsigned int MdcID::getSTEREO_LAYER_MAX ( )
static

Definition at line 142 of file MdcID.cxx.

143{
144 return STEREO_LAYER_MAX;
145}

Referenced by MdcBuilder::initialize().

◆ getSTEREO_LAYER_MAX() [2/2]

static value_type MdcID::getSTEREO_LAYER_MAX ( )
static

◆ getSTEREO_WIRE() [1/2]

unsigned int MdcID::getSTEREO_WIRE ( )
static

Definition at line 160 of file MdcID.cxx.

161{
162 return STEREO_WIRE;
163}

◆ getSTEREO_WIRE() [2/2]

static value_type MdcID::getSTEREO_WIRE ( )
static

◆ getSTEREO_WIRE_MAX() [1/2]

unsigned int MdcID::getSTEREO_WIRE_MAX ( )
static

Definition at line 150 of file MdcID.cxx.

151{
152 return STEREO_WIRE_MAX;
153}

◆ getSTEREO_WIRE_MAX() [2/2]

static value_type MdcID::getSTEREO_WIRE_MAX ( )
static

◆ is_axial() [1/2]

bool MdcID::is_axial ( const Identifier id)

Test for axial and stereo wire.

Definition at line 43 of file MdcID.cxx.

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

Referenced by layer_max(), and wire_max().

◆ is_axial() [2/2]

bool MdcID::is_axial ( const Identifier id)

Test for axial and stereo wire.

◆ layer() [1/2]

int MdcID::layer ( const Identifier id)
static

Values of different levels (failure returns 0)

Definition at line 49 of file MdcID.cxx.

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

Referenced by HoughHitList::addTruthInfo(), BesEvent::ConstructMdcTrackFromRec(), MdcConverter::convert(), MdcMergeDups::doMergeCurl(), MdcROOTGeo::DrawHits(), MdcTrkRecon::dumpDigi(), MdcMergeDups::dumpRecMdcTrack(), MdcTrkRecon::dumpTdsTrack(), EFSectorHits::execute(), BhabhaPreSelect::execute(), EventPreSelect::execute(), EsTimeAlg::execute(), KalFitAlg::execute(), MdcDedxRecon::execute(), MdcxCosmicSewer::execute(), BesTrigL1::execute(), TrkReco::execute(), ValidRecMdcTrackAlg::execute(), MdcCalRecTrk::fgNoiseRatio(), MdcTrkRecon::fillEvent(), IniMdcCalib::fillHist(), PreXtMdcCalib::fillHist(), MdcTrkRecon::fillMcTruth(), Hough2D::fit(), Hough3D::fit(), DedxCalibEvent::genNtuple(), getIntID(), MdcRawDataProvider::getMdcDigiVec(), HoughHit::HoughHit(), MdcROOTGeo::IsHit(), MdcDedxRecon::kaltrackrec(), MdcDetector::Layer(), TTrackManager::makeTds(), MdcHit::MdcHit(), MdcDedxRecon::mdctrackrec(), MdcxCosmicSewer::MdcxHitsToHots(), MdcBuilder::pack(), PrintMcInfo::printDigi(), MdcPrintSvc::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(), and wire_id().

◆ layer() [2/2]

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

Values of different levels (failure returns 0)

◆ layer_max() [1/2]

int MdcID::layer_max ( const Identifier id)

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

Definition at line 59 of file MdcID.cxx.

59 {
60 if (is_axial(id)) {
61 return AXIAL_LAYER_MAX;
62 } else {
63 return STEREO_LAYER_MAX;
64 }
65}
bool is_axial(const Identifier &id)
Test for axial and stereo wire.
Definition: MdcID.cxx:43

◆ layer_max() [2/2]

int MdcID::layer_max ( const Identifier id)

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

◆ values_ok() [1/2]

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

Definition at line 12 of file MdcID.cxx.

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

Referenced by wire_id().

◆ values_ok() [2/2]

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

◆ wire() [1/2]

int MdcID::wire ( const Identifier id)
static

Definition at line 54 of file MdcID.cxx.

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

Referenced by HoughHitList::addTruthInfo(), BesEvent::ConstructMdcTrackFromRec(), MdcConverter::convert(), MdcROOTGeo::DrawHits(), MdcTrkRecon::dumpDigi(), MdcMergeDups::dumpRecMdcTrack(), MdcTrkRecon::dumpTdsTrack(), EFSectorHits::execute(), BhabhaPreSelect::execute(), EventPreSelect::execute(), EsTimeAlg::execute(), KalFitAlg::execute(), MdcDedxRecon::execute(), MdcxCosmicSewer::execute(), BesTrigL1::execute(), TrkReco::execute(), ValidRecMdcTrackAlg::execute(), MdcCalRecTrk::fgNoiseRatio(), MdcTrkRecon::fillEvent(), IniMdcCalib::fillHist(), MdcTrkRecon::fillMcTruth(), Hough2D::fit(), Hough3D::fit(), DedxCalibEvent::genNtuple(), KalFitTrack::getDriftDist(), getIntID(), MdcRawDataProvider::getMdcDigiVec(), HoughHit::HoughHit(), MdcROOTGeo::IsHit(), MdcDedxRecon::kaltrackrec(), TTrackManager::makeTds(), MdcHit::MdcHit(), MdcDedxRecon::mdctrackrec(), MdcxCosmicSewer::MdcxHitsToHots(), MdcBuilder::pack(), PrintMcInfo::printDigi(), MdcPrintSvc::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(), and wire_id().

◆ wire() [2/2]

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

◆ wire_id() [1/4]

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

Definition at line 90 of file MdcID.cxx.

92 {
93 if ( layer < INNER_STEREO_LAYER_MAX
94 || layer < (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX + OUTER_STEREO_LAYER_MAX)
95 && layer >= (INNER_STEREO_LAYER_MAX + INNER_AXIAL_LAYER_MAX )
96 )
97 return MdcID::wire_id ( STEREO_WIRE, layer, wire );
98 else return MdcID::wire_id (AXIAL_WIRE, layer, wire );
99
100}
static Identifier wire_id(int wireType, int layer, int wire)
For a single wire.
Definition: MdcID.cxx:77

◆ wire_id() [2/4]

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

◆ wire_id() [3/4]

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

For a single wire.

Definition at line 77 of file MdcID.cxx.

80 {
81 assert ( values_ok(wireType, layer, wire) );
82 int value = (BesDetectorID::MDC_ID << MDC_INDEX) |
83 (wireType << WIRETYPE_INDEX) |
84 (layer << LAYER_INDEX) |
85 (wire << WIRE_INDEX);
86 return Identifier(value);
87}
static bool values_ok(const unsigned int wireType, const unsigned int layer, const unsigned int wire)
Definition: MdcID.cxx:12

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

◆ wire_id() [4/4]

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

For a single wire.

◆ wire_max() [1/2]

int MdcID::wire_max ( const Identifier id)

Definition at line 68 of file MdcID.cxx.

68 {
69 if (is_axial(id)) {
70 return AXIAL_WIRE_MAX;
71 } else {
72 return STEREO_WIRE_MAX;
73 }
74}

◆ wire_max() [2/2]

int MdcID::wire_max ( const Identifier id)

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