CMS 3D CMS Logo

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 10 of file LASConstants.h.

Constructor & Destructor Documentation

◆ LASConstants() [1/2]

LASConstants::LASConstants ( )

Definition at line 9 of file LASConstants.cc.

9 : atRadius(0.), tecBsZPosition(0.), atZPosition(0.) {}
double atRadius
Definition: LASConstants.h:38
double atZPosition
Definition: LASConstants.h:44
double tecBsZPosition
Definition: LASConstants.h:43

◆ LASConstants() [2/2]

LASConstants::LASConstants ( std::vector< edm::ParameterSet > const &  theConstConf)

Definition at line 14 of file LASConstants.cc.

References EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0::cerr, FillBsKinks(), FillRadii(), FillZPositions(), InitContainers(), and AlCaHLTBitMon_QueryRunRegistry::string.

14  {
16 
17  for (std::vector<edm::ParameterSet>::const_iterator iter = theConstConf.begin(); iter < theConstConf.end(); ++iter) {
18  if (iter->getParameter<std::string>("PSetName") == "BeamsplitterKinks")
19  FillBsKinks(*iter);
20  else if (iter->getParameter<std::string>("PSetName") == "Radii")
21  FillRadii(*iter);
22  else if (iter->getParameter<std::string>("PSetName") == "ZPositions")
23  FillZPositions(*iter);
24  else {
25  std::cerr << " [] ** WARNING: Cannot process unknown parameter set named: "
26  << iter->getParameter<std::string>("PSetName") << "." << std::endl;
27  }
28  }
29 }
void FillRadii(edm::ParameterSet const &)
void FillZPositions(edm::ParameterSet const &)
void InitContainers(void)
void FillBsKinks(edm::ParameterSet const &)

◆ ~LASConstants()

LASConstants::~LASConstants ( )

Definition at line 34 of file LASConstants.cc.

34 {}

Member Function Documentation

◆ FillBsKinks()

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

fill the beamplitter-kink related containers

Definition at line 156 of file LASConstants.cc.

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

Referenced by LASConstants().

156  {
157  // tec+
158  endcapBsKinks.at(0).at(0) = theBsKinkConf.getParameter<std::vector<double> >("LASTecPlusRing4BsKinks");
159  endcapBsKinks.at(0).at(1) = theBsKinkConf.getParameter<std::vector<double> >("LASTecPlusRing6BsKinks");
160 
161  // apply global offsets
162  for (unsigned int ring = 0; ring < 2; ++ring) {
163  for (unsigned int beam = 0; beam < 8; ++beam) {
164  endcapBsKinks.at(0).at(ring).at(beam) += theBsKinkConf.getParameter<double>("TecPlusGlobalOffset");
165  }
166  }
167 
168  // tec-
169  endcapBsKinks.at(1).at(0) = theBsKinkConf.getParameter<std::vector<double> >("LASTecMinusRing4BsKinks");
170  endcapBsKinks.at(1).at(1) = theBsKinkConf.getParameter<std::vector<double> >("LASTecMinusRing6BsKinks");
171 
172  // apply global offsets
173  for (unsigned int ring = 0; ring < 2; ++ring) {
174  for (unsigned int beam = 0; beam < 8; ++beam) {
175  endcapBsKinks.at(1).at(ring).at(beam) += theBsKinkConf.getParameter<double>("TecMinusGlobalOffset");
176  }
177  }
178 
179  // at
180  alignmentTubeBsKinks = theBsKinkConf.getParameter<std::vector<double> >("LASAlignmentTubeBsKinks");
181 }
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:34
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:35

◆ FillRadii()

void LASConstants::FillRadii ( edm::ParameterSet const &  theRadiiConf)
private

fill the beam radii

Definition at line 186 of file LASConstants.cc.

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

Referenced by LASConstants().

186  {
187  tecRadii = theRadiiConf.getParameter<std::vector<double> >("LASTecRadius");
188  atRadius = theRadiiConf.getParameter<double>("LASAtRadius");
189 }
double atRadius
Definition: LASConstants.h:38
std::vector< double > tecRadii
Definition: LASConstants.h:37

◆ FillZPositions()

void LASConstants::FillZPositions ( edm::ParameterSet const &  theZPosConf)
private

