CMS 3D CMS Logo

HcalAlignmentEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: HcalAlignmentEP
4 // Class: HcalAlignmentEP
5 //
6 //
7 // Original Author: Brian Heltsley
8 //
9 //
10 
12 
19 }
20 
22 
24  auto ali = std::make_unique<Alignments>();
25 
26  std::vector<AlignTransform>& vtr(ali->m_align);
27  const unsigned int nA(HcalGeometry::numberOfAlignments());
28  vtr.resize(nA);
29 
30  const auto& hb = iRecord.get(hbToken_);
31  const auto& he = iRecord.get(heToken_);
32  const auto& hf = iRecord.get(hfToken_);
33  const auto& ho = iRecord.get(hoToken_);
34 
35  // require valid alignments and expected size
39  assert(ho.m_align.size() == HcalGeometry::numberOfOuterAlignments());
40  const std::vector<AlignTransform>& hbt = hb.m_align;
41  const std::vector<AlignTransform>& het = he.m_align;
42  const std::vector<AlignTransform>& hft = hf.m_align;
43  const std::vector<AlignTransform>& hot = ho.m_align;
44 
45  copy(hbt.begin(), hbt.end(), vtr.begin());
46  copy(het.begin(), het.end(), vtr.begin() + hbt.size());
47  copy(hft.begin(), hft.end(), vtr.begin() + hbt.size() + het.size());
48  copy(hot.begin(), hot.end(), vtr.begin() + hbt.size() + het.size() + hft.size());
49 
50  return ali;
51 }
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:67
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
edm::ESGetToken< Alignments, HEAlignmentRcd > heToken_
edm::ESGetToken< Alignments, HFAlignmentRcd > hfToken_
uint32_t cc[maxCellsPerHit]
Definition: gpuFishbone.h:49
assert(be >=bs)
#define hbt
Definition: AMPTWrapper.h:60
std::unique_ptr< Alignments > ReturnAli
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:73
~HcalAlignmentEP() override
edm::ESGetToken< Alignments, HOAlignmentRcd > hoToken_
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:69
HcalAlignmentEP(const edm::ParameterSet &)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:71
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:77
edm::ESGetToken< Alignments, HBAlignmentRcd > hbToken_