CMS 3D CMS Logo

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

#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 ()
 
 LASConstants (std::vector< edm::ParameterSet > const &)
 
 ~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
 

Detailed Description

Definition at line 11 of file LASConstants.h.

Constructor & Destructor Documentation

LASConstants::LASConstants ( )

Definition at line 9 of file LASConstants.cc.

9  :
10  atRadius(0.), tecBsZPosition(0.), atZPosition(0.)
11 {
12 }
double atRadius
Definition: LASConstants.h:40
double atZPosition
Definition: LASConstants.h:46
double tecBsZPosition
Definition: LASConstants.h:45
LASConstants::LASConstants ( std::vector< edm::ParameterSet > const &  theConstConf)

Definition at line 21 of file LASConstants.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, FillBsKinks(), FillRadii(), FillZPositions(), InitContainers(), getDQMSummary::iter, and AlCaHLTBitMon_QueryRunRegistry::string.

21  {
22 
24 
25  for( std::vector<edm::ParameterSet>::const_iterator iter = theConstConf.begin(); iter < theConstConf.end(); ++iter ) {
26 
27  if( iter->getParameter<std::string>( "PSetName" ) == "BeamsplitterKinks" ) FillBsKinks( *iter );
28  else if( iter->getParameter<std::string>( "PSetName" ) == "Radii" ) FillRadii( *iter );
29  else if( iter->getParameter<std::string>( "PSetName" ) == "ZPositions" ) FillZPositions( *iter );
30  else {
31  std::cerr << " [] ** WARNING: Cannot process unknown parameter set named: " << iter->getParameter<std::string>( "PSetName" ) << "." << std::endl;
32  }
33 
34  }
35 
36 }
void FillRadii(edm::ParameterSet const &)
void FillZPositions(edm::ParameterSet const &)
void InitContainers(void)
void FillBsKinks(edm::ParameterSet const &)
LASConstants::~LASConstants ( )

Definition at line 45 of file LASConstants.cc.

45  {
46 }

Member Function Documentation

void LASConstants::FillBsKinks ( edm::ParameterSet const &  theBsKinkConf)
private

fill the beamplitter-kink related containers

Definition at line 232 of file LASConstants.cc.

References alignmentTubeBsKinks, EcalCondDBWriter_cfi::beam, endcapBsKinks, edm::ParameterSet::getParameter(), and relativeConstraints::ring.

Referenced by LASConstants().

