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 (uint32_t id)
 Construct from a packed id. More...
 
 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...
 
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
 
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...
 
CTPPSDetId getArmId () const
 
CTPPSDetId getRPId () const
 
CTPPSDetId getStationId () const
 
uint32_t rp () 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
 
void stationName (std::string &name, NameFlag flag=nFull) const
 
void subDetectorName (std::string &name, NameFlag flag=nFull) const
 
- Public Member Functions inherited from DetId
Detector det () const
 get the detector field from this detid More...
 
 DetId ()
 Create an empty or null id (also for persistence) More...
 
 DetId (uint32_t id)
 Create an id from a raw number. More...
 
 DetId (Detector det, int subdet)
 Create an id, filling the detector and subdetector fields as specified. More...
 
bool null () const
 is this a null id ? More...
 
 operator uint32_t () const
 
bool operator!= (DetId id) const
 inequality More...
 
uint32_t operator() () const
 
bool operator< (DetId id) const
 comparison More...
 
bool operator== (DetId id) const
 equality More...
 
uint32_t rawId () const
 get the raw id More...
 
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 kDetOffset = 28
 
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
}
 
- Protected Attributes inherited from DetId
uint32_t id_
 

Detailed Description

Definition at line 17 of file CTPPSPixelDetId.h.

Constructor & Destructor Documentation

CTPPSPixelDetId::CTPPSPixelDetId ( uint32_t  id)
explicit

Construct from a packed id.

Definition at line 13 of file CTPPSPixelDetId.cc.

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

Referenced by CTPPSPixelDetId().

13  :CTPPSDetId(id) {
14 
15  if (! check(id))
16  {
17  throw cms::Exception("InvalidDetId") << "CTPPSPixelDetId ctor:"
18  << " det: " << det()
19  << " subdet: " << subdetId()
20  << " is not a valid CTPPS Pixel id";
21  }
22 }
static bool check(unsigned int raw)
int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:37
CTPPSDetId(uint32_t id)
Construct from a raw id.
Definition: CTPPSDetId.cc:31
Detector det() const
get the detector field from this detid
Definition: DetId.h:35
CTPPSPixelDetId::CTPPSPixelDetId ( const CTPPSDetId id)
inline

Definition at line 24 of file CTPPSPixelDetId.h.

References CTPPSPixelDetId().

24  : CTPPSDetId(id)
25  {
26  }
CTPPSDetId(uint32_t id)
Construct from a raw id.
Definition: CTPPSDetId.cc:31
CTPPSPixelDetId::CTPPSPixelDetId ( uint32_t  Arm,
uint32_t  Station,
uint32_t  RP = 0,
uint32_t  Plane = 0 
)

Construct from fully qualified identifier.

Member Function Documentation

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

Definition at line 37 of file CTPPSPixelDetId.h.

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

Referenced by CTPPSPixelDetId().

38  {
39  return (((raw >>DetId::kDetOffset) & 0xF) == DetId::VeryForward &&
40  ((raw >> DetId::kSubdetOffset) & 0x7) == sdTrackingPixel);
41  }
static const int kSubdetOffset
Definition: DetId.h:21
static const int kDetOffset
Definition: DetId.h:20
void CTPPSPixelDetId::init ( uint32_t  Arm,
uint32_t  Station,
uint32_t  RP,
uint32_t  Plane 
)
private

Definition at line 32 of file CTPPSPixelDetId.cc.

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 CTPPSPixelDetId(), set(), and setPlane().

33 {
34  if (
35  Arm > maxArm || Station > maxStation || RP > maxRP || Plane > maxPlane
36  ) {
37  throw cms::Exception("InvalidDetId") << "CTPPSPixelDetId ctor:"
38  << " Invalid parameterss: "
39  << " Arm "<<Arm
40  << " Station "<<Station
41  << " RP "<<RP
42  << " Plane "<<Plane
43  << std::endl;
44  }
45 
46  uint32_t ok=0xfe000000;
47  id_ &= ok;
48 
49  id_ |= ((Arm & maskArm) << startArmBit);
50  id_ |= ((Station & maskStation) << startStationBit);
51  id_ |= ((RP & maskRP) << startRPBit);
52  id_ |= ((Plane & maskPlane) << startPlaneBit);
53 
54 }
static const uint32_t maxStation
Definition: CTPPSDetId.h:47
static const uint32_t maskPlane
static const uint32_t startRPBit
Definition: CTPPSDetId.h:48
Definition: Plane.h:17
static const uint32_t maskStation
Definition: CTPPSDetId.h:47
static const uint32_t maxPlane
static const uint32_t maskRP
Definition: CTPPSDetId.h:48
static const uint32_t startPlaneBit
static const uint32_t maskArm
Definition: CTPPSDetId.h:46
static const uint32_t maxArm
Definition: CTPPSDetId.h:46
static const uint32_t maxRP
Definition: CTPPSDetId.h:48
uint32_t id_
Definition: DetId.h:55
static const uint32_t startStationBit
Definition: CTPPSDetId.h:47
static const uint32_t startArmBit
Definition: CTPPSDetId.h:46
uint32_t CTPPSPixelDetId::plane ( ) const
inline

Definition at line 43 of file CTPPSPixelDetId.h.

References DetId::id_, and createfilelist::int.

Referenced by CTPPSGeometryInfo::PrintDetId(), and RPixPlaneCombinatoryTracking::produceAllHitCombination().

43  {
44  return int((id_>>startPlaneBit) & maskPlane);
45  }
static const uint32_t maskPlane
static const uint32_t startPlaneBit
uint32_t id_
Definition: DetId.h:55
void CTPPSPixelDetId::set ( uint32_t  a,
uint32_t  b,
uint32_t  c,
uint32_t  d 
)
inline

Definition at line 47 of file CTPPSPixelDetId.h.

References edmIntegrityCheck::d, and init().

47  {
48  this->init(a,b,c,d);
49  }
double b
Definition: hdecay.h:120
void init(uint32_t Arm, uint32_t Station, uint32_t RP, uint32_t Plane)
double a
Definition: hdecay.h:121
void CTPPSPixelDetId::setPlane ( uint32_t  pl)
inline

Definition at line 51 of file CTPPSPixelDetId.h.

References DetId::id_, init(), maskPlane, operator<<(), and startPlaneBit.

Referenced by RPixPlaneCombinatoryTracking::findTracks(), and RPixPlaneCombinatoryTracking::produceAllHitCombination().

52  {
53  id_ &= ~(maskPlane << startPlaneBit);
54  id_ |= ((pl & maskPlane) << startPlaneBit);
55  }
static const uint32_t maskPlane
static const uint32_t startPlaneBit
uint32_t id_
Definition: DetId.h:55

Member Data Documentation

const uint32_t CTPPSPixelDetId::maskPlane = 0x7
static

Definition at line 35 of file CTPPSPixelDetId.h.

Referenced by init(), and setPlane().

const uint32_t CTPPSPixelDetId::maxPlane = 5
static

Definition at line 35 of file CTPPSPixelDetId.h.

Referenced by init().

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 35 of file CTPPSPixelDetId.h.

Referenced by init(), and setPlane().