51 theSiPixelGainCalibration_(0),
54 readyToCluster_(
false),
55 src_( conf.getParameter<
edm::InputTag>(
"src" ) ),
56 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) )
60 produces<Phase2ITPixelClusterCollectionNew>();
64 if (strcmp(payloadType.c_str(),
"HLT") == 0)
66 else if (strcmp(payloadType.c_str(),
"Offline") == 0)
68 else if (strcmp(payloadType.c_str(),
"Full") == 0)
103 auto output = std::make_unique<Phase2ITPixelClusterCollectionNew>();
125 if (
clusterMode_ ==
"Phase2ITPixelThresholdClusterizer" ) {
131 edm::LogError(
"Phase2ITPixelClusterProducer") <<
"[Phase2ITPixelClusterProducer]:" 133 <<
"Possible choices:\n" 134 <<
" Phase2ITPixelThresholdClusterizer";
147 <<
" at least one clusterizer is not ready -- can't run!" ;
152 int numberOfDetUnits = 0;
153 int numberOfClusters = 0;
157 for( ; DSViter != input.
end(); DSViter++) {
163 std::vector<short> badChannels;
164 DetId detIdObject(DSViter->detId());
184 numberOfClusters += spc.size();
188 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
const TrackerGeomDet * idToDetUnit(DetId) const
Return the pointer to the GeomDetUnit corresponding to a given DetId.
T getUntrackedParameter(std::string const &, T const &) const
virtual void produce(edm::Event &e, const edm::EventSetup &c) override
The "Event" entrypoint: gets called by framework for every event.
virtual void setESObjects(const edm::EventSetup &es)=0
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
edm::EDGetTokenT< edm::DetSetVector< PixelDigi > > tPixelDigi
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
int32_t maxTotalClusters_
Optional limit on the total number of clusters.
void swap(DetSetVector &rh)
A specific threshold-based pixel clustering algorithm.
static std::string const input
void setSiPixelGainCalibrationService(SiPixelGainCalibrationServiceBase *in)
SiPixelGainCalibrationServiceBase * theSiPixelGainCalibration_
iterator end()
Return the off-the-end iterator.
void run(const edm::DetSetVector< PixelDigi > &input, edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< Phase2ITPixelCluster > &output)
Iterate over DetUnits, and invoke the Phase2ITPixelClusterizer on each.
Phase2ITPixelClusterizerBase * clusterizer_
virtual ~Phase2ITPixelClusterProducer()
Phase2ITPixelClusterProducer(const edm::ParameterSet &conf)
Constructor: set the ParameterSet and defer all thinking to setupClusterizer().
iterator begin()
Return an iterator to the first DetSet.
virtual void clusterizeDetUnit(const edm::DetSet< PixelDigi > &input, const PixelGeomDetUnit *pixDet, const std::vector< short > &badChannels, edmNew::DetSetVector< Phase2ITPixelCluster >::FastFiller &output)=0
collection_type::const_iterator const_iterator
EDProducer to cluster PixelDigis into Phase2ITPixelClusters.