232  {
233 
234  // tec+
235  endcapBsKinks.at( 0 ).at( 0 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecPlusRing4BsKinks" );
236  endcapBsKinks.at( 0 ).at( 1 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecPlusRing6BsKinks" );
237 
238  // apply global offsets
239  for( unsigned int ring = 0; ring < 2; ++ring ) {
240  for( unsigned int beam = 0; beam < 8; ++beam ) {
241  endcapBsKinks.at( 0 ).at( ring ).at( beam ) += theBsKinkConf.getParameter<double>( "TecPlusGlobalOffset" );
242  }
243  }
244 
245  // tec-
246  endcapBsKinks.at( 1 ).at( 0 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecMinusRing4BsKinks" );
247  endcapBsKinks.at( 1 ).at( 1 ) = theBsKinkConf.getParameter<std::vector<double> >( "LASTecMinusRing6BsKinks" );
248 
249  // apply global offsets
250  for( unsigned int ring = 0; ring < 2; ++ring ) {
251  for( unsigned int beam = 0; beam < 8; ++beam ) {
252  endcapBsKinks.at( 1 ).at( ring ).at( beam ) += theBsKinkConf.getParameter<double>( "TecMinusGlobalOffset" );
253  }
254  }
255 
256  // at
257  alignmentTubeBsKinks = theBsKinkConf.getParameter<std::vector<double> >( "LASAlignmentTubeBsKinks" );
258 
259 }
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:36
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:37
void LASConstants::FillRadii ( edm::ParameterSet const &  theRadiiConf)
private

fill the beam radii

Definition at line 268 of file LASConstants.cc.

References atRadius, edm::ParameterSet::getParameter(), and tecRadii.

Referenced by LASConstants().

268  {
269 
270  tecRadii = theRadiiConf.getParameter<std::vector<double> >( "LASTecRadius" );
271  atRadius = theRadiiConf.getParameter<double>( "LASAtRadius" );
272 
273 }
double atRadius
Definition: LASConstants.h:40
std::vector< double > tecRadii
Definition: LASConstants.h:39
void LASConstants::FillZPositions ( edm::ParameterSet const &  theZPosConf)
private

Definition at line 282 of file LASConstants.cc.

References atZPosition, edm::ParameterSet::getParameter(), tecBsZPosition, tecZPositions, tibZPositions, and tobZPositions.

Referenced by LASConstants().

282  {
283 
284  tecZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTecZPositions" );
285  tibZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTibZPositions" );
286  tobZPositions = theZPosConf.getParameter<std::vector<double> >( "LASTobZPositions" );
287  tecBsZPosition = theZPosConf.getParameter<double>( "LASTecBeamSplitterZPosition" );
288  atZPosition = theZPosConf.getParameter<double>( "LASAtBeamsplitterZPosition" );
289 
290 }
std::vector< double > tecZPositions
Definition: LASConstants.h:42
double atZPosition
Definition: LASConstants.h:46
double tecBsZPosition
Definition: LASConstants.h:45
std::vector< double > tobZPositions
Definition: LASConstants.h:44
std::vector< double > tibZPositions
Definition: LASConstants.h:43
double LASConstants::GetAlignmentTubeBsKink ( unsigned int  beam) const

Returns beamplitter kink for alignment tube beam <beam> (0..7)

Definition at line 75 of file LASConstants.cc.

References alignmentTubeBsKinks, and edm::hlt::Exception.

75  {
76 
77  if( beam >= 8U ) { // beam >= 0, since beam is unsigned
78  throw cms::Exception( " [LASConstants::GetAlignmentTubeBsKink]" ) << " ** ERROR: no such beam: " << beam << "." << std::endl;
79  }
80 
81  return alignmentTubeBsKinks.at( beam );
82 
83 }
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:37
double LASConstants::GetAtBsZPosition ( void  ) const

Definition at line 187 of file LASConstants.cc.

References atZPosition.

187  {
188 
189  return atZPosition;
190 
191 }
double atZPosition
Definition: LASConstants.h:46
double LASConstants::GetAtRadius ( void  ) const

Definition at line 109 of file LASConstants.cc.

References atRadius.

109  {
110 
111  return atRadius;
112 
113 }
double atRadius
Definition: LASConstants.h:40
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 58 of file LASConstants.cc.

References endcapBsKinks, and edm::hlt::Exception.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

58  {
59 
60  if( ! ( ( det == 0 || det == 1 ) && ( ring == 0 || ring == 1 ) && ( beam < 8U ) ) ) { // beam >= 0, since beam is unsigned
61  throw cms::Exception( " [LASConstants::GetEndcapBsKink]" ) << " ** ERROR: no such element: det " << det << ", ring " << ring << ", beam " << beam << "." << std::endl;
62  }
63 
64  return endcapBsKinks.at( det ).at( ring ).at( beam );
65 
66 }
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:36
double LASConstants::GetTecBsZPosition ( unsigned int  det) const

Definition at line 174 of file LASConstants.cc.

References tecBsZPosition.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

174  {
175 
176  return tecBsZPosition;
177 
178 }
double tecBsZPosition
Definition: LASConstants.h:45
double LASConstants::GetTecRadius ( unsigned int  ring) const

Definition at line 92 of file LASConstants.cc.

References edm::hlt::Exception, and tecRadii.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

92  {
93 
94  if( ring > 1U ) { // ring >= 0, since ring is unsigned
95  throw cms::Exception( " [LASConstants::GetTecRadius]" ) << " ** ERROR: no such ring: " << ring << "." << std::endl;
96  }
97 
98  return tecRadii.at( ring );
99 
100 }
std::vector< double > tecRadii
Definition: LASConstants.h:39
double LASConstants::GetTecZPosition ( unsigned int  det,
unsigned int  disk 
) const

Definition at line 122 of file LASConstants.cc.

References edm::hlt::Exception, and tecZPositions.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

122  {
123 
124  if( ( det > 1 ) || ( disk > 8 ) ) {
125  throw cms::Exception( " [LASConstants::GetTecZPosition]" ) << " ** ERROR: no such element: det " << det << ", disk " << disk << "." << std::endl;
126  }
127 
128  if( det == 0 ) return tecZPositions.at( disk ); // tec+
129  else return -1. * tecZPositions.at( disk ); // tec-
130 
131 }
std::vector< double > tecZPositions
Definition: LASConstants.h:42
double LASConstants::GetTibZPosition ( unsigned int  pos) const

Definition at line 140 of file LASConstants.cc.

References edm::hlt::Exception, and tibZPositions.

140  {
141 
142  if( pos > 5 ) {
143  throw cms::Exception( " [LASConstants::GetTibZPosition]" ) << " ** ERROR: no such position: " << pos << "." << std::endl;
144  }
145 
146  return tibZPositions.at( pos );
147 
148 }
std::vector< double > tibZPositions
Definition: LASConstants.h:43
double LASConstants::GetTobZPosition ( unsigned int  pos) const

Definition at line 157 of file LASConstants.cc.

References edm::hlt::Exception, and tobZPositions.

157  {
158 
159  if( pos > 5 ) {
160  throw cms::Exception( " [LASConstants::GetTobZPosition]" ) << " ** ERROR: no such position: " << pos << "." << std::endl;
161  }
162 
163  return tobZPositions.at( pos );
164 
165 }
std::vector< double > tobZPositions
Definition: LASConstants.h:44
void LASConstants::InitContainers ( void  )
private

Definition at line 200 of file LASConstants.cc.

References alignmentTubeBsKinks, endcapBsKinks, relativeConstraints::ring, tecRadii, tecZPositions, tibZPositions, and tobZPositions.

Referenced by LASConstants().

200  {
201 
202  // beam splitter kinks
203 
204  endcapBsKinks.resize( 2 ); // create two dets
205  for( int det = 0; det < 2; ++det ) {
206  endcapBsKinks.at( det ).resize( 2 ); // create two rings per det
207  for( int ring = 0; ring < 2; ++ring ) {
208  endcapBsKinks.at( det ).at( ring ).resize( 8 ); // 8 beams per ring
209  }
210  }
211 
212  alignmentTubeBsKinks.resize( 8 ); // 8 beams
213 
214 
215  // radii
216  tecRadii.resize( 2 );
217 
218  // z positions
219  tecZPositions.resize( 9 );
220  tibZPositions.resize( 6 );
221  tobZPositions.resize( 6 );
222 
223 }
std::vector< double > tecZPositions
Definition: LASConstants.h:42
std::vector< double > tecRadii
Definition: LASConstants.h:39
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:36
std::vector< double > tobZPositions
Definition: LASConstants.h:44
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:37
std::vector< double > tibZPositions
Definition: LASConstants.h:43

Member Data Documentation

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