File indexing completed on 2024-04-06 12:27:14
0001 #include <memory>
0002
0003
0004
0005
0006
0007 #include "FWCore/Framework/interface/Frameworkfwd.h"
0008 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0009
0010 #include "FWCore/Framework/interface/Event.h"
0011 #include "FWCore/Framework/interface/EventSetup.h"
0012 #include "FWCore/Framework/interface/ESHandle.h"
0013 #include "FWCore/Framework/interface/MakerMacros.h"
0014
0015 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0016
0017 #include "RecoMuon/Navigation/interface/MuonNavigationPrinter.h"
0018 #include "RecoMuon/Navigation/interface/MuonNavigationSchool.h"
0019
0020 #include "RecoMuon/Records/interface/MuonRecoGeometryRecord.h"
0021 #include "RecoMuon/Navigation/interface/MuonNavigationPrinter.h"
0022 #include "RecoMuon/DetLayers/interface/MuonDetLayerGeometry.h"
0023
0024
0025 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
0026
0027 class MuonNavigationTest : public edm::one::EDAnalyzer<> {
0028 public:
0029 explicit MuonNavigationTest(const edm::ParameterSet&);
0030 ~MuonNavigationTest() override;
0031
0032 void analyze(const edm::Event&, const edm::EventSetup&) override;
0033
0034 private:
0035 edm::ESGetToken<MuonDetLayerGeometry, MuonRecoGeometryRecord> geomToken_;
0036 };
0037
0038
0039
0040 MuonNavigationTest::MuonNavigationTest(const edm::ParameterSet& iConfig) {
0041 geomToken_ = esConsumes();
0042 std::cout << "Muon Navigation Printer Begin:" << std::endl;
0043 }
0044
0045 MuonNavigationTest::~MuonNavigationTest() { std::cout << "Muon Navigation Printer End. " << std::endl; }
0046
0047 void MuonNavigationTest::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {
0048 using namespace edm;
0049
0050
0051 bool testMuon = true;
0052
0053
0054
0055
0056 const MuonDetLayerGeometry& mm = iSetup.getData(geomToken_);
0057
0058 if (testMuon) {
0059 MuonNavigationSchool school(&mm);
0060 MuonNavigationPrinter* printer = new MuonNavigationPrinter(&mm, school);
0061 delete printer;
0062 }
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079 }
0080
0081
0082 DEFINE_FWK_MODULE(MuonNavigationTest);