Definition at line 194 of file LASConstants.cc.

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

Referenced by LASConstants().

194  {
195  tecZPositions = theZPosConf.getParameter<std::vector<double> >("LASTecZPositions");
196  tibZPositions = theZPosConf.getParameter<std::vector<double> >("LASTibZPositions");
197  tobZPositions = theZPosConf.getParameter<std::vector<double> >("LASTobZPositions");
198  tecBsZPosition = theZPosConf.getParameter<double>("LASTecBeamSplitterZPosition");
199  atZPosition = theZPosConf.getParameter<double>("LASAtBeamsplitterZPosition");
200 }
std::vector< double > tecZPositions
Definition: LASConstants.h:40
double atZPosition
Definition: LASConstants.h:44
double tecBsZPosition
Definition: LASConstants.h:43
std::vector< double > tobZPositions
Definition: LASConstants.h:42
std::vector< double > tibZPositions
Definition: LASConstants.h:41

◆ GetAlignmentTubeBsKink()

double LASConstants::GetAlignmentTubeBsKink ( unsigned int  beam) const

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

Definition at line 54 of file LASConstants.cc.

References alignmentTubeBsKinks, EcalCondDBWriter_cfi::beam, Exception, and mitigatedMETSequence_cff::U.

54  {
55  if (beam >= 8U) { // beam >= 0, since beam is unsigned
56  throw cms::Exception(" [LASConstants::GetAlignmentTubeBsKink]")
57  << " ** ERROR: no such beam: " << beam << "." << std::endl;
58  }
59 
60  return alignmentTubeBsKinks.at(beam);
61 }
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:35

◆ GetAtBsZPosition()

double LASConstants::GetAtBsZPosition ( void  ) const

Definition at line 126 of file LASConstants.cc.

References atZPosition.

126 { return atZPosition; }
double atZPosition
Definition: LASConstants.h:44

◆ GetAtRadius()

double LASConstants::GetAtRadius ( void  ) const

Definition at line 77 of file LASConstants.cc.

References atRadius.

77 { return atRadius; }
double atRadius
Definition: LASConstants.h:38

◆ GetEndcapBsKink()

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 42 of file LASConstants.cc.

References EcalCondDBWriter_cfi::beam, endcapBsKinks, Exception, relativeConstraints::ring, and mitigatedMETSequence_cff::U.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

42  {
43  if (!((det == 0 || det == 1) && (ring == 0 || ring == 1) && (beam < 8U))) { // beam >= 0, since beam is unsigned
44  throw cms::Exception(" [LASConstants::GetEndcapBsKink]")
45  << " ** ERROR: no such element: det " << det << ", ring " << ring << ", beam " << beam << "." << std::endl;
46  }
47 
48  return endcapBsKinks.at(det).at(ring).at(beam);
49 }
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:34

◆ GetTecBsZPosition()

double LASConstants::GetTecBsZPosition ( unsigned int  det) const

Definition at line 121 of file LASConstants.cc.

References tecBsZPosition.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

121 { return tecBsZPosition; }
double tecBsZPosition
Definition: LASConstants.h:43

◆ GetTecRadius()

double LASConstants::GetTecRadius ( unsigned int  ring) const

Definition at line 66 of file LASConstants.cc.

References Exception, relativeConstraints::ring, tecRadii, and mitigatedMETSequence_cff::U.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

66  {
67  if (ring > 1U) { // ring >= 0, since ring is unsigned
68  throw cms::Exception(" [LASConstants::GetTecRadius]") << " ** ERROR: no such ring: " << ring << "." << std::endl;
69  }
70 
71  return tecRadii.at(ring);
72 }
std::vector< double > tecRadii
Definition: LASConstants.h:37

◆ GetTecZPosition()

double LASConstants::GetTecZPosition ( unsigned int  det,
unsigned int  disk 
) const

Definition at line 82 of file LASConstants.cc.

References Exception, and tecZPositions.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

82  {
83  if ((det > 1) || (disk > 8)) {
84  throw cms::Exception(" [LASConstants::GetTecZPosition]")
85  << " ** ERROR: no such element: det " << det << ", disk " << disk << "." << std::endl;
86  }
87 
88  if (det == 0)
89  return tecZPositions.at(disk); // tec+
90  else
91  return -1. * tecZPositions.at(disk); // tec-
92 }
std::vector< double > tecZPositions
Definition: LASConstants.h:40

