CMS 3D CMS Logo

FakeCaloAlignmentEP.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: FakeCaloAlignmentEP
4 // Class: FakeCaloAlignmentEP
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  ~FakeCaloAlignmentEP() 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(Trl(0, 0, 0), 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(Trl(0, 0, 0), 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
FakeCaloAlignmentEP::produceESAli
ReturnAli produceESAli(const ESAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:127
mps_fire.i
i
Definition: mps_fire.py:355
CastorAlignmentRcd
Definition: CastorAlignmentRcd.h:6
HOAlignmentRcd.h
EcalBarrelGeometry.h
MessageLogger.h
FakeCaloAlignmentEP::produceEBAli
ReturnAli produceEBAli(const EBAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:90
FakeCaloAlignmentEP::~FakeCaloAlignmentEP
~FakeCaloAlignmentEP() override
Definition: FakeCaloAlignmentEP.cc:86
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
FakeCaloAlignmentEP::Rot
AlignTransform::Rotation Rot
Definition: FakeCaloAlignmentEP.cc:63
edm::ESProducer::setWhatProduced
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:138
EEAlignmentErrorExtendedRcd.h
ESProducer.h
Alignments.h
FakeCaloAlignmentEP::produceEEAli
ReturnAli produceEEAli(const EEAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:110
AlignTransform::Translation
CLHEP::Hep3Vector Translation
Definition: AlignTransform.h:18
FakeCaloAlignmentEP::produceEEAliErr
ReturnAliErr produceEEAliErr(const EEAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:122
ZdcGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: ZdcGeometry.h:46
CastorAlignmentErrorExtendedRcd.h
FakeCaloAlignmentEP::produceHFAliErr
ReturnAliErr produceHFAliErr(const HFAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:207
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
ZdcGeometry.h
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
FakeCaloAlignmentEP::produceHEAliErr
ReturnAliErr produceHEAliErr(const HEAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:173
FakeCaloAlignmentEP::produceEBAliErr
ReturnAliErr produceEBAliErr(const EBAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:105
EcalPreshowerGeometry.h
HBAlignmentRcd.h
FakeCaloAlignmentEP::ReturnAli
std::unique_ptr< Alignments > ReturnAli
Definition: FakeCaloAlignmentEP.cc:59
ZDCAlignmentErrorExtendedRcd.h
AlignTransform
Definition: AlignTransform.h:15
EEDetId
Definition: EEDetId.h:14
HcalCastorDetId
Definition: HcalCastorDetId.h:23
EBAlignmentErrorExtendedRcd
Definition: EBAlignmentErrorExtendedRcd.h:6
edm::ParameterSet
Definition: ParameterSet.h:36
EcalEndcapGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: EcalEndcapGeometry.h:79
FakeCaloAlignmentEP
Definition: FakeCaloAlignmentEP.cc:57
HFAlignmentRcd.h
HBAlignmentErrorExtendedRcd
Definition: HBAlignmentErrorExtendedRcd.h:6
EcalEndcapGeometry.h
HcalDetId.h
FakeCaloAlignmentEP::produceHBAliErr
ReturnAliErr produceHBAliErr(const HBAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:156
EBAlignmentRcd.h
ESAlignmentErrorExtendedRcd
Definition: ESAlignmentErrorExtendedRcd.h:6
HcalDetId
Definition: HcalDetId.h:12
FakeCaloAlignmentEP::produceESAliErr
ReturnAliErr produceESAliErr(const ESAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:139
EcalBarrelGeometry::detIdFromLocalAlignmentIndex
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Definition: EcalBarrelGeometry.cc:55
HEAlignmentRcd.h
HBAlignmentRcd
Definition: HBAlignmentRcd.h:6
CastorGeometry::numberOfAlignments
static unsigned int numberOfAlignments()
Definition: CastorGeometry.h:50
FakeCaloAlignmentEP::produceCastorAli
ReturnAli produceCastorAli(const CastorAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:229
HcalGeometry::numberOfForwardAlignments
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:69
AlignmentErrors.h
FakeCaloAlignmentEP::produceCastorAliErr
ReturnAliErr produceCastorAliErr(const CastorAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:241
FakeCaloAlignmentEP::produceHEAli
ReturnAli produceHEAli(const HEAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:161
FakeCaloAlignmentEP::produceZdcAliErr
ReturnAliErr produceZdcAliErr(const ZDCAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:224
ZDCAlignmentRcd
Definition: ZDCAlignmentRcd.h:6
ModuleFactory.h
ecalpyutils::ism
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:51
FakeCaloAlignmentEP::produceHBAli
ReturnAli produceHBAli(const HBAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:144
FakeCaloAlignmentEP::produceHFAli
ReturnAli produceHFAli(const HFAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:195
FakeCaloAlignmentEP::produceHOAliErr
ReturnAliErr produceHOAliErr(const HOAlignmentErrorExtendedRcd &)
Definition: FakeCaloAlignmentEP.cc:190
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
FakeCaloAlignmentEP::produceHOAli
ReturnAli produceHOAli(const HOAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:178
HFAlignmentRcd
Definition: HFAlignmentRcd.h:6
HFAlignmentErrorExtendedRcd.h
HcalGeometry::numberOfEndcapAlignments
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:67
EBAlignmentRcd
Definition: EBAlignmentRcd.h:6
FakeCaloAlignmentEP::produceZdcAli
ReturnAli produceZdcAli(const ZDCAlignmentRcd &)
Definition: FakeCaloAlignmentEP.cc:212
edm::ESProducer
Definition: ESProducer.h:101
CastorAlignmentRcd.h
HBAlignmentErrorExtendedRcd.h
EEAlignmentErrorExtendedRcd
Definition: EEAlignmentErrorExtendedRcd.h:6
FakeCaloAlignmentEP::FakeCaloAlignmentEP
FakeCaloAlignmentEP(const edm::ParameterSet &)
Definition: FakeCaloAlignmentEP.cc:65
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
FakeCaloAlignmentEP::ReturnAliErr
std::unique_ptr< AlignmentErrors > ReturnAliErr
Definition: FakeCaloAlignmentEP.cc:60
EcalEndcapGeometry::detIdFromLocalAlignmentIndex
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
Definition: EcalEndcapGeometry.cc:62
HcalGeometry::detIdFromEndcapAlignmentIndex
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
Definition: HcalGeometry.cc:302
HcalCastorDetId::EM
Definition: HcalCastorDetId.h:25
HFAlignmentErrorExtendedRcd
Definition: HFAlignmentErrorExtendedRcd.h:6
FakeCaloAlignmentEP::Trl
AlignTransform::Translation Trl
Definition: FakeCaloAlignmentEP.cc:62
CastorGeometry.h
ESAlignmentErrorExtendedRcd.h