00001 #include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPEESProducer.h" 00002 #include "RecoLocalTracker/SiStripRecHitConverter/interface/StripCPE.h" 00003 #include "MagneticField/Engine/interface/MagneticField.h" 00004 #include "MagneticField/Records/interface/IdealMagneticFieldRecord.h" 00005 #include "Geometry/TrackerGeometryBuilder/interface/TrackerGeometry.h" 00006 #include "Geometry/Records/interface/TrackerDigiGeometryRecord.h" 00007 00008 #include "FWCore/Framework/interface/EventSetup.h" 00009 #include "FWCore/Framework/interface/ESHandle.h" 00010 #include "FWCore/Framework/interface/ModuleFactory.h" 00011 #include "FWCore/Framework/interface/ESProducer.h" 00012 00013 #include "CondFormats/DataRecord/interface/SiStripLorentzAngleRcd.h" 00014 00015 00016 00017 #include <string> 00018 #include <memory> 00019 00020 using namespace edm; 00021 00022 StripCPEESProducer::StripCPEESProducer(const edm::ParameterSet & p) 00023 { 00024 std::string myname = p.getParameter<std::string>("ComponentName"); 00025 pset_ = p; 00026 setWhatProduced(this,myname); 00027 } 00028 00029 StripCPEESProducer::~StripCPEESProducer() {} 00030 00031 boost::shared_ptr<StripClusterParameterEstimator> 00032 StripCPEESProducer::produce(const TkStripCPERecord & iRecord){ 00033 // if (_propagator){ 00034 // delete _propagator; 00035 // _propagator = 0; 00036 // } 00037 ESHandle<MagneticField> magfield; 00038 iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield ); 00039 00040 edm::ESHandle<TrackerGeometry> pDD; 00041 iRecord.getRecord<TrackerDigiGeometryRecord>().get( pDD ); 00042 00043 edm::ESHandle<SiStripLorentzAngle> SiStripLorentzAngle_; 00044 iRecord.getRecord<SiStripLorentzAngleRcd>().get(SiStripLorentzAngle_); 00045 _cpe = boost::shared_ptr<StripClusterParameterEstimator>(new StripCPE(pset_,magfield.product(), pDD.product(), SiStripLorentzAngle_.product())); 00046 00047 return _cpe; 00048 } 00049 00050