CMS 3D CMS Logo

GsfTrajectorySmootherESProducer.cc

Go to the documentation of this file.
00001 #include "TrackingTools/GsfTracking/plugins/GsfTrajectorySmootherESProducer.h"
00002 
00003 #include "FWCore/Framework/interface/EventSetup.h"
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "FWCore/Framework/interface/ModuleFactory.h"
00006 #include "FWCore/Framework/interface/ESProducer.h"
00007 
00008 #include "TrackingTools/GeomPropagators/interface/AnalyticalPropagator.h"
00009 #include "TrackingTools/GsfTracking/interface/GsfMaterialEffectsUpdator.h"
00010 #include "TrackingTools/GsfTracking/interface/GsfPropagatorWithMaterial.h"
00011 #include "TrackingTools/GsfTracking/interface/GsfMultiStateUpdator.h"
00012 #include "TrackingTools/GsfTools/interface/MultiGaussianStateMerger.h"
00013 #include "TrackingTools/GsfTools/interface/CloseComponentsMerger.h"
00014 #include "TrackingTools/GsfTracking/interface/MultiTrajectoryStateMerger.h"
00015 #include "TrackingTools/GsfTracking/interface/GsfChi2MeasurementEstimator.h"
00016 #include "TrackingTools/GsfTracking/interface/GsfTrajectorySmoother.h"
00017 
00018 #include <string>
00019 #include <memory>
00020 
00021 GsfTrajectorySmootherESProducer::GsfTrajectorySmootherESProducer(const edm::ParameterSet & p) 
00022 {
00023   std::string myname = p.getParameter<std::string>("ComponentName");
00024   pset_ = p;
00025   setWhatProduced(this,myname);
00026 }
00027 
00028 GsfTrajectorySmootherESProducer::~GsfTrajectorySmootherESProducer() {}
00029 
00030 boost::shared_ptr<TrajectorySmoother> 
00031 GsfTrajectorySmootherESProducer::produce(const TrackingComponentsRecord & iRecord){ 
00032   //
00033   // material effects
00034   //
00035   std::string matName = pset_.getParameter<std::string>("MaterialEffectsUpdator");
00036   edm::ESHandle<GsfMaterialEffectsUpdator> matProducer;
00037   iRecord.get(matName,matProducer);
00038   //
00039   // propagator
00040   //
00041   std::string geomName = pset_.getParameter<std::string>("GeometricalPropagator");
00042   edm::ESHandle<Propagator> geomProducer;
00043   iRecord.get(geomName,geomProducer);
00044   GsfPropagatorWithMaterial propagator(*geomProducer.product(),*matProducer.product());
00045   //
00046   // merger
00047   //
00048   std::string mergerName = pset_.getParameter<std::string>("Merger");
00049 //   edm::ESHandle<MultiTrajectoryStateMerger> mergerProducer;
00050 //   iRecord.get(mergerName,mergerProducer);
00051   edm::ESHandle< MultiGaussianStateMerger<5> > mergerProducer;
00052   iRecord.get(mergerName,mergerProducer);
00053   MultiTrajectoryStateMerger merger(*mergerProducer.product());
00054   //
00055   // estimator
00056   //
00057   //   double chi2Cut = pset_.getParameter<double>("ChiSquarCut");
00058   double chi2Cut(100.);
00059   GsfChi2MeasurementEstimator estimator(chi2Cut);
00060   //
00061   // create algorithm
00062   //
00063   //   bool matBefUpd = pset_.getParameter<bool>("MaterialBeforeUpdate");
00064   double scale = pset_.getParameter<double>("ErrorRescaling");
00065   return boost::shared_ptr<TrajectorySmoother>(new GsfTrajectorySmoother(propagator,
00066                                                                          GsfMultiStateUpdator(), 
00067                                                                          estimator,merger,
00068 //                                                                       matBefUpd,
00069                                                                          scale));
00070 }

Generated on Tue Jun 9 17:48:21 2009 for CMSSW by  doxygen 1.5.4