CMS 3D CMS Logo

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

◆ Beam

template<class T>
enum LASGlobalData::Beam

◆ Subdetector

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

Definition at line 34 of file LASGlobalData.h.

◆ TecDisk

template<class T>
enum LASGlobalData::TecDisk

◆ TecRing

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

Definition at line 35 of file LASGlobalData.h.

◆ TibTobPosition

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

Definition at line 38 of file LASGlobalData.h.

Constructor & Destructor Documentation

◆ LASGlobalData() [1/2]

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

def constructor

Definition at line 66 of file LASGlobalData.h.

66  {
70 
71  Init();
72 }
void Init(const T &in=T())

◆ LASGlobalData() [2/2]

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

Definition at line 75 of file LASGlobalData.h.

75  {
76  Init(in);
77 }
void Init(const T &in=T())

Member Function Documentation

◆ ClassDef()

template<class T>
LASGlobalData< T >::ClassDef ( LASGlobalData< T ,
 
)
private

◆ GetTEC2TECEntry()

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 129 of file LASGlobalData.h.

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

129  {
130  // do a range check first
131  if (!((theDetector == 0 || theDetector == 1) && // TEC+ or TEC-
132  (theBeam >= 0 && theBeam < 8) && // eight AT beams in a TEC
133  (theDisk >= 0 && theDisk < 6))) { // disk1...disk5 are hit by AT
134  std::cerr << " [LASGlobalData::GetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
135  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
136  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
137  } else {
138  if (theDetector == 0)
139  return (tecPlusATData.at(theBeam).at(theDisk));
140  else
141  return (tecMinusATData.at(theBeam).at(theDisk));
142  }
143 }
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:55
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:54

◆ GetTECEntry()

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 84 of file LASGlobalData.h.

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

