CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 
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 
96  ReturnAli produceEBAli( const EBAlignmentRcd& /*iRecord*/ )
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  {
104  const EBDetId id ( EcalBarrelGeometry::detIdFromLocalAlignmentIndex( i ) ) ;
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 
120  ReturnAli produceEEAli( const EEAlignmentRcd& /*iRecord*/ )
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  {
128  const EEDetId id ( EcalEndcapGeometry::detIdFromLocalAlignmentIndex( i ) ) ;
129  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
130  Rot(),
131  id ) ) ;
132  }
133  return ali ;
134  }
135 
137  {
138  ReturnAliErr aliErr ( new AlignmentErrors );
139  return aliErr ;
140  }
141 //-------------------------------------------------------------------
142 
143  ReturnAli produceESAli( const ESAlignmentRcd& /*iRecord*/ )
144  {
145  ReturnAli ali ( new Alignments ) ;
146  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
147  const unsigned int nA ( EcalPreshowerGeometry::numberOfAlignments() ) ;
148  vtr.reserve( nA ) ;
149  for( unsigned int i ( 0 ) ; i != nA ; ++i )
150  {
152  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
153  Rot(),
154  id ) ) ;
155  }
156  return ali ;
157  }
158 
160  {
161  ReturnAliErr aliErr ( new AlignmentErrors );
162  return aliErr ;
163  }
164 //-------------------------------------------------------------------
165 
166  ReturnAli produceHBAli( const HBAlignmentRcd& /*iRecord*/ )
167  {
168  ReturnAli ali ( new Alignments ) ;
169  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
170  const unsigned int nA ( HcalGeometry::numberOfBarrelAlignments() ) ;
171  vtr.reserve( nA ) ;
172  for( unsigned int i ( 0 ) ; i != nA ; ++i )
173  {
175  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
176  Rot(),
177  id ) ) ;
178  }
179  return ali ;
180  }
181 
183  {
184  ReturnAliErr aliErr ( new AlignmentErrors );
185  return aliErr ;
186  }
187 //-------------------------------------------------------------------
188 
189  ReturnAli produceHEAli( const HEAlignmentRcd& /*iRecord*/ )
190  {
191  ReturnAli ali ( new Alignments ) ;
192  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
193  const unsigned int nA ( HcalGeometry::numberOfEndcapAlignments() ) ;
194  vtr.reserve( nA ) ;
195  for( unsigned int i ( 0 ) ; i != nA ; ++i )
196  {
198  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
199  Rot(),
200  id ) ) ;
201  }
202  return ali ;
203  }
204 
206  {
207  ReturnAliErr aliErr ( new AlignmentErrors );
208  return aliErr ;
209  }
210 //-------------------------------------------------------------------
211 
212  ReturnAli produceHOAli( const HOAlignmentRcd& /*iRecord*/ )
213  {
214  ReturnAli ali ( new Alignments ) ;
215  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
216  const unsigned int nA ( HcalGeometry::numberOfOuterAlignments() ) ;
217  vtr.reserve( nA ) ;
218  for( unsigned int i ( 0 ) ; i != nA ; ++i )
219  {
221  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
222  Rot(),
223  id ) ) ;
224  }
225  return ali ;
226  }
227 
229  {
230  ReturnAliErr aliErr ( new AlignmentErrors );
231  return aliErr ;
232  }
233 //-------------------------------------------------------------------
234 
235  ReturnAli produceHFAli( const HFAlignmentRcd& /*iRecord*/ )
236  {
237  ReturnAli ali ( new Alignments ) ;
238  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
239  const unsigned int nA ( HcalGeometry::numberOfForwardAlignments() ) ;
240  vtr.reserve( nA ) ;
241  for( unsigned int i ( 0 ) ; i != nA ; ++i )
242  {
244  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
245  Rot(),
246  id ) ) ;
247  }
248  return ali ;
249  }
250 
252  {
253  ReturnAliErr aliErr ( new AlignmentErrors );
254  return aliErr ;
255  }
256 //-------------------------------------------------------------------
257 
258  ReturnAli produceZdcAli( const ZDCAlignmentRcd& /*iRecord*/ )
259  {
260  ReturnAli ali ( new Alignments ) ;
261  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
262  const unsigned int nA ( ZdcGeometry::numberOfAlignments() ) ;
263  vtr.reserve( nA ) ;
264  for( unsigned int i ( 0 ) ; i != nA ; ++i )
265  {
266  const HcalZDCDetId id ( HcalZDCDetId::EM, false, 1 ) ;
267  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
268  Rot(),
269  id ) ) ;
270  }
271  return ali ;
272  }
273 
275  {
276  ReturnAliErr aliErr ( new AlignmentErrors );
277  return aliErr ;
278  }
279 //-------------------------------------------------------------------
280 
282  {
283  ReturnAli ali ( new Alignments ) ;
284  std::vector<AlignTransform>& vtr ( ali->m_align ) ;
285  const unsigned int nA ( CastorGeometry::numberOfAlignments() ) ;
286  vtr.reserve( nA ) ;
287  for( unsigned int i ( 0 ) ; i != nA ; ++i )
288  {
289  const HcalCastorDetId id ( HcalCastorDetId::EM, false, 1, 1 ) ;
290  vtr.push_back( AlignTransform( Trl( 0, 0, 0 ),
291  Rot(),
292  id ) ) ;
293  }
294  return ali ;
295  }
296 
298  {
299  ReturnAliErr aliErr ( new AlignmentErrors );
300  return aliErr ;
301  }
302 };
303 
304 
305 //define this as a plug-in
static unsigned int numberOfBarrelAlignments()
Definition: HcalGeometry.h:56
boost::shared_ptr< Alignments > ReturnAli
int i
Definition: DBlmapReader.cc:9
ReturnAli produceEEAli(const EEAlignmentRcd &)
ReturnAliErr produceESAliErr(const ESAlignmentErrorRcd &)
ReturnAli produceHFAli(const HFAlignmentRcd &)
ReturnAli produceCastorAli(const CastorAlignmentRcd &)
static DetId detIdFromOuterAlignmentIndex(unsigned int i)
CLHEP::Hep3Vector Translation
static unsigned int numberOfAlignments()
Definition: ZdcGeometry.h:48
ReturnAliErr produceHFAliErr(const HFAlignmentErrorRcd &)
void setWhatProduced(T *iThis, const es::Label &iLabel=es::Label())
Definition: ESProducer.h:115
static unsigned int numberOfAlignments()
ReturnAliErr produceHEAliErr(const HEAlignmentErrorRcd &)
ReturnAliErr produceEEAliErr(const EEAlignmentErrorRcd &)
static DetId detIdFromLocalAlignmentIndex(unsigned int iLoc)
static unsigned int numberOfOuterAlignments()
Definition: HcalGeometry.h:62
ReturnAli produceHBAli(const HBAlignmentRcd &)
static DetId detIdFromForwardAlignmentIndex(unsigned int i)
boost::shared_ptr< AlignmentErrors > ReturnAliErr
static DetId detIdFromBarrelAlignmentIndex(unsigned int i)
ReturnAliErr produceHBAliErr(const HBAlignmentErrorRcd &)
ReturnAliErr produceHOAliErr(const HOAlignmentErrorRcd &)
ReturnAliErr produceCastorAliErr(const CastorAlignmentErrorRcd &)
ReturnAli produceEBAli(const EBAlignmentRcd &)
static unsigned int numberOfAlignments()
static unsigned int numberOfEndcapAlignments()
Definition: HcalGeometry.h:58
AlignTransform::Translation Trl
ReturnAli produceZdcAli(const ZDCAlignmentRcd &)
#define DEFINE_FWK_EVENTSETUP_MODULE(type)
Definition: ModuleFactory.h:60
ReturnAli produceHEAli(const HEAlignmentRcd &)
FakeCaloAlignmentEP(const edm::ParameterSet &)
static unsigned int numberOfForwardAlignments()
Definition: HcalGeometry.h:60
static DetId detIdFromEndcapAlignmentIndex(unsigned int i)
ReturnAli produceESAli(const ESAlignmentRcd &)
ReturnAli produceHOAli(const HOAlignmentRcd &)
ReturnAliErr produceEBAliErr(const EBAlignmentErrorRcd &)
int ism(int ieta, int iphi)
Definition: EcalPyUtils.cc:56
AlignTransform::Rotation Rot
ReturnAliErr produceZdcAliErr(const ZDCAlignmentErrorRcd &)
CLHEP::HepRotation Rotation