#include <RecoMuon/StandAloneTrackFinder/interface/StandAloneMuonRefitter.h>
Public Types | |
typedef std::pair< bool, Trajectory > | RefitResult |
Public Member Functions | |
RefitResult | refit (const Trajectory &) |
Refit. | |
StandAloneMuonRefitter (const edm::ParameterSet &par, const MuonServiceProxy *service) | |
Constructor. | |
virtual | ~StandAloneMuonRefitter () |
Destructor. | |
Private Attributes | |
edm::ESHandle< TrajectoryFitter > | theFitter |
std::string | theFitterName |
const MuonServiceProxy * | theService |
int | theTEMPORARYoption |
Definition at line 21 of file StandAloneMuonRefitter.h.
typedef std::pair<bool,Trajectory> StandAloneMuonRefitter::RefitResult |
Definition at line 23 of file StandAloneMuonRefitter.h.
StandAloneMuonRefitter::StandAloneMuonRefitter | ( | const edm::ParameterSet & | par, | |
const MuonServiceProxy * | service | |||
) |
Constructor.
Definition at line 24 of file StandAloneMuonRefitter.cc.
References edm::ParameterSet::getParameter(), theFitterName, and theTEMPORARYoption.
00024 :theService(service){ 00025 theFitterName = par.getParameter<string>("FitterName"); 00026 theTEMPORARYoption = par.getParameter<int>("Option"); 00027 }
StandAloneMuonRefitter::~StandAloneMuonRefitter | ( | ) | [virtual] |
StandAloneMuonRefitter::RefitResult StandAloneMuonRefitter::refit | ( | const Trajectory & | trajectory | ) |
Refit.
Definition at line 37 of file StandAloneMuonRefitter.cc.
References Trajectory::lastMeasurement(), Trajectory::recHits(), Trajectory::seed(), theFitter, theFitterName, theService, theTEMPORARYoption, and TrajectoryMeasurement::updatedState().
Referenced by StandAloneMuonTrajectoryBuilder::trajectories().
00037 { 00038 00039 theService->eventSetup().get<TrackingComponentsRecord>().get(theFitterName, theFitter); 00040 00041 vector<Trajectory> refitted; 00042 00043 if(theTEMPORARYoption == 1) 00044 refitted = theFitter->fit(trajectory); 00045 00046 else if(theTEMPORARYoption == 2 || theTEMPORARYoption == 3){ 00047 TrajectoryMeasurement lastTM = trajectory.lastMeasurement(); 00048 TrajectoryStateOnSurface firstTsos = lastTM.updatedState(); 00049 if (theTEMPORARYoption == 3) 00050 firstTsos = TrajectoryStateWithArbitraryError()(lastTM.updatedState()); 00051 TransientTrackingRecHit::ConstRecHitContainer trajRH = trajectory.recHits(); 00052 reverse(trajRH.begin(),trajRH.end()); 00053 00054 vector<Trajectory> refitted = theFitter->fit(trajectory.seed(), trajRH, firstTsos); 00055 } 00056 00057 if(!refitted.empty()) return RefitResult(true,refitted.front()); 00058 else return RefitResult(false,trajectory); 00059 }
std::string StandAloneMuonRefitter::theFitterName [private] |
Definition at line 42 of file StandAloneMuonRefitter.h.
Referenced by refit(), and StandAloneMuonRefitter().
const MuonServiceProxy* StandAloneMuonRefitter::theService [private] |
Definition at line 43 of file StandAloneMuonRefitter.h.
Referenced by refit(), and StandAloneMuonRefitter().