CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/RecoPixelVertexing/PixelLowPtUtilities/src/ClusterShapeHitFilterESProducer.cc

Go to the documentation of this file.
00001 #include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilterESProducer.h"
00002 
00003 #include "RecoPixelVertexing/PixelLowPtUtilities/interface/ClusterShapeHitFilter.h"
00004 
00005 #include "Geometry/CommonDetUnit/interface/GlobalTrackingGeometry.h"
00006 #include "RecoTracker/Record/interface/CkfComponentsRecord.h"
00007 
00008 #include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"
00009 
00010 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00011 
00012 /*****************************************************************************/
00013 ClusterShapeHitFilterESProducer::ClusterShapeHitFilterESProducer
00014   (const edm::ParameterSet& iConfig)
00015 {
00016   
00017   std::string componentName = iConfig.getParameter<std::string>("ComponentName");
00018   
00019   edm::LogInfo("ClusterShapeHitFilterESProducer")
00020     << " with name: "            << componentName;
00021       
00022   setWhatProduced(this, componentName);
00023 }
00024 
00025 
00026 /*****************************************************************************/
00027 ClusterShapeHitFilterESProducer::~ClusterShapeHitFilterESProducer
00028   ()
00029 {
00030 }
00031 
00032 /*****************************************************************************/
00033 ClusterShapeHitFilterESProducer::ReturnType
00034 ClusterShapeHitFilterESProducer::produce
00035 (const ClusterShapeHitFilter::Record &iRecord)
00036 {
00037   using namespace edm::es;
00038 
00039   // Retrieve magnetic field
00040   edm::ESHandle<MagneticField> field;
00041   iRecord.getRecord<TrackingComponentsRecord>().getRecord<IdealMagneticFieldRecord>().get(field);
00042   //  iRecord.getRecord<IdealMagneticFieldRecord>().get(field);
00043   //iRecord.get(field);
00044 
00045   // Retrieve geometry
00046   edm::ESHandle<GlobalTrackingGeometry> geo;
00047   iRecord.getRecord<TrackingComponentsRecord>().getRecord<GlobalTrackingGeometryRecord>().get(geo);
00048   //iRecord.getRecord<GlobalTrackingGeometryRecord>().get(geo);
00049 
00050   // Retrieve pixel Lorentz
00051   edm::ESHandle<SiPixelLorentzAngle> pixel;
00052   iRecord.getRecord<TkPixelCPERecord>().getRecord<SiPixelLorentzAngleRcd>().get(pixel);
00053   //iRecord.getRecord<SiPixelLorentzAngleRcd>().get(pixel);
00054 
00055   // Retrieve strip Lorentz
00056   edm::ESHandle<SiStripLorentzAngle> strip;
00057   iRecord.getRecord<TkStripCPERecord>().getRecord<SiStripLorentzAngleRcd>().get(strip);
00058   //iRecord.getRecord<SiStripLorentzAngleRcd>().get(strip);
00059 
00060   // Produce the filter using the plugin factory
00061   ClusterShapeHitFilterESProducer::ReturnType
00062     aFilter(new ClusterShapeHitFilter(  geo.product(),
00063                                       field.product(),
00064                                       pixel.product(),
00065                                       strip.product()));
00066 
00067   return aFilter;
00068 }