9 #include "CLHEP/Units/GlobalSystemOfUnits.h"
27 std::pair<int,int> phicell =
hgcons->
assignCell(pos.x(),pos.y(),layer,0,
false);
28 int phiSector = phicell.first;
29 int icell = phicell.second;
38 if (
check_ && icell != -1) {
39 edm::LogError(
"HGCSim") <<
"[HGCNumberingScheme] ID out of bounds :"
40 <<
" Subdet= " << subdet <<
" Zside= " << iz
41 <<
" Layer= " << layer <<
" Sector= " << sector
42 <<
" SubSector= " << phiSector <<
" Cell= "
43 << icell <<
" Local position: (" << pos.x()
44 <<
"," << pos.y() <<
"," << pos.z() <<
")";
48 std::cout <<
"HGCNumberingScheme::i/p " << subdet <<
":" << layer <<
":"
49 << sector <<
":" << iz <<
":" << pos <<
" o/p " << phiSector
50 <<
":" << icell <<
":" << std::hex << index <<
std::dec <<
" "
59 return phicell.second;
bool isValid(int lay, int mod, int cell, bool reco) const
int assignCell(float x, float y, int layer)
maps a hit position to a sequential cell in a trapezoid surface defined by h,b,t
std::pair< float, float > getLocalCoords(int cell, int layer)
inverts the cell number in a trapezoid surface to local coordinates
virtual ~HGCNumberingScheme()
virtual uint32_t getUnitID(ForwardSubdetector subdet, int layer, int module, int iz, const G4ThreeVector &pos)
assigns the det id to a hit
type of data representation of DDCompactView
uint32_t rawId() const
get the raw id
T x() const
Cartesian x coordinate.
bool check(const std::string &)
HGCalDDDConstants * hgcons
static bool isValid(ForwardSubdetector subdet, int zp, int lay, int mod, int subsec, int cell)
std::pair< int, int > assignCell(float x, float y, int lay, int subSec, bool reco) const
std::pair< float, float > locateCell(int cell, int lay, int subSec, bool reco) const