#include <SiHitIdHelper.h>
|
static void | Print (int id) |
|
static void | SetBit (int &i, int bitpos) |
|
static void | UnsetBit (int &i, int bitpos) |
|
static void | Store (int &id, int value, int first, int field) |
|
static int | Retrieve (int id, int first, int field) |
|
Definition at line 25 of file SiHitIdHelper.h.
◆ SiHitIdHelper()
SiHitIdHelper::SiHitIdHelper |
( |
| ) |
|
|
private |
◆ buildHitId()
◆ buildHitIdFromStringHGTD()
int SiHitIdHelper::buildHitIdFromStringHGTD |
( |
int |
part, |
|
|
const std::string & |
physVolName |
|
) |
| const |
Definition at line 149 of file SiHitIdHelper.cxx.
153 int moduleInLayer = 0;
155 std::map<std::string, int&>
fields{{
"endcap",endcap},{
"layer",
layer},{
"moduleInLayer",moduleInLayer}};
157 size_t pos1 = (physVolName).
find(
field.first+
"_");
158 size_t pos2 = (physVolName).
find(
"_",pos1+
field.first.size()+1);
159 std::string strNew = (physVolName).substr(pos1+
field.first.size()+1,pos2-(pos1+
field.first.size()+1));
160 field.second = std::stoi(strNew);
◆ buildHitIdFromStringITk()
int SiHitIdHelper::buildHitIdFromStringITk |
( |
int |
part, |
|
|
const std::string & |
physVolName |
|
) |
| const |
Definition at line 131 of file SiHitIdHelper.cxx.
139 std::map<std::string, int&>
fields{{
"barrel_endcap",brlEcap},{
"layer_wheel",layerDisk},{
"phi_module",phiMod},{
"eta_module",
etaMod},{
"side",
side}};
141 size_t pos1 = (physVolName).
find(
field.first+
"_");
142 size_t pos2 = (physVolName).
find(
"_",pos1+
field.first.size()+1);
143 std::string strNew = (physVolName).substr(pos1+
field.first.size()+1,pos2-(pos1+
field.first.size()+1));
144 field.second = std::stoi(strNew);
◆ getBarrelEndcap()
int SiHitIdHelper::getBarrelEndcap |
( |
const int & |
hid | ) |
const |
◆ getEtaModule()
int SiHitIdHelper::getEtaModule |
( |
const int & |
hid | ) |
const |
◆ GetFieldValue()
int HitIdHelper::GetFieldValue |
( |
const std::string & |
name, |
|
|
HitID |
targetID |
|
) |
| const |
|
inherited |
Definition at line 48 of file HitIdHelper.cxx.
50 for (
unsigned int i=0;
i<
m_IDs.size();
i++)
58 std::cout<<
"HitIdHelper: field "<<
name<<
" not found: returning 0"<<
◆ GetHelper()
◆ getLayerDisk()
int SiHitIdHelper::getLayerDisk |
( |
const int & |
hid | ) |
const |
◆ getPhiModule()
int SiHitIdHelper::getPhiModule |
( |
const int & |
hid | ) |
const |
◆ getSide()
int SiHitIdHelper::getSide |
( |
const int & |
hid | ) |
const |
◆ Initialize()
void SiHitIdHelper::Initialize |
( |
| ) |
|
|
private |
Definition at line 24 of file SiHitIdHelper.cxx.
28 if (
detStore.retrieve().isSuccess()) {
29 if (
detStore->retrieve(
pix,
"PixelID").isFailure()) {
pix =
nullptr; }
32 bool isDBM = (
pix !=
nullptr &&
pix->dictionaryVersion() ==
"IBL-DBM");
34 bool isITkHGTD = (
pix !=
nullptr &&
pix->dictionaryVersion() ==
"ITkHGTD");
36 bool isITkHGTDPLR = (
pix !=
nullptr &&
pix->dictionaryVersion() ==
"ITkHGTDPLR");
38 bool isITk_HGTD_NewID_PLR = (
pix !=
nullptr &&
pix->dictionaryVersion() ==
"P2-RUN4");
40 m_isITkHGTD = isITkHGTD || isITkHGTDPLR || isITk_HGTD_NewID_PLR;
43 else if (isITkHGTDPLR || isITk_HGTD_NewID_PLR)
InitializeField(
"Part",0,3);
◆ InitializeField() [1/2]
void HitIdHelper::InitializeField |
( |
const std::string & |
n, |
|
|
int |
nb |
|
) |
| |
|
inherited |
◆ InitializeField() [2/2]
void HitIdHelper::InitializeField |
( |
const std::string & |
n, |
|
|
int |
vmn, |
|
|
int |
vmx |
|
) |
| |
|
inherited |
◆ isHGTD()
bool SiHitIdHelper::isHGTD |
( |
const int & |
hid | ) |
const |
◆ isPixel()
bool SiHitIdHelper::isPixel |
( |
const int & |
hid | ) |
const |
◆ isPLR()
bool SiHitIdHelper::isPLR |
( |
const int & |
hid | ) |
const |
◆ isSCT()
bool SiHitIdHelper::isSCT |
( |
const int & |
hid | ) |
const |
◆ Print()
void HitIdHelper::Print |
( |
int |
id | ) |
|
|
staticinherited |
Definition at line 73 of file HitIdHelper.cxx.
75 for (
unsigned int i=0;
i<8*
sizeof(
int);
i++)
77 if ((
id & (1
u<<
i))) std::cout<<
"1";
◆ PrintFields()
void HitIdHelper::PrintFields |
( |
| ) |
|
|
inherited |
◆ Retrieve()
int HitIdHelper::Retrieve |
( |
int |
id, |
|
|
int |
first, |
|
|
int |
field |
|
) |
| |
|
staticprotectedinherited |
◆ SetBit()
void HitIdHelper::SetBit |
( |
int & |
i, |
|
|
int |
bitpos |
|
) |
| |
|
staticprotectedinherited |
◆ SetFieldValue()
void HitIdHelper::SetFieldValue |
( |
const std::string & |
name, |
|
|
int |
n, |
|
|
HitID & |
targetID |
|
) |
| const |
|
inherited |
Definition at line 31 of file HitIdHelper.cxx.
33 for (
unsigned int i=0;
i<
m_IDs.size();
i++)
38 std::cout<<
"HitIdHelper: field "<<
name<<
": supplied value "<<
n<<
39 " is not within the allowed range ["<<
m_IDs[
i].vMin<<
","<<
m_IDs[
i].vMax
40 <<
"] : the result of this action is unpredictable "<<std::endl;
◆ Store()
void HitIdHelper::Store |
( |
int & |
id, |
|
|
int |
value, |
|
|
int |
first, |
|
|
int |
field |
|
) |
| |
|
staticprotectedinherited |
◆ UnsetBit()
void HitIdHelper::UnsetBit |
( |
int & |
i, |
|
|
int |
bitpos |
|
) |
| |
|
staticprotectedinherited |
◆ m_currentStorage
int HitIdHelper::m_currentStorage |
|
protectedinherited |
◆ m_IDs
◆ m_isITkHGTD
bool SiHitIdHelper::m_isITkHGTD {} |
|
private |
The documentation for this class was generated from the following files: