#include <Alignment/LaserAlignment/interface/LaserClusterizerAlgorithm.h>
Public Member Functions | |
LaserClusterizerAlgorithm (const edm::ParameterSet &theConf) | |
constructor | |
void | run (const edm::DetSetVector< SiStripDigi > &input, const LASBeamProfileFitCollection *beamFit, edm::DetSetVector< SiStripCluster > &output, const edm::ESHandle< TrackerGeometry > &theTrackerGeometry) |
Runs the Algorithm. | |
~LaserClusterizerAlgorithm () | |
destructor | |
Private Attributes | |
LaserBeamClusterizer * | theBeamClusterizer |
std::string | theClusterMode |
double | theClusterWidth |
edm::ParameterSet | theConfiguration |
bool | theValidClusterizer |
Definition at line 25 of file LaserClusterizerAlgorithm.h.
LaserClusterizerAlgorithm::LaserClusterizerAlgorithm | ( | const edm::ParameterSet & | theConf | ) |
constructor
Definition at line 14 of file LaserClusterizerAlgorithm.cc.
References Exception, theBeamClusterizer, theClusterMode, and theValidClusterizer.
00014 : 00015 theConfiguration(theConf), 00016 theClusterMode(theConf.getParameter<std::string>("ClusterMode")), 00017 theClusterWidth(theConf.getParameter<double>("ClusterWidth")), 00018 theValidClusterizer(false) 00019 { 00020 if (theClusterMode == "LaserBeamClusterizer") 00021 { 00022 theBeamClusterizer = new LaserBeamClusterizer(); 00023 theValidClusterizer = true; 00024 } 00025 else 00026 { 00027 throw cms::Exception("LaserClusterizerAlgorithm") << "<LaserClusterizerAlgorithm::LaserClusterizerAlgorithm(const edm::Parameterset&)>: No valid clusterizer selected, possible clusterizer: LaserBeamClusterizer"; 00028 theValidClusterizer = false; 00029 } 00030 }
LaserClusterizerAlgorithm::~LaserClusterizerAlgorithm | ( | ) |
destructor
Definition at line 32 of file LaserClusterizerAlgorithm.cc.
References theBeamClusterizer.
00033 { 00034 if (theBeamClusterizer != 0) { delete theBeamClusterizer; } 00035 }
void LaserClusterizerAlgorithm::run | ( | const edm::DetSetVector< SiStripDigi > & | input, | |
const LASBeamProfileFitCollection * | beamFit, | |||
edm::DetSetVector< SiStripCluster > & | output, | |||
const edm::ESHandle< TrackerGeometry > & | theTrackerGeometry | |||
) |
Runs the Algorithm.
Definition at line 37 of file LaserClusterizerAlgorithm.cc.
References edm::DetSetVector< T >::begin(), LaserBeamClusterizer::clusterizeDetUnit(), edm::DetSet< T >::data, edm::DetSetVector< T >::end(), LASBeamProfileFitCollection::get(), edm::DetSetVector< T >::insert(), theBeamClusterizer, theClusterMode, theClusterWidth, and theValidClusterizer.
Referenced by LaserClusterizer::produce().
00039 { 00040 if (theValidClusterizer) 00041 { 00042 int nDetUnits = 0; 00043 int nLocalStripRecHits = 0; 00044 00045 // loop over all detset inside the input collection 00046 for (edm::DetSetVector<SiStripDigi>::const_iterator DSViter = input.begin(); DSViter != input.end(); DSViter++) 00047 { 00048 unsigned int theDetId = DSViter->id; 00049 ++nDetUnits; 00050 00051 // get the BeamProfileFit for this detunit 00052 const LASBeamProfileFitCollection::Range beamFitRange = beamFit->get(theDetId); 00053 LASBeamProfileFitCollection::ContainerIterator beamFitRangeIteratorBegin = beamFitRange.first; 00054 LASBeamProfileFitCollection::ContainerIterator beamFitRangeIteratorEnd = beamFitRange.second; 00055 00056 if (theClusterMode == "LaserBeamClusterizer") 00057 { 00058 edm::DetSet<SiStripCluster> theStripCluster(DSViter->id); 00059 00060 theBeamClusterizer->clusterizeDetUnit(*DSViter, theStripCluster, 00061 beamFitRangeIteratorBegin, beamFitRangeIteratorEnd, theDetId, theClusterWidth); 00062 00063 00064 if (theStripCluster.data.size() > 0) 00065 { 00066 // insert the DetSet<SiStripCluster> in the DetSetVector<SiStripCluster> only if there is at least a digi 00067 output.insert(theStripCluster); 00068 nLocalStripRecHits += theStripCluster.data.size(); 00069 } 00070 } 00071 } 00072 00073 edm::LogInfo("LaserClusterizerAlgorithm") << "execution in mode " << theClusterMode << " generating " 00074 << nLocalStripRecHits << " SiStripClusters in " << nDetUnits 00075 << " DetUnits "; 00076 } 00077 }
Definition at line 39 of file LaserClusterizerAlgorithm.h.
Referenced by LaserClusterizerAlgorithm(), run(), and ~LaserClusterizerAlgorithm().
std::string LaserClusterizerAlgorithm::theClusterMode [private] |
Definition at line 40 of file LaserClusterizerAlgorithm.h.
Referenced by LaserClusterizerAlgorithm(), and run().
double LaserClusterizerAlgorithm::theClusterWidth [private] |
Definition at line 38 of file LaserClusterizerAlgorithm.h.
Definition at line 43 of file LaserClusterizerAlgorithm.h.
Referenced by LaserClusterizerAlgorithm(), and run().