CMS 3D CMS Logo

LaserClusterizer Class Reference

Clusterizer for the Laser beams. More...

#include <Alignment/LaserAlignment/plugins/LaserClusterizer.h>

Inheritance diagram for LaserClusterizer:

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

List of all members.

Public Types

typedef std::vector
< edm::ParameterSet
Parameters

Public Member Functions

virtual void beginJob (const edm::EventSetup &theSetup)
 begin job
 LaserClusterizer (const edm::ParameterSet &theConf)
 constructor
virtual void produce (edm::Event &theEvent, const edm::EventSetup &theSetup)
 produce clusters from the laser beams
virtual ~LaserClusterizer ()
 destructor

Private Attributes

LaserClusterizerAlgorithm theLaserClusterizerAlgorithm
edm::ParameterSet theParameterSet
edm::ESHandle< TrackerGeometrytheTrackerGeometry


Detailed Description

Clusterizer for the Laser beams.

Date
2007/12/04 23:51:43
Revision
1.4
Author:
Maarten Thomas

Definition at line 22 of file LaserClusterizer.h.


Member Typedef Documentation

typedef std::vector<edm::ParameterSet> LaserClusterizer::Parameters

Definition at line 25 of file LaserClusterizer.h.


Constructor & Destructor Documentation

LaserClusterizer::LaserClusterizer ( const edm::ParameterSet theConf  )  [explicit]

constructor

Definition at line 18 of file LaserClusterizer.cc.

References edm::ParameterSet::getParameter().

00018                                                                   : 
00019   theLaserClusterizerAlgorithm(theConf), theParameterSet(theConf)
00020 {
00021   std::string alias ( theConf.getParameter<std::string>("@module_label") );
00022 
00023   produces<edm::DetSetVector<SiStripCluster> >().setBranchAlias( alias + "siStripClusters" );
00024 }

LaserClusterizer::~LaserClusterizer (  )  [virtual]

destructor

Definition at line 27 of file LaserClusterizer.cc.

00027 {}


Member Function Documentation

void LaserClusterizer::beginJob ( const edm::EventSetup theSetup  )  [virtual]

begin job

Reimplemented from edm::EDProducer.

Definition at line 29 of file LaserClusterizer.cc.

References edm::EventSetup::get(), and theTrackerGeometry.

00030 {
00031   // get the geometry of the tracker
00032   theSetup.get<TrackerDigiGeometryRecord>().get(theTrackerGeometry);
00033 }

void LaserClusterizer::produce ( edm::Event theEvent,
const edm::EventSetup theSetup 
) [virtual]

produce clusters from the laser beams

Implements edm::EDProducer.

Definition at line 35 of file LaserClusterizer.cc.

References reco_application_tbsim_simpleTBanalysis_cfg::digiProducer, python::SiStripOnlineP5_cfg::DigiProducersList, edm::Event::getByLabel(), edm::ParameterSet::getParameter(), output(), edm::Event::put(), LaserClusterizerAlgorithm::run(), theLaserClusterizerAlgorithm, theParameterSet, and theTrackerGeometry.

00036 {
00037   // create empty output collection
00038   std::auto_ptr<edm::DetSetVector<SiStripCluster> > output(new edm::DetSetVector<SiStripCluster>);
00039 
00040   // retrieve producer name of the BeamProfileFitCollection
00041   std::string beamFitProducer = theParameterSet.getParameter<std::string>("BeamFitProducer");
00042 
00043   // get the BeamProfileFitCollection
00044   edm::Handle<LASBeamProfileFitCollection> beamFits;
00045   theEvent.getByLabel(beamFitProducer, beamFits);
00046 
00047   // retrieve producer names of the digis
00048   Parameters DigiProducersList = theParameterSet.getParameter<Parameters>("DigiProducersList");
00049 
00050   // get the digis
00051   edm::Handle<edm::DetSetVector<SiStripDigi> > stripDigis;
00052   for (Parameters::iterator itDigiProducersList = DigiProducersList.begin(); itDigiProducersList != DigiProducersList.end(); ++itDigiProducersList)
00053     {
00054       std::string digiProducer = itDigiProducersList->getParameter<std::string>("DigiProducer");
00055       std::string digiLabel = itDigiProducersList->getParameter<std::string>("DigiLabel");
00056 
00057       theEvent.getByLabel(digiProducer, digiLabel, stripDigis);
00058       
00059 
00060       if ( (stripDigis->size() > 0) && (beamFits->size() > 0) )
00061         {
00062           // invoke the laser beam clusterizer algorithm
00063           theLaserClusterizerAlgorithm.run(*stripDigis,beamFits.product(),*output,theTrackerGeometry);
00064         }
00065     }
00066 
00067   // write the output to the event
00068   theEvent.put(output);
00069 }


Member Data Documentation

LaserClusterizerAlgorithm LaserClusterizer::theLaserClusterizerAlgorithm [private]

Definition at line 38 of file LaserClusterizer.h.

Referenced by produce().

edm::ParameterSet LaserClusterizer::theParameterSet [private]

Definition at line 39 of file LaserClusterizer.h.

Referenced by produce().

edm::ESHandle<TrackerGeometry> LaserClusterizer::theTrackerGeometry [private]

Definition at line 40 of file LaserClusterizer.h.

Referenced by beginJob(), and produce().


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