CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Types | Public Member Functions | Private Member Functions | Private Attributes
LASGlobalData< T > Class Template Reference

#include <LASGlobalData.h>

Inheritance diagram for LASGlobalData< T >:

Public Types

enum  Beam {
  BEAM0, BEAM1, BEAM2, BEAM3,
  BEAM4, BEAM5, BEAM6, BEAM7
}
 
enum  Subdetector { TECPLUS, TECMINUS, TIB, TOB }
 
enum  TecDisk {
  DISK1, DISK2, DISK3, DISK4,
  DISK5, DISK6, DISK7, DISK8,
  DISK9
}
 
enum  TecRing { RING4, RING6 }
 
enum  TibTobPosition {
  MINUS3, MINUS2, MINUS1, PLUS1,
  PLUS2, PLUS3
}
 

Public Member Functions

TGetTEC2TECEntry (int subdetector, int beam, int tecDisk)
 
TGetTECEntry (int subdetector, int tecRing, int beam, int tecDisk)
 
TGetTIBTOBEntry (int subdetector, int beam, int tibTobPosition)
 
 LASGlobalData ()
 
 LASGlobalData (const T &)
 
void SetTEC2TECEntry (int subdetector, int beam, int tecDisk, T)
 
void SetTECEntry (int subdetector, int tecRing, int beam, int tecDisk, T)
 
void SetTIBTOBEntry (int subdetector, int beam, int tibTobPosition, T)
 

Private Member Functions

 ClassDef (LASGlobalData, 2)
 
void Init (const T &in=T())
 

Private Attributes

std::vector< std::vector< T > > tecMinusATData
 
std::vector< std::vector
< std::vector< T > > > 
tecMinusData
 
std::vector< std::vector< T > > tecPlusATData
 
std::vector< std::vector
< std::vector< T > > > 
tecPlusData
 
std::vector< std::vector< T > > tibData
 
std::vector< std::vector< T > > tobData
 

Detailed Description

template<class T>
class LASGlobalData< T >

Container class for storing and easy access to global LAS data

There is one entry of type T for each LAS module, e.g. beam profiles, position, name, ... All identifiers (beam,subdetector,position,...) start with index 0. Note that some ring 4 TEC modules are hit by either TEC internal as well as by AT beams and are therefore considered twice in the container (once in tec<X>Data and once in tec<X>ATData). Do not instantiate this class with bool.

Short LAS geometry reminder:

Definition at line 31 of file LASGlobalData.h.

Member Enumeration Documentation

template<class T>
enum LASGlobalData::Beam
template<class T>
enum LASGlobalData::Subdetector
Enumerator
TECPLUS 
TECMINUS 
TIB 
TOB 

Definition at line 36 of file LASGlobalData.h.

template<class T>
enum LASGlobalData::TecDisk
template<class T>
enum LASGlobalData::TecRing
Enumerator
RING4 
RING6 

Definition at line 37 of file LASGlobalData.h.

template<class T>
enum LASGlobalData::TibTobPosition
Enumerator
MINUS3 
MINUS2 
MINUS1 
PLUS1 
PLUS2 
PLUS3 

Definition at line 40 of file LASGlobalData.h.

Constructor & Destructor Documentation

template<class T >
LASGlobalData< T >::LASGlobalData ( )

def constructor

Definition at line 69 of file LASGlobalData.h.

69  {
73 
74  Init();
75 
76 }
void Init(const T &in=T())
template<class T>
LASGlobalData< T >::LASGlobalData ( const T in)

Definition at line 79 of file LASGlobalData.h.

80 {
81  Init(in);
82 }
void Init(const T &in=T())

Member Function Documentation

template<class T>
LASGlobalData< T >::ClassDef ( LASGlobalData< T ,
 
)
private
template<class T >
T & LASGlobalData< T >::GetTEC2TECEntry ( int  theDetector,
int  theBeam,
int  theDisk 
)

get a tec AT entry (ring 4) from the container according to subdetector, beam and disk number

