Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug on demand offline #5297

Merged
merged 4 commits into from
Sep 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -386,9 +386,11 @@ SeedClusterRemover::produce(Event& iEvent, const EventSetup& iSetup)
LogDebug("SeedClusterRemover")<<"to merge in, "<<oldStrMask->size()<<" strp and "<<oldPxlMask->size()<<" pxl";
oldStrMask->copyMaskTo(collectedStrips_);
oldPxlMask->copyMaskTo(collectedPixels_);
assert(stripClusters->dataSize()>=collectedStrips_.size());
collectedStrips_.resize(stripClusters->dataSize(),false); // for ondemand
}else {
collectedStrips_.resize(stripClusters->dataSize()); fill(collectedStrips_.begin(), collectedStrips_.end(), false);
collectedPixels_.resize(pixelClusters->dataSize()); fill(collectedPixels_.begin(), collectedPixels_.end(), false);
collectedStrips_.resize(stripClusters->dataSize(), false);
collectedPixels_.resize(pixelClusters->dataSize(), false);
}


Expand Down Expand Up @@ -447,7 +449,8 @@ SeedClusterRemover::produce(Event& iEvent, const EventSetup& iSetup)
iEvent.put( removedPixelClusterMask );

}

collectedStrips_.clear();
collectedPixels_.clear();

}

Expand Down
18 changes: 12 additions & 6 deletions RecoLocalTracker/SubCollectionProducers/src/TrackClusterRemover.cc
Expand Up @@ -292,11 +292,14 @@ void TrackClusterRemover::process(OmniClusterRef const & ocluster, SiStripDetId
}
if (pblocks_[subdet-1].cutOnStripCharge_ && (clusCharge > (pblocks_[subdet-1].minGoodStripCharge_*sensorThickness(detid)))) return;
}
strips[cluster.key()] = false;
//if (!clusterWasteSolution_) collectedStrip[hit->geographicalId()].insert(cluster);

if (collectedStrips_.size()<=cluster.key())
edm::LogError("BadCollectionSize")<<collectedStrips_.size()<<" is smaller than "<<cluster.key();

assert(collectedStrips_.size() > cluster.key());
//assert(hit->geographicalId() == cluster->geographicalId()); //This condition fails
strips[cluster.key()] = false;
if (!clusterWasteSolution_) collectedStrips_[cluster.key()]=true;

}


Expand Down Expand Up @@ -435,9 +438,11 @@ TrackClusterRemover::produce(Event& iEvent, const EventSetup& iSetup)
LogDebug("TrackClusterRemover")<<"to merge in, "<<oldStrMask->size()<<" strp and "<<oldPxlMask->size()<<" pxl";
oldStrMask->copyMaskTo(collectedStrips_);
oldPxlMask->copyMaskTo(collectedPixels_);
assert(stripClusters->dataSize()>=collectedStrips_.size());
collectedStrips_.resize(stripClusters->dataSize(), false);
}else {
collectedStrips_.resize(stripClusters->dataSize()); fill(collectedStrips_.begin(), collectedStrips_.end(), false);
collectedPixels_.resize(pixelClusters->dataSize()); fill(collectedPixels_.begin(), collectedPixels_.end(), false);
collectedStrips_.resize(stripClusters->dataSize(), false);
collectedPixels_.resize(pixelClusters->dataSize(), false);
}

if (doTracks_) {
Expand Down Expand Up @@ -545,7 +550,8 @@ TrackClusterRemover::produce(Event& iEvent, const EventSetup& iSetup)
iEvent.put( removedPixelClusterMask );

}

collectedStrips_.clear();
collectedPixels_.clear();

}

Expand Down