48 LogDebug(
"Muon|RecoMuon|TevMuonProducer") <<
"constructor called" << endl;
67 theRefits = parameterSet.
getParameter< std::vector<std::string> >(
"Refits");
68 theRefitIndex = parameterSet.
getParameter< std::vector<int> >(
"RefitIndex");
70 for(
unsigned int ww=0;ww<theRefits.size();ww++){
71 LogDebug(
"Muon|RecoMuon|TevMuonProducer") <<
"Refit " << theRefits[ww];
72 produces<reco::TrackCollection>(theRefits[ww]);
73 produces<TrackingRecHitCollection>(theRefits[ww]);
74 produces<reco::TrackExtraCollection>(theRefits[ww]);
75 produces<vector<Trajectory> >(theRefits[ww]) ;
76 produces<TrajTrackAssociationCollection>(theRefits[ww]);
77 produces<reco::TrackToTrackMap>(theRefits[ww]);
87 LogTrace(
"Muon|RecoMuon|TevMuonProducer") <<
"destructor called" << endl;
88 if (theService)
delete theService;
89 if (theRefitter)
delete theRefitter;
90 if (theTrackLoader)
delete theTrackLoader;
99 const string metname =
"Muon|RecoMuon|TevMuonProducer";
101 LogTrace(metname)<<
"TeV Muon Reconstruction started" << endl;
104 theService->update(eventSetup);
106 theRefitter->setEvent(event);
108 theRefitter->setServices(theService->eventSetup());
118 event.getByLabel(theGLBCollectionLabel,glbMuons);
122 LogTrace(metname)<<
"Taking " << glbMuons->size() <<
" Global Muons "<<theGLBCollectionLabel<<endl;
124 vector<MuonTrajectoryBuilder::TrackCand> glbTrackCands;
126 event.getByLabel(theGLBCollectionLabel.label(), glbMuonsTraj);
130 for(
unsigned int ww=0;ww<theRefits.size();ww++) {
131 LogDebug(metname)<<
"TeVRefit for Refit: " <<theRefitIndex[ww];
132 std::vector<std::pair<Trajectory*,reco::TrackRef> > miniMap;
133 vector<Trajectory*> trajectories;
135 for (reco::TrackCollection::const_iterator track = glbTracks->begin(); track!=glbTracks->end(); track++ , ++trackIndex) {
138 vector<Trajectory> refitted=theRefitter->refit(*track,theRefitIndex[ww],tTopo);
140 if (refitted.size()>0) {
142 LogDebug(metname)<<
"TeVTrackLoader for Refit: " <<theRefits[ww];
143 trajectories.push_back(refit);
144 std::pair<Trajectory*,reco::TrackRef> thisPair(refit,glbRef);
145 miniMap.push_back(thisPair);
148 theTrackLoader->loadTracks(trajectories,event,miniMap,theRefits[ww]);
151 LogTrace(metname) <<
"Done." << endl;
T getParameter(std::string const &) const
const std::string metname
std::vector< Track > TrackCollection
collection of Tracks
TevMuonProducer(const edm::ParameterSet &)
constructor with config
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
T const * product() const
T const * product() const
virtual ~TevMuonProducer()
destructor
boost::remove_cv< typename boost::remove_reference< argument_type >::type >::type key_type
virtual void produce(edm::Event &, const edm::EventSetup &)
reconstruct muons