54 theSiPixelGainCalibration_(0),
57 readyToCluster_(
false),
58 src_( conf.getParameter<edm::InputTag>(
"src" ) ),
59 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) )
63 produces<SiPixelClusterCollectionNew>();
67 if (strcmp(payloadType.c_str(),
"HLT") == 0)
69 else if (strcmp(payloadType.c_str(),
"Offline") == 0)
71 else if (strcmp(payloadType.c_str(),
"Full") == 0)
89 edm::LogInfo(
"SiPixelClusterizer") <<
"[SiPixelClusterizer::beginJob]";
117 run(*input, geom, *output );
138 edm::LogError(
"SiPixelClusterProducer") <<
"[SiPixelClusterProducer]:"
140 <<
"Possible choices:\n"
141 <<
" PixelThresholdClusterizer";
154 <<
" at least one clusterizer is not ready -- can't run!" ;
159 int numberOfDetUnits = 0;
160 int numberOfClusters = 0;
164 for( ; DSViter != input.
end(); DSViter++) {
170 std::vector<short> badChannels;
171 DetId detIdObject(DSViter->detId());
178 const GeomDetUnit * geoUnit = geom->idToDetUnit( detIdObject );
191 numberOfClusters += spc.size();
195 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
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void swap(DetSetVector &rh)
static std::string const input
OrphanHandle< PROD > put(std::auto_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > tPixelDigi
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.
volatile std::atomic< bool > shutdown_flag false
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