#include <RecoTracker/MeasurementDet/plugins/MeasurementTrackerESProducer.h>
Public Member Functions | |
MeasurementTrackerESProducer (const edm::ParameterSet &p) | |
boost::shared_ptr < MeasurementTracker > | produce (const CkfComponentsRecord &) |
virtual | ~MeasurementTrackerESProducer () |
Private Attributes | |
boost::shared_ptr < MeasurementTracker > | _measurementTracker |
edm::ParameterSet | pset_ |
Definition at line 10 of file MeasurementTrackerESProducer.h.
MeasurementTrackerESProducer::MeasurementTrackerESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 33 of file MeasurementTrackerESProducer.cc.
References edm::ParameterSet::getParameter(), pset_, and edm::ESProducer::setWhatProduced().
00034 { 00035 std::string myname = p.getParameter<std::string>("ComponentName"); 00036 pset_ = p; 00037 setWhatProduced(this,myname); 00038 }
MeasurementTrackerESProducer::~MeasurementTrackerESProducer | ( | ) | [virtual] |
boost::shared_ptr< MeasurementTracker > MeasurementTrackerESProducer::produce | ( | const CkfComponentsRecord & | iRecord | ) |
Definition at line 43 of file MeasurementTrackerESProducer.cc.
References _measurementTracker, MeasurementTracker::BadAPVFibers, MeasurementTracker::BadModules, MeasurementTracker::BadStrips, edm::ParameterSet::existsAs(), edm::ParameterSet::getParameter(), edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), edm::ParameterSet::getUntrackedParameter(), MeasurementTracker::MaskBad128StripBlocks, MeasurementTrackerESProducer_cfi::MeasurementTracker, OnDemandMeasurementTrackerESProducer_cfi::OnDemandMeasurementTracker, edm::ESHandle< T >::product(), and pset_.
00044 { 00045 std::string pixelCPEName = pset_.getParameter<std::string>("PixelCPE"); 00046 std::string stripCPEName = pset_.getParameter<std::string>("StripCPE"); 00047 std::string matcherName = pset_.getParameter<std::string>("HitMatcher"); 00048 bool regional = pset_.getParameter<bool>("Regional"); 00049 00050 bool onDemand = pset_.getParameter<bool>("OnDemand"); 00051 00052 /* vvvv LEGACY, WILL BE REMOVED vvvv */ 00053 //const SiStripNoises *ptr_stripNoises = 0; 00054 //edm::ESHandle<SiStripNoises> stripNoises; 00055 //if (pset_.getParameter<bool>("UseStripNoiseDB")) { 00056 // iRecord.getRecord<SiStripNoisesRcd>().get(stripNoises); 00057 // ptr_stripNoises = stripNoises.product(); 00058 //} 00059 /* ^^^^ LEGACY, WILL BE REMOVED ^^^^ */ 00060 00061 const SiStripQuality *ptr_stripQuality = 0; 00062 int qualityFlags = 0; 00063 int qualityDebugFlags = 0; 00064 edm::ESHandle<SiStripQuality> stripQuality; 00065 00066 if (pset_.getParameter<bool>("UseStripModuleQualityDB")) { 00067 qualityFlags += MeasurementTracker::BadModules; 00068 if (pset_.getUntrackedParameter<bool>("DebugStripModuleQualityDB")) { 00069 qualityDebugFlags += MeasurementTracker::BadModules; 00070 } 00071 } 00072 if (pset_.getParameter<bool>("UseStripAPVFiberQualityDB")) { 00073 qualityFlags += MeasurementTracker::BadAPVFibers; 00074 if (pset_.getUntrackedParameter<bool>("DebugStripAPVFiberQualityDB")) { 00075 qualityDebugFlags += MeasurementTracker::BadAPVFibers; 00076 } 00077 if (pset_.existsAs<bool>("MaskBadAPVFibers") && pset_.getParameter<bool>("MaskBadAPVFibers")) { 00078 qualityFlags += MeasurementTracker::MaskBad128StripBlocks; 00079 } 00080 } 00081 if (pset_.getParameter<bool>("UseStripStripQualityDB")) { 00082 qualityFlags += MeasurementTracker::BadStrips; 00083 if (pset_.getUntrackedParameter<bool>("DebugStripStripQualityDB")) { 00084 qualityDebugFlags += MeasurementTracker::BadStrips; 00085 } 00086 } 00087 00088 if (qualityFlags != 0) { 00089 iRecord.getRecord<SiStripQualityRcd>().get(stripQuality); 00090 ptr_stripQuality = stripQuality.product(); 00091 } 00092 00093 edm::ESHandle<PixelClusterParameterEstimator> pixelCPE; 00094 edm::ESHandle<StripClusterParameterEstimator> stripCPE; 00095 edm::ESHandle<SiStripRecHitMatcher> hitMatcher; 00096 edm::ESHandle<TrackerGeometry> trackerGeom; 00097 edm::ESHandle<GeometricSearchTracker> geometricSearchTracker; 00098 00099 00100 iRecord.getRecord<TkPixelCPERecord>().get(pixelCPEName,pixelCPE); 00101 iRecord.getRecord<TkStripCPERecord>().get(stripCPEName,stripCPE); 00102 iRecord.getRecord<TkStripCPERecord>().get(matcherName,hitMatcher); 00103 iRecord.getRecord<TrackerDigiGeometryRecord>().get(trackerGeom); 00104 iRecord.getRecord<TrackerRecoGeometryRecord>().get(geometricSearchTracker); 00105 00106 if (!onDemand){ 00107 _measurementTracker = boost::shared_ptr<MeasurementTracker>(new MeasurementTracker(pset_, 00108 pixelCPE.product(), 00109 stripCPE.product(), 00110 hitMatcher.product(), 00111 trackerGeom.product(), 00112 geometricSearchTracker.product(), 00113 ptr_stripQuality, 00114 qualityFlags, 00115 qualityDebugFlags, 00116 //ptr_stripNoises, 00117 regional) ); 00118 } 00119 else{ 00120 const SiStripRegionCabling * ptr_stripRegionCabling =0; 00121 //get regional cabling 00122 edm::ESHandle<SiStripRegionCabling> rcabling; 00123 iRecord.getRecord<SiStripRegionCablingRcd>().get(rcabling); 00124 ptr_stripRegionCabling = rcabling.product(); 00125 00126 _measurementTracker = boost::shared_ptr<MeasurementTracker>( new OnDemandMeasurementTracker(pset_, 00127 pixelCPE.product(), 00128 stripCPE.product(), 00129 hitMatcher.product(), 00130 trackerGeom.product(), 00131 geometricSearchTracker.product(), 00132 ptr_stripQuality, 00133 qualityFlags, 00134 qualityDebugFlags, 00135 //ptr_stripNoises, 00136 ptr_stripRegionCabling, 00137 regional) ); 00138 00139 } 00140 return _measurementTracker; 00141 }
boost::shared_ptr<MeasurementTracker> MeasurementTrackerESProducer::_measurementTracker [private] |
Definition at line 17 of file MeasurementTrackerESProducer.h.
Referenced by MeasurementTrackerESProducer(), and produce().