CMS 3D CMS Logo

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.3 2009/01/19 11:07:37 flucke Exp $
12 //
13 
14 // system include files
17 
18 // user include files
23 
25 
26 //
27 // constants, enums and typedefs
28 //
29 
30 //
31 // static data member definitions
32 //
33 
34 //
35 // constructors and destructor
36 //
38 
39 // MuonAlignmentInputMethod::MuonAlignmentInputMethod(const MuonAlignmentInputMethod& rhs)
40 // {
41 // // do actual copying here;
42 // }
43 
45 
46 //
47 // assignment operators
48 //
49 // const MuonAlignmentInputMethod& MuonAlignmentInputMethod::operator=(const MuonAlignmentInputMethod& rhs)
50 // {
51 // //An exception safe implementation is
52 // MuonAlignmentInputMethod temp(rhs);
53 // swap(rhs);
54 //
55 // return *this;
56 // }
57 
58 //
59 // member functions
60 //
61 
63  std::shared_ptr<DTGeometry> dtGeometry = idealDTGeometry(iSetup);
64  std::shared_ptr<CSCGeometry> cscGeometry = idealCSCGeometry(iSetup);
65 
66  return new AlignableMuon(&(*dtGeometry), &(*cscGeometry));
67 }
68 
69 std::shared_ptr<DTGeometry> MuonAlignmentInputMethod::idealDTGeometry(const edm::EventSetup& iSetup) const {
71  iSetup.get<IdealGeometryRecord>().get(cpv);
72 
74  iSetup.get<MuonNumberingRecord>().get(mdc);
75  DTGeometryBuilderFromDDD DTGeometryBuilder;
76 
77  auto boost_dtGeometry = std::make_shared<DTGeometry>();
78  DTGeometryBuilder.build(boost_dtGeometry, &(*cpv), *mdc);
79 
80  return boost_dtGeometry;
81 }
82 
83 std::shared_ptr<CSCGeometry> MuonAlignmentInputMethod::idealCSCGeometry(const edm::EventSetup& iSetup) const {
85  iSetup.get<IdealGeometryRecord>().get(cpv);
86 
88  iSetup.get<MuonNumberingRecord>().get(mdc);
90 
91  auto boost_cscGeometry = std::make_shared<CSCGeometry>();
92  CSCGeometryBuilder.build(boost_cscGeometry, &(*cpv), *mdc);
93 
94  return boost_cscGeometry;
95 }
96 
97 //
98 // const member functions
99 //
100 
101 //
102 // static member functions
103 //
std::shared_ptr< DTGeometry > idealDTGeometry(const edm::EventSetup &iSetup) const
std::shared_ptr< CSCGeometry > idealCSCGeometry(const edm::EventSetup &iSetup) const
const T & get() const
Definition: EventSetup.h:55
void build(std::shared_ptr< CSCGeometry > geom, const DDCompactView *fv, const MuonDDDConstants &muonConstants)
Build the geometry.
virtual AlignableMuon * newAlignableMuon(const edm::EventSetup &iSetup) const
void build(std::shared_ptr< DTGeometry > theGeometry, const DDCompactView *cview, const MuonDDDConstants &muonConstants)
Constructor of the full muon geometry.
Definition: AlignableMuon.h:37