#include <LASConstants.h>
Public Member Functions | |
double | GetAlignmentTubeBsKink (unsigned int beam) const |
double | GetAtBsZPosition (void) const |
double | GetAtRadius (void) const |
double | GetEndcapBsKink (unsigned int det, unsigned int ring, unsigned int beam) const |
double | GetTecBsZPosition (unsigned int det) const |
double | GetTecRadius (unsigned int ring) const |
double | GetTecZPosition (unsigned int det, unsigned int disk) const |
double | GetTibZPosition (unsigned int pos) const |
double | GetTobZPosition (unsigned int pos) const |
LASConstants (std::vector< edm::ParameterSet > const &) | |
LASConstants () | |
~LASConstants () | |
Private Member Functions | |
void | FillBsKinks (edm::ParameterSet const &) |
void | FillRadii (edm::ParameterSet const &) |
void | FillZPositions (edm::ParameterSet const &) |
void | InitContainers (void) |
Private Attributes | |
std::vector< double > | alignmentTubeBsKinks |
double | atRadius |
double | atZPosition |
std::vector< std::vector < std::vector< double > > > | endcapBsKinks |
double | tecBsZPosition |
std::vector< double > | tecRadii |
std::vector< double > | tecZPositions |
std::vector< double > | tibZPositions |
std::vector< double > | tobZPositions |
Definition at line 11 of file LASConstants.h.
LASConstants::LASConstants | ( | ) |
Definition at line 9 of file LASConstants.cc.
{ }
LASConstants::LASConstants | ( | std::vector< edm::ParameterSet > const & | theConstConf | ) |
Definition at line 19 of file LASConstants.cc.
References ExpressReco_HICollisions_FallBack::cerr, FillBsKinks(), FillRadii(), FillZPositions(), and InitContainers().
{ InitContainers(); for( std::vector<edm::ParameterSet>::const_iterator iter = theConstConf.begin(); iter < theConstConf.end(); ++iter ) { if( iter->getParameter<std::string>( "PSetName" ) == "BeamsplitterKinks" ) FillBsKinks( *iter ); else if( iter->getParameter<std::string>( "PSetName" ) == "Radii" ) FillRadii( *iter ); else if( iter->getParameter<std::string>( "PSetName" ) == "ZPositions" ) FillZPositions( *iter ); else { std::cerr << " [] ** WARNING: Cannot process unknown parameter set named: " << iter->getParameter<std::string>( "PSetName" ) << "." << std::endl; } } }
LASConstants::~LASConstants | ( | ) |
Definition at line 43 of file LASConstants.cc.
{ }
void LASConstants::FillBsKinks | ( | edm::ParameterSet const & | theBsKinkConf | ) | [private] |
fill the beamplitter-kink related containers
Definition at line 230 of file LASConstants.cc.
References alignmentTubeBsKinks, endcapBsKinks, edm::ParameterSet::getParameter(), and relativeConstraints::ring.
Referenced by LASConstants().
{ // tec+ endcapBsKinks.at( 0 ).at( 0 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecPlusRing4BsKinks" ); endcapBsKinks.at( 0 ).at( 1 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecPlusRing6BsKinks" ); // apply global offsets for( unsigned int ring = 0; ring < 2; ++ring ) { for( unsigned int beam = 0; beam < 8; ++beam ) { endcapBsKinks.at( 0 ).at( ring ).at( beam ) += theBsKinkConf.getParameter<double>( "TecPlusGlobalOffset" ); } } // tec- endcapBsKinks.at( 1 ).at( 0 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecMinusRing4BsKinks" ); endcapBsKinks.at( 1 ).at( 1 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecMinusRing6BsKinks" ); // apply global offsets for( unsigned int ring = 0; ring < 2; ++ring ) { for( unsigned int beam = 0; beam < 8; ++beam ) { endcapBsKinks.at( 1 ).at( ring ).at( beam ) += theBsKinkConf.getParameter<double>( "TecMinusGlobalOffset" ); } } // at alignmentTubeBsKinks = theBsKinkConf.getParameter<std::vector<double> >( "LASAlignmentTubeBsKinks" ); }
void LASConstants::FillRadii | ( | edm::ParameterSet const & | theRadiiConf | ) | [private] |
fill the beam radii
Definition at line 266 of file LASConstants.cc.
References atRadius, edm::ParameterSet::getParameter(), and tecRadii.
Referenced by LASConstants().
void LASConstants::FillZPositions | ( | edm::ParameterSet const & | theZPosConf | ) | [private] |
Definition at line 280 of file LASConstants.cc.
References atZPosition, edm::ParameterSet::getParameter(), tecBsZPosition, tecZPositions, tibZPositions, and tobZPositions.
Referenced by LASConstants().
{ tecZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTecZPositions" ); tibZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTibZPositions" ); tobZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTobZPositions" ); tecBsZPosition = theZPosConf.getParameter<double>( "LASTecBeamSplitterZPosition" ); atZPosition = theZPosConf.getParameter<double>( "LASAtBeamsplitterZPosition" ); }
double LASConstants::GetAlignmentTubeBsKink | ( | unsigned int | beam | ) | const |
Returns beamplitter kink for alignment tube beam <beam> (0..7)
Definition at line 73 of file LASConstants.cc.
References alignmentTubeBsKinks, and Exception.
{ if( beam >= 8U ) { // beam >= 0, since beam is unsigned throw cms::Exception( " [LASConstants::GetAlignmentTubeBsKink]" ) << " ** ERROR: no such beam: " << beam << "." << std::endl; } return alignmentTubeBsKinks.at( beam ); }
double LASConstants::GetAtBsZPosition | ( | void | ) | const |
double LASConstants::GetAtRadius | ( | void | ) | const |
double LASConstants::GetEndcapBsKink | ( | unsigned int | det, |
unsigned int | ring, | ||
unsigned int | beam | ||
) | const |
Returns one beamsplitter kink, parameters are: det (0=TEC+/1=TEC-) ring (0=R4/1=R6) beam (0..7)
Definition at line 56 of file LASConstants.cc.
References endcapBsKinks, and Exception.
Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().
{ if( ! ( ( det == 0 || det == 1 ) && ( ring == 0 || ring == 1 ) && ( beam < 8U ) ) ) { // beam >= 0, since beam is unsigned throw cms::Exception( " [LASConstants::GetEndcapBsKink]" ) << " ** ERROR: no such element: det " << det << ", ring " << ring << ", beam " << beam << "." << std::endl; } return endcapBsKinks.at( det ).at( ring ).at( beam ); }
double LASConstants::GetTecBsZPosition | ( | unsigned int | det | ) | const |
Definition at line 172 of file LASConstants.cc.
References tecBsZPosition.
Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().
{ return tecBsZPosition; }
double LASConstants::GetTecRadius | ( | unsigned int | ring | ) | const |
Definition at line 90 of file LASConstants.cc.
References Exception, and tecRadii.
Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().
{ if( ring > 1U ) { // ring >= 0, since ring is unsigned throw cms::Exception( " [LASConstants::GetTecRadius]" ) << " ** ERROR: no such ring: " << ring << "." << std::endl; } return tecRadii.at( ring ); }
double LASConstants::GetTecZPosition | ( | unsigned int | det, |
unsigned int | disk | ||
) | const |
Definition at line 120 of file LASConstants.cc.
References Exception, and tecZPositions.
Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().
{ if( ( det > 1 ) || ( disk > 8 ) ) { throw cms::Exception( " [LASConstants::GetTecZPosition]" ) << " ** ERROR: no such element: det " << det << ", disk " << disk << "." << std::endl; } if( det == 0 ) return tecZPositions.at( disk ); // tec+ else return -1. * tecZPositions.at( disk ); // tec- }
double LASConstants::GetTibZPosition | ( | unsigned int | pos | ) | const |
Definition at line 138 of file LASConstants.cc.
References Exception, and tibZPositions.
{ if( pos > 5 ) { throw cms::Exception( " [LASConstants::GetTibZPosition]" ) << " ** ERROR: no such position: " << pos << "." << std::endl; } return tibZPositions.at( pos ); }
double LASConstants::GetTobZPosition | ( | unsigned int | pos | ) | const |
Definition at line 155 of file LASConstants.cc.
References Exception, and tobZPositions.
{ if( pos > 5 ) { throw cms::Exception( " [LASConstants::GetTobZPosition]" ) << " ** ERROR: no such position: " << pos << "." << std::endl; } return tobZPositions.at( pos ); }
void LASConstants::InitContainers | ( | void | ) | [private] |
Definition at line 198 of file LASConstants.cc.
References alignmentTubeBsKinks, endcapBsKinks, relativeConstraints::ring, tecRadii, tecZPositions, tibZPositions, and tobZPositions.
Referenced by LASConstants().
{ // beam splitter kinks endcapBsKinks.resize( 2 ); // create two dets for( int det = 0; det < 2; ++det ) { endcapBsKinks.at( det ).resize( 2 ); // create two rings per det for( int ring = 0; ring < 2; ++ring ) { endcapBsKinks.at( det ).at( ring ).resize( 8 ); // 8 beams per ring } } alignmentTubeBsKinks.resize( 8 ); // 8 beams // radii tecRadii.resize( 2 ); // z positions tecZPositions.resize( 9 ); tibZPositions.resize( 6 ); tobZPositions.resize( 6 ); }
std::vector<double> LASConstants::alignmentTubeBsKinks [private] |
Definition at line 37 of file LASConstants.h.
Referenced by FillBsKinks(), GetAlignmentTubeBsKink(), and InitContainers().
double LASConstants::atRadius [private] |
Definition at line 40 of file LASConstants.h.
Referenced by FillRadii(), and GetAtRadius().
double LASConstants::atZPosition [private] |
Definition at line 46 of file LASConstants.h.
Referenced by FillZPositions(), and GetAtBsZPosition().
std::vector<std::vector<std::vector<double> > > LASConstants::endcapBsKinks [private] |
Definition at line 36 of file LASConstants.h.
Referenced by FillBsKinks(), GetEndcapBsKink(), and InitContainers().
double LASConstants::tecBsZPosition [private] |
Definition at line 45 of file LASConstants.h.
Referenced by FillZPositions(), and GetTecBsZPosition().
std::vector<double> LASConstants::tecRadii [private] |
Definition at line 39 of file LASConstants.h.
Referenced by FillRadii(), GetTecRadius(), and InitContainers().
std::vector<double> LASConstants::tecZPositions [private] |
Definition at line 42 of file LASConstants.h.
Referenced by FillZPositions(), GetTecZPosition(), and InitContainers().
std::vector<double> LASConstants::tibZPositions [private] |
Definition at line 43 of file LASConstants.h.
Referenced by FillZPositions(), GetTibZPosition(), and InitContainers().
std::vector<double> LASConstants::tobZPositions [private] |
Definition at line 44 of file LASConstants.h.
Referenced by FillZPositions(), GetTobZPosition(), and InitContainers().