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

#include <EmcID.h>

Inheritance diagram for EmcID:

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

 EmcID ()
 constructor
 ~EmcID ()
 destructor
unsigned int theta_module_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
unsigned int phi_module_max (const Identifier &id)
 EmcID ()
 constructor
 ~EmcID ()
 destructor
unsigned int theta_module_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
unsigned int phi_module_max (const Identifier &id)
 EmcID ()
 constructor
 ~EmcID ()
 destructor
unsigned int theta_module_max (const Identifier &id)
 Max/Min values for each field (error returns -999).
unsigned int phi_module_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 crystal_id (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
 For a single crystal.
static unsigned int getIntID (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool values_ok (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool is_barrel (const Identifier &id)
 Test for barrel.
static unsigned int barrel_ec (const Identifier &id)
 Values of different levels (failure returns 0).
static unsigned int theta_module (const Identifier &id)
static unsigned int phi_module (const Identifier &id)
static unsigned int getTHETA_BARREL_MAX ()
static unsigned int getTHETA_BARREL_MIN ()
static unsigned int getTHETA_ENDCAP_MAX ()
static unsigned int getTHETA_ENDCAP_MIN ()
static unsigned int getPHI_BARREL_MAX ()
static unsigned int getPHI_BARREL_MIN ()
static unsigned int getPHI_ENDCAP_MAX (const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN ()
static unsigned int getBARREL_EC_MAX ()
static unsigned int getBARREL_EC_MIN ()
static unsigned int getENDCAP_EAST ()
static unsigned int getBARREL ()
static unsigned int getENDCAP_WEST ()
static Identifier crystal_id (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
 For a single crystal.
static unsigned int getIntID (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool values_ok (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool is_barrel (const Identifier &id)
 Test for barrel.
static unsigned int barrel_ec (const Identifier &id)
 Values of different levels (failure returns 0).
static unsigned int theta_module (const Identifier &id)
static unsigned int phi_module (const Identifier &id)
static unsigned int getTHETA_BARREL_MAX ()
static unsigned int getTHETA_BARREL_MIN ()
static unsigned int getTHETA_ENDCAP_MAX ()
static unsigned int getTHETA_ENDCAP_MIN ()
static unsigned int getPHI_BARREL_MAX ()
static unsigned int getPHI_BARREL_MIN ()
static unsigned int getPHI_ENDCAP_MAX (const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN ()
static unsigned int getBARREL_EC_MAX ()
static unsigned int getBARREL_EC_MIN ()
static unsigned int getENDCAP_EAST ()
static unsigned int getBARREL ()
static unsigned int getENDCAP_WEST ()
static Identifier crystal_id (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
 For a single crystal.
static unsigned int getIntID (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool values_ok (const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
static bool is_barrel (const Identifier &id)
 Test for barrel.
static unsigned int barrel_ec (const Identifier &id)
 Values of different levels (failure returns 0).
static unsigned int theta_module (const Identifier &id)
static unsigned int phi_module (const Identifier &id)
static unsigned int getTHETA_BARREL_MAX ()
static unsigned int getTHETA_BARREL_MIN ()
static unsigned int getTHETA_ENDCAP_MAX ()
static unsigned int getTHETA_ENDCAP_MIN ()
static unsigned int getPHI_BARREL_MAX ()
static unsigned int getPHI_BARREL_MIN ()
static unsigned int getPHI_ENDCAP_MAX (const unsigned int theta)
static unsigned int getPHI_ENDCAP_MIN ()
static unsigned int getBARREL_EC_MAX ()
static unsigned int getBARREL_EC_MIN ()
static unsigned int getENDCAP_EAST ()
static unsigned int getBARREL ()
static unsigned int getENDCAP_WEST ()

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

◆ EmcID() [1/3]

EmcID::EmcID ( void )

constructor

Definition at line 4 of file EmcID.cxx.

4{}

◆ ~EmcID() [1/3]

EmcID::~EmcID ( void )

destructor

Definition at line 6 of file EmcID.cxx.

6{}

◆ EmcID() [2/3]

EmcID::EmcID ( )

constructor

◆ ~EmcID() [2/3]

EmcID::~EmcID ( )

destructor

◆ EmcID() [3/3]

EmcID::EmcID ( )

constructor

◆ ~EmcID() [3/3]

EmcID::~EmcID ( )

destructor

Member Function Documentation

◆ barrel_ec() [1/3]

◆ barrel_ec() [2/3]

unsigned int EmcID::barrel_ec ( const Identifier & id)
static

Values of different levels (failure returns 0).

◆ barrel_ec() [3/3]

unsigned int EmcID::barrel_ec ( const Identifier & id)
static

Values of different levels (failure returns 0).

◆ crystal_id() [1/3]

Identifier EmcID::crystal_id ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

For a single crystal.

Definition at line 63 of file EmcID.cxx.

64 {
66 unsigned int value = ( EMC_ID << EMC_INDEX ) | ( barrel_ec << BARREL_EC_INDEX ) |
67 ( theta_module << THETA_INDEX ) | ( phi_module << PHI_INDEX );
68 return Identifier( value );
69}
static bool values_ok(const unsigned int barrel_ec, const unsigned int theta_module, const unsigned int phi_module)
Definition EmcID.cxx:9
static unsigned int barrel_ec(const Identifier &id)
Values of different levels (failure returns 0).
Definition EmcID.cxx:36
static unsigned int theta_module(const Identifier &id)
Definition EmcID.cxx:41
static unsigned int phi_module(const Identifier &id)
Definition EmcID.cxx:46

Referenced by EmcSelBhaEvent::CollectBhabha(), RawDataEmcMcHitCnv::createObj(), AbsCor::execute(), EmcRec::execute(), EmcRecROOTGeo::FillCrystalMap(), EmcRecEndCapGeo::GetCrystal(), EmcRecNeighbor::GetNeighbors(), EmcRecNeighbor::GetNextNeighbors(), EmcRecROOTGeo::InitFromXML(), main(), EmcRecDigit2Hit::Output(), EmcRecDigit2Hit::OutputEndcap(), EmcRecShowerPosLin::Position(), EmcRecShowerPosLinShMax::Position(), EmcRecShowerPosLog::Position(), EmcRecShowerPosLoglin::Position(), BesEmcSD::ProcessHits(), BesRawDataWriter::SaveEmcDigits(), and BesMcTruthWriter::SaveEmcTruth().

◆ crystal_id() [2/3]

Identifier EmcID::crystal_id ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

For a single crystal.

◆ crystal_id() [3/3]

Identifier EmcID::crystal_id ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

For a single crystal.

◆ getBARREL() [1/3]

unsigned int EmcID::getBARREL ( )
static

Definition at line 97 of file EmcID.cxx.

97{ return BARREL; }

Referenced by EmcRecROOTGeo::FillCrystalMap(), EmcRecNeighbor::GetNeighbors(), and EmcBuilder::initialize().

◆ getBARREL() [2/3]

unsigned int EmcID::getBARREL ( )
static

◆ getBARREL() [3/3]

unsigned int EmcID::getBARREL ( )
static

◆ getBARREL_EC_MAX() [1/3]

unsigned int EmcID::getBARREL_EC_MAX ( )
static

Definition at line 92 of file EmcID.cxx.

92{ return BARREL_EC_MAX; }

Referenced by EmcBuilder::initialize().

◆ getBARREL_EC_MAX() [2/3]

unsigned int EmcID::getBARREL_EC_MAX ( )
static

◆ getBARREL_EC_MAX() [3/3]

unsigned int EmcID::getBARREL_EC_MAX ( )
static

◆ getBARREL_EC_MIN() [1/3]

unsigned int EmcID::getBARREL_EC_MIN ( )
static

Definition at line 93 of file EmcID.cxx.

93{ return BARREL_EC_MIN; }

Referenced by EmcBuilder::initialize().

◆ getBARREL_EC_MIN() [2/3]

unsigned int EmcID::getBARREL_EC_MIN ( )
static

◆ getBARREL_EC_MIN() [3/3]

unsigned int EmcID::getBARREL_EC_MIN ( )
static

◆ getENDCAP_EAST() [1/3]

unsigned int EmcID::getENDCAP_EAST ( )
static

◆ getENDCAP_EAST() [2/3]

unsigned int EmcID::getENDCAP_EAST ( )
static

◆ getENDCAP_EAST() [3/3]

unsigned int EmcID::getENDCAP_EAST ( )
static

◆ getENDCAP_WEST() [1/3]

unsigned int EmcID::getENDCAP_WEST ( )
static

Definition at line 99 of file EmcID.cxx.

99{ return ENDCAP_WEST; }

Referenced by EmcRecEndCapGeo::GetCrystal(), EmcRecNeighbor::GetNeighbors(), and main().

◆ getENDCAP_WEST() [2/3]

unsigned int EmcID::getENDCAP_WEST ( )
static

◆ getENDCAP_WEST() [3/3]

unsigned int EmcID::getENDCAP_WEST ( )
static

◆ getIntID() [1/3]

unsigned int EmcID::getIntID ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

Definition at line 71 of file EmcID.cxx.

72 {
74 unsigned int value = ( EMC_ID << EMC_INDEX ) | ( barrel_ec << BARREL_EC_INDEX ) |
75 ( theta_module << THETA_INDEX ) | ( phi_module << PHI_INDEX );
76 return value;
77}

Referenced by EmcBuilder::initialize().

◆ getIntID() [2/3]

unsigned int EmcID::getIntID ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

◆ getIntID() [3/3]

unsigned int EmcID::getIntID ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

◆ getPHI_BARREL_MAX() [1/3]

unsigned int EmcID::getPHI_BARREL_MAX ( )
static

◆ getPHI_BARREL_MAX() [2/3]

unsigned int EmcID::getPHI_BARREL_MAX ( )
static

◆ getPHI_BARREL_MAX() [3/3]

unsigned int EmcID::getPHI_BARREL_MAX ( )
static

◆ getPHI_BARREL_MIN() [1/3]

unsigned int EmcID::getPHI_BARREL_MIN ( )
static

Definition at line 84 of file EmcID.cxx.

84{ return PHI_BARREL_MIN; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcRecNeighbor::GetNextNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::Output().

◆ getPHI_BARREL_MIN() [2/3]

unsigned int EmcID::getPHI_BARREL_MIN ( )
static

◆ getPHI_BARREL_MIN() [3/3]

unsigned int EmcID::getPHI_BARREL_MIN ( )
static

◆ getPHI_ENDCAP_MAX() [1/3]

unsigned int EmcID::getPHI_ENDCAP_MAX ( const unsigned int theta)
static

Definition at line 85 of file EmcID.cxx.

85 {
86 if ( theta == 0 || theta == 1 ) { return PHI_ENDCAP_MAX1; }
87 if ( theta == 2 || theta == 3 ) { return PHI_ENDCAP_MAX2; }
88 if ( theta == 4 || theta == 5 ) { return PHI_ENDCAP_MAX3; }
89 return 0; // no available number
90}

Referenced by EmcRecEndCapGeo::GetCCenter(), EmcRecEndCapGeo::GetCFrontCenter(), EmcRecEndCapGeo::GetCrystal(), EmcRecNeighbor::GetNeighbors(), EmcBuilder::initialize(), main(), EmcRecDigit2Hit::OutputEndcap(), phi_module_max(), and values_ok().

◆ getPHI_ENDCAP_MAX() [2/3]

unsigned int EmcID::getPHI_ENDCAP_MAX ( const unsigned int theta)
static

◆ getPHI_ENDCAP_MAX() [3/3]

unsigned int EmcID::getPHI_ENDCAP_MAX ( const unsigned int theta)
static

◆ getPHI_ENDCAP_MIN() [1/3]

unsigned int EmcID::getPHI_ENDCAP_MIN ( )
static

Definition at line 91 of file EmcID.cxx.

91{ return PHI_ENDCAP_MIN; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::OutputEndcap().

◆ getPHI_ENDCAP_MIN() [2/3]

unsigned int EmcID::getPHI_ENDCAP_MIN ( )
static

◆ getPHI_ENDCAP_MIN() [3/3]

unsigned int EmcID::getPHI_ENDCAP_MIN ( )
static

◆ getTHETA_BARREL_MAX() [1/3]

unsigned int EmcID::getTHETA_BARREL_MAX ( )
static

Definition at line 79 of file EmcID.cxx.

79{ return THETA_BARREL_MAX; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcRecNeighbor::GetNextNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::Output().

◆ getTHETA_BARREL_MAX() [2/3]

unsigned int EmcID::getTHETA_BARREL_MAX ( )
static

◆ getTHETA_BARREL_MAX() [3/3]

unsigned int EmcID::getTHETA_BARREL_MAX ( )
static

◆ getTHETA_BARREL_MIN() [1/3]

unsigned int EmcID::getTHETA_BARREL_MIN ( )
static

Definition at line 80 of file EmcID.cxx.

80{ return THETA_BARREL_MIN; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcRecNeighbor::GetNextNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::Output().

◆ getTHETA_BARREL_MIN() [2/3]

unsigned int EmcID::getTHETA_BARREL_MIN ( )
static

◆ getTHETA_BARREL_MIN() [3/3]

unsigned int EmcID::getTHETA_BARREL_MIN ( )
static

◆ getTHETA_ENDCAP_MAX() [1/3]

unsigned int EmcID::getTHETA_ENDCAP_MAX ( )
static

Definition at line 81 of file EmcID.cxx.

81{ return THETA_ENDCAP_MAX; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::OutputEndcap().

◆ getTHETA_ENDCAP_MAX() [2/3]

unsigned int EmcID::getTHETA_ENDCAP_MAX ( )
static

◆ getTHETA_ENDCAP_MAX() [3/3]

unsigned int EmcID::getTHETA_ENDCAP_MAX ( )
static

◆ getTHETA_ENDCAP_MIN() [1/3]

unsigned int EmcID::getTHETA_ENDCAP_MIN ( )
static

Definition at line 82 of file EmcID.cxx.

82{ return THETA_ENDCAP_MIN; }

Referenced by EmcRecNeighbor::GetNeighbors(), EmcBuilder::initialize(), and EmcRecDigit2Hit::OutputEndcap().

◆ getTHETA_ENDCAP_MIN() [2/3]

unsigned int EmcID::getTHETA_ENDCAP_MIN ( )
static

◆ getTHETA_ENDCAP_MIN() [3/3]

unsigned int EmcID::getTHETA_ENDCAP_MIN ( )
static

◆ is_barrel() [1/3]

bool EmcID::is_barrel ( const Identifier & id)
static

Test for barrel.

Definition at line 30 of file EmcID.cxx.

30 {
31 unsigned int pos = ( id.get_value() & EmcID::BARREL_EC_MASK ) >> EmcID::BARREL_EC_INDEX;
32 return ( pos == BARREL ) ? true : false;
33}

Referenced by EmcRecGeoSvc::GetCCenter(), EmcRecGeoSvc::GetCFrontCenter(), EmcRecGeoSvc::GetCrystal(), EmcRecGeoSvc::GetCrystalPoint(), main(), phi_module_max(), and theta_module_max().

◆ is_barrel() [2/3]

bool EmcID::is_barrel ( const Identifier & id)
static

Test for barrel.

◆ is_barrel() [3/3]

bool EmcID::is_barrel ( const Identifier & id)
static

Test for barrel.

◆ phi_module() [1/3]

◆ phi_module() [2/3]

unsigned int EmcID::phi_module ( const Identifier & id)
static

◆ phi_module() [3/3]

unsigned int EmcID::phi_module ( const Identifier & id)
static

◆ phi_module_max() [1/3]

unsigned int EmcID::phi_module_max ( const Identifier & id)

Definition at line 57 of file EmcID.cxx.

57 {
58 if ( is_barrel( id ) ) { return PHI_BARREL_MAX; }
59 else { return getPHI_ENDCAP_MAX( theta_module( id ) ); }
60}
static bool is_barrel(const Identifier &id)
Test for barrel.
Definition EmcID.cxx:30
static unsigned int getPHI_ENDCAP_MAX(const unsigned int theta)
Definition EmcID.cxx:85

◆ phi_module_max() [2/3]

unsigned int EmcID::phi_module_max ( const Identifier & id)

◆ phi_module_max() [3/3]

unsigned int EmcID::phi_module_max ( const Identifier & id)

◆ theta_module() [1/3]

◆ theta_module() [2/3]

unsigned int EmcID::theta_module ( const Identifier & id)
static

◆ theta_module() [3/3]

unsigned int EmcID::theta_module ( const Identifier & id)
static

◆ theta_module_max() [1/3]

unsigned int EmcID::theta_module_max ( const Identifier & id)

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

Definition at line 51 of file EmcID.cxx.

51 {
52 if ( is_barrel( id ) ) { return THETA_BARREL_MAX; }
53 else { return THETA_ENDCAP_MAX; }
54}

◆ theta_module_max() [2/3]

unsigned int EmcID::theta_module_max ( const Identifier & id)

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

◆ theta_module_max() [3/3]

unsigned int EmcID::theta_module_max ( const Identifier & id)

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

◆ values_ok() [1/3]

bool EmcID::values_ok ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

Definition at line 9 of file EmcID.cxx.

10 {
11 // Check values
12 // unsigned int >= 0, this is definitely true.
13 // Omit the compare with MIN(0) to avoid warnings in compile.
14 if ( barrel_ec > BARREL_EC_MAX ) return false;
15
16 if ( barrel_ec == BARREL )
17 {
18 if ( phi_module > PHI_BARREL_MAX ) return false;
19 if ( theta_module > THETA_BARREL_MAX ) return false;
20 }
21 else
22 { // for endcap
23 if ( theta_module > THETA_ENDCAP_MAX ) return false;
24 if ( phi_module > getPHI_ENDCAP_MAX( theta_module ) ) return false;
25 }
26 return true;
27}

Referenced by crystal_id(), and getIntID().

◆ values_ok() [2/3]

bool EmcID::values_ok ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

◆ values_ok() [3/3]

bool EmcID::values_ok ( const unsigned int barrel_ec,
const unsigned int theta_module,
const unsigned int phi_module )
static

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