5 int kCrystalsInPhi = 1;
28 + (
crystal()%kCrystalsInPhi > 0 ?
crystal()%kCrystalsInPhi : kCrystalsInPhi ) ;
33 int kCrystalsInEta = 1, kCrystalsInPhi = 1;
34 std::array<int,4> kTypeBoundaries = {};
64 int etaRowInModule =
zside() > 0 ? (
crystal()-1)/kCrystalsInPhi + 1 : kCrystalsInEta - (
crystal()-1)/kCrystalsInPhi;
65 return kCrystalsInEta * (
module() -1 )
66 + kCrystalsInEta * kTypeBoundaries[(
modType() -1)]
71 int max_iphi = 1, max_ieta = 1;
103 int max_iphi =1 ,max_ieta = 1, nphi = 0, keta = 0, tmphi = hi + 1;
104 std::array<int,4> kTypeBoundaries = {};
143 if ( tmphi > max_ieta*max_iphi ) { zside = 1; }
144 int ip = (tmphi-1)%max_iphi+1;
145 int ie = (tmphi-1)/max_iphi - max_ieta;
146 ie = ( zside == 1 ? ie + 1 : -ie ) ;
149 if (
module > kTypeBoundaries[1] ) { modtype = (
module > kTypeBoundaries[2] ? 3 : 2 ) ; }
150 if ( modtype > 1 ) {
module =
module - kTypeBoundaries[modtype-1]; }
151 crystal = zside == 1 ? ((ip-1)%nphi+1)+((ie-1)%keta)*nphi : ((ip-1)%nphi+1)+(keta - 1 - (ie-1)%keta)*nphi ;
177 os <<
" BTL " << std::endl
178 <<
" Side : " <<
id.mtdSide() << std::endl
179 <<
" Rod : " <<
id.mtdRR() << std::endl
180 <<
" Module : " <<
id.module() << std::endl
181 <<
" Crystal type: " <<
id.modType() << std::endl
182 <<
" Crystal : " <<
id.crystal() << std::endl;
static constexpr int MAX_IETA_BAR
int modulesPerType(CrysLayout lay) const
static constexpr int kCrystalsInPhiBarPhi
int ietaAbs(CrysLayout lay) const
static constexpr std::array< int, 4 > kTypeBoundariesReference
Detector identifier base class for the MIP Timing Layer.
static constexpr int MAX_IPHI_BAR
BTLDetId geographicalId(CrysLayout lay) const
static constexpr int HALF_ROD
static constexpr int MAX_IETA_TILE
static constexpr int MAX_IPHI_BARZFLAT
static constexpr int MAX_IPHI_TILE
static constexpr int kCrystalsInPhiBar
static constexpr int MAX_IETA_BARPHIFLAT
static constexpr std::array< int, 4 > kTypeBoundariesBarZflat
static constexpr std::array< int, 4 > kTypeBoundariesBarPhiFlat
int hashedIndex(CrysLayout lay) const
static constexpr int kCrystalsInEtaBarPhi
static constexpr int kCrystalsInPhiTile
int iphi(CrysLayout lay) const
BTLDetId getUnhashedIndex(int hi, CrysLayout lay) const
static constexpr int kCrystalsInEtaBar
static constexpr int MAX_IETA_BARZFLAT
static constexpr int kCrystalsInEtaBarZ
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
static constexpr int kCrystalsInEtaTile
static constexpr int kCrystalsInPhiBarZ
std::ostream & operator<<(std::ostream &os, const BTLDetId &id)
T mod(const T &a, const T &b)
static constexpr int MAX_IPHI_BARPHIFLAT