CMS 3D CMS Logo

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

#include <HGCalDDDConstants.h>

Public Types

typedef std::array
< std::vector< int32_t >, 2 > 
simrecovecs
 

Public Member Functions

std::pair< int, int > assignCell (float x, float y, int lay, int subSec, bool reco) const
 
std::pair< int, int > assignCellHexagon (float x, float y) const
 
std::pair< int, int > assignCellSquare (float x, float y, float h, float bl, float tl, float alpha, float cellSize) const
 
double cellSizeHex (int type) const
 
std::pair< int, int > findCell (int cell, int lay, int subSec, bool reco) const
 
std::pair< int, int > findCellSquare (int cell, float h, float bl, float tl, float alpha, float cellSize) const
 
HGCalGeometryMode geomMode () const
 
std::pair< int, float > getIndex (int lay, bool reco) const
 
HGCalParameters::hgtrap getModule (unsigned int k, bool hexType, bool reco) const
 
std::vector
< HGCalParameters::hgtrap
getModules () const
 
HGCalParameters::hgtrform getTrForm (unsigned int k) const
 
unsigned int getTrFormN () const
 
std::vector
< HGCalParameters::hgtrform
getTrForms () const
 
 HGCalDDDConstants (const HGCalParameters *hp, const std::string name)
 
bool isValid (int lay, int mod, int cell, bool reco) const
 
unsigned int layers (bool reco) const
 
unsigned int layersInit (bool reco) const
 
std::pair< float, float > locateCell (int cell, int lay, int type, bool reco) const
 
std::pair< float, float > locateCellHex (int cell, int wafer, bool reco) const
 
int maxCells (bool reco) const
 
int maxCells (int lay, bool reco) const
 
int maxCellsSquare (float h, float bl, float tl, float alpha, float cellSize) const
 
int maxRows (int lay, bool reco) const
 
int modules (int lay, bool reco) const
 
int modulesInit (int lay, bool reco) const
 
std::pair< int, int > newCell (int cell, int layer, int sector, int subsector, int incrx, int incry, bool half) const
 
std::pair< int, int > newCell (int cell, int layer, int subsector, int incrz, bool half) const
 
int newCell (int kx, int ky, int lay, int subSec) const
 
std::vector< int > numberCells (int lay, bool reco) const
 
int numberCellsHexagon (int wafer) const
 
std::vector< int > numberCellsSquare (float h, float bl, float tl, float alpha, float cellSize) const
 
int sectors () const
 
std::pair< int, int > simToReco (int cell, int layer, int mod, bool half) const
 
unsigned int volumes () const
 
int waferFromCopy (int copy) const
 
bool waferInLayer (int wafer, int lay, bool reco) const
 
std::pair< double, double > waferPosition (int wafer) const
 
int wafers () const
 
int waferToCopy (int wafer) const
 
int waferTypeT (int wafer) const
 
double waferZ (int layer, bool reco) const
 
 ~HGCalDDDConstants ()
 

Private Member Functions

int cellHex (double xx, double yy, const double &cellR, const std::vector< double > &posX, const std::vector< double > &posY) const
 
void getParameterSquare (int lay, int subSec, bool reco, float &h, float &bl, float &tl, float &alpha) const
 
bool waferInLayer (int wafer, int lay) const
 

Private Attributes

const HGCalParametershgpar_
 
simrecovecs max_modules_layer_
 
HGCalGeometryMode mode_
 
double rmax_
 
std::array< uint32_t, 2 > tot_layers_
 
int32_t tot_wafers_
 

Static Private Attributes

static double tan30deg_ = 0.5773502693
 

Detailed Description

this class reads the constant section of the numbering xml-files of the high granulairy calorimeter

Date:
2014/03/20 00:06:50
Author
Sunanda Banerjee, SINP sunan.nosp@m.da.b.nosp@m.anerj.nosp@m.ee@c.nosp@m.ern.c.nosp@m.h

Definition at line 23 of file HGCalDDDConstants.h.

Member Typedef Documentation

typedef std::array<std::vector<int32_t>, 2> HGCalDDDConstants::simrecovecs

Definition at line 27 of file HGCalDDDConstants.h.

Constructor & Destructor Documentation

HGCalDDDConstants::HGCalDDDConstants ( const HGCalParameters hp,
const std::string  name 
)

Definition at line 20 of file HGCalDDDConstants.cc.

HGCalDDDConstants::~HGCalDDDConstants ( )

Definition at line 71 of file HGCalDDDConstants.cc.

