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
LASEndcapAlignmentParameterSet Class Reference

#include <LASEndcapAlignmentParameterSet.h>

Public Member Functions

std::pair< double, double > & GetBeamParameter (int aSubdetector, int aRing, int aBeam, int aParameter)
 
std::pair< double, double > & GetDiskParameter (int aSubdetector, int aDisk, int aParameter)
 
std::pair< double, double > & GetGlobalParameter (int aSubdetector, int aParameter)
 
 LASEndcapAlignmentParameterSet ()
 
void Print (void)
 

Private Member Functions

void Init (void)
 

Private Attributes

std::vector< std::vector
< std::vector< std::pair
< double, double > > > > 
tecMinusBeamParameters
 
std::vector< std::vector
< std::pair< double, double > > > 
tecMinusDiskParameters
 
std::vector< std::pair< double,
double > > 
tecMinusGlobalParameters
 
std::vector< std::vector
< std::vector< std::pair
< double, double > > > > 
tecPlusBeamParameters
 
std::vector< std::vector
< std::pair< double, double > > > 
tecPlusDiskParameters
 
std::vector< std::pair< double,
double > > 
tecPlusGlobalParameters
 

Detailed Description

container for storing the alignment parameters calculated by class LASEndcapAlgorithm

structure:

TODO:

Definition at line 27 of file LASEndcapAlignmentParameterSet.h.

Constructor & Destructor Documentation

LASEndcapAlignmentParameterSet::LASEndcapAlignmentParameterSet ( )

Definition at line 10 of file LASEndcapAlignmentParameterSet.cc.

References Init().

10  {
11 
12  Init();
13 
14 }

Member Function Documentation

std::pair< double, double > & LASEndcapAlignmentParameterSet::GetBeamParameter ( int  aSubdetector,
int  aRing,
int  aBeam,
int  aParameter 
)

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

  • aSubdetector = 0 (TEC+), 1 (TEC-)
  • aBeam = 0..7
  • aParameter: 0 (deltaPhi on disk0), 1 (deltaPhi on disk8),

Definition at line 143 of file LASEndcapAlignmentParameterSet.cc.

References Exception, tecMinusBeamParameters, and tecPlusBeamParameters.

Referenced by LASEndcapAlgorithm::CalculateParameters(), LASEndcapAlgorithm::GetAlignmentParameterCorrection(), and Print().

143  {
144 
145  if( aSubdetector < 0 || aSubdetector > 1 ) {
146  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal subdetector index: " << aSubdetector << "." << std::endl;
147  }
148 
149  if( aRing < 0 || aRing > 1 ) {
150  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal ring index: " << aRing << "." << std::endl;
151  }
152 
153  if( aBeam < 0 || aBeam > 7 ) {
154  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal beam index: " << aBeam << "." << std::endl;
155  }
156 
157  if( aParameter < 0 || aParameter > 5 ) {
158  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetBeamParameter] ERROR ** Illegal parameter index: " << aParameter << "." << std::endl;
159  }
160 
161  if( aSubdetector == 0 ) return tecPlusBeamParameters.at( aBeam ).at( aRing ).at( aParameter );
162  return tecMinusBeamParameters.at( aBeam ).at( aRing ).at( aParameter );
163 
164 }
std::vector< std::vector< std::vector< std::pair< double, double > > > > tecPlusBeamParameters
std::vector< std::vector< std::vector< std::pair< double, double > > > > tecMinusBeamParameters
std::pair< double, double > & LASEndcapAlignmentParameterSet::GetDiskParameter ( int  aSubdetector,
int  aDisk,
int  aParameter 
)

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

  • aSubdetector = 0 (TEC+), 1 (TEC-)
  • aDisk = 0..8 (from inner to outer)
  • aParameter: 0 (rotation angle), 1 (x displacement), 2 (y displacement)

Definition at line 85 of file LASEndcapAlignmentParameterSet.cc.

References Exception, tecMinusDiskParameters, and tecPlusDiskParameters.

Referenced by LASEndcapAlgorithm::CalculateParameters(), LASGeometryUpdater::EndcapUpdate(), LASEndcapAlgorithm::GetAlignmentParameterCorrection(), Print(), and LASGeometryUpdater::TrackerUpdate().

85  {
86 
87  if( aSubdetector < 0 || aSubdetector > 1 ) {
88  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetDiskParameter] ERROR ** Illegal subdetector index: " << aSubdetector << "." << std::endl;
89  }
90 
91  if( aDisk < 0 || aDisk > 8 ) {
92  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetDiskParameter] ERROR ** Illegal disk index: " << aDisk << "." << std::endl;
93  }
94 
95  if( aParameter < 0 || aParameter > 2 ) {
96  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetDiskParameter] ERROR ** Illegal parameter index: " << aParameter << "." << std::endl;
97  }
98 
99 
100  if( aSubdetector == 0 ) return tecPlusDiskParameters.at( aDisk ).at( aParameter );
101  return tecMinusDiskParameters.at( aDisk ).at( aParameter );
102 
103 }
std::vector< std::vector< std::pair< double, double > > > tecMinusDiskParameters
std::vector< std::vector< std::pair< double, double > > > tecPlusDiskParameters
std::pair< double, double > & LASEndcapAlignmentParameterSet::GetGlobalParameter ( int  aSubdetector,
int  aParameter 
)

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

  • aSubdetector = 0 (TEC+), 1 (TEC-)
  • aParameter: 0 (global rotation), 1 (global torsion), 2 (global x shift), 3 (global x shear), 4 (global y shift), 5 (global y shear)

