53 clusterMode_( conf.getParameter<
std::
string>(
"ClusterMode") ),
54 maxTotalClusters_( conf.getParameter<int32_t>(
"maxNumberOfClusters" ) )
62 if (payloadType ==
"HLT")
64 else if (payloadType ==
"Offline")
66 else if (payloadType ==
"Full")
83 desc.
add<
int>(
"maxNumberOfClusters", -1)->setComment(
"-1 means no limit");
84 desc.
add<
std::string>(
"payloadType",
"Offline")->setComment(
"Options: HLT - column granularity, Offline - gain:col/ped:pix");
89 descriptions.
add(
"SiPixelClusterizerDefault", desc);
119 auto output = std::make_unique< SiPixelClusterCollectionNew>();
143 clusterizer_ = std::make_unique<PixelThresholdClusterizer>(conf);
147 throw cms::Exception(
"Configuration") <<
"[SiPixelClusterProducer]:" 149 <<
"Possible choices:\n" 150 <<
" PixelThresholdClusterizer";
162 int numberOfDetUnits = 0;
163 int numberOfClusters = 0;
166 typename T::const_iterator DSViter = input.begin();
167 for( ; DSViter != input.end(); DSViter++) {
173 std::vector<short> badChannels;
174 DetId detIdObject(DSViter->detId());
195 numberOfClusters += spc.size();
199 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
static void fillPSetDescription(edm::ParameterSetDescription &desc)
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
bool getByToken(EDGetToken token, Handle< PROD > &result) const
void swap(DetSetVector &rh)
static std::string const input
const TrackerGeomDet * idToDetUnit(DetId) const override
Return the pointer to the GeomDetUnit corresponding to a given DetId.
std::unique_ptr< PixelClusterizerBase > clusterizer_
#define DEFINE_FWK_MODULE(type)
SiPixelClusterProducer(const edm::ParameterSet &conf)
Constructor: set the ParameterSet and defer all thinking to setupClusterizer().
std::unique_ptr< SiPixelGainCalibrationServiceBase > theSiPixelGainCalibration_
ParameterDescriptionBase * add(U const &iLabel, T const &value)
edm::EDPutTokenT< SiPixelClusterCollectionNew > tPutPixelClusters
const int32_t maxTotalClusters_
Optional limit on the total number of clusters.
EDProducer to cluster PixelDigis into SiPixelClusters.
static void fillPSetDescription(edm::ParameterSetDescription &desc)
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
void add(std::string const &label, ParameterSetDescription const &psetDescription)
edm::EDGetTokenT< SiPixelClusterCollectionNew > tPixelClusters
~SiPixelClusterProducer() override
void run(const T &input, const edm::ESHandle< TrackerGeometry > &geom, edmNew::DetSetVector< SiPixelCluster > &output)
Iterate over DetUnits, and invoke the PixelClusterizer on each.
static void fillDescriptions(edm::ConfigurationDescriptions &descriptions)
T const * product() const
const TrackerTopology * tTopo_
const std::string clusterMode_