CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Static Public Attributes | Private Member Functions
CTPPSPixelDetId Class Reference

#include <CTPPSPixelDetId.h>

Inheritance diagram for CTPPSPixelDetId:
CTPPSDetId DetId

Public Member Functions

 CTPPSPixelDetId (const CTPPSDetId &id)
 
 CTPPSPixelDetId (uint32_t Arm, uint32_t Station, uint32_t RP=0, uint32_t Plane=0)
 Construct from fully qualified identifier. More...
 
 CTPPSPixelDetId (uint32_t id)
 Construct from a packed id. More...
 
uint32_t plane () const
 
void set (uint32_t a, uint32_t b, uint32_t c, uint32_t d)
 
void setPlane (uint32_t pl)
 
- Public Member Functions inherited from CTPPSDetId
uint32_t arm () const
 
CTPPSDetId armId () const
 
void armName (std::string &name, NameFlag flag=nFull) const
 
 CTPPSDetId (uint32_t id)
 Construct from a raw id. More...
 
 CTPPSDetId (uint32_t SubDet, uint32_t Arm, uint32_t Station, uint32_t RomanPot=0)
 Construct from hierarchy indeces. More...
 
uint32_t rp () const
 
CTPPSDetId rpId () const
 
void rpName (std::string &name, NameFlag flag=nFull) const
 
void setArm (uint32_t arm)
 
void setRP (uint32_t rp)
 
void setStation (uint32_t station)
 
uint32_t station () const
 
CTPPSDetId stationId () const
 
void stationName (std::string &name, NameFlag flag=nFull) const
 
void subDetectorName (std::string &name, NameFlag flag=nFull) const
 
- Public Member Functions inherited from DetId
constexpr Detector det () const
 get the detector field from this detid More...
 
constexpr DetId ()
 Create an empty or null id (also for persistence) More...
 
constexpr DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
constexpr DetId (uint32_t id)
 Create an id from a raw number. More...
 
constexpr bool null () const
 is this a null id ? More...
 
constexpr operator uint32_t () const
 
constexpr bool operator!= (DetId id) const
 inequality More...
 
constexpr uint32_t operator() () const
 
constexpr bool operator< (DetId id) const
 comparison More...
 
constexpr bool operator== (DetId id) const
 equality More...
 
constexpr uint32_t rawId () const
 get the raw id More...
 
