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
Enumerator
BEAM0 
BEAM1 
BEAM2 
BEAM3 
BEAM4 
BEAM5 
BEAM6 
BEAM7 

Definition at line 36 of file LASGlobalData.h.

◆ Subdetector

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

Definition at line 34 of file LASGlobalData.h.

34 { TECPLUS, TECMINUS, TIB, TOB };

◆ TecDisk

template<class T>
enum LASGlobalData::TecDisk
Enumerator
DISK1 
DISK2 
DISK3 
DISK4 
DISK5 
DISK6 
DISK7 
DISK8 
DISK9 

Definition at line 37 of file LASGlobalData.h.

◆ TecRing

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

Definition at line 35 of file LASGlobalData.h.

35 { RING4, RING6 };

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

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

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.

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 }

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

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

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 }

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

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

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 }

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

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

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

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 }

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

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

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 }

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

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

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 }

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

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.

LASGlobalData::DISK1
Definition: LASGlobalData.h:37
LASGlobalData::PLUS3
Definition: LASGlobalData.h:38
LASGlobalData::RING6
Definition: LASGlobalData.h:35
LASGlobalData::tecMinusData
std::vector< std::vector< std::vector< T > > > tecMinusData
Definition: LASGlobalData.h:53
LASGlobalData::RING4
Definition: LASGlobalData.h:35
LASGlobalData::DISK5
Definition: LASGlobalData.h:37
LASGlobalData::tecMinusATData
std::vector< std::vector< T > > tecMinusATData
Definition: LASGlobalData.h:55
LASGlobalData::Init
void Init(const T &in=T())
Definition: LASGlobalData.h:249
LASGlobalData::BEAM4
Definition: LASGlobalData.h:36
LASGlobalData::tecPlusData
std::vector< std::vector< std::vector< T > > > tecPlusData
Definition: LASGlobalData.h:52
LASGlobalData::MINUS1
Definition: LASGlobalData.h:38
LASGlobalData::DISK3
Definition: LASGlobalData.h:37
LASGlobalData::TOB
Definition: LASGlobalData.h:34
LASGlobalData::DISK7
Definition: LASGlobalData.h:37
LASGlobalData::MINUS3
Definition: LASGlobalData.h:38
LASGlobalData::MINUS2
Definition: LASGlobalData.h:38
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
LASGlobalData::TECMINUS
Definition: LASGlobalData.h:34
LASGlobalData::BEAM2
Definition: LASGlobalData.h:36
LASGlobalData::BEAM1
Definition: LASGlobalData.h:36
LASGlobalData::DISK8
Definition: LASGlobalData.h:37
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition: beam_dqm_sourceclient-live_cfg.py:17
recoMuon::in
Definition: RecoMuonEnumerators.h:6
LASGlobalData::PLUS2
Definition: LASGlobalData.h:38
LASGlobalData::BEAM7
Definition: LASGlobalData.h:36
LASGlobalData::PLUS1
Definition: LASGlobalData.h:38
LASGlobalData::DISK6
Definition: LASGlobalData.h:37
LASGlobalData::DISK4
Definition: LASGlobalData.h:37
LASGlobalData::DISK2
Definition: LASGlobalData.h:37
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68
LASGlobalData::BEAM3
Definition: LASGlobalData.h:36
LASGlobalData::tobData
std::vector< std::vector< T > > tobData
Definition: LASGlobalData.h:57
LASGlobalData::BEAM6
Definition: LASGlobalData.h:36
LASGlobalData::TECPLUS
Definition: LASGlobalData.h:34
LASGlobalData::DISK9
Definition: LASGlobalData.h:37
LASGlobalData::tibData
std::vector< std::vector< T > > tibData
Definition: LASGlobalData.h:56
LASGlobalData::tecPlusATData
std::vector< std::vector< T > > tecPlusATData
Definition: LASGlobalData.h:54
LASGlobalData::TIB
Definition: LASGlobalData.h:34
LASGlobalData::BEAM5
Definition: LASGlobalData.h:36
LASGlobalData::BEAM0
Definition: LASGlobalData.h:36