Belle II Software  release-08-01-10
CDCXtRelations Class Reference

Database object for xt-relations. More...

#include <CDCXtRelations.h>

Inheritance diagram for CDCXtRelations:
Collaboration diagram for CDCXtRelations:

Public Types

enum  {
  c_nSLayers = 56 ,
  c_maxNAlphaBins = 18 ,
  c_maxNThetaBins = 7 ,
  c_maxNXtParams = 8
}
 Constants. More...
 

Public Member Functions

 CDCXtRelations ()
 Default constructor.
 
void setAlphaBin (const array3 &alpha)
 Set alpha-angle bin (rad)
 
void setThetaBin (const array3 &theta)
 Set theta-angle bin (rad)
 
void setXtParamMode (unsigned short mode)
 Set xt parameterization mode.
 
void setXtParams (const XtID xtID, const std::vector< float > &params)
 Set xt parameters for the specified id. More...
 
void setXtParams (unsigned short iCLayer, unsigned short iLR, unsigned short iAlpha, unsigned short iTheta, const std::vector< float > &params)
 Set xt parameters for the specified id. More...
 
void addXTParams (const XtID xtID, const std::vector< float > &delta)
 Update xt parameters for the specified id. More...
 
void addXTParams (unsigned short iCLayer, unsigned short iLR, unsigned short iAlpha, unsigned short iTheta, const std::vector< float > &delta)
 Update xt parameters for the specified id. More...
 
void replaceXTParams (const XtID xtID, const std::vector< float > &param)
 Replace xt parameters for the specified id. More...
 
void replaceXTParams (unsigned short iCLayer, unsigned short iLR, unsigned short iAlpha, unsigned short iTheta, const std::vector< float > &param)
 Replace xt parameters for the specified id. More...
 
unsigned short getNoOfAlphaBins () const
 Get no. More...
 
unsigned short getNoOfThetaBins () const
 Get no. More...
 
const array3getAlphaBin (unsigned short i) const
 Get i-th alpha-angle bin info. More...
 
float getAlphaPoint (unsigned short i) const
 Get i-th alpha-angle point (rad)
 
const array3getThetaBin (unsigned short i) const
 Get i-th theta-angle bin info. More...
 
float getThetaPoint (unsigned short i) const
 Get i-th theta-angle point (rad)
 
unsigned short getXtParamMode () const
 Get xt parameterization mode.
 
XtID getXtID (unsigned short iCLayer, unsigned short iLR, unsigned short iAlpha, unsigned short iTheta) const
 Get xt id. More...
 
XtID getXtID (unsigned short iCLayer, unsigned short iLR, float alpha, float theta) const
 Get xt id. More...
 
const std::vector< float > & getXtParams (const XtID xtID) const
 Get xt parameters for the specified id. More...
 
const std::vector< float > & getXtParams (unsigned short iCLayer, unsigned short iLR, unsigned short iAlpha, unsigned short iTheta) const
 Get xt parameters for the specified id. More...
 
void dump () const
 Print all contents.
 
void outputToFile (std::string fileName) const
 Output the contents in test file format.
 
double getGlobalParam (unsigned short xtId, unsigned short i) const
 Get global parameter for i-th component of the specified xtId.
 
void setGlobalParam (double value, unsigned short xtId, unsigned short i)
 Set global parameter for i-th component of the specified xtId.
 
std::vector< std::pair< unsigned short, unsigned short > > listGlobalParams () const
 list stored global parameters TODO FIXME CDC not ready
 

Static Public Member Functions

static bool comp (const array3 &lhs, const array3 &rhs)
 Static function for sorting.
 
static unsigned short getGlobalUniqueID ()
 Get global unique id.
 

Private Types

typedef std::array< float, 3 > array3
 angle bin info.
 
typedef unsigned short XtID
 id. More...
 

Private Member Functions

 ClassDef (CDCXtRelations, 2)
 ClassDef.
 

Private Attributes

unsigned short m_xtParamMode
 Mode for xt parameterization.
 
unsigned short m_nXtParams
 no. More...
 
std::vector< array3m_alphaBins
 alpha bins for xt (rad)
 
std::vector< array3m_thetaBins
 theta bins for xt (rad)
 
std::map< XtID, std::vector< float > > m_xts
 XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle. More...
 

Detailed Description

Database object for xt-relations.

Definition at line 28 of file CDCXtRelations.h.

Member Typedef Documentation

◆ XtID

typedef unsigned short XtID
private

id.

for xt

Definition at line 31 of file CDCXtRelations.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum

