Skip to content

Commit

Permalink
Merge pull request #5297 from VinInn/FixBugOnDemandOffline
Browse files Browse the repository at this point in the history
RecoLocalTracker/SubCollectionProducers -- Fix bug on demand offline
  • Loading branch information
nclopezo committed Sep 17, 2014
2 parents 5b5c877 + b2b8e8b commit fc35041
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit fc35041

Please sign in to comment.