CMS 3D CMS Logo

CosmicMuonProducer.cc
Go to the documentation of this file.
2 
13 // system include files
14 #include <memory>
15 
16 // user include files
19 
22 
24 
27 
29 
34 
36 
37 using namespace edm;
38 
39 //
40 // constructors and destructor
41 //
43  ParameterSet tbpar = iConfig.getParameter<ParameterSet>("TrajectoryBuilderParameters");
44 
45  theSeedCollectionToken =
46  consumes<edm::View<TrajectorySeed> >(iConfig.getParameter<std::string>("MuonSeedCollectionLabel"));
47 
48  // service parameters
49  ParameterSet serviceParameters = iConfig.getParameter<ParameterSet>("ServiceParameters");
50 
51  // TrackLoader parameters
52  ParameterSet trackLoaderParameters = iConfig.getParameter<ParameterSet>("TrackLoaderParameters");
53 
54  // the services
55 
56  edm::ConsumesCollector iC = consumesCollector();
57 
58  theService = std::make_unique<MuonServiceProxy>(serviceParameters, consumesCollector());
59  theTrackFinder =
60  std::make_unique<MuonTrackFinder>(std::make_unique<CosmicMuonTrajectoryBuilder>(tbpar, theService.get(), iC),
61  std::make_unique<MuonTrackLoader>(trackLoaderParameters, iC, theService.get()),
62  iC);
63 
64  produces<reco::TrackCollection>();
65  produces<TrackingRecHitCollection>();
66  produces<reco::TrackExtraCollection>();
67  produces<std::vector<Trajectory> >();
68  produces<TrajTrackAssociationCollection>();
69 }
70 
72 
73 // ------------ method called to produce the data ------------
75  LogInfo("CosmicMuonProducer") << "Analyzing event number: " << iEvent.id();
76 
78  iEvent.getByToken(theSeedCollectionToken, seeds);
79 
80  // Update the services
81  theService->update(iSetup);
82  theTrackFinder->reconstruct(seeds, iEvent, iSetup);
83 }
MessageLogger.h
CosmicMuonProducer.h
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::LogInfo
Log< level::Info, false > LogInfo
Definition: MessageLogger.h:125
edm::Handle
Definition: AssociativeIterator.h:50
MakerMacros.h
Track.h
CosmicMuonProducer::produce
void produce(edm::Event &, const edm::EventSetup &) override
Definition: CosmicMuonProducer.cc:74
MuonTrackLoader.h
TrajTrackAssociation.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
InitialStep_cff.seeds
seeds
Definition: InitialStep_cff.py:231
edm::ParameterSet
Definition: ParameterSet.h:47
Event.h
CosmicMuonProducer::~CosmicMuonProducer
~CosmicMuonProducer() override
Definition: CosmicMuonProducer.cc:71
iEvent
int iEvent
Definition: GenABIO.cc:224
CosmicMuonTrajectoryBuilder.h
MuonTrackFinder.h
edm::EventSetup
Definition: EventSetup.h:58
Frameworkfwd.h
CosmicMuonProducer::CosmicMuonProducer
CosmicMuonProducer(const edm::ParameterSet &)
Definition: CosmicMuonProducer.cc:42
MuonServiceProxy.h
EventSetup.h
edm::ParameterSet::getParameter
T getParameter(std::string const &) const
Definition: ParameterSet.h:303
ConsumesCollector.h
ParameterSet.h
edm::Event
Definition: Event.h:73
edm::ConsumesCollector
Definition: ConsumesCollector.h:45