CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Attributes
CaloPoint Class Reference

#include <CaloPoint.h>

Inheritance diagram for CaloPoint:

Classes

class  DistanceToVertex
 

Public Types

typedef math::XYZVector XYZPoint
 
typedef math::XYZVector XYZVector
 

Public Member Functions

 CaloPoint ()
 Empty constructor. More...
 
 CaloPoint (const DetId &cell, CaloDirection side, const XYZPoint &position)
 constructor for ECAL More...
 
 CaloPoint (DetId::Detector detector, const XYZPoint &position)
 constructor for HCAL More...
 
 CaloPoint (DetId::Detector detector, int subdetn, int layer, const XYZPoint &position)
 constructor for preshower More...
 
DetId getDetId () const
 returns the cellID More...
 
CaloDirection getSide () const
 returns the Side (see numbering) More...
 
bool operator< (const CaloPoint &p) const
 
void setDetId (DetId::Detector det)
 
void setLayer (int i)
 
void setSubDetector (int i)
 
DetId::Detector whichDetector () const
 
int whichLayer () const
 
int whichSubDetector () const
 watch out, only valid in ECAL and preshower More...
 
 ~CaloPoint ()
 

Private Attributes

DetId cellid_
 
DetId::Detector detector_
 
int layer_
 
CaloDirection side_
 
int subdetector_
 

Detailed Description

Definition at line 17 of file CaloPoint.h.

Member Typedef Documentation

◆ XYZPoint

Definition at line 20 of file CaloPoint.h.

◆ XYZVector

Definition at line 19 of file CaloPoint.h.

Constructor & Destructor Documentation

◆ CaloPoint() [1/4]

CaloPoint::CaloPoint ( )
inline

Empty constructor.

Definition at line 23 of file CaloPoint.h.

References NONE, and side_.

Referenced by CaloPoint().

23 : XYZPoint(), side_{NONE} {}
math::XYZVector XYZPoint
Definition: TkAlStyle.h:43
CaloDirection side_
Definition: CaloPoint.h:64

◆ CaloPoint() [2/4]

CaloPoint::CaloPoint ( const DetId cell,
CaloDirection  side,
const XYZPoint position 
)

constructor for ECAL

Definition at line 16 of file CaloPoint.cc.

References CaloPoint(), DetId::det(), detector_, sistrip::layer_, subdetector_, and DetId::subdetId().

17  : XYZPoint(position), cellid_(cell), side_(side) {
18  detector_ = cell.det();
19  subdetector_ = cell.subdetId();
20  layer_ = 0;
21 }
static const char layer_[]
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
DetId::Detector detector_
Definition: CaloPoint.h:65
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector&#39;s numbering enum) ...
Definition: DetId.h:48
math::XYZVector XYZPoint
static int position[264][3]
Definition: ReadPGInfo.cc:289
DetId cellid_
Definition: CaloPoint.h:63
int subdetector_
Definition: CaloPoint.h:66
CaloDirection side_
Definition: CaloPoint.h:64

◆ CaloPoint() [3/4]

CaloPoint::CaloPoint ( DetId::Detector  detector,
const XYZPoint position 
)

constructor for HCAL

◆ CaloPoint() [4/4]

CaloPoint::CaloPoint ( DetId::Detector  detector,
int  subdetn,
int  layer,
const XYZPoint position 
)

constructor for preshower

Definition at line 31 of file CaloPoint.cc.

References CaloPoint(), cellid_, NONE, and side_.

33  cellid_ = DetId();
35 }
static const char layer_[]
constexpr std::array< uint8_t, layerIndexSize > layer
DetId::Detector detector_
Definition: CaloPoint.h:65
Definition: DetId.h:17
math::XYZVector XYZPoint
static int position[264][3]
Definition: ReadPGInfo.cc:289
DetId cellid_
Definition: CaloPoint.h:63
Definition: TkAlStyle.h:43
int subdetector_
Definition: CaloPoint.h:66
CaloDirection side_
Definition: CaloPoint.h:64

◆ ~CaloPoint()

CaloPoint::~CaloPoint ( )
inline

Definition at line 39 of file CaloPoint.h.

39 { ; }

Member Function Documentation

◆ getDetId()

DetId CaloPoint::getDetId ( void  ) const
inline

returns the cellID

Definition at line 41 of file CaloPoint.h.

References cellid_.

41 { return cellid_; };
DetId cellid_
Definition: CaloPoint.h:63

◆ getSide()

CaloDirection CaloPoint::getSide ( ) const
inline

returns the Side (see numbering)

Definition at line 43 of file CaloPoint.h.

References side_.

43 { return side_; };
CaloDirection side_
Definition: CaloPoint.h:64

◆ operator<()

bool CaloPoint::operator< ( const CaloPoint p) const
inline

Definition at line 45 of file CaloPoint.h.

References mag2().

45 { return this->mag2() < p.mag2(); };
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)

◆ setDetId()

void CaloPoint::setDetId ( DetId::Detector  det)
inline

Definition at line 47 of file CaloPoint.h.

References detector_.

47 { detector_ = det; }
DetId::Detector detector_
Definition: CaloPoint.h:65

◆ setLayer()

void CaloPoint::setLayer ( int  i)
inline

Definition at line 55 of file CaloPoint.h.

References mps_fire::i, and sistrip::layer_.

55 { layer_ = i; }
static const char layer_[]

◆ setSubDetector()

void CaloPoint::setSubDetector ( int  i)
inline

Definition at line 50 of file CaloPoint.h.

References mps_fire::i, and subdetector_.

50 { subdetector_ = i; }
int subdetector_
Definition: CaloPoint.h:66

◆ whichDetector()

DetId::Detector CaloPoint::whichDetector ( ) const
inline

Definition at line 48 of file CaloPoint.h.

References detector_.

48 { return detector_; };
DetId::Detector detector_
Definition: CaloPoint.h:65

◆ whichLayer()

int CaloPoint::whichLayer ( ) const
inline

Definition at line 57 of file CaloPoint.h.

References sistrip::layer_.

57 { return layer_; }
static const char layer_[]

◆ whichSubDetector()

int CaloPoint::whichSubDetector ( ) const
inline

watch out, only valid in ECAL and preshower

Definition at line 53 of file CaloPoint.h.

References subdetector_.

53 { return subdetector_; };
int subdetector_
Definition: CaloPoint.h:66

Member Data Documentation

◆ cellid_

DetId CaloPoint::cellid_
private

Definition at line 63 of file CaloPoint.h.

Referenced by CaloPoint(), and getDetId().

◆ detector_

DetId::Detector CaloPoint::detector_
private

Definition at line 65 of file CaloPoint.h.

Referenced by CaloPoint(), setDetId(), and whichDetector().

◆ layer_

int CaloPoint::layer_
private

Definition at line 67 of file CaloPoint.h.

◆ side_

CaloDirection CaloPoint::side_
private

Definition at line 64 of file CaloPoint.h.

Referenced by CaloPoint(), and getSide().

◆ subdetector_

int CaloPoint::subdetector_
private

Definition at line 66 of file CaloPoint.h.

Referenced by CaloPoint(), setSubDetector(), and whichSubDetector().