52 theSiPixelGainCalibration_(0),
55 readyToCluster_(
false),
56 src_( conf.getParameter<edm::InputTag>(
"src" ) ),
57 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) )
61 produces<SiPixelClusterCollectionNew>();
65 if (strcmp(payloadType.c_str(),
"HLT") == 0)
67 else if (strcmp(payloadType.c_str(),
"Offline") == 0)
69 else if (strcmp(payloadType.c_str(),
"Full") == 0)
109 run(*input, geom, *output );
112 output->shrink_to_fit();
132 edm::LogError(
"SiPixelClusterProducer") <<
"[SiPixelClusterProducer]:"
134 <<
"Possible choices:\n"
135 <<
" PixelThresholdClusterizer";
148 <<
" at least one clusterizer is not ready -- can't run!" ;
153 int numberOfDetUnits = 0;
154 int numberOfClusters = 0;
158 for( ; DSViter != input.
end(); DSViter++) {
164 std::vector<short> badChannels;
165 DetId detIdObject(DSViter->detId());
172 const GeomDetUnit * geoUnit = geom->idToDetUnit( detIdObject );
185 numberOfClusters += spc.size();
189 edm::LogError(
"TooManyClusters") <<
"Limit on the number of clusters exceeded. An empty cluster collection will be produced instead.\n";
PixelClusterizerBase * clusterizer_
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
virtual void setESObjects(const edm::EventSetup &es)=0
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void swap(DetSetVector &rh)
virtual ~SiPixelClusterProducer()
static std::string const input
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
SiPixelClusterProducer(const edm::ParameterSet &conf)
Constructor: set the ParameterSet and defer all thinking to setupClusterizer().
int32_t maxTotalClusters_
Optional limit on the total number of clusters.
iterator end()
Return the off-the-end iterator.
EDProducer to cluster PixelDigis into SiPixelClusters.
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
The "Event" entrypoint: gets called by framework for every event.
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > tPixelDigi
edmNew::DetSetVector< SiPixelCluster > SiPixelClusterCollectionNew
iterator begin()
Return an iterator to the first DetSet.
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibration_
volatile std::atomic< bool > shutdown_flag false
collection_type::const_iterator const_iterator
void run(const edm::DetSetVector< PixelDigi > &input, edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< SiPixelCluster > &output)
Iterate over DetUnits, and invoke the PixelClusterizer on each.
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
A specific threshold-based pixel clustering algorithm.
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=0