CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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

Definition at line 20 of file CaloPoint.h.

Definition at line 19 of file CaloPoint.h.

Constructor & Destructor Documentation

CaloPoint::CaloPoint ( )
inline

Empty constructor.

Definition at line 23 of file CaloPoint.h.

References NONE.

Referenced by CaloPoint().

23 : XYZPoint(), side_{NONE} {}
side_(iConfig.getUntrackedParameter< int >("side", 3))
math::XYZVector XYZPoint
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_[]
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
side_(iConfig.getUntrackedParameter< int >("side", 3))
math::XYZVector XYZPoint
static int position[264][3]
Definition: ReadPGInfo.cc:289
DetId cellid_
Definition: CaloPoint.h:63
int subdetector_
Definition: CaloPoint.h:66
constexpr Detector det() const
get the detector field from this detid
Definition: DetId.h:46
CaloPoint::CaloPoint ( DetId::Detector  detector,
const XYZPoint position 
)

constructor for HCAL

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

32  : XYZPoint(position), detector_(detector), subdetector_(subdetn), layer_(layer) {
33  cellid_ = DetId();
35 }
static const char layer_[]
constexpr std::array< uint8_t, layerIndexSize > layer
DetId::Detector detector_
Definition: CaloPoint.h:65
side_(iConfig.getUntrackedParameter< int >("side", 3))
Definition: DetId.h:17
math::XYZVector XYZPoint
static int position[264][3]
Definition: ReadPGInfo.cc:289
DetId cellid_
Definition: CaloPoint.h:63
int subdetector_
Definition: CaloPoint.h:66
CaloPoint::~CaloPoint ( )
inline

Definition at line 39 of file CaloPoint.h.

39 { ; }

Member Function Documentation

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
CaloDirection CaloPoint::getSide ( ) const
inline

returns the Side (see numbering)

Definition at line 43 of file CaloPoint.h.

References side_().

43 { return side_; };
side_(iConfig.getUntrackedParameter< int >("side", 3))
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)
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
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_[]
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
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
int CaloPoint::whichLayer ( ) const
inline

Definition at line 57 of file CaloPoint.h.

References sistrip::layer_.

57 { return layer_; }
static const char layer_[]
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

DetId CaloPoint::cellid_
private

Definition at line 63 of file CaloPoint.h.

Referenced by CaloPoint(), and getDetId().

DetId::Detector CaloPoint::detector_
private

Definition at line 65 of file CaloPoint.h.

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

int CaloPoint::layer_
private

Definition at line 67 of file CaloPoint.h.

CaloDirection CaloPoint::side_
private

Definition at line 64 of file CaloPoint.h.

int CaloPoint::subdetector_
private

Definition at line 66 of file CaloPoint.h.

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