84  {
85  // do a range check first
86  if (!((theDetector == 0 || theDetector == 1) && // TEC+ or TEC-
87  (theRing == 0 || theRing == 1) && // ring4 or ring6
88  (theBeam >= 0 && theBeam < 8) && // eight beams in a TEC
89  (theDisk >= 0 && theDisk < 9))) { // disk1..disk9
90  std::cerr << " [LASGlobalData::GetTECEntry] ** ERROR: illegal input coordinates:" << std::endl;
91  std::cerr << " detector " << theDetector << ", ring " << theRing << ", beam " << theBeam << ", disk " << theDisk
92  << "." << std::endl;
93  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
94  } else {
95  if (theDetector == 0)
96  return (tecPlusData.at(theRing).at(theBeam).at(theDisk));
97  else
98  return (tecMinusData.at(theRing).at(theBeam).at(theDisk));
99  }
100 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:53
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:52

◆ GetTIBTOBEntry()

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 107 of file LASGlobalData.h.

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

107  {
108  // do a range check first
109  if (!((theDetector == 2 || theDetector == 3) && // TIB or TOB
110  (theBeam >= 0 && theBeam < 8) && // there are eight AT beams
111  (thePosition >= 0 && thePosition < 6))) { // z-pos -3 .. z-pos +3
112  std::cerr << " [LASGlobalData::GetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
113  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", position " << thePosition << "."
114  << std::endl;
115  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
116  } else {
117  if (theDetector == 2)
118  return (tibData.at(theBeam).at(thePosition));
119  else
120  return (tobData.at(theBeam).at(thePosition));
121  }
122 }
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:56
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:57

◆ Init()

template<class T>
void LASGlobalData< T >::Init ( const T in = T())
private

Definition at line 249 of file LASGlobalData.h.

249  {
250  // create TEC+ subdetector "multi"-vector of T
251  tecPlusData.resize(2); // create ring4 and ring6
252  for (unsigned int ring = 0; ring < tecPlusData.size(); ++ring) {
253  tecPlusData.at(ring).resize(8); // create 8 beams for each ring
254  for (unsigned int beam = 0; beam < tecPlusData.at(ring).size(); ++beam) {
255  tecPlusData.at(ring).at(beam).resize(9, in); // create 9 disks for each beam
256  }
257  }
258 
259  // same for TEC-
260  tecMinusData.resize(2); // create ring4 and ring6
261  for (unsigned int ring = 0; ring < tecMinusData.size(); ++ring) {
262  tecMinusData.at(ring).resize(8); // create 8 beams for each ring
263  for (unsigned int beam = 0; beam < tecMinusData.at(ring).size(); ++beam) {
264  tecMinusData.at(ring).at(beam).resize(9, in); // create 9 disks for each beam
265  }
266  }
267 
268  // same for TEC+ AT
269  tecPlusATData.resize(8); // create 8 beams
270  for (unsigned int beam = 0; beam < tecPlusATData.size(); ++beam) {
271  tecPlusATData.at(beam).resize(5, in); // five TEC disks hit by each AT beam
272  }
273 
274  // same for TEC- AT
275  tecMinusATData.resize(8); // create 8 beams
276  for (unsigned int beam = 0; beam < tecMinusATData.size(); ++beam) {
277  tecMinusATData.at(beam).resize(5, in); // five TEC disks hit by each AT beam
278  }
279 
280  // same for TIB..
281  tibData.resize(8); // create 8 beams
282  for (unsigned int beam = 0; beam < tibData.size(); ++beam) {
283  tibData.at(beam).resize(6, in); // six TIB modules hit by each beam
284  }
285 
286  // ..and for TOB
287  tobData.resize(8); // create 8 beams
288  for (unsigned int beam = 0; beam < tobData.size(); ++beam) {
289  tobData.at(beam).resize(6, in); // six TOB modules hit by each beam
290  }
291 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:53
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:56
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:55
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:52
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:57
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:54

◆ SetTEC2TECEntry()

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 195 of file LASGlobalData.h.

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

195  {
196  // do a range check first
197  if (!((theDetector == 0 || theDetector == 1) && // TEC+ or TEC-
198  (theBeam >= 0 && theBeam < 8) && // eight beams in a TEC
199  (theDisk >= 0 && theDisk < 6))) { // disk1..disk5 for TEC AT
200  std::cerr << " [LASGlobalData::SetTEC2TECEntry] ** ERROR: illegal coordinates:" << std::endl;
201  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", disk " << theDisk << "." << std::endl;
202  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
203  } else {
204  if (theDetector == 0)
205  tecPlusATData.at(theBeam).at(theDisk) = theEntry;
206  else
207  tecMinusATData.at(theBeam).at(theDisk) = theEntry;
208  }
209 }
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:55
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:54

◆ SetTECEntry()

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 150 of file LASGlobalData.h.

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

150  {
151  // do a range check first
152  if (!((theDetector == 0 || theDetector == 1) && // TEC+ or TEC-
153  (theRing == 0 || theRing == 1) && // ring4 or ring6
154  (theBeam >= 0 && theBeam < 8) && // eight beams in a TEC
155  (theDisk >= 0 && theDisk < 9))) { // disk1..disk9
156  std::cerr << " [LASGlobalData::SetTECEntry] ** ERROR: illegal coordinates:" << std::endl;
157  std::cerr << " detector " << theDetector << ", ring " << theRing << ", beam " << theBeam << ", disk " << theDisk
158  << "." << std::endl;
159  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
160  } else {
161  if (theDetector == 0)
162  tecPlusData.at(theRing).at(theBeam).at(theDisk) = theEntry;
163  else
164  tecMinusData.at(theRing).at(theBeam).at(theDisk) = theEntry;
165  }
166 }
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:53
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:52

◆ SetTIBTOBEntry()

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 173 of file LASGlobalData.h.

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

173  {
174  // do a range check first
175  if (!((theDetector == 2 || theDetector == 3) && // TIB or TOB
176  (theBeam >= 0 && theBeam < 8) && // there are eight AT beams
177  (thePosition >= 0 && thePosition < 6))) { // pos-3..pos+3
178  std::cerr << " [LASGlobalData::SetTIBTOBEntry] ** ERROR: illegal coordinates:" << std::endl;
179  std::cerr << " detector " << theDetector << ", beam " << theBeam << ", position " << thePosition << "."
180  << std::endl;
181  throw " Bailing out."; // @@@ REPLACE THIS BY cms::Exception (<FWCore/Utilities/interface/Exception.h> in 1_3_6)
182  } else {
183  if (theDetector == 2)
184  tibData.at(theBeam).at(thePosition) = theEntry;
185  else
186  tobData.at(theBeam).at(thePosition) = theEntry;
187  }
188 }
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:56
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:57

Member Data Documentation

◆ tecMinusATData

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

Definition at line 55 of file LASGlobalData.h.

◆ tecMinusData

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

Definition at line 53 of file LASGlobalData.h.

◆ tecPlusATData

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

Definition at line 54 of file LASGlobalData.h.

◆ tecPlusData

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

Definition at line 52 of file LASGlobalData.h.

◆ tibData

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

Definition at line 56 of file LASGlobalData.h.

◆ tobData

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

Definition at line 57 of file LASGlobalData.h.