CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
MuonAlignmentInputMethod.cc
Go to the documentation of this file.
1 // -*- C++ -*-
2 //
3 // Package: MuonAlignment
4 // Class : MuonAlignmentInputMethod
5 //
6 // Implementation:
7 // <Notes on implementation>
8 //
9 // Original Author: Jim Pivarski
10 // Created: Thu Mar 6 14:25:07 CST 2008
11 // $Id: MuonAlignmentInputMethod.cc,v 1.4 2010/05/14 21:07:59 pivarski Exp $
12 //
13 
14 // system include files
17 
18 // user include files
23 
24 //
25 // constants, enums and typedefs
26 //
27 
28 //
29 // static data member definitions
30 //
31 
32 //
33 // constructors and destructor
34 //
36 
37 // MuonAlignmentInputMethod::MuonAlignmentInputMethod(const MuonAlignmentInputMethod& rhs)
38 // {
39 // // do actual copying here;
40 // }
41 
43 
44 //
45 // assignment operators
46 //
47 // const MuonAlignmentInputMethod& MuonAlignmentInputMethod::operator=(const MuonAlignmentInputMethod& rhs)
48 // {
49 // //An exception safe implementation is
50 // MuonAlignmentInputMethod temp(rhs);
51 // swap(rhs);
52 //
53 // return *this;
54 // }
55 
56 //
57 // member functions
58 //
59 
61  boost::shared_ptr<DTGeometry> dtGeometry = idealDTGeometry(iSetup);
62  boost::shared_ptr<CSCGeometry> cscGeometry = idealCSCGeometry(iSetup);
63 
64  return new AlignableMuon(&(*dtGeometry), &(*cscGeometry));
65 }
66 
67 boost::shared_ptr<DTGeometry> MuonAlignmentInputMethod::idealDTGeometry(const edm::EventSetup& iSetup) const {
69  iSetup.get<IdealGeometryRecord>().get(cpv);
70 
72  iSetup.get<MuonNumberingRecord>().get(mdc);
73  DTGeometryBuilderFromDDD DTGeometryBuilder;
74 
75  boost::shared_ptr<DTGeometry> boost_dtGeometry(new DTGeometry );
76  DTGeometryBuilder.build(boost_dtGeometry, &(*cpv), *mdc);
77 
78  return boost_dtGeometry;
79 }
80 
81 boost::shared_ptr<CSCGeometry> MuonAlignmentInputMethod::idealCSCGeometry(const edm::EventSetup& iSetup) const {
83  iSetup.get<IdealGeometryRecord>().get(cpv);
84 
86  iSetup.get<MuonNumberingRecord>().get(mdc);
88 
89  boost::shared_ptr<CSCGeometry> boost_cscGeometry(new CSCGeometry);
90  CSCGeometryBuilder.build(boost_cscGeometry, &(*cpv), *mdc);
91 
92  return boost_cscGeometry;
93 }
94 
95 //
96 // const member functions
97 //
98 
99 //
100 // static member functions
101 //
void build(boost::shared_ptr< CSCGeometry > geom, const DDCompactView *fv, const MuonDDDConstants &muonConstants)
Build the geometry.
boost::shared_ptr< CSCGeometry > idealCSCGeometry(const edm::EventSetup &iSetup) const
void build(boost::shared_ptr< DTGeometry > theGeometry, const DDCompactView *cview, const MuonDDDConstants &muonConstants)
const T & get() const
Definition: EventSetup.h:55
virtual AlignableMuon * newAlignableMuon(const edm::EventSetup &iSetup) const
Constructor of the full muon geometry.
Definition: AlignableMuon.h:36
boost::shared_ptr< DTGeometry > idealDTGeometry(const edm::EventSetup &iSetup) const