#include <StripCPEESProducer.h>
Public Member Functions | |
boost::shared_ptr < StripClusterParameterEstimator > | produce (const TkStripCPERecord &) |
StripCPEESProducer (const edm::ParameterSet &) | |
Private Types | |
enum | CPE_t { SIMPLE, TRACKANGLE, GEOMETRIC, TEMPLATE } |
Private Attributes | |
boost::shared_ptr < StripClusterParameterEstimator > | cpe |
CPE_t | cpeNum |
std::map< std::string, CPE_t > | enumMap |
edm::ParameterSet | pset |
Definition at line 14 of file StripCPEESProducer.h.
enum StripCPEESProducer::CPE_t [private] |
Definition at line 23 of file StripCPEESProducer.h.
{ SIMPLE, TRACKANGLE, GEOMETRIC, TEMPLATE};
StripCPEESProducer::StripCPEESProducer | ( | const edm::ParameterSet & | p | ) |
Definition at line 13 of file StripCPEESProducer.cc.
References cpeNum, enumMap, GEOMETRIC, edm::ParameterSet::getParameter(), mergeVDriftHistosByStation::name, AlCaHLTBitMon_ParallelJobs::p, pset, edm::ESProducer::setWhatProduced(), SIMPLE, TEMPLATE, and TRACKANGLE.
{ std::string name = p.getParameter<std::string>("ComponentName"); enumMap[std::string("SimpleStripCPE")]=SIMPLE; enumMap[std::string("StripCPEfromTrackAngle")]=TRACKANGLE; enumMap[std::string("StripCPEgeometric")]=GEOMETRIC; enumMap[std::string("StripCPEfromTemplate")]=TEMPLATE; if(enumMap.find(name)==enumMap.end()) throw cms::Exception("Unknown StripCPE type") << name; cpeNum = enumMap[name]; pset = p; setWhatProduced(this,name); }
boost::shared_ptr< StripClusterParameterEstimator > StripCPEESProducer::produce | ( | const TkStripCPERecord & | iRecord | ) |
Definition at line 30 of file StripCPEESProducer.cc.
References cond::ecalcond::bad(), cpe, cpeNum, GEOMETRIC, edm::eventsetup::DependentRecordImplementation< RecordT, ListT >::getRecord(), autoMagneticFieldProducer_cfi::magfield, pset, SIMPLE, TEMPLATE, and TRACKANGLE.
{ edm::ESHandle<TrackerGeometry> pDD; iRecord.getRecord<TrackerDigiGeometryRecord>().get( pDD ); edm::ESHandle<MagneticField> magfield; iRecord.getRecord<IdealMagneticFieldRecord>().get(magfield ); edm::ESHandle<SiStripLorentzAngle> lorentzAngle; iRecord.getRecord<SiStripLorentzAngleDepRcd>().get(lorentzAngle); edm::ESHandle<SiStripConfObject> confObj; iRecord.getRecord<SiStripConfObjectRcd>().get(confObj); edm::ESHandle<SiStripLatency> latency; iRecord.getRecord<SiStripLatencyRcd>().get(latency); edm::ESHandle<SiStripNoises> noise; iRecord.getRecord<SiStripNoisesRcd>().get(noise); edm::ESHandle<SiStripApvGain> gain; iRecord.getRecord<SiStripApvGainRcd>().get(gain); edm::ESHandle<SiStripBadStrip> bad; iRecord.getRecord<SiStripBadChannelRcd>().get(bad); switch(cpeNum) { case SIMPLE: cpe = boost::shared_ptr<StripClusterParameterEstimator>(new StripCPE( pset, *magfield, *pDD, *lorentzAngle, *confObj, *latency )); break; case TRACKANGLE: cpe = boost::shared_ptr<StripClusterParameterEstimator>(new StripCPEfromTrackAngle( pset, *magfield, *pDD, *lorentzAngle, *confObj, *latency )); break; case GEOMETRIC: cpe = boost::shared_ptr<StripClusterParameterEstimator>(new StripCPEgeometric(pset, *magfield, *pDD, *lorentzAngle, *confObj, *latency )); break; case TEMPLATE: cpe = boost::shared_ptr<StripClusterParameterEstimator>(new StripCPEfromTemplate( pset, *magfield, *pDD, *lorentzAngle, *confObj, *latency )); break; } return cpe; }
boost::shared_ptr<StripClusterParameterEstimator> StripCPEESProducer::cpe [private] |
Definition at line 28 of file StripCPEESProducer.h.
Referenced by produce().
CPE_t StripCPEESProducer::cpeNum [private] |
Definition at line 26 of file StripCPEESProducer.h.
Referenced by produce(), and StripCPEESProducer().
std::map<std::string,CPE_t> StripCPEESProducer::enumMap [private] |
Definition at line 24 of file StripCPEESProducer.h.
Referenced by StripCPEESProducer().
edm::ParameterSet StripCPEESProducer::pset [private] |
Definition at line 27 of file StripCPEESProducer.h.
Referenced by produce(), and StripCPEESProducer().