CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
Crystal Class Reference

#include <Crystal.h>

Classes

class  crystalEqual
 

Public Types

typedef ROOT::Math::Plane3D Plane3D
 
typedef math::XYZVector XYZPoint
 
typedef math::XYZVector XYZVector
 

Public Member Functions

 Crystal ()
 Empty constructor. More...
 
 Crystal (const DetId &cell, const BaseCrystal *bc=0)
 constructor from DetId More...
 
CrystalNeighbourcrystalNeighbour (unsigned iq)
 Direct acces to the iq-th neighbour. More...
 
const XYZVectorexitingNormal (const CaloDirection &side) const
 normal exiting vector for the surface More...
 
const XYZVectorgetAxis () const
 get crystal axis More...
 
const XYZPointgetBackCenter () const
 get front center More...
 
const Plane3DgetBackPlane () const
 back plane More...
 
void getBackSide (XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
 Coordinates of the back side. More...
 
void getBackSide (std::vector< XYZPoint > &corners) const
 
const XYZPointgetCenter () const
 get 1/8*(Sum of corners) More...
 
const XYZPointgetCorner (unsigned i) const
 get the i-th corner More...
 
const DetIdgetDetId () const
 get the DetId More...
 
void getDrawingCoordinates (std::vector< float > &x, std::vector< float > &y, std::vector< float > &z) const
 for debugging. More...
 
const XYZVectorgetFifthEdge () const
 Direction of the fifth edge. More...
 
const XYZVectorgetFirstEdge () const
 Direction of the first edge. More...
 
const XYZPointgetFrontCenter () const
 get front center More...
 
const Plane3DgetFrontPlane () const
 front plane More...
 
void getFrontSide (XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
 coordinates of the front side More...
 
void getFrontSide (std::vector< XYZPoint > &corners) const
 
const XYZVectorgetLateralEdge (unsigned i) const
 lateral directions More...
 
void getLateralEdges (unsigned i, XYZPoint &a, XYZPoint &b) const
 get the lateral edges More...
 
const Plane3DgetLateralPlane (unsigned i) const
 lateral planes More...
 
void getLateralSide (unsigned i, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
 Coordinates of the i=th lateral side. More...
 
void getLateralSide (unsigned i, std::vector< XYZPoint > &corners) const
 
const Plane3DgetPlane (const CaloDirection &side) const
 generic access More...
 
void getSide (const CaloDirection &side, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
 generic access More...
 
void getSide (const CaloDirection &side, std::vector< XYZPoint > &corners) const
 
const int getSubdetNumber () const
 get the subdector More...
 
double getX0Back () const
 get the X0back More...
 
unsigned number () const
 get the number of the crystal More...
 
void print () const
 
void setNumber (unsigned n)
 it might be useful to have a number assigned to the crystal More...
 
void setX0Back (double val)
 set X0back (it depends on the choosen origin, it isn't purely geometrical) More...
 
 ~Crystal ()
 

Static Public Member Functions

static unsigned oppositeDirection (unsigned iside)
 

Private Attributes

DetId cellid_
 
const BaseCrystalmyCrystal_
 
std::vector< CrystalNeighbourneighbours_
 
unsigned number_
 
double X0back_
 

Detailed Description

Definition at line 20 of file Crystal.h.

Member Typedef Documentation

typedef ROOT::Math::Plane3D Crystal::Plane3D

Definition at line 27 of file Crystal.h.

Definition at line 26 of file Crystal.h.

Definition at line 25 of file Crystal.h.

Constructor & Destructor Documentation

Crystal::Crystal ( )
inline

Empty constructor.

Definition at line 32 of file Crystal.h.

32 {;};
Crystal::Crystal ( const DetId cell,
const BaseCrystal bc = 0 
)

constructor from DetId

Definition at line 4 of file Crystal.cc.

References neighbours_.

4  :cellid_(cell),myCrystal_(xtal)
5 {
6  neighbours_.resize(8);
7 }
DetId cellid_
Definition: Crystal.h:117
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
std::vector< CrystalNeighbour > neighbours_
Definition: Crystal.h:118
Crystal::~Crystal ( )
inline

Definition at line 113 of file Crystal.h.

113 {;};

Member Function Documentation

CrystalNeighbour& Crystal::crystalNeighbour ( unsigned  iq)
inline

Direct acces to the iq-th neighbour.

Definition at line 102 of file Crystal.h.

References neighbours_.

102 { return neighbours_[iq];}
std::vector< CrystalNeighbour > neighbours_
Definition: Crystal.h:118
const XYZVector& Crystal::exitingNormal ( const CaloDirection side) const
inline

normal exiting vector for the surface

Definition at line 84 of file Crystal.h.

References BaseCrystal::exitingNormal(), and myCrystal_.

84 {return myCrystal_->exitingNormal(side);}
const XYZVector & exitingNormal(const CaloDirection &side) const
normal exiting vector for the surface
Definition: BaseCrystal.h:95
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZVector& Crystal::getAxis ( ) const
inline

get crystal axis

Definition at line 105 of file Crystal.h.

References BaseCrystal::getAxis(), and myCrystal_.

105 { return myCrystal_->getAxis();}
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZVector & getAxis() const
get crystal axis
Definition: BaseCrystal.h:103
const XYZPoint& Crystal::getBackCenter ( ) const
inline

get front center

Definition at line 43 of file Crystal.h.

References BaseCrystal::getBackCenter(), and myCrystal_.

43 {return myCrystal_->getBackCenter();}
const XYZPoint & getBackCenter() const
get front center
Definition: BaseCrystal.h:55
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const Plane3D& Crystal::getBackPlane ( ) const
inline

back plane

Definition at line 74 of file Crystal.h.

References BaseCrystal::getBackPlane(), and myCrystal_.

74 {return myCrystal_->getBackPlane();}
const Plane3D & getBackPlane() const
back plane
Definition: BaseCrystal.h:85
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void Crystal::getBackSide ( XYZPoint a,
XYZPoint b,
XYZPoint c,
XYZPoint d 
) const
inline

Coordinates of the back side.

Definition at line 59 of file Crystal.h.

References BaseCrystal::getBackSide(), and myCrystal_.

59 {myCrystal_->getBackSide(a,b,c,d);}
void getBackSide(XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
Coordinates of the back side.
Definition: BaseCrystal.cc:166
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void Crystal::getBackSide ( std::vector< XYZPoint > &  corners) const
inline

Definition at line 60 of file Crystal.h.

References BaseCrystal::getBackSide(), and myCrystal_.

60 {myCrystal_->getBackSide(corners);}
void getBackSide(XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
Coordinates of the back side.
Definition: BaseCrystal.cc:166
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZPoint& Crystal::getCenter ( ) const
inline

get 1/8*(Sum of corners)

Definition at line 39 of file Crystal.h.

References BaseCrystal::getCenter(), and myCrystal_.

39 {return myCrystal_->getCenter();};
const XYZPoint & getCenter() const
get 1/8*(Sum of corners)
Definition: BaseCrystal.h:51
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZPoint& Crystal::getCorner ( unsigned  i) const
inline

get the i-th corner

Definition at line 37 of file Crystal.h.

References BaseCrystal::getCorner(), and myCrystal_.

37 { return myCrystal_->getCorner(i);};
int i
Definition: DBlmapReader.cc:9
const XYZPoint & getCorner(unsigned i) const
get the i-th corner
Definition: BaseCrystal.h:49
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const DetId& Crystal::getDetId ( void  ) const
inline

get the DetId

Definition at line 49 of file Crystal.h.

References cellid_.

Referenced by EcalHitMaker::EcalHitMaker(), and Crystal::crystalEqual::operator()().

49 {return cellid_;};
DetId cellid_
Definition: Crystal.h:117
void Crystal::getDrawingCoordinates ( std::vector< float > &  x,
std::vector< float > &  y,
std::vector< float > &  z 
) const
inline

for debugging.

Definition at line 89 of file Crystal.h.

References BaseCrystal::getDrawingCoordinates(), and myCrystal_.

90  {
92  }
void getDrawingCoordinates(std::vector< float > &x, std::vector< float > &y, std::vector< float > &z) const
for debugging.
Definition: BaseCrystal.cc:205
double double double z
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
x
Definition: VDTMath.h:216
const XYZVector& Crystal::getFifthEdge ( ) const
inline

Direction of the fifth edge.

Definition at line 47 of file Crystal.h.

References BaseCrystal::getFifthEdge(), and myCrystal_.

47 {return myCrystal_->getFifthEdge();}
const XYZVector & getFifthEdge() const
Direction of the fifth edge.
Definition: BaseCrystal.h:59
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZVector& Crystal::getFirstEdge ( ) const
inline

Direction of the first edge.

Definition at line 45 of file Crystal.h.

References BaseCrystal::getFirstEdge(), and myCrystal_.

Referenced by EcalHitMaker::getPads().

45 {return myCrystal_->getFirstEdge();}
const XYZVector & getFirstEdge() const
Direction of the first edge.
Definition: BaseCrystal.h:57
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const XYZPoint& Crystal::getFrontCenter ( ) const
inline

get front center

Definition at line 41 of file Crystal.h.

References BaseCrystal::getFrontCenter(), and myCrystal_.

41 {return myCrystal_->getFrontCenter();};
const XYZPoint & getFrontCenter() const
get front center
Definition: BaseCrystal.h:53
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const Plane3D& Crystal::getFrontPlane ( ) const
inline

front plane

Definition at line 72 of file Crystal.h.

References BaseCrystal::getFrontPlane(), and myCrystal_.

72 {return myCrystal_->getFrontPlane();}
const Plane3D & getFrontPlane() const
front plane
Definition: BaseCrystal.h:83
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void Crystal::getFrontSide ( XYZPoint a,
XYZPoint b,
XYZPoint c,
XYZPoint d 
) const
inline

coordinates of the front side

Definition at line 56 of file Crystal.h.

References BaseCrystal::getFrontSide(), and myCrystal_.

56 {myCrystal_->getFrontSide(a,b,c,d); }
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void getFrontSide(XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
coordinates of the front side
Definition: BaseCrystal.cc:147
void Crystal::getFrontSide ( std::vector< XYZPoint > &  corners) const
inline

Definition at line 57 of file Crystal.h.

References BaseCrystal::getFrontSide(), and myCrystal_.

57 {myCrystal_->getFrontSide(corners);}
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void getFrontSide(XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
coordinates of the front side
Definition: BaseCrystal.cc:147
const XYZVector& Crystal::getLateralEdge ( unsigned  i) const
inline

lateral directions

Definition at line 81 of file Crystal.h.

References BaseCrystal::getLateralEdge(), and myCrystal_.

81 {return myCrystal_->getLateralEdge(i);}
int i
Definition: DBlmapReader.cc:9
const XYZVector & getLateralEdge(unsigned i) const
lateral directions
Definition: BaseCrystal.h:92
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void Crystal::getLateralEdges ( unsigned  i,
XYZPoint a,
XYZPoint b 
) const
inline

get the lateral edges

Definition at line 54 of file Crystal.h.

References BaseCrystal::getLateralEdges(), and myCrystal_.

int i
Definition: DBlmapReader.cc:9
void getLateralEdges(unsigned i, XYZPoint &, XYZPoint &) const
get the lateral edges
Definition: BaseCrystal.cc:138
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
const Plane3D& Crystal::getLateralPlane ( unsigned  i) const
inline

lateral planes

Definition at line 76 of file Crystal.h.

References BaseCrystal::getLateralPlane(), and myCrystal_.

76 {return myCrystal_->getLateralPlane(i);}
int i
Definition: DBlmapReader.cc:9
const Plane3D & getLateralPlane(unsigned i) const
lateral planes
Definition: BaseCrystal.h:87
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void Crystal::getLateralSide ( unsigned  i,
XYZPoint a,
XYZPoint b,
XYZPoint c,
XYZPoint d 
) const
inline

Coordinates of the i=th lateral side.

Definition at line 62 of file Crystal.h.

References BaseCrystal::getLateralSide(), and myCrystal_.

int i
Definition: DBlmapReader.cc:9
void getLateralSide(unsigned i, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
Coordinates of the i=th lateral side.
Definition: BaseCrystal.cc:185
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void Crystal::getLateralSide ( unsigned  i,
std::vector< XYZPoint > &  corners 
) const
inline

Definition at line 63 of file Crystal.h.

References BaseCrystal::getLateralSide(), and myCrystal_.

63 {myCrystal_->getLateralSide(i,corners);}
int i
Definition: DBlmapReader.cc:9
void getLateralSide(unsigned i, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
Coordinates of the i=th lateral side.
Definition: BaseCrystal.cc:185
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const Plane3D& Crystal::getPlane ( const CaloDirection side) const
inline

generic access

Definition at line 78 of file Crystal.h.

References BaseCrystal::getPlane(), and myCrystal_.

78 { return myCrystal_->getPlane(side);}
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const Plane3D & getPlane(const CaloDirection &side) const
generic access
Definition: BaseCrystal.h:89
void Crystal::getSide ( const CaloDirection side,
XYZPoint a,
XYZPoint b,
XYZPoint c,
XYZPoint d 
) const
inline

generic access

Definition at line 65 of file Crystal.h.

References BaseCrystal::getSide(), and myCrystal_.

66  {myCrystal_->getSide(side,a,b,c,d);}
void getSide(const CaloDirection &side, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
generic access
Definition: BaseCrystal.cc:266
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
double b
Definition: hdecay.h:120
double a
Definition: hdecay.h:121
void Crystal::getSide ( const CaloDirection side,
std::vector< XYZPoint > &  corners 
) const
inline

Definition at line 67 of file Crystal.h.

References BaseCrystal::getSide(), and myCrystal_.

68  {myCrystal_->getSide(side,corners);}
void getSide(const CaloDirection &side, XYZPoint &a, XYZPoint &b, XYZPoint &c, XYZPoint &d) const
generic access
Definition: BaseCrystal.cc:266
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const int Crystal::getSubdetNumber ( ) const
inline

get the subdector

Definition at line 51 of file Crystal.h.

References BaseCrystal::getSubdetNumber(), and myCrystal_.

51 {return myCrystal_->getSubdetNumber();}
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
const int getSubdetNumber() const
get the subdector
Definition: BaseCrystal.h:63
double Crystal::getX0Back ( ) const
inline

get the X0back

Definition at line 111 of file Crystal.h.

References X0back_.

111 { return X0back_;}
double X0back_
Definition: Crystal.h:119
unsigned Crystal::number ( ) const
inline

get the number of the crystal

Definition at line 98 of file Crystal.h.

References number_.

98  {
99  return number_;};
unsigned number_
Definition: Crystal.h:113
static unsigned Crystal::oppositeDirection ( unsigned  iside)
static
void Crystal::print ( void  ) const
inline

Definition at line 52 of file Crystal.h.

References myCrystal_, and BaseCrystal::print().

52 {return myCrystal_->print();}
const BaseCrystal * myCrystal_
Definition: Crystal.h:120
void print() const
Definition: BaseCrystal.cc:281
void Crystal::setNumber ( unsigned  n)
inline

it might be useful to have a number assigned to the crystal

Definition at line 95 of file Crystal.h.

References n, and number_.

95 {number_=n;};
unsigned number_
Definition: Crystal.h:113
void Crystal::setX0Back ( double  val)
inline

set X0back (it depends on the choosen origin, it isn't purely geometrical)

Definition at line 108 of file Crystal.h.

References X0back_.

108 {X0back_=val;}
double X0back_
Definition: Crystal.h:119

Member Data Documentation

DetId Crystal::cellid_
private

Definition at line 117 of file Crystal.h.

Referenced by getDetId().

const BaseCrystal* Crystal::myCrystal_
private
std::vector<CrystalNeighbour> Crystal::neighbours_
private

Definition at line 118 of file Crystal.h.

Referenced by Crystal(), and crystalNeighbour().

unsigned Crystal::number_
private

Definition at line 113 of file Crystal.h.

Referenced by number(), and setNumber().

double Crystal::X0back_
private

Definition at line 119 of file Crystal.h.

Referenced by getX0Back(), and setX0Back().