CMS 3D CMS Logo

TotemSymbId.cc
Go to the documentation of this file.
1 /****************************************************************************
2 *
3 * This is a part of TOTEM offline software.
4 * Authors:
5 * Jan Kašpar (jan.kaspar@cern.ch)
6 *
7 ****************************************************************************/
8 
16 
17 void TotemSymbID::print(std::ostream& os, std::string subSystemName) const {
18  const auto ctppsDetId = CTPPSDetId(symbolicID);
19  os << "DetId=" << symbolicID << " (";
20 
21  if (subSystemName == "TrackingStrip") {
22  os << "subDet=" << ctppsDetId.subdetId() << " " << TotemRPDetId(symbolicID);
23  } else if (subSystemName == "TimingDiamond") {
24  os << "subDet=" << ctppsDetId.subdetId() << " " << CTPPSDiamondDetId(symbolicID);
25  } else if (subSystemName == "TotemT2") {
26  os << "subDet=" << ctppsDetId.subdetId() << " " << TotemT2DetId(symbolicID);
27  } else if (subSystemName == "TotemTiming") {
28  const auto timingId = TotemTimingDetId(symbolicID);
29  os << "subDet=" << ctppsDetId.subdetId() << " " << timingId;
30  if (timingId.channel() == TotemTimingDetId::ID_NOT_SET || timingId.plane() == 0) {
31  os << ") - (plane/channel det ids not applicable to SAMPIC; initialized with def values " << 0 << "/"
32  << TotemTimingDetId::ID_NOT_SET << " now";
33  }
34  } else {
35  os << ctppsDetId;
36  }
37 
38  os << ")";
39 }
40 
41 std::ostream& operator<<(std::ostream& s, const TotemSymbID& sid) {
42  s << "DetId=" << sid.symbolicID << " (" << CTPPSDetId(sid.symbolicID) << ")";
43 
44  return s;
45 }
Detector ID class for TOTEM Si strip detectors.
Definition: TotemRPDetId.h:30
std::ostream & operator<<(std::ostream &s, const TotemSymbID &sid)
Definition: TotemSymbId.cc:41
Detector ID class for Totem T2 detectors. Bits [19:31] : Base CTPPSDetId class attributes Bits [16:18...
Definition: TotemT2DetId.h:25
Symbolic ID describing an entity of a TOTEM subdetector.
Definition: TotemSymbId.h:18
unsigned int symbolicID
chip ID, raw integer representation of DetId class
Definition: TotemSymbId.h:21
Base class for CTPPS detector IDs.
Definition: CTPPSDetId.h:32
void print(std::ostream &os, std::string subSystemName) const
Definition: TotemSymbId.cc:17
Detector ID class for CTPPS Timing Diamond detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bit...
Detector ID class for CTPPS Totem Timing detectors. Bits [19:31] : Assigend in CTPPSDetId Calss Bits ...