Definition at line 117 of file LASEndcapAlignmentParameterSet.cc.

References Exception, tecMinusGlobalParameters, and tecPlusGlobalParameters.

Referenced by LASEndcapAlgorithm::CalculateParameters(), LASEndcapAlgorithm::GetAlignmentParameterCorrection(), and Print().

117  {
118 
119  if( aSubdetector < 0 || aSubdetector > 1 ) {
120  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetGlobalParameter] ERROR ** Illegal subdetector index: " << aSubdetector << "." << std::endl;
121  }
122 
123  if( aParameter < 0 || aParameter > 5 ) {
124  throw cms::Exception( "Laser Alignment" ) << " [LASEndcapAlignmentParameterSet::GetGlobalParameter] ERROR ** Illegal parameter index: " << aParameter << "." << std::endl;
125  }
126 
127  if( aSubdetector == 0 ) return tecPlusGlobalParameters.at( aParameter );
128  return tecMinusGlobalParameters.at( aParameter );
129 
130 }
std::vector< std::pair< double, double > > tecMinusGlobalParameters
std::vector< std::pair< double, double > > tecPlusGlobalParameters
void LASEndcapAlignmentParameterSet::Init ( void  )
private

whatever initialization is needed

Definition at line 23 of file LASEndcapAlignmentParameterSet.cc.

References EcalCondDBWriter_cfi::beam, relativeConstraints::ring, tecMinusBeamParameters, tecMinusDiskParameters, tecMinusGlobalParameters, tecPlusBeamParameters, tecPlusDiskParameters, and tecPlusGlobalParameters.

Referenced by LASEndcapAlignmentParameterSet().

23  {
24 
25  // could use a single vector<vector<vector<pair<> > > >
26  // but better split it in 2 parts
27 
28  for( unsigned int disk = 0; disk < 9; ++disk ) { // nine times; once for each disk
29  tecPlusDiskParameters.push_back ( std::vector<std::pair<double,double> >( 3 ) );
30  tecMinusDiskParameters.push_back( std::vector<std::pair<double,double> >( 3 ) );
31 
32  // compiler won't let me init the pairs within push_back call..
33  for( unsigned int par = 0; par < 3; ++par ) {
34  tecPlusDiskParameters.at( disk ).at( par ) = std::pair<double,double>( 0., 0. );
35  tecMinusDiskParameters.at( disk ).at( par ) = std::pair<double,double>( 0., 0. );
36  }
37 
38  }
39 
40  // once for each parameter
41  for( unsigned int par = 0; par < 6; ++par ) {
42  tecPlusGlobalParameters.push_back( std::pair<double,double>( 0., 0. ) );
43  tecMinusGlobalParameters.push_back( std::pair<double,double>( 0., 0. ) );
44  }
45 
46 
47  // beam parameters
48  tecPlusBeamParameters.resize( 8 );
49  tecMinusBeamParameters.resize( 8 );
50 
51  // now once for each beam: the 2 rings
52  for( unsigned int beam = 0; beam < 8; ++beam ) {
53 
54  tecPlusBeamParameters.at( beam ).resize( 2 );
55  tecMinusBeamParameters.at( beam ).resize( 2 );
56 
57  // now once for each ring: the 2 parameters
58  for( unsigned int ring = 0; ring < 2; ++ring ) {
59  tecPlusBeamParameters.at( beam ).at( ring ).resize( 2 );
60  tecMinusBeamParameters.at( beam ).at( ring ).resize( 2 );
61 
62  // now once for each parameter: the pairs (value/error)
63  for( unsigned int par = 0; par < 2; ++par ) {
64  tecPlusBeamParameters.at( beam ).at( ring ).at( par ) = std::pair<double,double>( 0., 0. );
65  tecMinusBeamParameters.at( beam ).at( ring ).at( par ) = std::pair<double,double>( 0., 0. );
66  }
67 
68  }
69 
70  }
71 
72 }
std::vector< std::pair< double, double > > tecMinusGlobalParameters
std::vector< std::vector< std::vector< std::pair< double, double > > > > tecPlusBeamParameters
std::vector< std::pair< double, double > > tecPlusGlobalParameters
std::vector< std::vector< std::pair< double, double > > > tecMinusDiskParameters
std::vector< std::vector< std::pair< double, double > > > tecPlusDiskParameters
std::vector< std::vector< std::vector< std::pair< double, double > > > > tecMinusBeamParameters
void LASEndcapAlignmentParameterSet::Print ( void  )

