CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
L2MuonProducer.cc
Go to the documentation of this file.
1 //-------------------------------------------------
2 //
16 //
17 //--------------------------------------------------
18 
20 
21 // Framework
26 
27 // TrackFinder and Specific STA/L2 Trajectory Builder
33 
36 
43 
44 #include <string>
45 
46 using namespace edm;
47 using namespace std;
48 
51  LogTrace("Muon|RecoMuon|L2MuonProducer")<<"constructor called"<<endl;
52 
53  // Parameter set for the Builder
54  ParameterSet trajectoryBuilderParameters = parameterSet.getParameter<ParameterSet>("L2TrajBuilderParameters");
55 
56  // MuonSeed Collection Label
57  theSeedCollectionLabel = parameterSet.getParameter<InputTag>("InputObjects");
58 
59  // service parameters
60  ParameterSet serviceParameters = parameterSet.getParameter<ParameterSet>("ServiceParameters");
61 
62  // TrackLoader parameters
63  ParameterSet trackLoaderParameters = parameterSet.getParameter<ParameterSet>("TrackLoaderParameters");
64 
65  // the services
66  theService = new MuonServiceProxy(serviceParameters);
67 
68  // instantiate the concrete trajectory builder in the Track Finder
69  theTrackFinder = new MuonTrackFinder(new StandAloneMuonTrajectoryBuilder(trajectoryBuilderParameters, theService),
70  new MuonTrackLoader(trackLoaderParameters, theService),
71  new MuonTrajectoryCleaner(true));
72 
73  produces<reco::TrackCollection>();
74  produces<reco::TrackCollection>("UpdatedAtVtx");
75  produces<TrackingRecHitCollection>();
76  produces<reco::TrackExtraCollection>();
77  produces<reco::TrackToTrackMap>();
78 
79  produces<std::vector<Trajectory> >();
80  produces<TrajTrackAssociationCollection>();
81 
82  produces<edm::AssociationMap<edm::OneToMany<std::vector<L2MuonTrajectorySeed>, std::vector<L2MuonTrajectorySeed> > > >();
83 }
84 
87  LogTrace("Muon|RecoMuon|L2eMuonProducer")<<"L2MuonProducer destructor called"<<endl;
88  delete theService;
89  delete theTrackFinder;
90 }
91 
92 
94 void L2MuonProducer::produce(Event& event, const EventSetup& eventSetup){
95 
96  const std::string metname = "Muon|RecoMuon|L2MuonProducer";
97 
98  LogTrace(metname)<<endl<<endl<<endl;
99  LogTrace(metname)<<"L2 Muon Reconstruction Started"<<endl;
100 
101  // Take the seeds container
102  LogTrace(metname)<<"Taking the seeds: "<<theSeedCollectionLabel.label()<<endl;
104  event.getByLabel(theSeedCollectionLabel,seeds);
105 
106  // Update the services
107  theService->update(eventSetup);
108  NavigationSetter setter(*theService->muonNavigationSchool());
109 
110  // Reconstruct
111  LogTrace(metname)<<"Track Reconstruction"<<endl;
112  theTrackFinder->reconstruct(seeds,event);
113 
114  LogTrace(metname)<<"Event loaded"
115  <<"================================"
116  <<endl<<endl;
117 }
118 
T getParameter(std::string const &) const
const std::string metname
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
#define LogTrace(id)
L2MuonProducer(const edm::ParameterSet &)
constructor with config
virtual ~L2MuonProducer()
destructor
virtual void produce(edm::Event &, const edm::EventSetup &)
reconstruct muons