Definition at line 142 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::ApplyATMaskingCorrections(), LaserAlignment::beginJob(), LASAlignmentTubeAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpPosFileSet(), LASGeometryUpdater::EndcapUpdate(), LaserAlignment::endRun(), fcn(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), RawDataConverter::GetDigis(), LASAlignmentTubeAlgorithm::GetTEC2TECAlignmentParameterCorrection(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

142  {
143 
144  // do a range check first
145  if( !( ( theDetector == 0 || theDetector == 1 ) && // TEC+ or TEC-
146  ( theBeam >= 0 && theBeam < 8 ) && // eight AT beams in a TEC
147  ( theDisk >= 0 && theDisk < 6 ) ) ) { // disk1...disk5 are hit by AT
148  std::cerr << " [LASGlobalData::GetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
149  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
150  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
151  }
152  else {
153  if( theDetector == 0 ) return( tecPlusATData.at( theBeam ).at( theDisk ) );
154  else return( tecMinusATData.at( theBeam ).at( theDisk ) );
155  }
156 
157 }
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:57
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:56
template<class T >
T & LASGlobalData< T >::GetTECEntry ( int  theDetector,
int  theRing,
int  theBeam,
int  theDisk 
)

get a tec entry from the container according to subdetector, ring, beam and disk number

Definition at line 91 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LASGeometryUpdater::ApplyBeamKinkCorrections(), LaserAlignment::ApplyEndcapMaskingCorrections(), LaserAlignment::beginJob(), LASEndcapAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpHitmaps(), LaserAlignment::DumpPosFileSet(), LaserAlignment::endRun(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), LASEndcapAlgorithm::GetAlignmentParameterCorrection(), RawDataConverter::GetDigis(), LaserAlignment::isTECBeam(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

91  {
92 
93  // do a range check first
94  if( !( ( theDetector == 0 || theDetector == 1 ) && // TEC+ or TEC-
95  ( theRing == 0 || theRing == 1 ) && // ring4 or ring6
96  ( theBeam >= 0 && theBeam < 8 ) && // eight beams in a TEC
97  ( theDisk >= 0 && theDisk < 9 ) ) ) { // disk1..disk9
98  std::cerr << " [LASGlobalData::GetTECEntry] ** ERROR: illegal input coordinates:" << std::endl;
99  std::cerr << " detector " << theDetector << ", ring " << theRing << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
100  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
101  }
102  else {
103  if( theDetector == 0 ) return( tecPlusData.at( theRing ).at( theBeam ).at( theDisk ) );
104  else return( tecMinusData.at( theRing ).at( theBeam ).at( theDisk ) );
105  }
106 
107 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:55
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:54
template<class T >
T & LASGlobalData< T >::GetTIBTOBEntry ( int  theDetector,
int  theBeam,
int  thePosition 
)

get a tib/tob entry from the container according to subdetector, beam and position (z) number

Definition at line 117 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::ApplyATMaskingCorrections(), LaserAlignment::beginJob(), LASAlignmentTubeAlgorithm::CalculateParameters(), RawDataConverter::ClearData(), LaserAlignment::DumpPosFileSet(), LaserAlignment::endRun(), fcn(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), RawDataConverter::GetDigis(), LASAlignmentTubeAlgorithm::GetTIBTOBAlignmentParameterCorrection(), LaserAlignment::isATBeam(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

117  {
118 
119  // do a range check first
120  if( !( ( theDetector == 2 || theDetector == 3 ) && // TIB or TOB
121  ( theBeam >= 0 && theBeam < 8 ) && // there are eight AT beams
122  ( thePosition >= 0 && thePosition < 6 ) ) ) { // z-pos -3 .. z-pos +3
123  std::cerr << " [LASGlobalData::GetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
124  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", position " << thePosition << "." << std::endl;
125  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
126  }
127  else {
128  if( theDetector == 2 ) return( tibData.at( theBeam ).at( thePosition ) );
129  else return( tobData.at( theBeam ).at( thePosition ) );
130  }
131 
132 }
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:58
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:59
template<class T>
void LASGlobalData< T >::Init ( const T in = T())
private

Definition at line 282 of file LASGlobalData.h.

References relativeConstraints::ring.

282  {
283 
284  // create TEC+ subdetector "multi"-vector of T
285  tecPlusData.resize( 2 ); // create ring4 and ring6
286  for( unsigned int ring = 0; ring < tecPlusData.size(); ++ring ) {
287  tecPlusData.at( ring ).resize( 8 ); // create 8 beams for each ring
288  for( unsigned int beam = 0; beam < tecPlusData.at( ring ).size(); ++beam ) {
289  tecPlusData.at( ring ).at( beam ).resize( 9 , in); // create 9 disks for each beam
290  }
291  }
292 
293  // same for TEC-
294  tecMinusData.resize( 2 ); // create ring4 and ring6
295  for( unsigned int ring = 0; ring < tecMinusData.size(); ++ring ) {
296  tecMinusData.at( ring ).resize( 8 ); // create 8 beams for each ring
297  for( unsigned int beam = 0; beam < tecMinusData.at( ring ).size(); ++beam ) {
298  tecMinusData.at( ring ).at( beam ).resize( 9, in ); // create 9 disks for each beam
299  }
300  }
301 
302  // same for TEC+ AT
303  tecPlusATData.resize( 8 ); // create 8 beams
304  for( unsigned int beam = 0; beam < tecPlusATData.size(); ++beam ) {
305  tecPlusATData.at( beam ).resize( 5, in ); // five TEC disks hit by each AT beam
306  }
307 
308  // same for TEC- AT
309  tecMinusATData.resize( 8 ); // create 8 beams
310  for( unsigned int beam = 0; beam < tecMinusATData.size(); ++beam ) {
311  tecMinusATData.at( beam ).resize( 5, in ); // five TEC disks hit by each AT beam
312  }
313 
314  // same for TIB..
315  tibData.resize( 8 ); // create 8 beams
316  for( unsigned int beam = 0; beam < tibData.size(); ++ beam ) {
317  tibData.at( beam ).resize( 6, in ); // six TIB modules hit by each beam
318  }
319 
320  // ..and for TOB
321  tobData.resize( 8 ); // create 8 beams
322  for( unsigned int beam = 0; beam < tobData.size(); ++ beam ) {
323  tobData.at( beam ).resize( 6, in ); // six TOB modules hit by each beam
324  }
325 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:55
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:58
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:57
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:54
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:59
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:56
template<class T>
void LASGlobalData< T >::SetTEC2TECEntry ( int  theDetector,
int  theBeam,
int  theDisk,
T  theEntry 
)

set a tec AT entry (ring 4) in the container according to subdetector, beam and disk number

Definition at line 221 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LaserAlignment::endRun(), RawDataConverter::fillDetectorId(), LaserAlignmentT0ProducerDQM::FillDetectorId(), and LaserAlignment::fillDetectorId().

221  {
222 
223  // do a range check first
224  if( !( ( theDetector == 0 || theDetector == 1 ) && // TEC+ or TEC-
225  ( theBeam >= 0 && theBeam < 8 ) && // eight beams in a TEC
226  ( theDisk >= 0 && theDisk < 6 ) ) ) { // disk1..disk5 for TEC AT
227  std::cerr << " [LASGlobalData::SetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
228  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
229  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
230  }
231  else {
232  if( theDetector == 0 ) tecPlusATData.at( theBeam ).at( theDisk ) = theEntry;
233  else tecMinusATData.at( theBeam ).at( theDisk ) = theEntry;
234  }
235 
236 }
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:57
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:56
template<class T>
void LASGlobalData< T >::SetTECEntry ( int  theDetector,
int  theRing,
int  theBeam,
int  theDisk,
T  theEntry 
)

set a tec entry int the container according to subdetector, ring, beam and disk number

Definition at line 168 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LaserAlignment::endRun(), RawDataConverter::fillDetectorId(), LaserAlignmentT0ProducerDQM::FillDetectorId(), LaserAlignment::fillDetectorId(), and LaserAlignment::produce().

168  {
169 
170  // do a range check first
171  if( !( ( theDetector == 0 || theDetector == 1 ) && // TEC+ or TEC-
172  ( theRing == 0 || theRing == 1 ) && // ring4 or ring6
173  ( theBeam >= 0 && theBeam < 8 ) && // eight beams in a TEC
174  ( theDisk >= 0 && theDisk < 9 ) ) ) { // disk1..disk9
175  std::cerr << " [LASGlobalData::SetTECEntry] ** ERROR: illegal coordinates:" << std::endl;
176  std::cerr << " detector " << theDetector << ", ring " << theRing << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
177  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
178  }
179  else {
180  if( theDetector == 0 ) tecPlusData.at( theRing ).at( theBeam ).at( theDisk ) = theEntry;
181  else tecMinusData.at( theRing ).at( theBeam ).at( theDisk ) = theEntry;
182  }
183 
184 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:55
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:54
template<class T>
void LASGlobalData< T >::SetTIBTOBEntry ( int  theDetector,
int  theBeam,
int  thePosition,
T  theEntry 
)

set a tib/tob entry in the container accord subdetector, beam and position (z) number

Definition at line 195 of file LASGlobalData.h.

References dtNoiseDBValidation_cfg::cerr.

Referenced by LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LaserAlignment::endRun(), RawDataConverter::fillDetectorId(), LaserAlignmentT0ProducerDQM::FillDetectorId(), LaserAlignment::fillDetectorId(), and LaserAlignment::produce().

195  {
196 
197  // do a range check first
198  if( !( ( theDetector == 2 || theDetector == 3 ) && // TIB or TOB
199  ( theBeam >= 0 && theBeam < 8 ) && // there are eight AT beams
200  ( thePosition >= 0 && thePosition < 6 ) ) ) { // pos-3..pos+3
201  std::cerr << " [LASGlobalData::SetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
202  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", position " << thePosition << "." << std::endl;
203  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
204  }
205  else {
206  if( theDetector == 2 ) tibData.at( theBeam ).at( thePosition ) = theEntry;
207  else tobData.at( theBeam ).at( thePosition ) = theEntry;
208  }
209 
210 }
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:58
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:59

Member Data Documentation

template<class T>
std::vector<std::vector<T> > LASGlobalData< T >::tecMinusATData
private

Definition at line 57 of file LASGlobalData.h.

template<class T>
std::vector<std::vector<std::vector<T> > > LASGlobalData< T >::tecMinusData
private

Definition at line 55 of file LASGlobalData.h.

template<class T>
std::vector<std::vector<T> > LASGlobalData< T >::tecPlusATData
private

Definition at line 56 of file LASGlobalData.h.

template<class T>
std::vector<std::vector<std::vector<T> > > LASGlobalData< T >::tecPlusData
private

Definition at line 54 of file LASGlobalData.h.

template<class T>
std::vector<std::vector<T> > LASGlobalData< T >::tibData
private

Definition at line 58 of file LASGlobalData.h.

template<class T>
std::vector<std::vector<T> > LASGlobalData< T >::tobData
private

Definition at line 59 of file LASGlobalData.h.