CMS 3D CMS Logo

RoadSearchCloudMaker Class Reference

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

Inheritance diagram for RoadSearchCloudMaker:

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

List of all members.

Public Member Functions

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

Private Attributes

edm::ParameterSet conf_
edm::InputTag matchedStripRecHitsInputTag_
edm::InputTag pixelRecHitsInputTag_
RoadSearchCloudMakerAlgorithm roadSearchCloudMakerAlgorithm_
edm::InputTag rphiStripRecHitsInputTag_
edm::InputTag seedProducer_
edm::InputTag stereoStripRecHitsInputTag_


Detailed Description

Definition at line 31 of file RoadSearchCloudMaker.h.


Constructor & Destructor Documentation

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

Definition at line 30 of file RoadSearchCloudMaker.cc.

References conf_, edm::ParameterSet::getParameter(), matchedStripRecHitsInputTag_, pixelRecHitsInputTag_, rphiStripRecHitsInputTag_, seedProducer_, and stereoStripRecHitsInputTag_.

00030                                                                       : 
00031   roadSearchCloudMakerAlgorithm_(conf) ,
00032   conf_(conf)
00033 {
00034   produces<RoadSearchCloudCollection>();
00035 
00036   // retrieve InputTags for rechits
00037   matchedStripRecHitsInputTag_ = conf_.getParameter<edm::InputTag>("matchedStripRecHits");
00038   rphiStripRecHitsInputTag_    = conf_.getParameter<edm::InputTag>("rphiStripRecHits");
00039   stereoStripRecHitsInputTag_  = conf_.getParameter<edm::InputTag>("stereoStripRecHits");
00040   pixelRecHitsInputTag_        = conf_.getParameter<edm::InputTag>("pixelRecHits");
00041     
00042   // retrieve InputTags of input SeedCollection
00043   seedProducer_                = conf_.getParameter<edm::InputTag>("SeedProducer");
00044 
00045 }

RoadSearchCloudMaker::~RoadSearchCloudMaker (  )  [virtual]

Definition at line 49 of file RoadSearchCloudMaker.cc.

00049 { }  


Member Function Documentation

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

Implements edm::EDProducer.

Definition at line 52 of file RoadSearchCloudMaker.cc.

References edm::Event::getByLabel(), LogDebug, python::SiStripOnlineP5_cfg::matchedRecHits, matchedStripRecHitsInputTag_, output(), python::SiStripOnlineP5_cfg::pixelRecHits, pixelRecHitsInputTag_, edm::Handle< T >::product(), edm::Event::put(), roadSearchCloudMakerAlgorithm_, rphiStripRecHitsInputTag_, RoadSearchCloudMakerAlgorithm::run(), seedProducer_, and stereoStripRecHitsInputTag_.

00053 {
00054 
00055   // Step A: Get Inputs 
00056   edm::Handle<RoadSearchSeedCollection> seedHandle;
00057   e.getByLabel(seedProducer_, seedHandle);
00058     
00059   // get Inputs
00060   edm::Handle<SiStripRecHit2DCollection> rphirecHitHandle;
00061   e.getByLabel(rphiStripRecHitsInputTag_ ,rphirecHitHandle);
00062   const SiStripRecHit2DCollection *rphiRecHitCollection = rphirecHitHandle.product();
00063   edm::Handle<SiStripRecHit2DCollection> stereorecHitHandle;
00064   e.getByLabel(stereoStripRecHitsInputTag_ ,stereorecHitHandle);
00065   const SiStripRecHit2DCollection *stereoRecHitCollection = stereorecHitHandle.product();
00066 
00067   // special treatment for getting matched RecHit collection
00068   // if collection exists in file, use collection from file
00069   // if collection does not exist in file, create empty collection
00070   static const SiStripMatchedRecHit2DCollection s_empty0;
00071   const SiStripMatchedRecHit2DCollection *matchedRecHitCollection = &s_empty0;
00072   edm::Handle<SiStripMatchedRecHit2DCollection> matchedRecHits;
00073   if( e.getByLabel(matchedStripRecHitsInputTag_, matchedRecHits)) {
00074     matchedRecHitCollection = matchedRecHits.product();
00075   } else {
00076     LogDebug("RoadSearch") << "Collection SiStripMatchedRecHit2DCollection with InputTag " << matchedStripRecHitsInputTag_ << " cannot be found, using empty collection of same type. The RoadSearch algorithm is also fully functional without matched RecHits.";
00077   }
00078   
00079   // special treatment for getting pixel collection
00080   // if collection exists in file, use collection from file
00081   // if collection does not exist in file, create empty collection
00082   static const SiPixelRecHitCollection s_empty1;
00083   const SiPixelRecHitCollection *pixelRecHitCollection = &s_empty1;
00084   edm::Handle<SiPixelRecHitCollection> pixelRecHits;
00085   if( e.getByLabel(pixelRecHitsInputTag_, pixelRecHits)) {
00086     pixelRecHitCollection = pixelRecHits.product();
00087   } else {
00088     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.";
00089   }
00090   
00091 
00092   // Step B: create empty output collection
00093   std::auto_ptr<RoadSearchCloudCollection> output(new RoadSearchCloudCollection);
00094 
00095   // Step C: Invoke the seed finding algorithm
00096   roadSearchCloudMakerAlgorithm_.run(seedHandle,
00097                                      rphiRecHitCollection,  
00098                                      stereoRecHitCollection,
00099                                      matchedRecHitCollection,
00100                                      pixelRecHitCollection,
00101                                      es,
00102                                      *output);
00103 
00104   // Step D: write output to file
00105   e.put(output);
00106 
00107 }


Member Data Documentation

edm::ParameterSet RoadSearchCloudMaker::conf_ [private]

Definition at line 43 of file RoadSearchCloudMaker.h.

Referenced by RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::matchedStripRecHitsInputTag_ [private]

Definition at line 45 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::pixelRecHitsInputTag_ [private]

Definition at line 48 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

RoadSearchCloudMakerAlgorithm RoadSearchCloudMaker::roadSearchCloudMakerAlgorithm_ [private]

Definition at line 42 of file RoadSearchCloudMaker.h.

Referenced by produce().

edm::InputTag RoadSearchCloudMaker::rphiStripRecHitsInputTag_ [private]

Definition at line 46 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::seedProducer_ [private]

Definition at line 44 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().

edm::InputTag RoadSearchCloudMaker::stereoStripRecHitsInputTag_ [private]

Definition at line 47 of file RoadSearchCloudMaker.h.

Referenced by produce(), and RoadSearchCloudMaker().


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