Skip to content

Commit

Permalink
clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed Aug 29, 2019
1 parent 0ec9b05 commit 1812da2
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 22 deletions.
6 changes: 2 additions & 4 deletions SimTracker/SiPixelDigitizer/plugins/PreMixingSiPixelWorker.cc
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ PreMixingSiPixelWorker::PreMixingSiPixelWorker(const edm::ParameterSet& ps,
PixelDigiPToken_ = iC.consumes<edm::DetSetVector<PixelDigi>>(pixeldigi_collectionPile_);

producer.produces<edm::DetSetVector<PixelDigi>>(PixelDigiCollectionDM_);
producer.produces<PixelFEDChannelCollection>();
producer.produces<PixelFEDChannelCollection>(PixelDigiCollectionDM_);

// clear local storage for this event
SiHitStorage_.clear();
Expand Down Expand Up @@ -286,11 +286,9 @@ void PreMixingSiPixelWorker::put(edm::Event& e,
if (PixelFEDChannelCollection_ == nullptr) {
throw cms::Exception("NullPointerError") << "PixelFEDChannelCollection not set in chooseScenario function.\n";
}
e.put(std::move(PixelFEDChannelCollection_));
e.put(std::move(PixelFEDChannelCollection_), PixelDigiCollectionDM_);
}

std::cout << "5: " << (digitizer_.GetPixelFEDChannelCollection_ptr() != nullptr) << std::endl;

for (const auto& iu : pDD->detUnits()) {
if (iu->type().isTrackerPixel()) {
edm::DetSet<PixelDigi> collector(iu->geographicalId().rawId());
Expand Down
9 changes: 0 additions & 9 deletions SimTracker/SiPixelDigitizer/plugins/SiPixelDigitizer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -268,9 +268,6 @@ namespace cms {
if (_pixeldigialgo->killBadFEDChannels()) {
std::unique_ptr<PixelFEDChannelCollection> PixelFEDChannelCollection_ =
_pixeldigialgo->chooseScenario(PileupInfo_.get(), randomEngine_);

std::cout << __FILE__ << " " << __LINE__ << ": PixelFEDChannelCollection_: " << PixelFEDChannelCollection_.get() << std::endl;

if (PixelFEDChannelCollection_ == nullptr) {
throw cms::Exception("NullPointerError") << "PixelFEDChannelCollection not set in chooseScenario function.\n";
}
Expand All @@ -284,14 +281,8 @@ namespace cms {
edm::DetSet<PixelDigi> collector(iu->geographicalId().rawId());
edm::DetSet<PixelDigiSimLink> linkcollector(iu->geographicalId().rawId());

std::cout << "3: " << (_pixeldigialgo->GetPixelFEDChannelCollection_ptr() != nullptr) << std::endl;

_pixeldigialgo->digitize(
dynamic_cast<const PixelGeomDetUnit*>(iu), collector.data, linkcollector.data, tTopo, randomEngine_);

std::cout << "4: " << (_pixeldigialgo->GetPixelFEDChannelCollection_ptr() != nullptr) << std::endl;


if (!collector.data.empty()) {
theDigiVector.push_back(std::move(collector));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1779,9 +1779,6 @@ void SiPixelDigitizerAlgorithm::pixel_inefficiency(const PixelEfficiencies& eff,
auto pIndexConverter = PixelIndices(numColumns, numRows);

std::vector<int> badRocsFromFEDChannels(16, 0);

std::cout<< __FILE__ << " " << __LINE__ <<": " << eff.PixelFEDChannelCollection_.get() << std::endl;

if (eff.PixelFEDChannelCollection_ != nullptr) {
PixelFEDChannelCollection::const_iterator it = eff.PixelFEDChannelCollection_->find(detID);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ class SiPixelDigitizerAlgorithm {
void init_DynIneffDB(const edm::EventSetup&, const unsigned int&);
std::unique_ptr<PixelFEDChannelCollection> chooseScenario(PileupMixingContent* puInfo, CLHEP::HepRandomEngine*);


// for premixing
void calculateInstlumiFactor(const std::vector<PileupSummaryInfo>& ps,
int bunchSpacing); // TODO: try to remove the duplication of logic...
Expand All @@ -90,11 +89,6 @@ class SiPixelDigitizerAlgorithm {
typedef std::unordered_map<std::string, PixelFEDChannelCollection> PixelFEDChannelCollectionMap;
const PixelFEDChannelCollectionMap* quality_map;

PixelFEDChannelCollection* GetPixelFEDChannelCollection_ptr(){
return pixelEfficiencies_.PixelFEDChannelCollection_.get();
}


private:
//Accessing Lorentz angle from DB:
edm::ESHandle<SiPixelLorentzAngle> SiPixelLorentzAngle_;
Expand Down

0 comments on commit 1812da2

Please sign in to comment.