CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_3/src/FastSimulation/TrackerSetup/plugins/TrackerInteractionGeometryESProducer.cc

Go to the documentation of this file.
00001 #include "FastSimulation/TrackerSetup/plugins/TrackerInteractionGeometryESProducer.h"
00002 #include "RecoTracker/Record/interface/TrackerRecoGeometryRecord.h"
00003 
00004 #include "FWCore/Framework/interface/ESHandle.h"
00005 #include "FWCore/Framework/interface/ModuleFactory.h"
00006 
00007 #include <memory>
00008 
00009 TrackerInteractionGeometryESProducer::TrackerInteractionGeometryESProducer(const edm::ParameterSet & p) 
00010 {
00011     setWhatProduced(this);
00012     _label = p.getUntrackedParameter<std::string>("trackerGeometryLabel","");
00013 
00014     theTrackerMaterial = p.getParameter<edm::ParameterSet>("TrackerMaterial");
00015 
00016 }
00017 
00018 TrackerInteractionGeometryESProducer::~TrackerInteractionGeometryESProducer() {}
00019 
00020 boost::shared_ptr<TrackerInteractionGeometry> 
00021 TrackerInteractionGeometryESProducer::produce(const TrackerInteractionGeometryRecord & iRecord){ 
00022 
00023   edm::ESHandle<GeometricSearchTracker> theGeomSearchTracker;
00024   
00025   iRecord.getRecord<TrackerRecoGeometryRecord>().get(_label, theGeomSearchTracker );
00026   _tracker = boost::shared_ptr<TrackerInteractionGeometry>
00027     (new TrackerInteractionGeometry(theTrackerMaterial,&(*theGeomSearchTracker)));
00028   return _tracker;
00029 
00030 }
00031 
00032 
00033 DEFINE_FWK_EVENTSETUP_MODULE(TrackerInteractionGeometryESProducer);