#include <RecoLocalTracker/SiStripRecHitConverter/interface/SiStripRecHitConverter.h>
Public Member Functions | |
virtual void | produce (edm::Event &e, const edm::EventSetup &c) |
SiStripRecHitConverter (const edm::ParameterSet &conf) | |
virtual | ~SiStripRecHitConverter () |
Private Attributes | |
edm::ParameterSet | conf_ |
bool | m_newCont |
std::string | matchedRecHitsTag_ |
std::string | np_ |
SiStripRecHitConverterAlgorithm | recHitConverterAlgorithm_ |
std::string | rphiRecHitsTag_ |
std::string | stereoRecHitsTag_ |
Definition at line 27 of file SiStripRecHitConverter.h.
SiStripRecHitConverter::SiStripRecHitConverter | ( | const edm::ParameterSet & | conf | ) | [explicit] |
Definition at line 34 of file SiStripRecHitConverter.cc.
References matchedRecHitsTag_, rphiRecHitsTag_, and stereoRecHitsTag_.
00034 : 00035 recHitConverterAlgorithm_(conf) , 00036 conf_(conf), 00037 matchedRecHitsTag_( conf.getParameter<std::string>( "matchedRecHits" ) ), 00038 rphiRecHitsTag_( conf.getParameter<std::string>( "rphiRecHits" ) ), 00039 stereoRecHitsTag_( conf.getParameter<std::string>( "stereoRecHits" ) ) 00040 { 00041 produces<SiStripMatchedRecHit2DCollection>( matchedRecHitsTag_ ); 00042 produces<SiStripRecHit2DCollection>( rphiRecHitsTag_ ); 00043 produces<SiStripRecHit2DCollection>( stereoRecHitsTag_ ); 00044 }
SiStripRecHitConverter::~SiStripRecHitConverter | ( | ) | [virtual] |
void SiStripRecHitConverter::produce | ( | edm::Event & | e, | |
const edm::EventSetup & | c | |||
) | [virtual] |
Implements edm::EDProducer.
Definition at line 51 of file SiStripRecHitConverter.cc.
References edm::EventSetup::get(), edm::Event::getByLabel(), edm::ESHandle< T >::product(), and edm::Event::put().
00052 { 00053 //get tracker geometry 00054 using namespace edm; 00055 edm::ESHandle<TrackerGeometry> pDD; 00056 es.get<TrackerDigiGeometryRecord>().get( pDD ); 00057 const TrackerGeometry &tracker(*pDD); 00058 00059 //get Cluster Parameter Estimator 00060 std::string cpe = conf_.getParameter<std::string>("StripCPE"); 00061 edm::ESHandle<StripClusterParameterEstimator> parameterestimator; 00062 es.get<TkStripCPERecord>().get(cpe, parameterestimator); 00063 const StripClusterParameterEstimator &stripcpe(*parameterestimator); 00064 00065 //get matcher 00066 std::string matcher = conf_.getParameter<std::string>("Matcher"); 00067 edm::ESHandle<SiStripRecHitMatcher> rechitmatcher; 00068 es.get<TkStripCPERecord>().get(matcher, rechitmatcher); 00069 const SiStripRecHitMatcher &rhmatcher(*rechitmatcher); 00070 00071 //maybe get the SiStripQuality 00072 const SiStripQuality *ptr_stripQuality = 0; 00073 edm::ESHandle<SiStripQuality> stripQuality; 00074 if (conf_.existsAs<bool>("useSiStripQuality") && conf_.getParameter<bool>("useSiStripQuality")) { 00075 std::string qualityLabel = conf_.getParameter<std::string>("siStripQualityLabel"); 00076 es.get<SiStripQualityRcd>().get(stripQuality); 00077 ptr_stripQuality = stripQuality.product(); 00078 } 00079 00080 // Step A: Get Inputs 00081 std::string clusterProducer = conf_.getParameter<std::string>("ClusterProducer"); 00082 bool regional = conf_.getParameter<bool>("Regional"); 00083 edm::Handle<edmNew::DetSetVector<SiStripCluster> > clusters; 00084 edm::Handle<edm::RefGetter<SiStripCluster> > refclusters; 00085 edm::Handle<edm::LazyGetter<SiStripCluster> > lazygetter; 00086 00087 if (regional){ 00088 std::string lazyGetterProducer=conf_.getParameter<std::string>("LazyGetterProducer"); 00089 e.getByLabel(clusterProducer, refclusters); 00090 e.getByLabel(lazyGetterProducer, lazygetter); 00091 } 00092 else e.getByLabel(clusterProducer, clusters); 00093 00094 // Step B: create empty output collection 00095 std::auto_ptr<SiStripMatchedRecHit2DCollection> outputmatched(new SiStripMatchedRecHit2DCollection); 00096 std::auto_ptr<SiStripRecHit2DCollection> outputrphi(new SiStripRecHit2DCollection); 00097 std::auto_ptr<SiStripRecHit2DCollection> outputstereo(new SiStripRecHit2DCollection); 00098 00099 // Step C: Invoke the seed finding algorithm 00100 if (regional) recHitConverterAlgorithm_.run(refclusters,lazygetter,*outputmatched,*outputrphi,*outputstereo,tracker,stripcpe,rhmatcher,ptr_stripQuality); 00101 else recHitConverterAlgorithm_.run(clusters,*outputmatched,*outputrphi,*outputstereo,tracker,stripcpe,rhmatcher,ptr_stripQuality); 00102 00103 // Step D: write output to file 00104 e.put(outputmatched, matchedRecHitsTag_ ); 00105 e.put(outputrphi, rphiRecHitsTag_ ); 00106 e.put(outputstereo,stereoRecHitsTag_ ); 00107 }
Definition at line 39 of file SiStripRecHitConverter.h.
bool cms::SiStripRecHitConverter::m_newCont [private] |
Definition at line 42 of file SiStripRecHitConverter.h.
std::string cms::SiStripRecHitConverter::matchedRecHitsTag_ [private] |
std::string cms::SiStripRecHitConverter::np_ [private] |
Definition at line 41 of file SiStripRecHitConverter.h.
Definition at line 38 of file SiStripRecHitConverter.h.
std::string cms::SiStripRecHitConverter::rphiRecHitsTag_ [private] |
std::string cms::SiStripRecHitConverter::stereoRecHitsTag_ [private] |