48 maxChi2_(iConfig.getParameter<double>(
"maxChi2")),
93 if (iConfig.
exists(name)) {
96 fill(pblocks_, pblocks_ + NumberOfParamBlocks, pblock);
98 pblocks_[id1] = pblock;
100 pblocks_[id2] = pblock;
102 pblocks_[id3] = pblock;
104 pblocks_[id4] = pblock;
106 pblocks_[id5] = pblock;
108 pblocks_[id6] = pblock;
115 doStrip_(iConfig.existsAs<bool>(
"doStrip") ? iConfig.getParameter<bool>(
"doStrip") :
true),
116 doPixel_(iConfig.existsAs<bool>(
"doPixel") ? iConfig.getParameter<bool>(
"doPixel") :
true),
117 mergeOld_(iConfig.exists(
"oldClusterRemovalInfo")) {
126 readPSet(iConfig,
"Strip", 2, 3, 4, 5);
127 readPSet(iConfig,
"StripInner", 2, 3);
128 readPSet(iConfig,
"StripOuter", 4, 5);
135 bool usingCharge =
false;
139 <<
"SeedClusterRemover: Missing configuration for detector with subDetID = " << (
i + 1);
140 if (
pblocks_[
i].usesCharge_ && !usingCharge) {
141 throw cms::Exception(
"Configuration Error") <<
"SeedClusterRemover: Configuration for subDetID = " << (
i + 1)
142 <<
" uses cluster charge, which is not enabled.";
156 produces<edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > >();
157 produces<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > >();
164 <<
"SeedClusterRemover: strip cluster ref from Product ID = " << cluster.
id()
165 <<
" does not match with source cluster collection (ID = " <<
stripSourceProdID <<
")\n.";
183 if (chi2 >
pblocks_[subdet - 1].maxChi2_)
196 <<
"SeedClusterRemover: pixel cluster ref from Product ID = " << cluster.
id()
197 <<
" does not match with source cluster collection (ID = " <<
pixelSourceProdID <<
")\n.";
215 const type_info &hitType =
typeid(*hit);
234 <<
"Don't know how to handle " << hitType.name() <<
" on detid " << detid.
rawId() <<
"\n";
256 strips.resize(stripClusters->dataSize());
260 pixels.resize(pixelClusters->dataSize());
268 LogDebug(
"SeedClusterRemover") <<
"to merge in, " << oldStrMask->size() <<
" strp and " << oldPxlMask->size()
282 for (
auto const &
seed : (*seeds)) {
283 for (
auto const &
hit :
seed.recHits()) {
293 LogDebug(
"SeedClusterRemover") <<
"total strip to skip: "
298 LogDebug(
"SeedClusterRemover") <<
"total pxl to skip: "
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
OrphanHandle< PROD > put(std::unique_ptr< PROD > product)
Put a new product.
static const unsigned int NumberOfParamBlocks
bool getByToken(EDGetToken token, Handle< PROD > &result) const
#define DEFINE_FWK_MODULE(type)
OmniClusterRef const & stereoClusterRef() const
SeedClusterRemover(const edm::ParameterSet &iConfig)
constexpr uint32_t rawId() const
get the raw id
bool exists(std::string const ¶meterName) const
checks if a parameter exists
key_type key() const
Accessor for product key.
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
ProductID id() const
Accessor for product ID.
bool getData(T &iHolder) const
std::vector< bool > collectedStrips_
edm::ProductID pixelSourceProdID
void readPSet(const edm::ParameterSet &iConfig, const std::string &name, int id1=-1, int id2=-1, int id3=-1, int id4=-1, int id5=-1, int id6=-1)
ClusterStripRef cluster_strip() const
ParamBlock pblocks_[NumberOfParamBlocks]
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClusters_
edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > StripMaskContainer
edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > PixelMaskContainer
OmniClusterRef const & monoClusterRef() const
edm::EDGetTokenT< TrajectorySeedCollection > trajectories_
edm::ProductID stripSourceProdID
SiStripRecHit2D originalHit() const
OmniClusterRef const & omniClusterRef() const
void fill(std::map< std::string, TH1 * > &h, const std::string &s, double x)
ParamBlock(const edm::ParameterSet &iConfig)
ClusterRef cluster() const
T getParameter(std::string const &) const
void process(const TrackingRecHit *hit, float chi2, const TrackerGeometry *tg)
std::vector< uint8_t > strips
edm::EDGetTokenT< StripMaskContainer > oldStrMaskToken_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClusters_
edm::EDGetTokenT< PixelMaskContainer > oldPxlMaskToken_
std::vector< bool > collectedPixels_
std::vector< uint8_t > pixels
DetId geographicalId() const
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const tTrackerGeom_