54 maxChi2_(iConfig.getParameter<double>(
"maxChi2")),
95 const std::vector<uint8_t> &isGood,
110 using namespace reco;
117 fill(pblocks_, pblocks_ + NumberOfParamBlocks, pblock);
119 pblocks_[
id1] = pblock;
121 pblocks_[
id2] = pblock;
123 pblocks_[id3] = pblock;
125 pblocks_[id4] = pblock;
127 pblocks_[id5] = pblock;
129 pblocks_[id6] = pblock;
136 doTracks_(iConfig.exists(
"trajectories")),
137 doStrip_(iConfig.existsAs<
bool>(
"doStrip") ? iConfig.getParameter<
bool>(
"doStrip") :
true),
138 doPixel_(iConfig.existsAs<
bool>(
"doPixel") ? iConfig.getParameter<
bool>(
"doPixel") :
true),
142 iConfig.existsAs<
bool>(
"doStripChargeCheck") ? iConfig.getParameter<
bool>(
"doStripChargeCheck") :
false),
144 iConfig.existsAs<
bool>(
"doPixelChargeCheck") ? iConfig.getParameter<
bool>(
"doPixelChargeCheck") :
false)
147 if (iConfig.
exists(
"oldClusterRemovalInfo")) {
156 <<
"HLTTrackClusterRemoverNew: Charge check asked without cluster collection ";
159 <<
"HLTTrackClusterRemoverNew: Pixel cluster charge check not yet implemented";
169 readPSet(iConfig,
"Strip", 2, 3, 4, 5);
170 readPSet(iConfig,
"StripInner", 2, 3);
171 readPSet(iConfig,
"StripOuter", 4, 5);
178 bool usingCharge =
false;
182 <<
"HLTTrackClusterRemoverNew: Missing configuration for detector with subDetID = " << (
i + 1);
183 if (
pblocks_[
i].usesCharge_ && !usingCharge) {
185 <<
"HLTTrackClusterRemoverNew: Configuration for subDetID = " << (
i + 1)
186 <<
" uses cluster charge, which is not enabled.";
205 produces<edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > >();
206 produces<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > >();
213 for (
size_t i = 0,
n = refs.size();
i <
n; ++
i) {
214 refs[
i] = oldRefs[refs[
i]];
218 template <
typename T>
221 const std::vector<uint8_t> &isGood,
227 auto output = std::make_unique<DSV>();
231 const T *firstOffset = &oldClusters.
data().front();
232 for (
typename DSV::const_iterator itdet = oldClusters.
begin(), enddet = oldClusters.
end(); itdet != enddet; ++itdet) {
238 uint32_t
id = oldDS.detId();
241 for (
typename DS::const_iterator
it = oldDS.begin(), ed = oldDS.end();
it != ed; ++
it) {
242 uint32_t
index = ((&*
it) - firstOffset);
244 outds.push_back(*
it);
245 refs.push_back(
index);
253 if (oldRefs !=
nullptr)
261 <<
"HLTTrackClusterRemoverNew: strip cluster ref from Product ID = " << clusterReg.
id()
262 <<
" does not match with source cluster collection (ID = " <<
stripSourceProdID <<
")\n.";
273 DetId detid =
hit->geographicalId();
292 <<
"HLTTrackClusterRemoverNew: pixel cluster ref from Product ID = " << cluster.
id()
293 <<
" does not match with source cluster collection (ID = " <<
pixelSourceProdID <<
")\n.";
309 const type_info &hitType =
typeid(*hit);
345 <<
"Don't know how to handle " << hitType.name() <<
" on detid " << detid.
rawId() <<
"\n";
360 ProductID pixelOldProdID, stripOldProdID;
385 LogDebug(
"TrackClusterRemover") <<
"to merge in, " << oldStrMask->
size() <<
" strp and " << oldPxlMask->
size()
400 const std::vector<TrajectoryMeasurement> &tms = tj.
measurements();
402 std::vector<TrajectoryMeasurement>::const_iterator itm, endtm;
403 for (itm = tms.begin(), endtm = tms.end(); itm != endtm; ++itm) {
426 if (!
pblocks_[subdet - 1].cutOnStripCharge_)
433 for (
auto cAmp :
clusters[
i].amplitudes())
437 if (clusCharge <
pblocks_[subdet - 1].minGoodStripCharge_)
445 LogDebug(
"TrackClusterRemover") <<
"total strip to skip: " 451 LogDebug(
"TrackClusterRemover") <<
"total pxl to skip: " ClusterRef cluster() const
edm::EDGetTokenT< edmNew::DetSetVector< SiStripCluster > > stripClusters_
void copyMaskTo(std::vector< bool > &) const
size_type dataSize() const
T getParameter(std::string const &) const
ProductID id() const
Accessor for product ID.
T const & getData(const ESGetToken< T, R > &iToken) const noexcept(false)
static const unsigned int NumberOfParamBlocks
std::vector< bool > collectedPixels_
edm::EDGetTokenT< edmNew::DetSetVector< SiPixelCluster > > pixelClusters_
std::vector< uint8_t > pixels
bool exists(std::string const ¶meterName) const
checks if a parameter exists
OmniClusterRef const & stereoClusterRef() const
OmniClusterRef const & omniClusterRef() const
data_type const * data(size_t cell) const
Log< level::Error, false > LogError
~HLTTrackClusterRemoverNew() override
OmniClusterRef const & monoClusterRef() const
key_type key() const
Accessor for product key.
edm::EDGetTokenT< PixelMaskContainer > oldPxlMaskToken_
edm::ProductID id() const
HLTTrackClusterRemoverNew(const edm::ParameterSet &iConfig)
const_iterator end(bool update=false) const
edm::ContainerMask< edmNew::DetSetVector< SiStripCluster > > StripMaskContainer
std::unique_ptr< edmNew::DetSetVector< T > > cleanup(const edmNew::DetSetVector< T > &oldClusters, const std::vector< uint8_t > &isGood, reco::ClusterRemovalInfo::Indices &refs, const reco::ClusterRemovalInfo::Indices *oldRefs)
DataContainer const & measurements() const
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)
void process(const TrackingRecHit *hit, float chi2, const TrackerGeometry *tg)
edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > const tTrackerGeom_
ParamBlock pblocks_[NumberOfParamBlocks]
edm::EDGetTokenT< std::vector< Trajectory > > trajectories_
#define DEFINE_FWK_MODULE(type)
constexpr int subdetId() const
get the contents of the subdetector field (not cast into any detector's numbering enum) ...
std::vector< uint32_t > Indices
std::vector< bool > collectedRegStrips_
const_iterator begin(bool update=false) const
constexpr uint32_t rawId() const
get the raw id
void mergeOld(reco::ClusterRemovalInfo::Indices &refs, const reco::ClusterRemovalInfo::Indices &oldRefs)
float minGoodStripCharge_
std::vector< uint8_t > strips
edm::ProductID stripSourceProdID
const GeomDetEnumerators::SubDetector geomDetSubDetector(int subdet) const
SiStripRecHit2D originalHit() const
void produce(edm::Event &iEvent, const edm::EventSetup &iSetup) override
ParamBlock(const edm::ParameterSet &iConfig)
edm::ContainerMask< edmNew::DetSetVector< SiPixelCluster > > PixelMaskContainer
edm::ProductID pixelSourceProdID
bool isTrackerPixel(GeomDetEnumerators::SubDetector m)
float minGoodPixelCharge_
edm::EDGetTokenT< StripMaskContainer > oldStrMaskToken_