Member Function Documentation

std::pair< int, int > HGCalDDDConstants::assignCell ( float  x,
float  y,
int  lay,
int  subSec,
bool  reco 
) const
std::pair< int, int > HGCalDDDConstants::assignCellHexagon ( float  x,
float  y 
) const

Definition at line 134 of file HGCalDDDConstants.cc.

std::pair< int, int > HGCalDDDConstants::assignCellSquare ( float  x,
float  y,
float  h,
float  bl,
float  tl,
float  alpha,
float  cellSize 
) const

Definition at line 91 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::cellHex ( double  xx,
double  yy,
const double &  cellR,
const std::vector< double > &  posX,
const std::vector< double > &  posY 
) const
private

Definition at line 607 of file HGCalDDDConstants.cc.

double HGCalDDDConstants::cellSizeHex ( int  type) const

Definition at line 150 of file HGCalDDDConstants.cc.

std::pair< int, int > HGCalDDDConstants::findCell ( int  cell,
int  lay,
int  subSec,
bool  reco 
) const

Definition at line 164 of file HGCalDDDConstants.cc.

std::pair< int, int > HGCalDDDConstants::findCellSquare ( int  cell,
float  h,
float  bl,
float  tl,
float  alpha,
float  cellSize 
) const

Definition at line 179 of file HGCalDDDConstants.cc.

HGCalGeometryMode HGCalDDDConstants::geomMode ( ) const
inline

Definition at line 42 of file HGCalDDDConstants.h.

References mode_.

Referenced by HGCNumberingScheme::getUnitID().

42 {return mode_;}
HGCalGeometryMode mode_
std::pair< int, float > HGCalDDDConstants::getIndex ( int  lay,
bool  reco 
) const

Definition at line 628 of file HGCalDDDConstants.cc.

HGCalParameters::hgtrap HGCalDDDConstants::getModule ( unsigned int  k,
bool  hexType,
bool  reco 
) const

Definition at line 207 of file HGCalDDDConstants.cc.

std::vector< HGCalParameters::hgtrap > HGCalDDDConstants::getModules ( ) const

Definition at line 224 of file HGCalDDDConstants.cc.

void HGCalDDDConstants::getParameterSquare ( int  lay,
int  subSec,
bool  reco,
float &  h,
float &  bl,
float &  tl,
float &  alpha 
) const
private

Definition at line 644 of file HGCalDDDConstants.cc.

HGCalParameters::hgtrform HGCalDDDConstants::getTrForm ( unsigned int  k) const
inline

Definition at line 80 of file HGCalDDDConstants.h.

References HGCalParameters::getTrForm(), and hgpar_.

80 {return hgpar_->getTrForm(k);}
hgtrform getTrForm(unsigned int k) const
const HGCalParameters * hgpar_
unsigned int HGCalDDDConstants::getTrFormN ( ) const
inline

Definition at line 79 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::trformIndex_.

79 {return hgpar_->trformIndex_.size();}
std::vector< uint32_t > trformIndex_
const HGCalParameters * hgpar_
std::vector< HGCalParameters::hgtrform > HGCalDDDConstants::getTrForms ( ) const

Definition at line 232 of file HGCalDDDConstants.cc.

bool HGCalDDDConstants::isValid ( int  lay,
int  mod,
int  cell,
bool  reco 
) const
unsigned int HGCalDDDConstants::layers ( bool  reco) const

Definition at line 156 of file HGCalDDDConstants.cc.

unsigned int HGCalDDDConstants::layersInit ( bool  reco) const

Definition at line 160 of file HGCalDDDConstants.cc.

std::pair< float, float > HGCalDDDConstants::locateCell ( int  cell,
int  lay,
int  type,
bool  reco 
) const

Definition at line 278 of file HGCalDDDConstants.cc.

Referenced by HGCNumberingScheme::getLocalCoords().

std::pair< float, float > HGCalDDDConstants::locateCellHex ( int  cell,
int  wafer,
bool  reco 
) const

Definition at line 313 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::maxCells ( bool  reco) const

Definition at line 330 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::maxCells ( int  lay,
bool  reco 
) const

Definition at line 340 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::maxCellsSquare ( float  h,
float  bl,
float  tl,
float  alpha,
float  cellSize 
) const

Definition at line 362 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::maxRows ( int  lay,
bool  reco 
) const

Definition at line 379 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::modules ( int  lay,
bool  reco 
) const

Definition at line 399 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::modulesInit ( int  lay,
bool  reco 
) const

