Skip to content

Commit

Permalink
apply code-format
Browse files Browse the repository at this point in the history
  • Loading branch information
brusale committed Apr 18, 2024
1 parent b0887de commit 27029e2
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions RecoEgamma/EgammaTools/src/EgammaPCAHelper.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,14 @@ void EGammaPCAHelper::setHitMap(const std::unordered_map<DetId, const unsigned i
void EGammaPCAHelper::setRecHits(edm::Handle<HGCRecHitCollection> recHitHandleEE,
edm::Handle<HGCRecHitCollection> recHitHandleFH,
edm::Handle<HGCRecHitCollection> recHitHandleBH) {

unsigned int total_size = recHitHandleEE->size() + recHitHandleFH->size() + recHitHandleBH->size();
hits_.resize(total_size);
unsigned int firstIndex = 0;

for (const auto& handle : {recHitHandleEE, recHitHandleFH, recHitHandleBH}) {
unsigned int collection_size = handle->size();
for (unsigned int i = 0; i < collection_size; ++i) {
hits_[firstIndex + i ] = &(*handle)[i];
hits_[firstIndex + i] = &(*handle)[i];
}
firstIndex += collection_size;
}
Expand Down Expand Up @@ -94,7 +93,7 @@ void EGammaPCAHelper::storeRecHits(const std::vector<std::pair<DetId, float>>& h
<< rh_detid.det() << " " << HGCalDetId(rh_detid) << std::endl;
continue;
}

if (debug_) {
const HGCRecHit* hit = hits_[itcheck->second];
std::cout << "DetId " << rh_detid.rawId() << " " << layer << " " << hit->energy() << std::endl;
Expand Down

0 comments on commit 27029e2

Please sign in to comment.