CMS 3D CMS Logo

List of all members | Public Member Functions
LASGlobalLoop Class Reference

#include <LASGlobalLoop.h>

Public Member Functions

 LASGlobalLoop ()
 
bool TEC2TECLoop (int &, int &, int &) const
 
bool TECLoop (int &, int &, int &, int &) const
 
bool TIBTOBLoop (int &, int &, int &) const
 

Detailed Description

helper class for looping over LASGlobalData objects (si-strip module loops). Use exactly as:

LASGlobalLoop theLoop;
int det = 0, ring = 0, beam = 0, disk = 0;
do {
// det,ring,beam,disk will loop the full TEC+,TEC-
} while ( loop.TECLoop( det, ring, beam, disk ) );
int pos = 0;
det = 2; // set subdetector to TIB
beam = 0;
do {
// dto.
} while( loop.TIBTOBLoop( det, beam, disk ) );

Definition at line 24 of file LASGlobalLoop.h.

Constructor & Destructor Documentation

◆ LASGlobalLoop()

LASGlobalLoop::LASGlobalLoop ( )

Definition at line 7 of file LASGlobalLoop.cc.

7 {}

Member Function Documentation

◆ TEC2TECLoop()

bool LASGlobalLoop::TEC2TECLoop ( int &  subdet,
int &  beam,
int &  disk 
) const

full TEC AT loop with starting values given by parameter values

Definition at line 74 of file LASGlobalLoop.cc.

74  {
75  if (subdet > 1) {
76  std::cerr << " [LASGlobalLoop::TEC2TECLoop] ** ERROR: TEC loop running on TIB/TOB (subdetector > 1)" << std::endl;
77  throw 1;
78  }
79 
80  ++disk;
81 
82  if (disk == 5) {
83  ++beam;
84  disk = 0;
85 
86  if (beam == 8) {
87  ++subdet;
88  beam = 0;
89 
90  if (subdet == 2)
91  return false;
92  }
93  }
94 
95  return true;
96 }

References EcalCondDBWriter_cfi::beam, and beam_dqm_sourceclient-live_cfg::cerr.

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

◆ TECLoop()

bool LASGlobalLoop::TECLoop ( int &  subdet,
int &  ring,
int &  beam,
int &  disk 
) const

full TEC loop (both endcaps) with starting values given by parameter values

Definition at line 13 of file LASGlobalLoop.cc.

13  {
14  if (subdet > 1) {
15  std::cerr << " [LASGlobalLoop::TECLoop] ** ERROR: Endcap loop running on TIB/TOB (subdetector > 1)" << std::endl;
16  throw 1;
17  }
18 
19  ++disk;
20 
21  if (disk == 9) {
22  ++beam;
23  disk = 0;
24 
25  if (beam == 8) {
26  ++ring;
27  beam = 0;
28 
29  if (ring == 2) {
30  ++subdet;
31  ring = 0;
32 
33  if (subdet == 2)
34  return false;
35  }
36  }
37  }
38 
39  return true;
40 }

References EcalCondDBWriter_cfi::beam, beam_dqm_sourceclient-live_cfg::cerr, and relativeConstraints::ring.

Referenced by LaserAlignment::ApplyEndcapMaskingCorrections(), LaserAlignment::beginJob(), LaserAlignment::CalculateNominalCoordinates(), LASEndcapAlgorithm::CalculateParameters(), LaserAlignment::endRunProduce(), LaserAlignment::fillDataProfiles(), LaserAlignmentT0ProducerDQM::FillFromProcessedDigis(), LaserAlignmentT0ProducerDQM::FillFromRawDigis(), LaserAlignment::fillPedestalProfiles(), LaserAlignment::produce(), LASAlignmentTubeAlgorithm::ReadMisalignmentFromFile(), LASBarrelAlgorithm::ReadMisalignmentFromFile(), and LaserAlignment::testRoutine().

◆ TIBTOBLoop()

bool LASGlobalLoop::TIBTOBLoop ( int &  subdet,
int &  beam,
int &  position 
) const

full TIB+TOB loop with starting values given by parameter values

Definition at line 46 of file LASGlobalLoop.cc.

46  {
47  if (subdet < 2) {
48  std::cerr << " [LASGlobalLoop::TIBTOBLoop] ** ERROR: Barrel loop running on TEC (subdetector < 2)" << std::endl;
49  throw 1;
50  }
51 
52  ++position;
53 
54  if (position == 6) {
55  ++beam;
56  position = 0;
57 
58  if (beam == 8) {
59  ++subdet;
60  beam = 0;
61 
62  if (subdet == 4)
63  return false;
64  }
65  }
66 
67  return true;
68 }

References EcalCondDBWriter_cfi::beam, beam_dqm_sourceclient-live_cfg::cerr, and position.

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

pos
Definition: PixelAliasList.h:18
LASGlobalLoop
Definition: LASGlobalLoop.h:24
EcalCondDBWriter_cfi.beam
beam
Definition: EcalCondDBWriter_cfi.py:45
beam_dqm_sourceclient-live_cfg.cerr
cerr
Definition: beam_dqm_sourceclient-live_cfg.py:17
heppy_loop.loop
loop
Definition: heppy_loop.py:28
position
static int position[264][3]
Definition: ReadPGInfo.cc:289
relativeConstraints.ring
ring
Definition: relativeConstraints.py:68