◆ GetTibZPosition()

double LASConstants::GetTibZPosition ( unsigned int  pos) const

Definition at line 97 of file LASConstants.cc.

References Exception, and tibZPositions.

97  {
98  if (pos > 5) {
99  throw cms::Exception(" [LASConstants::GetTibZPosition]")
100  << " ** ERROR: no such position: " << pos << "." << std::endl;
101  }
102 
103  return tibZPositions.at(pos);
104 }
std::vector< double > tibZPositions
Definition: LASConstants.h:41

◆ GetTobZPosition()

double LASConstants::GetTobZPosition ( unsigned int  pos) const

Definition at line 109 of file LASConstants.cc.

References Exception, and tobZPositions.

109  {
110  if (pos > 5) {
111  throw cms::Exception(" [LASConstants::GetTobZPosition]")
112  << " ** ERROR: no such position: " << pos << "." << std::endl;
113  }
114 
115  return tobZPositions.at(pos);
116 }
std::vector< double > tobZPositions
Definition: LASConstants.h:42

◆ InitContainers()

void LASConstants::InitContainers ( void  )
private

Definition at line 131 of file LASConstants.cc.

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

Referenced by LASConstants().

131  {
132  // beam splitter kinks
133 
134  endcapBsKinks.resize(2); // create two dets
135  for (int det = 0; det < 2; ++det) {
136  endcapBsKinks.at(det).resize(2); // create two rings per det
137  for (int ring = 0; ring < 2; ++ring) {
138  endcapBsKinks.at(det).at(ring).resize(8); // 8 beams per ring
139  }
140  }
141 
142  alignmentTubeBsKinks.resize(8); // 8 beams
143 
144  // radii
145  tecRadii.resize(2);
146 
147  // z positions
148  tecZPositions.resize(9);
149  tibZPositions.resize(6);
150  tobZPositions.resize(6);
151 }
std::vector< double > tecZPositions
Definition: LASConstants.h:40
std::vector< double > tecRadii
Definition: LASConstants.h:37
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:34
std::vector< double > tobZPositions
Definition: LASConstants.h:42
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:35
std::vector< double > tibZPositions
Definition: LASConstants.h:41

Member Data Documentation

◆ alignmentTubeBsKinks

std::vector<double> LASConstants::alignmentTubeBsKinks
private

Definition at line 35 of file LASConstants.h.

Referenced by FillBsKinks(), GetAlignmentTubeBsKink(), and InitContainers().

◆ atRadius

double LASConstants::atRadius
private

Definition at line 38 of file LASConstants.h.

Referenced by FillRadii(), and GetAtRadius().

◆ atZPosition

double LASConstants::atZPosition
private

Definition at line 44 of file LASConstants.h.

Referenced by FillZPositions(), and GetAtBsZPosition().

◆ endcapBsKinks

std::vector<std::vector<std::vector<double> > > LASConstants::endcapBsKinks
private

Definition at line 34 of file LASConstants.h.

Referenced by FillBsKinks(), GetEndcapBsKink(), and InitContainers().

◆ tecBsZPosition

double LASConstants::tecBsZPosition
private

Definition at line 43 of file LASConstants.h.

Referenced by FillZPositions(), and GetTecBsZPosition().

◆ tecRadii

std::vector<double> LASConstants::tecRadii
private

Definition at line 37 of file LASConstants.h.

Referenced by FillRadii(), GetTecRadius(), and InitContainers().

◆ tecZPositions

std::vector<double> LASConstants::tecZPositions
private

Definition at line 40 of file LASConstants.h.

Referenced by FillZPositions(), GetTecZPosition(), and InitContainers().

◆ tibZPositions

std::vector<double> LASConstants::tibZPositions
private

Definition at line 41 of file LASConstants.h.

Referenced by FillZPositions(), GetTibZPosition(), and InitContainers().

◆ tobZPositions

std::vector<double> LASConstants::tobZPositions
private

Definition at line 42 of file LASConstants.h.

Referenced by FillZPositions(), GetTobZPosition(), and InitContainers().