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;
135 : doTracks_(iConfig.exists(
"trajectories")),
136 doStrip_(iConfig.existsAs<
bool>(
"doStrip") ? iConfig.getParameter<
bool>(
"doStrip") :
true),
137 doPixel_(iConfig.existsAs<
bool>(
"doPixel") ? iConfig.getParameter<
bool>(
"doPixel") :
true),
141 iConfig.existsAs<
bool>(
"doStripChargeCheck") ? iConfig.getParameter<
bool>(
"doStripChargeCheck") :
false),
143 iConfig.existsAs<
bool>(
"doPixelChargeCheck") ? iConfig.getParameter<
bool>(
"doPixelChargeCheck") :
false)
146 if (iConfig.
exists(
"oldClusterRemovalInfo")) {
155 <<
"HLTTrackClusterRemoverNew: Charge check asked without cluster collection ";
158 <<
"HLTTrackClusterRemoverNew: Pixel cluster charge check not yet implemented";
168 readPSet(iConfig,
"Strip", 2, 3, 4, 5);
169 readPSet(iConfig,
"StripInner", 2, 3);
170 readPSet(iConfig,
"StripOuter", 4, 5);
177 bool usingCharge =
false;
181 <<
"HLTTrackClusterRemoverNew: Missing configuration for detector with subDetID = " << (
i + 1);
182 if (
pblocks_[
i].usesCharge_ && !usingCharge) {
184 <<
"HLTTrackClusterRemoverNew: Configuration for subDetID = " << (
i + 1)
185 <<
" uses cluster charge, which is not enabled.";
204 produces<edm::ContainerMask<edmNew::DetSetVector<SiPixelCluster> > >();
205 produces<edm::ContainerMask<edmNew::DetSetVector<SiStripCluster> > >();
212 for (
size_t i = 0,
n = refs.size();
i <
n; ++
i) {
213 refs[
i] = oldRefs[refs[
i]];
217 template <
typename T>
220 const std::vector<uint8_t> &isGood,
226 auto output = std::make_unique<DSV>();
229 unsigned int countOld = 0;
230 unsigned int countNew = 0;
233 const T *firstOffset = &oldClusters.
data().front();
234 for (
typename DSV::const_iterator itdet = oldClusters.
begin(), enddet = oldClusters.
end(); itdet != enddet; ++itdet) {
240 uint32_t
id = oldDS.detId();
243 for (
typename DS::const_iterator it = oldDS.begin(), ed = oldDS.end(); it != ed; ++it) {
244 uint32_t
index = ((&*it) - firstOffset);
247 outds.push_back(*it);
249 refs.push_back(
index);
258 if (oldRefs !=
nullptr)
266 <<
"HLTTrackClusterRemoverNew: strip cluster ref from Product ID = " << clusterReg.
id()
267 <<
" does not match with source cluster collection (ID = " <<
stripSourceProdID <<
")\n.";
278 DetId detid =
hit->geographicalId();
297 <<
"HLTTrackClusterRemoverNew: pixel cluster ref from Product ID = " << cluster.
id()
298 <<
" does not match with source cluster collection (ID = " <<
pixelSourceProdID <<
")\n.";
314 const type_info &hitType =
typeid(*hit);
350 <<
"Don't know how to handle " << hitType.name() <<
" on detid " << detid.
rawId() <<
"\n";
365 ProductID pixelOldProdID, stripOldProdID;
391 LogDebug(
"TrackClusterRemover") <<
"to merge in, " << oldStrMask->
size() <<
" strp and " << oldPxlMask->
size()
404 for (std::vector<Trajectory>::const_iterator it =
trajectories->begin(), ed =
trajectories->end(); it != ed; ++it) {
406 const std::vector<TrajectoryMeasurement> &tms = tj.
measurements();
408 std::vector<TrajectoryMeasurement>::const_iterator itm, endtm;
409 for (itm = tms.begin(), endtm = tms.end(); itm != endtm; ++itm) {
432 if (!
pblocks_[subdet - 1].cutOnStripCharge_)
439 for (
auto cAmp :
clusters[
i].amplitudes())
443 if (clusCharge <
pblocks_[subdet - 1].minGoodStripCharge_)
451 LogDebug(
"TrackClusterRemover") <<
"total strip to skip: "
457 LogDebug(
"TrackClusterRemover") <<
"total pxl to skip: "