CMS 3D CMS Logo

StandAloneMuonRefitter Class Reference

Class ti interface the muon system rechits with the standard KF tools. More...

#include <RecoMuon/StandAloneTrackFinder/interface/StandAloneMuonRefitter.h>

List of all members.

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< TrajectoryFittertheFitter
std::string theFitterName
const MuonServiceProxy * theService
int theTEMPORARYoption


Detailed Description

Class ti interface the muon system rechits with the standard KF tools.

Date
2008/04/24 18:14:58
Revision
1.30
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>
Date
2008/04/24 18:14:59
Revision
1.43
Author:
R. Bellan - INFN Torino <riccardo.bellan@cern.ch>

Definition at line 21 of file StandAloneMuonRefitter.h.


Member Typedef Documentation

typedef std::pair<bool,Trajectory> StandAloneMuonRefitter::RefitResult

Definition at line 23 of file StandAloneMuonRefitter.h.


Constructor & Destructor Documentation

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]

Destructor.

Definition at line 30 of file StandAloneMuonRefitter.cc.

00030                                                {
00031 
00032 }


Member Function Documentation

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 }


Member Data Documentation

edm::ESHandle<TrajectoryFitter> StandAloneMuonRefitter::theFitter [private]

Definition at line 41 of file StandAloneMuonRefitter.h.

Referenced by refit().

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 40 of file StandAloneMuonRefitter.h.

Referenced by refit().

int StandAloneMuonRefitter::theTEMPORARYoption [private]

Definition at line 43 of file StandAloneMuonRefitter.h.

Referenced by refit(), and StandAloneMuonRefitter().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:32:45 2009 for CMSSW by  doxygen 1.5.4