Constants.

Enumerator
c_nSLayers 

no.

of layers

c_maxNAlphaBins 

max.

no. of alpha angle bins

c_maxNThetaBins 

max.

no. of theta angle bins

c_maxNXtParams 

max.

no. of params. for xt

Definition at line 37 of file CDCXtRelations.h.

Member Function Documentation

◆ addXTParams() [1/2]

void addXTParams ( const XtID  xtID,
const std::vector< float > &  delta 
)
inline

Update xt parameters for the specified id.

(=bin)

Definition at line 121 of file CDCXtRelations.h.

◆ addXTParams() [2/2]

void addXTParams ( unsigned short  iCLayer,
unsigned short  iLR,
unsigned short  iAlpha,
unsigned short  iTheta,
const std::vector< float > &  delta 
)
inline

Update xt parameters for the specified id.

(=bin)

Definition at line 137 of file CDCXtRelations.h.

◆ getAlphaBin()

const array3& getAlphaBin ( unsigned short  i) const
inline

Get i-th alpha-angle bin info.

(rad)

Definition at line 190 of file CDCXtRelations.h.

◆ getNoOfAlphaBins()

unsigned short getNoOfAlphaBins ( ) const
inline

Get no.

of alpha-angle bin

Definition at line 174 of file CDCXtRelations.h.

◆ getNoOfThetaBins()

unsigned short getNoOfThetaBins ( ) const
inline

Get no.

of theta-angle bin

Definition at line 182 of file CDCXtRelations.h.

◆ getThetaBin()

const array3& getThetaBin ( unsigned short  i) const
inline

Get i-th theta-angle bin info.

(rad)

Definition at line 206 of file CDCXtRelations.h.

◆ getXtID() [1/2]

XtID getXtID ( unsigned short  iCLayer,
unsigned short  iLR,
float  alpha,
float  theta 
) const
inline

Get xt id.

(=bin id.)

Definition at line 243 of file CDCXtRelations.h.

◆ getXtID() [2/2]

XtID getXtID ( unsigned short  iCLayer,
unsigned short  iLR,
unsigned short  iAlpha,
unsigned short  iTheta 
) const
inline

Get xt id.

(=bin id.) bit#00 - 05: used for layer no. bit#06 - 06: used for left/right bit#07 - 11: used for alpha angle bin bit#12 - 15: used for theta angle bin

Definition at line 234 of file CDCXtRelations.h.

◆ getXtParams() [1/2]

const std::vector<float>& getXtParams ( const XtID  xtID) const
inline

Get xt parameters for the specified id.

(=bin)

Definition at line 295 of file CDCXtRelations.h.

◆ getXtParams() [2/2]

const std::vector<float>& getXtParams ( unsigned short  iCLayer,
unsigned short  iLR,
unsigned short  iAlpha,
unsigned short  iTheta 
) const
inline

Get xt parameters for the specified id.

(=bin)

Definition at line 308 of file CDCXtRelations.h.

◆ replaceXTParams() [1/2]

void replaceXTParams ( const XtID  xtID,
const std::vector< float > &  param 
)
inline

Replace xt parameters for the specified id.

(=bin)

Definition at line 147 of file CDCXtRelations.h.

◆ replaceXTParams() [2/2]

void replaceXTParams ( unsigned short  iCLayer,
unsigned short  iLR,
unsigned short  iAlpha,
unsigned short  iTheta,
const std::vector< float > &  param 
)
inline

Replace xt parameters for the specified id.

(=bin)

Definition at line 163 of file CDCXtRelations.h.

◆ setXtParams() [1/2]

void setXtParams ( const XtID  xtID,
const std::vector< float > &  params 
)
inline

Set xt parameters for the specified id.

(=bin)

Definition at line 95 of file CDCXtRelations.h.

◆ setXtParams() [2/2]

void setXtParams ( unsigned short  iCLayer,
unsigned short  iLR,
unsigned short  iAlpha,
unsigned short  iTheta,
const std::vector< float > &  params 
)
inline

Set xt parameters for the specified id.

(=bin)

Definition at line 111 of file CDCXtRelations.h.

Member Data Documentation

◆ m_nXtParams

unsigned short m_nXtParams
private

no.

of xt parameters per bin

Definition at line 447 of file CDCXtRelations.h.

◆ m_xts

std::map<XtID, std::vector<float> > m_xts
private

XT-relation coefficients for each layer, Left/Right, entrance angle and polar angle.


Definition at line 451 of file CDCXtRelations.h.


The documentation for this class was generated from the following file: