54 theSiPixelGainCalibration_(0),
57 readyToCluster_(
false),
58 src_( conf.getParameter<edm::InputTag>(
"src" ) ),
59 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) )
62 produces<SiPixelClusterCollectionNew>();
66 if (strcmp(payloadType.c_str(),
"HLT") == 0)
68 else if (strcmp(payloadType.c_str(),
"Offline") == 0)
70 else if (strcmp(payloadType.c_str(),
"Full") == 0)
88 edm::LogInfo(
"SiPixelClusterizer") <<
"[SiPixelClusterizer::beginJob]";
116 run(*input, geom, *output );
137 edm::LogError(
"SiPixelClusterProducer") <<
"[SiPixelClusterProducer]:"
139 <<
"Possible choices:\n"
140 <<
" PixelThresholdClusterizer";
153 <<
" at least one clusterizer is not ready -- can't run!" ;
158 int numberOfDetUnits = 0;
159 int numberOfClusters = 0;
163 for( ; DSViter != input.
end(); DSViter++) {
169 std::vector<short> badChannels;
170 DetId detIdObject(DSViter->detId());
177 const GeomDetUnit * geoUnit = geom->idToDetUnit( detIdObject );
190 numberOfClusters += spc.size();
194 edm::LogError(
"TooManyClusters") <<
"Limit on the number of clusters exceeded. An empty cluster collection will be produced instead.\n";
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual ~SiPixelClusterProducer()
PixelClusterizerBase * clusterizer_
virtual void setESObjects(const edm::EventSetup &es)=0
void swap(DetSetVector &rh)
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
bool getByLabel(InputTag const &tag, Handle< PROD > &result) const
iterator end()
Return the off-the-end iterator.
SiPixelClusterProducer(const edm::ParameterSet &conf)
Constructor: set the ParameterSet and defer all thinking to setupClusterizer().
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
void run(const edm::DetSetVector< PixelDigi > &input, edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< SiPixelCluster > &output)
Iterate over DetUnits, and invoke the PixelClusterizer on each.
iterator begin()
Return an iterator to the first DetSet.
collection_type::const_iterator const_iterator
virtual void produce(edm::Event &e, const edm::EventSetup &c)
The "Event" entrypoint: gets called by framework for every event.
int32_t maxTotalClusters_
Optional limit on the total number of clusters.
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibration_
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
An explicit threshold-based clustering algorithm.
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=0