Definition at line 404 of file HGCalDDDConstants.cc.

std::pair< int, int > HGCalDDDConstants::newCell ( int  cell,
int  layer,
int  sector,
int  subsector,
int  incrx,
int  incry,
bool  half 
) const

Definition at line 414 of file HGCalDDDConstants.cc.

std::pair< int, int > HGCalDDDConstants::newCell ( int  cell,
int  layer,
int  subsector,
int  incrz,
bool  half 
) const

Definition at line 439 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::newCell ( int  kx,
int  ky,
int  lay,
int  subSec 
) const

Definition at line 451 of file HGCalDDDConstants.cc.

std::vector< int > HGCalDDDConstants::numberCells ( int  lay,
bool  reco 
) const

Definition at line 469 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::numberCellsHexagon ( int  wafer) const

Definition at line 505 of file HGCalDDDConstants.cc.

std::vector< int > HGCalDDDConstants::numberCellsSquare ( float  h,
float  bl,
float  tl,
float  alpha,
float  cellSize 
) const

Definition at line 492 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::sectors ( ) const
inline

Definition at line 65 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::nSectors_.

65 {return hgpar_->nSectors_;}
const HGCalParameters * hgpar_
std::pair< int, int > HGCalDDDConstants::simToReco ( int  cell,
int  layer,
int  mod,
bool  half 
) const

Definition at line 517 of file HGCalDDDConstants.cc.

unsigned int HGCalDDDConstants::volumes ( ) const
inline

Definition at line 67 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::moduleLayR_.

67 {return hgpar_->moduleLayR_.size();}
std::vector< int > moduleLayR_
const HGCalParameters * hgpar_
int HGCalDDDConstants::waferFromCopy ( int  copy) const

Definition at line 560 of file HGCalDDDConstants.cc.

Referenced by HGCNumberingScheme::getUnitID().

bool HGCalDDDConstants::waferInLayer ( int  wafer,
int  lay,
bool  reco 
) const

Definition at line 572 of file HGCalDDDConstants.cc.

bool HGCalDDDConstants::waferInLayer ( int  wafer,
int  lay 
) const
private

Definition at line 661 of file HGCalDDDConstants.cc.

std::pair< double, double > HGCalDDDConstants::waferPosition ( int  wafer) const

Definition at line 579 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::wafers ( ) const

Definition at line 597 of file HGCalDDDConstants.cc.

int HGCalDDDConstants::waferToCopy ( int  wafer) const
inline

Definition at line 72 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::waferCopy_.

72 {return ((wafer>=0)&&(wafer< (int)(hgpar_->waferCopy_.size()))) ? hgpar_->waferCopy_[wafer] : (int)(hgpar_->waferCopy_.size());}
std::vector< int > waferCopy_
const HGCalParameters * hgpar_
int HGCalDDDConstants::waferTypeT ( int  wafer) const
inline

Definition at line 73 of file HGCalDDDConstants.h.

References hgpar_, and HGCalParameters::waferTypeT_.

73 {return ((wafer>=0)&&(wafer<(int)(hgpar_->waferTypeT_.size()))) ? hgpar_->waferTypeT_[wafer] : 0;}
std::vector< int > waferTypeT_
const HGCalParameters * hgpar_
double HGCalDDDConstants::waferZ ( int  layer,
bool  reco 
) const

Definition at line 590 of file HGCalDDDConstants.cc.

Member Data Documentation

const HGCalParameters* HGCalDDDConstants::hgpar_
private

Definition at line 93 of file HGCalDDDConstants.h.

Referenced by getTrForm(), getTrFormN(), sectors(), volumes(), waferToCopy(), and waferTypeT().

simrecovecs HGCalDDDConstants::max_modules_layer_
private

Definition at line 99 of file HGCalDDDConstants.h.

HGCalGeometryMode HGCalDDDConstants::mode_
private

Definition at line 96 of file HGCalDDDConstants.h.

Referenced by geomMode().

double HGCalDDDConstants::rmax_
private

Definition at line 95 of file HGCalDDDConstants.h.

double HGCalDDDConstants::tan30deg_ = 0.5773502693
staticprivate

Definition at line 94 of file HGCalDDDConstants.h.

std::array<uint32_t,2> HGCalDDDConstants::tot_layers_
private

Definition at line 98 of file HGCalDDDConstants.h.

int32_t HGCalDDDConstants::tot_wafers_
private

Definition at line 97 of file HGCalDDDConstants.h.