pretty-printout of all parameter and error values

Definition at line 173 of file LASEndcapAlignmentParameterSet.cc.

References EcalCondDBWriter_cfi::beam, gather_cfg::cout, GetBeamParameter(), GetDiskParameter(), GetGlobalParameter(), and relativeConstraints::ring.

Referenced by LaserAlignment::endRunProduce().

173  {
174 
175  std::cout << " [LASEndcapAlignmentParameterSet::Print] -- Listing parameters:" << std::endl;
176  std::cout << std::endl;
177  std::cout << " Disk parameters:" << std::endl;
178  std:: cout << " ----------------" << std::endl;
179  for( int det = 0; det < 2; ++det ) {
180  std::cout << " " << (det==0 ? "TEC+" : "TEC-") << ": dPHI \xb1 \bE dX \xb1 \bE dY \xb1 \bE (rad/mm): " << std::endl;
181  for( int disk = 0; disk < 9; ++disk ) {
182  std::cout << " disk " << disk << ": ";
183  for( int par = 0; par < 3; ++par ) std::cout << std::right << std::setw( 11 ) << std::fixed << std::setprecision( 6 ) << GetDiskParameter( det, disk, par ).first
184  << " \xb1 " << std::left << std::setw( 9 ) << std::fixed << std::setprecision( 6 ) << GetDiskParameter( det, disk, par ).second;
185  std::cout << std::endl;
186  }
187  }
188 
189  for( int det = 0; det < 2; ++det ) {
190  std::cout << " " << (det==0 ? "TEC+" : "TEC-") << " global parameters in format: dPhi0\xb1 \be dPhiT\xb1 \be dX0\xb1 \be dXT\xb1 \be dY0\xb1 \be dYT\xb1 \be (rad/mm): " << std::endl;
191  for( int par = 0; par < 6; ++par ) std::cout << std::setw( 11 ) << std::setprecision( 6 ) << std::right << GetGlobalParameter( det, par ).first
192  << " \xb1 " << std::setw( 9 ) << std::setprecision( 6 ) << std::left << GetGlobalParameter( det, par ).second;
193  std::cout << std::endl;
194  }
195 
196  for( int det = 0; det < 2; ++det ) {
197  std::cout << " " << (det==0 ? "TEC+" : "TEC-") << " beam parameters in format: dPhi1\xb1 \be dPhi2\xb1 \be (rad): " << std::endl;
198  for( int ring = 0; ring < 2; ++ring ) {
199  std::cout << " ring " << (ring==0?"4":"6") << ": " << std::endl;
200  for( int beam = 0; beam < 8; ++beam ) {
201  std::cout << " beam " << beam << ": ";
202  for( int par = 0; par < 2; ++par ) std::cout << std::setw( 11 ) << std::setprecision( 6 ) << std::right << GetBeamParameter( det, ring, beam, par ).first
203  << " \xb1 " << std::setw( 9 ) << std::setprecision( 6 ) << std::left << GetBeamParameter( det, ring, beam, par ).second;
204  std::cout << std::endl;
205  }
206  }
207  }
208 
209  std::cout << " [LASEndcapAlignmentParameterSet::Print] -- End of list." << std::endl << std::endl;
210 
211 }
std::pair< double, double > & GetGlobalParameter(int aSubdetector, int aParameter)
std::pair< double, double > & GetDiskParameter(int aSubdetector, int aDisk, int aParameter)
std::pair< double, double > & GetBeamParameter(int aSubdetector, int aRing, int aBeam, int aParameter)
tuple cout
Definition: gather_cfg.py:145

Member Data Documentation

std::vector<std::vector<std::vector<std::pair<double,double> > > > LASEndcapAlignmentParameterSet::tecMinusBeamParameters
private

Definition at line 44 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetBeamParameter(), and Init().

std::vector<std::vector<std::pair<double,double> > > LASEndcapAlignmentParameterSet::tecMinusDiskParameters
private

Definition at line 40 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetDiskParameter(), and Init().

std::vector<std::pair<double,double> > LASEndcapAlignmentParameterSet::tecMinusGlobalParameters
private

Definition at line 42 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetGlobalParameter(), and Init().

std::vector<std::vector<std::vector<std::pair<double,double> > > > LASEndcapAlignmentParameterSet::tecPlusBeamParameters
private

Definition at line 43 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetBeamParameter(), and Init().

std::vector<std::vector<std::pair<double,double> > > LASEndcapAlignmentParameterSet::tecPlusDiskParameters
private

Definition at line 39 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetDiskParameter(), and Init().

std::vector<std::pair<double,double> > LASEndcapAlignmentParameterSet::tecPlusGlobalParameters
private

Definition at line 41 of file LASEndcapAlignmentParameterSet.h.

Referenced by GetGlobalParameter(), and Init().