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 }
HEAlignmentRcd
Definition: HEAlignmentRcd.h:6
edm::ESInputTag
Definition: ESInputTag.h:87
HcalGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: HcalGeometry.h:77
HcalAlignmentEP::heToken_
edm::ESGetToken< Alignments, HEAlignmentRcd > heToken_
Definition: HcalAlignmentEP.h:35
filterCSVwithJSON.copy
copy
Definition: filterCSVwithJSON.py:36
HcalAlignmentEP::ReturnAli
std::unique_ptr< Alignments > ReturnAli
Definition: HcalAlignmentEP.h:21
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:163
cms::cuda::assert
assert(be >=bs)
HcalGeometry::numberOfBarrelAlignments
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:67
HcalGeometry::numberOfOuterAlignments
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:73
HcalAlignmentRcd
Definition: HcalAlignmentRcd.h:21
photonIsolationHIProducer_cfi.hf
hf
Definition: photonIsolationHIProducer_cfi.py:9
HOAlignmentRcd
Definition: HOAlignmentRcd.h:6
HcalAlignmentEP::produceHcalAli
ReturnAli produceHcalAli(const HcalAlignmentRcd &iRecord)
Definition: HcalAlignmentEP.cc:23
HcalAlignmentEP.h
HcalAlignmentEP::~HcalAlignmentEP
~HcalAlignmentEP() override
Definition: HcalAlignmentEP.cc:21
HcalAlignmentEP::hfToken_
edm::ESGetToken< Alignments, HFAlignmentRcd > hfToken_
Definition: HcalAlignmentEP.h:36
edm::eventsetup::DependentRecordImplementation::get
ProductT const & get(ESGetToken< ProductT, DepRecordT > const &iToken) const
Definition: DependentRecordImplementation.h:103
edm::ParameterSet
Definition: ParameterSet.h:47
photonIsolationHIProducer_cfi.ho
ho
Definition: photonIsolationHIProducer_cfi.py:10
HBAlignmentRcd
Definition: HBAlignmentRcd.h:6
HcalGeometry::numberOfForwardAlignments
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:71
cc
hcalSimParameters_cfi.hb
hb
Definition: hcalSimParameters_cfi.py:60
hbt
#define hbt
Definition: AMPTWrapper.h:60
hcalSimParameters_cfi.he
he
Definition: hcalSimParameters_cfi.py:79
HFAlignmentRcd
Definition: HFAlignmentRcd.h:6
HcalAlignmentEP::HcalAlignmentEP
HcalAlignmentEP(const edm::ParameterSet &)
Definition: HcalAlignmentEP.cc:13
HcalGeometry::numberOfEndcapAlignments
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:69
HcalAlignmentEP::hoToken_
edm::ESGetToken< Alignments, HOAlignmentRcd > hoToken_
Definition: HcalAlignmentEP.h:37
HcalAlignmentEP::hbToken_
edm::ESGetToken< Alignments, HBAlignmentRcd > hbToken_
Definition: HcalAlignmentEP.h:34
Alignments
Definition: Alignments.h:10