CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions | Private Attributes
LASBarrelAlignmentParameterSet Class Reference

#include <LASBarrelAlignmentParameterSet.h>

Public Member Functions

std::pair< double, double > & GetBeamParameter (int aBeam, int aParameter)
 
std::pair< double, double > & GetParameter (int aSubdetector, int aDisk, int aParameter)
 
 LASBarrelAlignmentParameterSet ()
 
void Print (void)
 

Private Member Functions

void Init (void)
 

Private Attributes

std::vector< std::vector< std::pair< double, double > > > beamParameters
 
std::vector< std::vector< std::pair< double, double > > > tecMinusParameters
 
std::vector< std::vector< std::pair< double, double > > > tecPlusParameters
 
std::vector< std::vector< std::pair< double, double > > > tibMinusParameters
 
std::vector< std::vector< std::pair< double, double > > > tibPlusParameters
 
std::vector< std::vector< std::pair< double, double > > > tobMinusParameters
 
std::vector< std::vector< std::pair< double, double > > > tobPlusParameters
 

Detailed Description

container for storing the alignment parameters calculated by class LASBarrelAlgorithm

structure:

Definition at line 23 of file LASBarrelAlignmentParameterSet.h.

Constructor & Destructor Documentation

LASBarrelAlignmentParameterSet::LASBarrelAlignmentParameterSet ( )

Definition at line 7 of file LASBarrelAlignmentParameterSet.cc.

References Init().

Member Function Documentation

std::pair< double, double > & LASBarrelAlignmentParameterSet::GetBeamParameter ( int  aBeam,
int  aParameter 
)

return a single beam parameter (pair<> for value, error). we have eight beams with two parameters each (phi1, phi2)

Definition at line 75 of file LASBarrelAlignmentParameterSet.cc.

References beamParameters, and Exception.

Referenced by LASAlignmentTubeAlgorithm::CalculateParameters(), LASAlignmentTubeAlgorithm::GetTEC2TECAlignmentParameterCorrection(), LASAlignmentTubeAlgorithm::GetTIBTOBAlignmentParameterCorrection(), and Print().

75  {
76  if (aBeam < 0 || aBeam > 7) {
77  throw cms::Exception("Laser Alignment")
78  << " [LASBarrelAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal beam index: " << aBeam << "."
79  << std::endl;
80  }
81 
82  if (aParameter < 0 || aParameter > 1) {
83  throw cms::Exception("Laser Alignment")
84  << " [LASBarrelAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal beam parameter index: " << aParameter
85  << "." << std::endl;
86  }
87 
88  return beamParameters.at(aBeam).at(aParameter);
89 }
std::vector< std::vector< std::pair< double, double > > > beamParameters
std::pair< double, double > & LASBarrelAlignmentParameterSet::GetParameter ( int  aSubdetector,
int  aDisk,
int  aParameter 
)

function for accessing a single parameter (pair<>); indices are:

  • aSubdetector = 0 (TEC+), 1 (TEC-), 2 (TIB+), 3 (TIB-), 4 (TOB+), 5 (TOB-)
  • aDisk = 0 (lower z), 1 (upper z)
  • aParameter: 0 (rotation angle), 1 (x displacement), 2 (y displacement)

Definition at line 37 of file LASBarrelAlignmentParameterSet.cc.

References Exception, tecMinusParameters, tecPlusParameters, tibMinusParameters, tibPlusParameters, tobMinusParameters, and tobPlusParameters.

Referenced by LASAlignmentTubeAlgorithm::CalculateParameters(), LASBarrelAlgorithm::CalculateParameters(), LASAlignmentTubeAlgorithm::GetTEC2TECAlignmentParameterCorrection(), LASAlignmentTubeAlgorithm::GetTIBTOBAlignmentParameterCorrection(), Print(), and LASGeometryUpdater::TrackerUpdate().

37  {
38  if (aSubdetector < 0 || aSubdetector > 5) {
39  throw cms::Exception("Laser Alignment")
40  << " [LASBarrelAlignmentParameterSet::GetParameter] ERROR ** Illegal subdetector index: " << aSubdetector << "."
41  << std::endl;
42  }
43 
44  if (aDisk < 0 || aDisk > 1) {
45  throw cms::Exception("Laser Alignment")
46  << " [LASBarrelAlignmentParameterSet::GetParameter] ERROR ** Illegal endface index: " << aDisk << "."
47  << std::endl;
48  }
49 
50  if (aParameter < 0 || aParameter > 2) {
51  throw cms::Exception("Laser Alignment")
52  << " [LASBarrelAlignmentParameterSet::GetParameter] ERROR ** Illegal parameter index: " << aParameter << "."
53  << std::endl;
54  }
55 
56  // would use a switch here, but this creates problems..
57  if (aSubdetector == 0)
58  return tecPlusParameters.at(aDisk).at(aParameter);
59  else if (aSubdetector == 1)
60  return tecMinusParameters.at(aDisk).at(aParameter);
61  else if (aSubdetector == 2)
62  return tibPlusParameters.at(aDisk).at(aParameter);
63  else if (aSubdetector == 3)
64  return tibMinusParameters.at(aDisk).at(aParameter);
65  else if (aSubdetector == 4)
66  return tobPlusParameters.at(aDisk).at(aParameter);
67  else
68  return tobMinusParameters.at(aDisk).at(aParameter);
69 }
std::vector< std::vector< std::pair< double, double > > > tobPlusParameters
std::vector< std::vector< std::pair< double, double > > > tecMinusParameters
std::vector< std::vector< std::pair< double, double > > > tibPlusParameters
std::vector< std::vector< std::pair< double, double > > > tecPlusParameters
std::vector< std::vector< std::pair< double, double > > > tobMinusParameters
std::vector< std::vector< std::pair< double, double > > > tibMinusParameters
void LASBarrelAlignmentParameterSet::Init ( void  )
private

