CMS 3D CMS Logo

CandKinematicVertexFitter.h

Go to the documentation of this file.
00001 #ifndef RecoAlgos_CandKalmanVertexFitter_h
00002 #define RecoAlgos_CandKalmanVertexFitter_h
00003 #include "PhysicsTools/UtilAlgos/interface/EventSetupInitTrait.h"
00004 #include "PhysicsTools/RecoUtils/interface/CandKinematicVertexFitter.h"
00005 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h"
00006 #include "FWCore/Framework/interface/ESHandle.h"
00007 #include "FWCore/Framework/interface/EventSetup.h"
00008 
00009 namespace reco {
00010   namespace modules {
00011     struct CandKinematicVertexFitterEventSetupInit {
00012       static void init(CandKinematicVertexFitter & fitter, 
00013                        const edm::Event & evt,
00014                        const edm::EventSetup& es) { 
00015         edm::ESHandle<MagneticField> h;
00016         es.get<IdealMagneticFieldRecord>().get(h);
00017         fitter.set(h.product());
00018       }
00019     };
00020 
00021     template<>
00022     struct EventSetupInit<CandKinematicVertexFitter> {
00023       typedef CandKinematicVertexFitterEventSetupInit type;
00024     };
00025   }
00026 }
00027 
00028 #endif

Generated on Tue Jun 9 17:41:50 2009 for CMSSW by  doxygen 1.5.4