CMS 3D CMS Logo

TestCaloAlignmentEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: TestCaloAlignmentEP
4 // Class: TestCaloAlignmentEP
5 //
13 //
14 // Original Author: Brian Heltsley
15 //
16 //
17 
18 // System
19 #include <memory>
20 
21 // Framework
25 
26 // Alignment
56 
58 public:
59  using ReturnAli = std::unique_ptr<Alignments>;
60  using ReturnAliErr = std::unique_ptr<AlignmentErrors>;
61 
64 
84  }
85 
86  ~TestCaloAlignmentEP() override {}
87 
88  //-------------------------------------------------------------------
89 
90  ReturnAli produceEBAli(const EBAlignmentRcd& /*iRecord*/) {
91  ReturnAli ali = std::make_unique<Alignments>();
92  std::vector<AlignTransform>& vtr(ali->m_align);
93  const unsigned int nA(EcalBarrelGeometry::numberOfAlignments());
94  vtr.reserve(nA);
95  for (unsigned int i(0); i != nA; ++i) {
97  vtr.emplace_back(AlignTransform((1 == id.ism() ? Trl(0, 0, 0) : //-0.3 ) :
98  Trl(0, 0, 0)),
99  Rot(),
100  id));
101  }
102  return ali;
103  }
104 
106  return std::make_unique<AlignmentErrors>();
107  }
108  //-------------------------------------------------------------------
109 
110  ReturnAli produceEEAli(const EEAlignmentRcd& /*iRecord*/) {
111  ReturnAli ali = std::make_unique<Alignments>();
112  std::vector<AlignTransform>& vtr(ali->m_align);
113  const unsigned int nA(EcalEndcapGeometry::numberOfAlignments());
114  vtr.reserve(nA);
115  for (unsigned int i(0); i != nA; ++i) {
117  vtr.emplace_back(AlignTransform((2 > i ? Trl(-0.02, -0.81, -0.94) : Trl(+0.52, -0.81, +0.81)), Rot(), id));
118  }
119  return ali;
120  }
121 
123  return std::make_unique<AlignmentErrors>();
124  }
125  //-------------------------------------------------------------------
126 
127  ReturnAli produceESAli(const ESAlignmentRcd& /*iRecord*/) {
128  ReturnAli ali = std::make_unique<Alignments>();
129  std::vector<AlignTransform>& vtr(ali->m_align);
130  const unsigned int nA(EcalPreshowerGeometry::numberOfAlignments());
131  vtr.reserve(nA);
132  for (unsigned int i(0); i != nA; ++i) {
134  vtr.emplace_back(AlignTransform((4 > i ? Trl(-0.02, -0.81, -0.94) : Trl(+0.52, -0.81, +0.81)), Rot(), id));
135  }
136  return ali;
137  }
138 
140  return std::make_unique<AlignmentErrors>();
141  }
142  //-------------------------------------------------------------------
143 
144  ReturnAli produceHBAli(const HBAlignmentRcd& /*iRecord*/) {
145  ReturnAli ali = std::make_unique<Alignments>();
146  std::vector<AlignTransform>& vtr(ali->m_align);
147  const unsigned int nA(HcalGeometry::numberOfBarrelAlignments());
148  vtr.reserve(nA);
149  for (unsigned int i(0); i != nA; ++i) {
151  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
152  }
153  return ali;
154  }
155 
157  return std::make_unique<AlignmentErrors>();
158  }
159  //-------------------------------------------------------------------
160 
161  ReturnAli produceHEAli(const HEAlignmentRcd& /*iRecord*/) {
162  ReturnAli ali = std::make_unique<Alignments>();
163  std::vector<AlignTransform>& vtr(ali->m_align);
164  const unsigned int nA(HcalGeometry::numberOfEndcapAlignments());
165  vtr.reserve(nA);
166  for (unsigned int i(0); i != nA; ++i) {
168  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
169  }
170  return ali;
171  }
172 
174  return std::make_unique<AlignmentErrors>();
175  }
176  //-------------------------------------------------------------------
177 
178  ReturnAli produceHOAli(const HOAlignmentRcd& /*iRecord*/) {
179  ReturnAli ali = std::make_unique<Alignments>();
180  std::vector<AlignTransform>& vtr(ali->m_align);
181  const unsigned int nA(HcalGeometry::numberOfOuterAlignments());
182  vtr.reserve(nA);
183  for (unsigned int i(0); i != nA; ++i) {
185  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
186  }
187  return ali;
188  }
189 
191  return std::make_unique<AlignmentErrors>();
192  }
193  //-------------------------------------------------------------------
194 
195  ReturnAli produceHFAli(const HFAlignmentRcd& /*iRecord*/) {
196  ReturnAli ali = std::make_unique<Alignments>();
197  std::vector<AlignTransform>& vtr(ali->m_align);
198  const unsigned int nA(HcalGeometry::numberOfForwardAlignments());
199  vtr.reserve(nA);
200  for (unsigned int i(0); i != nA; ++i) {
202  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
203  }
204  return ali;
205  }
206 
208  return std::make_unique<AlignmentErrors>();
209  }
210  //-------------------------------------------------------------------
211 
213  ReturnAli ali = std::make_unique<Alignments>();
214  std::vector<AlignTransform>& vtr(ali->m_align);
215  const unsigned int nA(ZdcGeometry::numberOfAlignments());
216  vtr.reserve(nA);
217  for (unsigned int i(0); i != nA; ++i) {
218  const HcalZDCDetId id(HcalZDCDetId::EM, false, 1);
219  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
220  }
221  return ali;
222  }
223 
225  return std::make_unique<AlignmentErrors>();
226  }
227  //-------------------------------------------------------------------
228 
230  ReturnAli ali = std::make_unique<Alignments>();
231  std::vector<AlignTransform>& vtr(ali->m_align);
232  const unsigned int nA(CastorGeometry::numberOfAlignments());
233  vtr.reserve(nA);
234  for (unsigned int i(0); i != nA; ++i) {
235  const HcalCastorDetId id(HcalCastorDetId::EM, false, 1, 1);
236  vtr.emplace_back(AlignTransform(Trl(0, 0, 0), Rot(), id));
237  }
238  return ali;
239  }
240 
242  return std::make_unique<AlignmentErrors>();
243  }
244 };
245 
246 //define this as a plug-in
HEAlignmentRcd
Definition: HEAlignmentRcd.h:6
HEAlignmentErrorExtendedRcd.h
mps_fire.i
i
Definition: mps_fire.py:355
CastorAlignmentRcd
Definition: CastorAlignmentRcd.h:6
HOAlignmentRcd.h
EcalBarrelGeometry.h
MessageLogger.h
TestCaloAlignmentEP::produceHBAliErr
ReturnAliErr produceHBAliErr(const HBAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:156
TestCaloAlignmentEP::TestCaloAlignmentEP
TestCaloAlignmentEP(const edm::ParameterSet &)
Definition: TestCaloAlignmentEP.cc:65
TestCaloAlignmentEP::produceEEAliErr
ReturnAliErr produceEEAliErr(const EEAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:122
EBDetId
Definition: EBDetId.h:17
ESAlignmentRcd
Definition: ESAlignmentRcd.h:6
EcalPreshowerGeometry::detIdFromLocalAlignmentIndex
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Definition: EcalPreshowerGeometry.cc:65
AlignTransform::Rotation
CLHEP::HepRotation Rotation
Definition: AlignTransform.h:19
EcalBarrelGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: EcalBarrelGeometry.h:85
EEAlignmentRcd
Definition: EEAlignmentRcd.h:6
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
EEAlignmentErrorExtendedRcd.h
ESProducer.h
Alignments.h
AlignTransform::Translation
CLHEP::Hep3Vector Translation
Definition: AlignTransform.h:18
TestCaloAlignmentEP::produceHFAli
ReturnAli produceHFAli(const HFAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:195
ZdcGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: ZdcGeometry.h:46
CastorAlignmentErrorExtendedRcd.h
EBAlignmentErrorExtendedRcd.h
ESDetId
Definition: ESDetId.h:15
ESDetId.h
HcalZDCDetId.h
HcalGeometry::numberOfBarrelAlignments
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:65
HcalGeometry::detIdFromBarrelAlignmentIndex
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:295
ZDCAlignmentErrorExtendedRcd
Definition: ZDCAlignmentErrorExtendedRcd.h:6
HOAlignmentErrorExtendedRcd.h
TestCaloAlignmentEP::produceESAliErr
ReturnAliErr produceESAliErr(const ESAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:139
ZdcGeometry.h
TestCaloAlignmentEP::produceHEAliErr
ReturnAliErr produceHEAliErr(const HEAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:173
HcalGeometry.h
EcalPreshowerGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: EcalPreshowerGeometry.h:64
HcalGeometry::numberOfOuterAlignments
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:71
HcalZDCDetId
Definition: HcalZDCDetId.h:16
HOAlignmentRcd
Definition: HOAlignmentRcd.h:6
CastorAlignmentErrorExtendedRcd
Definition: CastorAlignmentErrorExtendedRcd.h:6
HcalGeometry::detIdFromForwardAlignmentIndex
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:309
HOAlignmentErrorExtendedRcd
Definition: HOAlignmentErrorExtendedRcd.h:6
TestCaloAlignmentEP::Rot
AlignTransform::Rotation Rot
Definition: TestCaloAlignmentEP.cc:63
TestCaloAlignmentEP::~TestCaloAlignmentEP
~TestCaloAlignmentEP() override
Definition: TestCaloAlignmentEP.cc:86
EcalPreshowerGeometry.h
HBAlignmentRcd.h
ZDCAlignmentErrorExtendedRcd.h
TestCaloAlignmentEP::Trl
AlignTransform::Translation Trl
Definition: TestCaloAlignmentEP.cc:62
AlignTransform
Definition: AlignTransform.h:15
EEDetId
Definition: EEDetId.h:14
HcalCastorDetId
Definition: HcalCastorDetId.h:23
TestCaloAlignmentEP
Definition: TestCaloAlignmentEP.cc:57
EBAlignmentErrorExtendedRcd
Definition: EBAlignmentErrorExtendedRcd.h:6
edm::ParameterSet
Definition: ParameterSet.h:36
EcalEndcapGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: EcalEndcapGeometry.h:79
TestCaloAlignmentEP::produceHOAli
ReturnAli produceHOAli(const HOAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:178
HFAlignmentRcd.h
HBAlignmentErrorExtendedRcd
Definition: HBAlignmentErrorExtendedRcd.h:6
EcalEndcapGeometry.h
HcalDetId.h
TestCaloAlignmentEP::ReturnAli
std::unique_ptr< Alignments > ReturnAli
Definition: TestCaloAlignmentEP.cc:59
EBAlignmentRcd.h
TestCaloAlignmentEP::produceHBAli
ReturnAli produceHBAli(const HBAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:144
ESAlignmentErrorExtendedRcd
Definition: ESAlignmentErrorExtendedRcd.h:6
HcalDetId
Definition: HcalDetId.h:12
TestCaloAlignmentEP::produceHFAliErr
ReturnAliErr produceHFAliErr(const HFAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:207
TestCaloAlignmentEP::produceEEAli
ReturnAli produceEEAli(const EEAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:110
TestCaloAlignmentEP::produceCastorAli
ReturnAli produceCastorAli(const CastorAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:229
EcalBarrelGeometry::detIdFromLocalAlignmentIndex
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Definition: EcalBarrelGeometry.cc:55
HEAlignmentRcd.h
HBAlignmentRcd
Definition: HBAlignmentRcd.h:6
TestCaloAlignmentEP::produceEBAliErr
ReturnAliErr produceEBAliErr(const EBAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:105
CastorGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: CastorGeometry.h:50
HcalGeometry::numberOfForwardAlignments
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:69
AlignmentErrors.h
TestCaloAlignmentEP::produceEBAli
ReturnAli produceEBAli(const EBAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:90
TestCaloAlignmentEP::ReturnAliErr
std::unique_ptr< AlignmentErrors > ReturnAliErr
Definition: TestCaloAlignmentEP.cc:60
ZDCAlignmentRcd
Definition: ZDCAlignmentRcd.h:6
TestCaloAlignmentEP::produceCastorAliErr
ReturnAliErr produceCastorAliErr(const CastorAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:241
ModuleFactory.h
ecalpyutils::ism
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:51
EEAlignmentRcd.h
DEFINE_FWK_EVENTSETUP_MODULE
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ZDCAlignmentRcd.h
triggerObjects_cff.id
id
Definition: triggerObjects_cff.py:31
HFAlignmentRcd
Definition: HFAlignmentRcd.h:6
HFAlignmentErrorExtendedRcd.h
HcalGeometry::numberOfEndcapAlignments
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:67
EBAlignmentRcd
Definition: EBAlignmentRcd.h:6
TestCaloAlignmentEP::produceHOAliErr
ReturnAliErr produceHOAliErr(const HOAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:190
edm::ESProducer
Definition: ESProducer.h:101
CastorAlignmentRcd.h
HBAlignmentErrorExtendedRcd.h
TestCaloAlignmentEP::produceZdcAliErr
ReturnAliErr produceZdcAliErr(const ZDCAlignmentErrorExtendedRcd &)
Definition: TestCaloAlignmentEP.cc:224
EEAlignmentErrorExtendedRcd
Definition: EEAlignmentErrorExtendedRcd.h:6
TestCaloAlignmentEP::produceZdcAli
ReturnAli produceZdcAli(const ZDCAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:212
HEAlignmentErrorExtendedRcd
Definition: HEAlignmentErrorExtendedRcd.h:6
ESAlignmentRcd.h
HcalGeometry::detIdFromOuterAlignmentIndex
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:316
HcalZDCDetId::EM
Definition: HcalZDCDetId.h:23
TestCaloAlignmentEP::produceESAli
ReturnAli produceESAli(const ESAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:127
EcalEndcapGeometry::detIdFromLocalAlignmentIndex
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Definition: EcalEndcapGeometry.cc:62
HcalGeometry::detIdFromEndcapAlignmentIndex
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:302
TestCaloAlignmentEP::produceHEAli
ReturnAli produceHEAli(const HEAlignmentRcd &)
Definition: TestCaloAlignmentEP.cc:161
HcalCastorDetId::EM
Definition: HcalCastorDetId.h:25
HFAlignmentErrorExtendedRcd
Definition: HFAlignmentErrorExtendedRcd.h:6
CastorGeometry.h
ESAlignmentErrorExtendedRcd.h