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
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:67
auto setWhatProduced(T *iThis, const es::Label &iLabel={})
Definition: ESProducer.h:165
ReturnAli produceEEAli(const EEAlignmentRcd &)
ReturnAli produceHFAli(const HFAlignmentRcd &)
ReturnAli produceCastorAli(const CastorAlignmentRcd &)
static unsigned int numberOfAlignments()
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
ReturnAliErr produceHEAliErr(const HEAlignmentErrorExtendedRcd &)
CLHEP::Hep3Vector Translation
static unsigned int numberOfAlignments()
Definition: ZdcGeometry.h:46
static unsigned int numberOfAlignments()
static unsigned int numberOfAlignments()
ReturnAliErr produceHBAliErr(const HBAlignmentErrorExtendedRcd &)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
ReturnAliErr produceHOAliErr(const HOAlignmentErrorExtendedRcd &)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:73
ReturnAli produceHBAli(const HBAlignmentRcd &)
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
std::unique_ptr< Alignments > ReturnAli
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:61
ReturnAli produceEBAli(const EBAlignmentRcd &)
static unsigned int numberOfAlignments()
ReturnAliErr produceEEAliErr(const EEAlignmentErrorExtendedRcd &)
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:69
AlignTransform::Translation Trl
ReturnAli produceZdcAli(const ZDCAlignmentRcd &)
ReturnAliErr produceZdcAliErr(const ZDCAlignmentErrorExtendedRcd &)
ReturnAli produceHEAli(const HEAlignmentRcd &)
FakeCaloAlignmentEP(const edm::ParameterSet &)
ReturnAliErr produceHFAliErr(const HFAlignmentErrorExtendedRcd &)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:71
ReturnAliErr produceCastorAliErr(const CastorAlignmentErrorExtendedRcd &)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
ReturnAliErr produceESAliErr(const ESAlignmentErrorExtendedRcd &)
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
std::unique_ptr< AlignmentErrors > ReturnAliErr
ReturnAli produceESAli(const ESAlignmentRcd &)
ReturnAli produceHOAli(const HOAlignmentRcd &)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:49
AlignTransform::Rotation Rot
ReturnAliErr produceEBAliErr(const EBAlignmentErrorExtendedRcd &)
CLHEP::HepRotation Rotation