#include <Detectors.h>
Inheritance diagram for DayaBay::RpcSensor:
Public Member Functions | |
RpcSensor () | |
RpcSensor (int panelRow, int panelColumn, int layer, int strip, Site::Site_t site, DetectorId::DetectorId_t detid) | |
RpcSensor (const RpcSensor &sensor) | |
RpcSensor (int data) | |
virtual | ~RpcSensor () |
RpcSensor & | operator= (const RpcSensor &sensor) |
int | panelRow () const |
int | panelColumn () const |
int | layer () const |
int | strip () const |
virtual bool | bogus () const |
Check for bogosity. | |
int | sensorId () const |
Return the sensor ID number. | |
void | set (Site::Site_t site, DetectorId::DetectorId_t det) |
Set values after construction. | |
std::string | asString () const |
Return string representation of the data. | |
std::string | detName () const |
Return the detector name = SiteDetectorId (eg. NearAD1, FarIWS). | |
DetectorId::DetectorId_t | detectorId () const |
Return the detector ID. | |
Site::Site_t | site () const |
Return the site. | |
int | fullPackedData () const |
Return the full, raw packed integer. | |
short int | siteDetPackedData () const |
Return the part of the packing just for the site+detector part. | |
bool | isAD () const |
Is this an AD? | |
bool | isWaterShield () const |
Is this a Water Shield (Inner or Outer)? | |
bool | operator== (const Detector &rhs) const |
bool | operator!= (const Detector &rhs) const |
Static Public Member Functions | |
static short int | siteDetPackedFromString (const std::string str) |
Protected Attributes | |
unsigned int | m_data |
Besides Site and Detector ID, RPC strips are characterized as follows:
Panels are arranged in a grid of 6 x 9 (Near site) and 9 x 9 (Far site).
Panel row: counts 1 to 9 starting from the edge of the RPC adjacent to the hall entrance.
Panel column: counts 1 to 6 (Near site) or 1 to 9 (Far site). Numbering starts on the left when looking at the RPC from above. See the diagram below.
Hall Entrance (this side)
Col: 1 2 3 4 5 6 --------------------------------------- | | | | | | | Row: | | | | | | | 1 | | | | | | | --------------------------------------- | | | | | | | Looking at | | | | | | | 2 Near site RPC | | | | | | | from above. --------------------------------------- | | | | | | |
Layer: counts 1 to 4 from the bottom layer of the RPC.
Strip: counts 1 to 8 in the same direction as either the row or column number, depending on the orientation of the strips.
Definition at line 205 of file Detectors.h.
DayaBay::RpcSensor::RpcSensor | ( | ) | [inline] |
DayaBay::RpcSensor::RpcSensor | ( | int | panelRow, | |
int | panelColumn, | |||
int | layer, | |||
int | strip, | |||
Site::Site_t | site, | |||
DetectorId::DetectorId_t | detid | |||
) |
Definition at line 281 of file Detectors.cc.
00284 : DetectorSensor((panelRow<<12)|(panelColumn<<8)|(layer<<4)|strip,site,detid) 00285 { 00286 }
DayaBay::RpcSensor::RpcSensor | ( | const RpcSensor & | sensor | ) | [inline] |
DayaBay::RpcSensor::RpcSensor | ( | int | data | ) | [inline] |
DayaBay::RpcSensor::~RpcSensor | ( | ) | [virtual] |
int DayaBay::RpcSensor::panelRow | ( | ) | const |
int DayaBay::RpcSensor::panelColumn | ( | ) | const |
int DayaBay::RpcSensor::layer | ( | ) | const |
int DayaBay::RpcSensor::strip | ( | ) | const |
Definition at line 308 of file Detectors.cc.
00309 { 00310 return this->sensorId()&0x0000000f; 00311 }
bool DayaBay::RpcSensor::bogus | ( | ) | const [virtual] |
Check for bogosity.
Reimplemented from DayaBay::DetectorSensor.
Definition at line 327 of file Detectors.cc.
00328 { 00329 if (this->Detector::bogus()) return true; 00330 if (detectorId() != DetectorId::kRPC) { 00331 return true; 00332 } 00333 00334 // fixme: fill in numerology 00335 }
int DayaBay::DetectorSensor::sensorId | ( | ) | const [inherited] |
Return the sensor ID number.
Definition at line 158 of file Detectors.cc.
00159 { 00160 return m_data&0x0000ffff; 00161 }
void DayaBay::Detector::set | ( | Site::Site_t | site, | |
DetectorId::DetectorId_t | det | |||
) | [inherited] |
std::string DayaBay::Detector::asString | ( | ) | const [inherited] |
std::string DayaBay::Detector::detName | ( | ) | const [inherited] |
Return the detector name = SiteDetectorId (eg. NearAD1, FarIWS).
Definition at line 61 of file Detectors.cc.
00062 { 00063 std::string ret = Site::AsString(site()); 00064 ret += DetectorId::AsString(detectorId()); 00065 00066 return ret; 00067 }
DetectorId::DetectorId_t DayaBay::Detector::detectorId | ( | ) | const [inherited] |
Return the detector ID.
Definition at line 69 of file Detectors.cc.
00070 { 00071 return (DetectorId::DetectorId_t)((m_data&0x00ff0000)>>16); 00072 }
Site::Site_t DayaBay::Detector::site | ( | ) | const [inherited] |
Return the site.
Definition at line 74 of file Detectors.cc.
00075 { 00076 return (Site::Site_t)((m_data&0xff000000)>>24); 00077 }
int DayaBay::Detector::fullPackedData | ( | ) | const [inherited] |
Return the full, raw packed integer.
If created by subclass, this may include values in the lower two detector sensor bytes.
Definition at line 79 of file Detectors.cc.
00080 { 00081 return m_data; 00082 }
short int DayaBay::Detector::siteDetPackedData | ( | ) | const [inherited] |
Return the part of the packing just for the site+detector part.
Definition at line 84 of file Detectors.cc.
00085 { 00086 return (short int)(m_data>>16); 00087 }
short int DayaBay::Detector::siteDetPackedFromString | ( | const std::string | str | ) | [static, inherited] |
Definition at line 107 of file Detectors.cc.
00107 { 00108 DetectorId::DetectorId_t detId = DetectorId::FromString("Unknown"); 00109 Site::Site_t site = Site::FromString("Unknown"); 00110 00111 //find site 00112 00113 if (str.find("DayaBay")!=std::string::npos) site=Site::FromString("DayaBay"); 00114 if (str.find("LingAo")!=std::string::npos) site=Site::FromString("LingAo"); 00115 if (str.find("Mid")!=std::string::npos) site=Site::FromString("Mid"); 00116 if (str.find("Far")!=std::string::npos) site=Site::FromString("Far"); 00117 if (str.find("Aberdeen")!=std::string::npos) site=Site::FromString("Aberdeen"); 00118 if (str.find("SAB")!=std::string::npos) site=Site::FromString("SAB"); 00119 00120 //find detector 00121 00122 if (str.find("AD1")!=std::string::npos) detId=DetectorId::FromString("AD1"); 00123 if (str.find("AD2")!=std::string::npos) detId=DetectorId::FromString("AD2"); 00124 if (str.find("AD3")!=std::string::npos) detId=DetectorId::FromString("AD3"); 00125 if (str.find("AD4")!=std::string::npos) detId=DetectorId::FromString("AD4"); 00126 if (str.find("IWS")!=std::string::npos) detId=DetectorId::FromString("IWS"); 00127 if (str.find("OWS")!=std::string::npos) detId=DetectorId::FromString("OWS"); 00128 if (str.find("RPC")!=std::string::npos) detId=DetectorId::FromString("RPC"); 00129 00130 return DayaBay::Detector(site,detId).siteDetPackedData(); 00131 }
bool DayaBay::Detector::isAD | ( | ) | const [inline, inherited] |
Is this an AD?
Definition at line 71 of file Detectors.h.
00071 { return DetectorId::isAD(this->detectorId()); }
bool DayaBay::Detector::isWaterShield | ( | ) | const [inline, inherited] |
Is this a Water Shield (Inner or Outer)?
Definition at line 74 of file Detectors.h.
00074 { return DetectorId::isWaterShield(this->detectorId()); }
bool DayaBay::Detector::operator== | ( | const Detector & | rhs | ) | const [inline, inherited] |
bool DayaBay::Detector::operator!= | ( | const Detector & | rhs | ) | const [inline, inherited] |
unsigned int DayaBay::Detector::m_data [protected, inherited] |
Definition at line 85 of file Detectors.h.