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>();
111 auto output = std::make_unique< SiPixelClusterCollectionNew>();
140 edm::LogError(
"SiPixelClusterProducer") <<
"[SiPixelClusterProducer]:" 142 <<
"Possible choices:\n" 143 <<
" PixelThresholdClusterizer";
158 <<
" at least one clusterizer is not ready -- can't run!" ;
163 int numberOfDetUnits = 0;
164 int numberOfClusters = 0;
167 typename T::const_iterator DSViter = input.begin();
168 for( ; DSViter != input.end(); DSViter++) {
174 std::vector<short> badChannels;
175 DetId detIdObject(DSViter->detId());
196 numberOfClusters += spc.size();
200 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
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
virtual void setESObjects(const edm::EventSetup &es)=0
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const TrackerTopology *tTopo, const std::vector< short > &badChannels, edmNew::DetSetVector< SiPixelCluster >::FastFiller &output)=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
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_
void run(const T &input, const edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< SiPixelCluster > &output)
Iterate over DetUnits, and invoke the PixelClusterizer on each.
T const * product() const
const TrackerTopology * tTopo_
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
const std::string clusterMode_
A specific threshold-based pixel clustering algorithm.