51 theSiPixelGainCalibration_(0),
52 clusterMode_( conf.getUntrackedParameter<std::
string>(
"ClusterMode",
"PixelThresholdClusterizer") ),
54 readyToCluster_(
false),
55 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) ),
56 payloadType_( conf.getParameter<std::
string>(
"payloadType" ) )
63 produces<SiPixelClusterCollectionNew>();
107 auto output = std::make_unique< SiPixelClusterCollectionNew>();
136 edm::LogError(
"SiPixelClusterProducer") <<
"[SiPixelClusterProducer]:"
138 <<
"Possible choices:\n"
139 <<
" PixelThresholdClusterizer";
154 <<
" at least one clusterizer is not ready -- can't run!" ;
159 int numberOfDetUnits = 0;
160 int numberOfClusters = 0;
163 typename T::const_iterator DSViter = input.begin();
164 for( ; DSViter != input.end(); DSViter++) {
170 std::vector<short> badChannels;
171 DetId detIdObject(DSViter->detId());
178 const GeomDetUnit * geoUnit = geom->idToDetUnit( detIdObject );
192 numberOfClusters += spc.size();
196 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
virtual void setESObjects(const edm::EventSetup &es)=0
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
void swap(DetSetVector &rh)
virtual ~SiPixelClusterProducer()
static std::string const input
const std::string payloadType_
SiPixelClusterProducer(const edm::ParameterSet &conf)
Constructor: set the ParameterSet and defer all thinking to setupClusterizer().
const int32_t maxTotalClusters_
Optional limit on the total number of clusters.
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.
void setupClusterizer(const edm::ParameterSet &conf)
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > tPixelDigi
edm::EDGetTokenT< SiPixelClusterCollectionNew > tPixelClusters
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibration_
volatile std::atomic< bool > shutdown_flag false
void run(const T &input, const edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< SiPixelCluster > &output)
Iterate over DetUnits, and invoke the PixelClusterizer on each.
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
const std::string clusterMode_
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