CMS 3D CMS Logo

RoadSearchSeedFinder Class Reference

#include <RecoTracker/RoadSearchSeedFinder/interface/RoadSearchSeedFinder.h>

Inheritance diagram for RoadSearchSeedFinder:

edm::EDProducer edm::ProducerBase edm::ProductRegistryHelper

List of all members.

Public Member Functions

virtual void produce (edm::Event &e, const edm::EventSetup &c)
 RoadSearchSeedFinder (const edm::ParameterSet &conf)
virtual ~RoadSearchSeedFinder ()

Private Attributes

edm::ParameterSet conf_
RoadSearchSeedFinderAlgorithm roadSearchSeedFinderAlgorithm_


Detailed Description

Definition at line 29 of file RoadSearchSeedFinder.h.


Constructor & Destructor Documentation

RoadSearchSeedFinder::RoadSearchSeedFinder ( const edm::ParameterSet conf  )  [explicit]

Definition at line 35 of file RoadSearchSeedFinder.cc.

00035                                                                       : 
00036   roadSearchSeedFinderAlgorithm_(conf) ,
00037   conf_(conf)
00038 {
00039   produces<RoadSearchSeedCollection>();
00040 
00041 }

RoadSearchSeedFinder::~RoadSearchSeedFinder (  )  [virtual]

Definition at line 45 of file RoadSearchSeedFinder.cc.

00045 { }  


Member Function Documentation

void RoadSearchSeedFinder::produce ( edm::Event e,
const edm::EventSetup c 
) [virtual]

Implements edm::EDProducer.

Definition at line 48 of file RoadSearchSeedFinder.cc.

References HcalDataFrameFilter_impl::check(), conf_, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), LogDebug, python::SiStripOnlineP5_cfg::matchedRecHits, output(), python::SiStripOnlineP5_cfg::pixelRecHits, edm::Handle< T >::product(), edm::Event::put(), roadSearchSeedFinderAlgorithm_, HLT_VtxMuL3::rphiRecHits, RoadSearchSeedFinderAlgorithm::run(), python::SiStripOnlineP5_cfg::stereoRecHits, and ClusterChecker::tooManyClusters().

00049 {
00050 
00051   // retrieve InputTags for strip rechits
00052   edm::InputTag matchedStripRecHitsInputTag = conf_.getParameter<edm::InputTag>("matchedStripRecHits");
00053   edm::InputTag rphiStripRecHitsInputTag    = conf_.getParameter<edm::InputTag>("rphiStripRecHits");
00054   edm::InputTag stereoStripRecHitsInputTag  = conf_.getParameter<edm::InputTag>("stereoStripRecHits");
00055   edm::InputTag clusterCollectionInputTag   = conf_.getParameter<edm::InputTag>("ClusterCollectionLabel");
00056   
00057   // get Inputs
00058   edm::Handle<SiStripMatchedRecHit2DCollection> matchedRecHits;
00059   e.getByLabel(matchedStripRecHitsInputTag ,matchedRecHits);
00060   edm::Handle<SiStripRecHit2DCollection> rphiRecHits;
00061   e.getByLabel(rphiStripRecHitsInputTag ,rphiRecHits);
00062   edm::Handle<SiStripRecHit2DCollection> stereoRecHits;
00063   e.getByLabel(stereoStripRecHitsInputTag ,stereoRecHits);
00064  
00065   // retrieve InputTag for pixel rechits
00066   edm::InputTag pixelRecHitsInputTag  = conf_.getParameter<edm::InputTag>("pixelRecHits");
00067 
00068   // special treatment for getting pixel collection
00069   // if collection exists in file, use collection from file
00070   // if collection does not exist in file, create empty collection
00071   static const SiPixelRecHitCollection s_empty;
00072   const SiPixelRecHitCollection *pixelRecHitCollection = &s_empty;
00073   edm::Handle<SiPixelRecHitCollection> pixelRecHits;
00074   if( e.getByLabel(pixelRecHitsInputTag, pixelRecHits)) {
00075     pixelRecHitCollection = pixelRecHits.product();
00076   } else {
00077     LogDebug("RoadSearch") << "Collection SiPixelRecHitCollection with InputTag " << pixelRecHitsInputTag << " cannot be found, using empty collection of same type. The RoadSearch algorithm is also fully functional without Pixel RecHits.";
00078   }
00079 
00080   // create empty output collection
00081   std::auto_ptr<RoadSearchSeedCollection> output(new RoadSearchSeedCollection);
00082 
00083   ClusterChecker check(conf_);
00084     
00085   // invoke the seed finding algorithm: check number of clusters per event *only* in cosmic tracking mode
00086   if (!check.tooManyClusters(e)) {
00087 
00088     roadSearchSeedFinderAlgorithm_.run(rphiRecHits.product(),  
00089                                        stereoRecHits.product(),
00090                                        matchedRecHits.product(),
00091                                        pixelRecHitCollection,
00092                                        es,
00093                                        *output);
00094   }
00095 
00096   // write output to file
00097   e.put(output);
00098 
00099 }


Member Data Documentation

edm::ParameterSet RoadSearchSeedFinder::conf_ [private]

Definition at line 41 of file RoadSearchSeedFinder.h.

Referenced by produce().

RoadSearchSeedFinderAlgorithm RoadSearchSeedFinder::roadSearchSeedFinderAlgorithm_ [private]

Definition at line 40 of file RoadSearchSeedFinder.h.

Referenced by produce().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:30:51 2009 for CMSSW by  doxygen 1.5.4