constexpr int subdetId () const
 get the contents of the subdetector field (not cast into any detector's numbering enum) More...
 

Static Public Member Functions

static bool check (unsigned int raw)
 

Static Public Attributes

static const uint32_t maskPlane = 0x7
 
static const uint32_t maxPlane = 5
 
static const uint32_t startPlaneBit = 16
 
- Static Public Attributes inherited from CTPPSDetId
static const uint32_t lowMaskArm = 0xFFFFFF
 
static const uint32_t lowMaskRP = 0x7FFFF
 
static const uint32_t lowMaskStation = 0x3FFFFF
 
static const uint32_t maskArm = 0x1
 
static const uint32_t maskRP = 0x7
 
static const uint32_t maskStation = 0x3
 
static const uint32_t maxArm = 1
 
static const uint32_t maxRP = 6
 
static const uint32_t maxStation = 2
 
static const uint32_t startArmBit = 24
 
static const uint32_t startRPBit = 19
 
static const uint32_t startStationBit = 22
 
- Static Public Attributes inherited from DetId
static const int kDetMask = 0xF
 
static const int kDetOffset = 28
 
static const int kSubdetMask = 0x7
 
static const int kSubdetOffset = 25
 

Private Member Functions

void init (uint32_t Arm, uint32_t Station, uint32_t RP, uint32_t Plane)
 

Additional Inherited Members

- Public Types inherited from CTPPSDetId
enum  NameFlag { nShort, nFull, nPath }
 type of name returned by *Name functions More...
 
enum  SubDetector { sdTrackingStrip = 3, sdTrackingPixel = 4, sdTimingDiamond = 5, sdTimingFastSilicon = 6 }
 CTPPS sub-detectors. More...
 
- Public Types inherited from DetId
enum  Detector {
  Tracker = 1, Muon = 2, Ecal = 3, Hcal = 4,
  Calo = 5, Forward = 6, VeryForward = 7, HGCalEE = 8,
  HGCalHSi = 9, HGCalHSc = 10, HGCalTrigger = 11
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Definition at line 16 of file CTPPSPixelDetId.h.

Constructor & Destructor Documentation

◆ CTPPSPixelDetId() [1/3]

CTPPSPixelDetId::CTPPSPixelDetId ( uint32_t  id)
explicit

Construct from a packed id.

Definition at line 13 of file CTPPSPixelDetId.cc.

13  : CTPPSDetId(id) {
14  if (!check(id)) {
15  throw cms::Exception("InvalidDetId") << "CTPPSPixelDetId ctor:"
16  << " det: " << det() << " subdet: " << subdetId()
17  << " is not a valid CTPPS Pixel id";
18  }
19 }

References check(), DetId::det(), Exception, and DetId::subdetId().

◆ CTPPSPixelDetId() [2/3]

CTPPSPixelDetId::CTPPSPixelDetId ( const CTPPSDetId id)
inline

Definition at line 21 of file CTPPSPixelDetId.h.

21 : CTPPSDetId(id) {}

◆ CTPPSPixelDetId() [3/3]

CTPPSPixelDetId::CTPPSPixelDetId ( uint32_t  Arm,
uint32_t  Station,
uint32_t  RP = 0,
uint32_t  Plane = 0 
)

Construct from fully qualified identifier.

Member Function Documentation

◆ check()

static bool CTPPSPixelDetId::check ( unsigned int  raw)
inlinestatic

Definition at line 32 of file CTPPSPixelDetId.h.

32  {
33  return (((raw >> DetId::kDetOffset) & 0xF) == DetId::VeryForward &&
34  ((raw >> DetId::kSubdetOffset) & 0x7) == sdTrackingPixel);
35  }

References DetId::kDetOffset, DetId::kSubdetOffset, CTPPSDetId::sdTrackingPixel, and DetId::VeryForward.

Referenced by CTPPSPixelDetId().

◆ init()

void CTPPSPixelDetId::init ( uint32_t  Arm,
uint32_t  Station,
uint32_t  RP,
uint32_t  Plane 
)
private

Definition at line 26 of file CTPPSPixelDetId.cc.

26  {
27  if (Arm > maxArm || Station > maxStation || RP > maxRP || Plane > maxPlane) {
28  throw cms::Exception("InvalidDetId") << "CTPPSPixelDetId ctor:"
29  << " Invalid parameterss: "
30  << " Arm " << Arm << " Station " << Station << " RP " << RP << " Plane "
31  << Plane << std::endl;
32  }
33 
34  uint32_t ok = 0xfe000000;
35  id_ &= ok;
36 
37  id_ |= ((Arm & maskArm) << startArmBit);
38  id_ |= ((Station & maskStation) << startStationBit);
39  id_ |= ((RP & maskRP) << startRPBit);
40  id_ |= ((Plane & maskPlane) << startPlaneBit);
41 }

References Exception, DetId::id_, CTPPSDetId::maskArm, maskPlane, CTPPSDetId::maskRP, CTPPSDetId::maskStation, CTPPSDetId::maxArm, maxPlane, CTPPSDetId::maxRP, CTPPSDetId::maxStation, convertSQLiteXML::ok, CTPPSDetId::startArmBit, startPlaneBit, CTPPSDetId::startRPBit, and CTPPSDetId::startStationBit.

Referenced by set().

◆ plane()

uint32_t CTPPSPixelDetId::plane ( ) const
inline

◆ set()

void CTPPSPixelDetId::set ( uint32_t  a,
uint32_t  b,
uint32_t  c,
uint32_t  d 
)
inline

Definition at line 39 of file CTPPSPixelDetId.h.

39 { this->init(a, b, c, d); }

References b, c, ztail::d, and init().

◆ setPlane()

void CTPPSPixelDetId::setPlane ( uint32_t  pl)
inline

Member Data Documentation

◆ maskPlane

const uint32_t CTPPSPixelDetId::maskPlane = 0x7
static

Definition at line 30 of file CTPPSPixelDetId.h.

Referenced by init(), plane(), and setPlane().

◆ maxPlane

const uint32_t CTPPSPixelDetId::maxPlane = 5
static

Definition at line 30 of file CTPPSPixelDetId.h.

Referenced by init().

◆ startPlaneBit

const uint32_t CTPPSPixelDetId::startPlaneBit = 16
static

Bit 24 = Arm: 0=z>0 1=z<0 Bits [22:23] Station (0 = 210 or ex 147) Bits [19:21] RP Bits [16:18] Si Plane

Definition at line 30 of file CTPPSPixelDetId.h.

Referenced by init(), plane(), and setPlane().

CTPPSDetId::maxRP
static const uint32_t maxRP
Definition: CTPPSDetId.h:51
CTPPSDetId::CTPPSDetId
CTPPSDetId(uint32_t id)
Construct from a raw id.
Definition: CTPPSDetId.cc:34
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
CTPPSDetId::maxArm
static const uint32_t maxArm
Definition: CTPPSDetId.h:49
CTPPSPixelDetId::maskPlane
static const uint32_t maskPlane
Definition: CTPPSPixelDetId.h:30
CTPPSDetId::startArmBit
static const uint32_t startArmBit
Definition: CTPPSDetId.h:49
DetId::VeryForward
Definition: DetId.h:31
CTPPSPixelDetId::check
static bool check(unsigned int raw)
Definition: CTPPSPixelDetId.h:32
convertSQLiteXML.ok
bool ok
Definition: convertSQLiteXML.py:98
CTPPSPixelDetId::startPlaneBit
static const uint32_t startPlaneBit
Definition: CTPPSPixelDetId.h:30
CTPPSPixelDetId::maxPlane
static const uint32_t maxPlane
Definition: CTPPSPixelDetId.h:30
DetId::kSubdetOffset
static const int kSubdetOffset
Definition: DetId.h:22
CTPPSDetId::startStationBit
static const uint32_t startStationBit
Definition: CTPPSDetId.h:50
CTPPSDetId::sdTrackingPixel
Definition: CTPPSDetId.h:44
b
double b
Definition: hdecay.h:118
DetId::subdetId
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum)
Definition: DetId.h:48
CTPPSPixelDetId::init
void init(uint32_t Arm, uint32_t Station, uint32_t RP, uint32_t Plane)
Definition: CTPPSPixelDetId.cc:26
a
double a
Definition: hdecay.h:119
DetId::id_
uint32_t id_
Definition: DetId.h:69
createfilelist.int
int
Definition: createfilelist.py:10
CTPPSDetId::maskStation
static const uint32_t maskStation
Definition: CTPPSDetId.h:50
CTPPSDetId::maxStation
static const uint32_t maxStation
Definition: CTPPSDetId.h:50
CTPPSDetId::startRPBit
static const uint32_t startRPBit
Definition: CTPPSDetId.h:51
DetId::kDetOffset
static const int kDetOffset
Definition: DetId.h:21
Exception
Definition: hltDiff.cc:245
Plane
Definition: Plane.h:16
ztail.d
d
Definition: ztail.py:151
c
auto & c
Definition: CAHitNtupletGeneratorKernelsImpl.h:46
CTPPSDetId::maskArm
static const uint32_t maskArm
Definition: CTPPSDetId.h:49
CTPPSDetId::maskRP
static const uint32_t maskRP
Definition: CTPPSDetId.h:51