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.

23 : XYZPoint(), side_{NONE} {}

References NONE, and side_.

Referenced by CaloPoint().

◆ CaloPoint() [2/4]

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

constructor for ECAL

Definition at line 16 of file CaloPoint.cc.

17  : XYZPoint(position), cellid_(cell), side_(side) {
18  detector_ = cell.det();
19  subdetector_ = cell.subdetId();
20  layer_ = 0;
21 }

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

◆ 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 30 of file CaloPoint.cc.

32  cellid_ = DetId();
33 }

References CaloPoint(), and cellid_.

◆ ~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.

41 { return cellid_; };

References cellid_.

◆ getSide()

CaloDirection CaloPoint::getSide ( ) const
inline

returns the Side (see numbering)

Definition at line 43 of file CaloPoint.h.

43 { return side_; };

References side_.

◆ operator<()

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

Definition at line 45 of file CaloPoint.h.

45 { return this->mag2() < p.mag2(); };

References mag2().

◆ setDetId()

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

Definition at line 47 of file CaloPoint.h.

47 { detector_ = det; }

References detector_.

◆ setLayer()

void CaloPoint::setLayer ( int  i)
inline

Definition at line 55 of file CaloPoint.h.

55 { layer_ = i; }

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

◆ setSubDetector()

void CaloPoint::setSubDetector ( int  i)
inline

Definition at line 50 of file CaloPoint.h.

50 { subdetector_ = i; }

References mps_fire::i, and subdetector_.

◆ whichDetector()

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

Definition at line 48 of file CaloPoint.h.

48 { return detector_; };

References detector_.

◆ whichLayer()

int CaloPoint::whichLayer ( ) const
inline

Definition at line 57 of file CaloPoint.h.

57 { return layer_; }

References sistrip::layer_.

◆ whichSubDetector()

int CaloPoint::whichSubDetector ( ) const
inline

watch out, only valid in ECAL and preshower

Definition at line 53 of file CaloPoint.h.

53 { return subdetector_; };

References subdetector_.

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().

mps_fire.i
i
Definition: mps_fire.py:428
CaloPoint::side_
CaloDirection side_
Definition: CaloPoint.h:64
DetId::det
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
DetId
Definition: DetId.h:17
CaloPoint::detector_
DetId::Detector detector_
Definition: CaloPoint.h:65
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
phase1PixelTopology::layer
constexpr std::array< uint8_t, layerIndexSize > layer
Definition: phase1PixelTopology.h:99
AlCaHLTBitMon_ParallelJobs.p
def p
Definition: AlCaHLTBitMon_ParallelJobs.py:153
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
mag2
T mag2() const
The vector magnitude squared. Equivalent to vec.dot(vec)
Definition: Basic3DVectorLD.h:124
XYZPoint
math::XYZVector XYZPoint
Definition: CalorimetryManager.cc:69
CaloPoint::subdetector_
int subdetector_
Definition: CaloPoint.h:66
NONE
Definition: TkAlStyle.cc:47
hgcalTestNeighbor_cfi.detector
detector
Definition: hgcalTestNeighbor_cfi.py:6
sistrip::layer_
static const char layer_[]
Definition: ConstantsForGranularity.h:30
CaloPoint::cellid_
DetId cellid_
Definition: CaloPoint.h:63