whatever initialization is needed

Definition at line 12 of file LASBarrelAlignmentParameterSet.cc.

References beamParameters, mps_fire::i, tecMinusParameters, tecPlusParameters, tibMinusParameters, tibPlusParameters, tobMinusParameters, and tobPlusParameters.

Referenced by LASBarrelAlignmentParameterSet().

12  {
13  // could use a single vector<vector<vector<pair<> > > >
14  // but better split it in 6 parts
15  for (int i = 0; i < 2; ++i) { // twice; once for each endface
16  tecPlusParameters.push_back(std::vector<std::pair<double, double> >(3));
17  tecMinusParameters.push_back(std::vector<std::pair<double, double> >(3));
18  tibPlusParameters.push_back(std::vector<std::pair<double, double> >(3));
19  tibMinusParameters.push_back(std::vector<std::pair<double, double> >(3));
20  tobPlusParameters.push_back(std::vector<std::pair<double, double> >(3));
21  tobMinusParameters.push_back(std::vector<std::pair<double, double> >(3));
22  }
23 
24  // the beam parameters (8 beams * 2 pars) are stored in one single container
25  for (int i = 0; i < 8; ++i) {
26  beamParameters.push_back(std::vector<std::pair<double, double> >(2));
27  }
28 }
std::vector< std::vector< std::pair< double, double > > > beamParameters
std::vector< std::vector< std::pair< double, double > > > tobPlusParameters
std::vector< std::vector< std::pair< double, double > > > tecMinusParameters
std::vector< std::vector< std::pair< double, double > > > tibPlusParameters
std::vector< std::vector< std::pair< double, double > > > tecPlusParameters
std::vector< std::vector< std::pair< double, double > > > tobMinusParameters
std::vector< std::vector< std::pair< double, double > > > tibMinusParameters
void LASBarrelAlignmentParameterSet::Print ( void  )

pretty-print all parameter and error values

Definition at line 94 of file LASBarrelAlignmentParameterSet.cc.

References EcalCondDBWriter_cfi::beam, gather_cfg::cout, alignBH_cfg::fixed, GetBeamParameter(), GetParameter(), AlCaHLTBitMon_QueryRunRegistry::string, and subdetNames.

Referenced by LaserAlignment::endRunProduce().

94  {
95  std::cout << std::endl << " [LASBarrelAlignmentParameterSet::Print] -- Parameter list [rad/mm]: " << std::endl;
96 
97  const std::string subdetNames[6] = {" TEC+ ", " TEC- ", " TIB+ ", " TIB- ", " TOB+ ", " TOB- "};
98 
99  std::cout << " Detector parameters: " << std::endl;
100  std::cout << " --------------------" << std::endl;
101  std::cout << " Values: PHI1 X1 Y1 PHI2 X2 Y2 " << std::endl;
102  for (int subdet = 0; subdet < 6; ++subdet) {
103  std::cout << subdetNames[subdet];
104  for (int par = 0; par < 3; ++par)
105  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
106  << GetParameter(subdet, 0, par).first;
107  for (int par = 0; par < 3; ++par)
108  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
109  << GetParameter(subdet, 1, par).first;
110  std::cout << std::endl;
111  }
112 
113  std::cout << " Errors: PHI1 X1 Y1 PHI2 X2 Y2 " << std::endl;
114  for (int subdet = 0; subdet < 6; ++subdet) {
115  std::cout << subdetNames[subdet];
116  for (int par = 0; par < 3; ++par)
117  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
118  << GetParameter(subdet, 0, par).second;
119  for (int par = 0; par < 3; ++par)
120  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
121  << GetParameter(subdet, 1, par).second;
122  std::cout << std::endl;
123  }
124 
125  std::cout << std::endl;
126  std::cout << " Beam parameters: " << std::endl;
127  std::cout << " ----------------" << std::endl;
128  std::cout << " Values: PHI1 PHI2" << std::endl;
129  for (int beam = 0; beam < 8; ++beam) {
130  std::cout << " beam " << beam;
131  for (int par = 0; par < 2; ++par)
132  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
133  << GetBeamParameter(beam, par).first;
134  std::cout << std::endl;
135  }
136 
137  std::cout << " Errors: PHI1 PHI2" << std::endl;
138  for (int beam = 0; beam < 8; ++beam) {
139  std::cout << " beam " << beam;
140  for (int par = 0; par < 2; ++par)
141  std::cout << std::right << std::setw(12) << std::setprecision(6) << std::fixed
142  << GetBeamParameter(beam, par).second;
143  std::cout << std::endl;
144  }
145 
146  std::cout << " [LASBarrelAlignmentParameterSet::Print] -- End parameter list." << std::endl;
147 }
std::pair< double, double > & GetParameter(int aSubdetector, int aDisk, int aParameter)
std::pair< double, double > & GetBeamParameter(int aBeam, int aParameter)
static const char * subdetNames[]

Member Data Documentation

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::beamParameters
private

Definition at line 40 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetBeamParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tecMinusParameters
private

Definition at line 34 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tecPlusParameters
private

Definition at line 33 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tibMinusParameters
private

Definition at line 36 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tibPlusParameters
private

Definition at line 35 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tobMinusParameters
private

Definition at line 38 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().

std::vector<std::vector<std::pair<double, double> > > LASBarrelAlignmentParameterSet::tobPlusParameters
private

Definition at line 37 of file LASBarrelAlignmentParameterSet.h.

Referenced by GetParameter(), and Init().