Skip to content

Commit

Permalink
pick the right function
Browse files Browse the repository at this point in the history
  • Loading branch information
kpedro88 committed Jun 18, 2018
1 parent ef67ab0 commit e975a69
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ void RealisticSimClusterMapper::buildClusters(const edm::Handle<reco::PFRecHitCo
const SimClusterCollection& simClusters = *simClusterH_;
auto const& hits = *input;
RealisticHitToClusterAssociator realisticAssociator;
const int numberOfLayers = rhtools_.getLayer(ForwardSubdetector::ForwardEmpty);
int geometryType = 0;
DetId testid(hits.size()>0 ? hits[0].detId() : 0);
if(DetId(hits[0].detId()).det()==DetId::HGCalEE or
DetId(hits[0].detId()).det()==DetId::HGCalHSi or
DetId(hits[0].detId()).det()==DetId::HGCalHSc)
{ geometryType = 1; }
const int numberOfLayers = geometryType==0 ? rhtools_.getLayer(ForwardSubdetector::ForwardEmpty) : rhtools_.getLayer(DetId::Forward);
realisticAssociator.init(hits.size(), simClusters.size(), numberOfLayers + 1);
// for quick indexing back to hit energy
std::unordered_map < uint32_t, size_t > detIdToIndex(hits.size());
Expand Down

0 comments on commit e975a69

Please sign in to comment.