CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
19 // System
20 #include <memory>
21 
22 // Framework
26 
27 
28 
29 // Alignment
59 
61 {
62  public:
63 
64  typedef boost::shared_ptr<Alignments> ReturnAli ;
65  typedef boost::shared_ptr<AlignmentErrors> ReturnAliErr ;
66 
69 
71  {
90  }
91 
93 
94 //-------------------------------------------------------------------
95 
97  {
98  ReturnAli ali ( new Alignments ) ;
99  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
100  const unsigned int nA ( EcalBarrelGeometry::numberOfAlignments() ) ;
101  vtr.reserve( nA ) ;
102  for( unsigned int i ( 0 ) ; i != nA ; ++i )
103  {
105  vtr.push_back( AlignTransform( ( 1==id.ism() ? Trl( 0, 0, 0 ) : //-0.3 ) :
106  Trl(0,0,0 ) ) ,
107  Rot(),
108  id ) ) ;
109  }
110  return ali ;
111  }
112 
114  {
115  ReturnAliErr aliErr ( new AlignmentErrors );
116  return aliErr ;
117  }
118 //-------------------------------------------------------------------
119 
121  {
122  ReturnAli ali ( new Alignments ) ;
123  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
124  const unsigned int nA ( EcalEndcapGeometry::numberOfAlignments() ) ;
125  vtr.reserve( nA ) ;
126  for( unsigned int i ( 0 ) ; i != nA ; ++i )
127  {
129  vtr.push_back( AlignTransform( ( 2 > i ? Trl( -0.02, -0.81, -0.94 ) :
130  Trl( +0.52, -0.81, +0.81 ) ) ,
131  Rot(),
132  id ) ) ;
133  }
134  return ali ;
135  }
136 
138  {
139  ReturnAliErr aliErr ( new AlignmentErrors );
140  return aliErr ;
141  }
142 //-------------------------------------------------------------------
143 
145  {
146  ReturnAli ali ( new Alignments ) ;
147  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
148  const unsigned int nA ( EcalPreshowerGeometry::numberOfAlignments() ) ;
149  vtr.reserve( nA ) ;
150  for( unsigned int i ( 0 ) ; i != nA ; ++i )
151  {
153  vtr.push_back( AlignTransform( ( 4 > i ? Trl( -0.02, -0.81, -0.94 ) :
154  Trl( +0.52, -0.81, +0.81 ) ) ,
155  Rot(),
156  id ) ) ;
157  }
158  return ali ;
159  }
160 
162  {
163  ReturnAliErr aliErr ( new AlignmentErrors );
164  return aliErr ;
165  }
166 //-------------------------------------------------------------------
167 
169  {
170  ReturnAli ali ( new Alignments ) ;
171  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
172  const unsigned int nA ( HcalGeometry::numberOfBarrelAlignments() ) ;
173  vtr.reserve( nA ) ;
174  for( unsigned int i ( 0 ) ; i != nA ; ++i )
175  {
176  const HcalDetId id ( HcalBarrel, 1, 1, 1 ) ;
177  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
178  Rot(),
179  id ) ) ;
180  }
181  return ali ;
182  }
183 
185  {
186  ReturnAliErr aliErr ( new AlignmentErrors );
187  return aliErr ;
188  }
189 //-------------------------------------------------------------------
190 
192  {
193  ReturnAli ali ( new Alignments ) ;
194  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
195  const unsigned int nA ( HcalGeometry::numberOfEndcapAlignments() ) ;
196  vtr.reserve( nA ) ;
197  for( unsigned int i ( 0 ) ; i != nA ; ++i )
198  {
199  const HcalDetId id ( HcalEndcap, 21, 1, 1 ) ;
200  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
201  Rot(),
202  id ) ) ;
203  }
204  return ali ;
205  }
206 
208  {
209  ReturnAliErr aliErr ( new AlignmentErrors );
210  return aliErr ;
211  }
212 //-------------------------------------------------------------------
213 
215  {
216  ReturnAli ali ( new Alignments ) ;
217  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
218  const unsigned int nA ( HcalGeometry::numberOfOuterAlignments() ) ;
219  vtr.reserve( nA ) ;
220  for( unsigned int i ( 0 ) ; i != nA ; ++i )
221  {
222  const HcalDetId id ( HcalOuter, 1, 1, 4 ) ;
223  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
224  Rot(),
225  id ) ) ;
226  }
227  return ali ;
228  }
229 
231  {
232  ReturnAliErr aliErr ( new AlignmentErrors );
233  return aliErr ;
234  }
235 //-------------------------------------------------------------------
236 
238  {
239  ReturnAli ali ( new Alignments ) ;
240  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
241  const unsigned int nA ( HcalGeometry::numberOfForwardAlignments() ) ;
242  vtr.reserve( nA ) ;
243  for( unsigned int i ( 0 ) ; i != nA ; ++i )
244  {
245  const HcalDetId id ( HcalForward, 29, 1, 1 ) ;
246  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
247  Rot(),
248  id ) ) ;
249  }
250  return ali ;
251  }
252 
254  {
255  ReturnAliErr aliErr ( new AlignmentErrors );
256  return aliErr ;
257  }
258 //-------------------------------------------------------------------
259 
261  {
262  ReturnAli ali ( new Alignments ) ;
263  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
264  const unsigned int nA ( ZdcGeometry::numberOfAlignments() ) ;
265  vtr.reserve( nA ) ;
266  for( unsigned int i ( 0 ) ; i != nA ; ++i )
267  {
268  const HcalZDCDetId id ( HcalZDCDetId::EM, false, 1 ) ;
269  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
270  Rot(),
271  id ) ) ;
272  }
273  return ali ;
274  }
275 
277  {
278  ReturnAliErr aliErr ( new AlignmentErrors );
279  return aliErr ;
280  }
281 //-------------------------------------------------------------------
282 
284  {
285  ReturnAli ali ( new Alignments ) ;
286  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
287  const unsigned int nA ( CastorGeometry::numberOfAlignments() ) ;
288  vtr.reserve( nA ) ;
289  for( unsigned int i ( 0 ) ; i != nA ; ++i )
290  {
291  const HcalCastorDetId id ( HcalCastorDetId::EM, false, 1, 1 ) ;
292  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
293  Rot(),
294  id ) ) ;
295  }
296  return ali ;
297  }
298 
300  {
301  ReturnAliErr aliErr ( new AlignmentErrors );
302  return aliErr ;
303  }
304 };
305 
306 
307 //define this as a plug-in
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:50
int i
Definition: DBlmapReader.cc:9
ReturnAliErr produceZdcAliErr(const ZDCAlignmentErrorRcd &iRecord)
ReturnAli produceHBAli(const HBAlignmentRcd &iRecord)
static unsigned int numberOfAlignments()
CLHEP::Hep3Vector Translation
static unsigned int numberOfAlignments()
Definition: ZdcGeometry.h:44
static unsigned int numberOfAlignments()
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
ReturnAli produceHEAli(const HEAlignmentRcd &iRecord)
static unsigned int numberOfAlignments()
ReturnAli produceHOAli(const HOAlignmentRcd &iRecord)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:54
ReturnAliErr produceESAliErr(const ESAlignmentErrorRcd &iRecord)
ReturnAliErr produceEEAliErr(const EEAlignmentErrorRcd &iRecord)
boost::shared_ptr< Alignments > ReturnAli
ReturnAliErr produceHEAliErr(const HEAlignmentErrorRcd &iRecord)
ReturnAli produceZdcAli(const ZDCAlignmentRcd &iRecord)
static unsigned int numberOfAlignments()
ReturnAliErr produceHBAliErr(const HBAlignmentErrorRcd &iRecord)
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:52
ReturnAliErr produceCastorAliErr(const CastorAlignmentErrorRcd &iRecord)
ReturnAliErr produceEBAliErr(const EBAlignmentErrorRcd &iRecord)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:48
ReturnAli produceEEAli(const EEAlignmentRcd &iRecord)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:56
ReturnAli produceESAli(const ESAlignmentRcd &iRecord)
AlignTransform::Rotation Rot
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
boost::shared_ptr< AlignmentErrors > ReturnAliErr
ReturnAliErr produceHOAliErr(const HOAlignmentErrorRcd &iRecord)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
ReturnAli produceEBAli(const EBAlignmentRcd &iRecord)
ReturnAli produceCastorAli(const CastorAlignmentRcd &iRecord)
ReturnAli produceHFAli(const HFAlignmentRcd &iRecord)
ReturnAliErr produceHFAliErr(const HFAlignmentErrorRcd &iRecord)
TestCaloAlignmentEP(const edm::ParameterSet &)
AlignTransform::Translation Trl
CLHEP::HepRotation Rotation