CMS 3D CMS Logo

BTLDetId.cc
Go to the documentation of this file.
2 
4  // For tracking geometry navigation
5 
6  if (lay == CrysLayout::barphiflat) {
7  // barphiflat: count modules in a rod, combining all types
8  return BTLDetId(mtdSide(), mtdRR(), module() + kModulePerTypeBarPhiFlat * (modType() - 1), 0, 1);
9  } else if (lay == CrysLayout::v2 || lay == CrysLayout::v3) {
10  // v2: set number of crystals to 17 to distinguish from crystal BTLDetId
11  // v3: set number of crystals to 17 to distinguish from crystal BTLDetId, build V2-like type and RU number as in BTLNumberingScheme
12  return BTLDetId(mtdSide(), mtdRR(), runit(), module(), modType(), kCrystalsPerModuleV2 + 1);
13  }
14 
15  return 0;
16 }
17 
18 #include <iomanip>
19 
20 std::ostream& operator<<(std::ostream& os, const BTLDetId& id) {
21  os << (MTDDetId&)id;
22  os << " BTL " << std::endl
23  << " Side : " << id.mtdSide() << std::endl
24  << " Rod : " << id.mtdRR() << std::endl
25  << " Crystal type: " << id.modType() << std::endl
26  << " Readout unit: " << id.runit() << std::endl
27  << " Global RU : " << id.globalRunit() << std::endl
28  << " Module : " << id.module() << std::endl
29  << " Crystal : " << id.crystal() << std::endl;
30  return os;
31 }
static constexpr uint32_t kModulePerTypeBarPhiFlat
Definition: BTLDetId.h:33
CrysLayout
Definition: BTLDetId.h:46
int mtdSide() const
Definition: MTDDetId.h:59
int modType() const
Definition: BTLDetId.h:84
Detector identifier base class for the MIP Timing Layer.
Definition: MTDDetId.h:21
BTLDetId()
Definition: BTLDetId.h:51
int mtdRR() const
Definition: MTDDetId.h:64
int module() const
Definition: BTLDetId.h:81
int runit() const
Definition: BTLDetId.h:90
Detector identifier class for the Barrel Timing Layer. The crystal count must start from 0...
Definition: BTLDetId.h:19
static constexpr uint32_t kCrystalsPerModuleV2
Definition: BTLDetId.h:36
std::ostream & operator<<(std::ostream &os, const BTLDetId &id)
Definition: BTLDetId.cc:20
BTLDetId geographicalId(CrysLayout lay) const
Definition: BTLDetId.cc:3