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.) {}

◆ LASConstants() [2/2]

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

Definition at line 14 of file LASConstants.cc.

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 }

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

◆ ~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.

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 }

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

Referenced by LASConstants().

◆ FillRadii()

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

fill the beam radii

Definition at line 186 of file LASConstants.cc.

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

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

Referenced by LASConstants().

◆ FillZPositions()

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

Definition at line 194 of file LASConstants.cc.

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 }

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

Referenced by LASConstants().

◆ 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.

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 }

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

◆ GetAtBsZPosition()

double LASConstants::GetAtBsZPosition ( void  ) const

Definition at line 126 of file LASConstants.cc.

126 { return atZPosition; }

References atZPosition.

◆ GetAtRadius()

double LASConstants::GetAtRadius ( void  ) const

Definition at line 77 of file LASConstants.cc.

77 { return atRadius; }

References atRadius.

◆ 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.

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 }

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

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

◆ GetTecBsZPosition()

double LASConstants::GetTecBsZPosition ( unsigned int  det) const

Definition at line 121 of file LASConstants.cc.

121 { return tecBsZPosition; }

References tecBsZPosition.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

◆ GetTecRadius()

double LASConstants::GetTecRadius ( unsigned int  ring) const

Definition at line 66 of file LASConstants.cc.

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 }

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

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

◆ GetTecZPosition()

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

Definition at line 82 of file LASConstants.cc.

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 }

References Exception, and tecZPositions.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections().

◆ GetTibZPosition()

double LASConstants::GetTibZPosition ( unsigned int  pos) const

Definition at line 97 of file LASConstants.cc.

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 }

References Exception, and tibZPositions.

◆ GetTobZPosition()

double LASConstants::GetTobZPosition ( unsigned int  pos) const

Definition at line 109 of file LASConstants.cc.

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 }

References Exception, and tobZPositions.

◆ InitContainers()

void LASConstants::InitContainers ( void  )
private

Definition at line 131 of file LASConstants.cc.

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 }

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

Referenced by LASConstants().

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

LASConstants::tibZPositions
std::vector< double > tibZPositions
Definition: LASConstants.h:41
LASConstants::atZPosition
double atZPosition
Definition: LASConstants.h:44
LASConstants::alignmentTubeBsKinks
std::vector< double > alignmentTubeBsKinks
Definition: LASConstants.h:35
LASConstants::InitContainers
void InitContainers(void)
Definition: LASConstants.cc:131
pos
Definition: PixelAliasList.h:18
LASConstants::tecBsZPosition
double tecBsZPosition
Definition: LASConstants.h:43
LASConstants::atRadius
double atRadius
Definition: LASConstants.h:38
LASConstants::endcapBsKinks
std::vector< std::vector< std::vector< double > > > endcapBsKinks
Definition: LASConstants.h:34
LASConstants::FillBsKinks
void FillBsKinks(edm::ParameterSet const &)
Definition: LASConstants.cc:156
LASConstants::tecRadii
std::vector< double > tecRadii
Definition: LASConstants.h:37
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
mitigatedMETSequence_cff.U
U
Definition: mitigatedMETSequence_cff.py:36
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LASConstants::tobZPositions
std::vector< double > tobZPositions
Definition: LASConstants.h:42
LASConstants::FillZPositions
void FillZPositions(edm::ParameterSet const &)
Definition: LASConstants.cc:194
LASConstants::tecZPositions
std::vector< double > tecZPositions
Definition: LASConstants.h:40
LASConstants::FillRadii
void FillRadii(edm::ParameterSet const &)
Definition: LASConstants.cc:186
Exception
Definition: hltDiff.cc:246
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.cerr
cerr
Definition: EcnaPython_AdcPeg12_S1_10_R170298_1_0_150_Dee0.py:8