26 std::vector<Alignable*> alis;
49 if (!alignable)
return 0;
53 return position->second;
55 const DetId detId(alignable->
id());
58 <<
"@SUB=PedeLabeler::alignableLabel" <<
"Alignable " 59 <<
typeid(*alignable).name() <<
" not in map, det/subdet/alignableStructureType = " 60 << detId.det() <<
"/" << detId.subdetId() <<
"/" << alignable->
alignableObjectId();
79 return position->second;
82 edm::LogError(
"LogicError") <<
"@SUB=PedeLabeler::lasBeamLabel" 83 <<
"No label for beam Id " << lasBeamId;
92 throw cms::Exception(
"Alignment") <<
"@SUB=PedeLabeler::parameterLabel" 93 <<
"Parameter number " << parNum
96 return aliLabel + parNum;
103 edm::LogError(
"LogicError") <<
"@SUB=PedeLabeler::paramNumFromLabel" 104 <<
"Label " << paramLabel <<
" should be >= " <<
theMinLabel;
124 return position->second;
129 edm::LogError(
"LogicError") <<
"@SUB=PedeLabeler::alignableFromLabel" 130 <<
"Alignable label " << aliLabel <<
" not in map.";
144 return position->second;
146 edm::LogError(
"LogicError") <<
"@SUB=PedeLabeler::lasBeamIdFromLabel" 147 <<
"Alignable label " << aliLabel <<
" not in map.";
157 std::vector<Alignable*> allComps;
159 for (
const auto& iAli: alis) {
161 allComps.push_back(iAli);
162 iAli->recursiveComponents(allComps);
167 for (
const auto& iter: allComps) {
176 unsigned int beamIds[] = { 0, 10, 20, 30, 40, 50, 60, 70,
177 1, 11, 21, 31, 41, 51, 61, 71,
178 100, 110, 120, 130, 140, 150, 160, 170,
179 101, 111, 121, 131, 141, 151, 161, 171,
180 200, 210, 220, 230, 240, 250, 260, 270};
182 const size_t nBeams =
sizeof(beamIds)/
sizeof(beamIds[0]);
183 for (
size_t iBeam = 0; iBeam < nBeams; ++iBeam) {
align::ID id() const
Return the ID of Alignable, i.e. DetId of 'first' component GeomDet(Unit).
Alignable * alignableFromLabel(unsigned int label) const override
unsigned int alignableLabelFromParamAndInstance(Alignable *alignable, unsigned int param, unsigned int instance) const override
static const unsigned int theMinLabel
PedeLabeler(const PedeLabelerBase::TopLevelAlignables &alignables, const edm::ParameterSet &config)
constructor from three Alignables (null pointers allowed )
unsigned int lasBeamLabel(unsigned int lasBeamId) const override
unsigned int buildReverseMap()
returns size of map
static const unsigned int theMaxNumParam
AlignableTracker * aliTracker_
UintUintMap theLabelToLasBeamMap
labels for las beams
unsigned int paramNumFromLabel(unsigned int paramLabel) const override
parameter number, 0 <= .. < theMaxNumParam, belonging to unique parameter label
AlignableToIdMap::value_type AlignableToIdPair
virtual StructureType alignableObjectId() const =0
Return the alignable type identifier.
~PedeLabeler() override
destructor
IdToAlignableMap theIdToAlignableMap
providing unique ID for alignable, space for param IDs
AlignableToIdMap theAlignableToIdMap
unsigned int alignableLabelFromLabel(unsigned int label) const override
alignable label from parameter label (works also for alignable label...)
AlignableExtras * aliExtras_
UintUintMap theLasBeamToLabelMap
reverse map
unsigned int lasBeamIdFromLabel(unsigned int label) const override
unsigned int alignableLabel(Alignable *alignable) const override
Return 32-bit unique label for alignable, 0 indicates failure.
unsigned int parameterLabel(unsigned int aliLabel, unsigned int parNum) const override
returns the label for a given alignable parameter number combination
static int position[264][3]
#define DEFINE_EDM_PLUGIN(factory, type, name)
unsigned int buildMap(const std::vector< Alignable * > &alis)
returns size of map