#include <RecoTracker/TransientTrackingRecHit/plugins/TkTransientTrackingRecHitBuilderESProducer.h>
Public Member Functions | |
boost::shared_ptr < TransientTrackingRecHitBuilder > | produce (const TransientRecHitRecord &) |
TkTransientTrackingRecHitBuilderESProducer (const edm::ParameterSet &p) | |
virtual | ~TkTransientTrackingRecHitBuilderESProducer () |
Private Attributes | |
boost::shared_ptr < TransientTrackingRecHitBuilder > | _builder |
edm::ParameterSet | pset_ |
Definition at line 14 of file TkTransientTrackingRecHitBuilderESProducer.h.
TkTransientTrackingRecHitBuilderESProducer::TkTransientTrackingRecHitBuilderESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 17 of file TkTransientTrackingRecHitBuilderESProducer.cc.
References edm::ParameterSet::getParameter(), pset_, and edm::ESProducer::setWhatProduced().
00018 { 00019 std::string myname = p.getParameter<std::string>("ComponentName"); 00020 pset_ = p; 00021 setWhatProduced(this,myname); 00022 }
TkTransientTrackingRecHitBuilderESProducer::~TkTransientTrackingRecHitBuilderESProducer | ( | ) | [virtual] |
boost::shared_ptr< TransientTrackingRecHitBuilder > TkTransientTrackingRecHitBuilderESProducer::produce | ( | const TransientRecHitRecord & | iRecord | ) |
Definition at line 27 of file TkTransientTrackingRecHitBuilderESProducer.cc.
References _builder, edm::ParameterSet::getParameter(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), me, mp, edm::ESHandle< T >::product(), and pset_.
00027 { 00028 // if (_propagator){ 00029 // delete _propagator; 00030 // _propagator = 0; 00031 // } 00032 00033 std::string sname = pset_.getParameter<std::string>("StripCPE"); 00034 std::string pname = pset_.getParameter<std::string>("PixelCPE"); 00035 std::string mname = pset_.getParameter<std::string>("Matcher"); 00036 00037 edm::ESHandle<StripClusterParameterEstimator> se; 00038 edm::ESHandle<PixelClusterParameterEstimator> pe; 00039 edm::ESHandle<SiStripRecHitMatcher> me; 00040 const StripClusterParameterEstimator * sp ; 00041 const PixelClusterParameterEstimator * pp ; 00042 const SiStripRecHitMatcher * mp ; 00043 00044 if (sname == "Fake") { 00045 sp = 0; 00046 }else{ 00047 iRecord.getRecord<TkStripCPERecord>().get( sname, se ); 00048 sp = se.product(); 00049 } 00050 00051 if (pname == "Fake") { 00052 pp = 0; 00053 }else{ 00054 iRecord.getRecord<TkPixelCPERecord>().get( pname, pe ); 00055 pp = pe.product(); 00056 } 00057 00058 if (mname == "Fake") { 00059 mp = 0; 00060 }else{ 00061 iRecord.getRecord<TkStripCPERecord>().get( mname, me ); 00062 mp = me.product(); 00063 } 00064 00065 00066 edm::ESHandle<TrackerGeometry> pDD; 00067 iRecord.getRecord<TrackerDigiGeometryRecord>().get( pDD ); 00068 00069 _builder = boost::shared_ptr<TransientTrackingRecHitBuilder>(new TkTransientTrackingRecHitBuilder(pDD.product(), pp, sp, mp)); 00070 return _builder; 00071 }
boost::shared_ptr<TransientTrackingRecHitBuilder> TkTransientTrackingRecHitBuilderESProducer::_builder [private] |
Definition at line 20 of file TkTransientTrackingRecHitBuilderESProducer.h.
Referenced by produce().
Definition at line 21 of file TkTransientTrackingRecHitBuilderESProducer.h.
Referenced by produce(), and TkTransientTrackingRecHitBuilderESProducer().