Skip to content

Commit

Permalink
findThetaCluster does not modify arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Riley authored and Dan Riley committed Feb 2, 2023
1 parent 569e19c commit 324d91d
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -956,15 +956,14 @@ void MuonShowerInformationFiller::fillHitsByStation(const reco::Muon& muon) {
//for theta
if (!muonCorrelatedHits.at(stat).empty()) {
float dthetamax = 0;
auto muonCorrelatedHitsTmp{muonCorrelatedHits.at(stat)}; // findThetaCluster() sorts its argument
for (TransientTrackingRecHit::ConstRecHitContainer::const_iterator iseed = muonCorrelatedHits.at(stat).begin();
iseed != muonCorrelatedHits.at(stat).end();
++iseed) {
if (!(*iseed)->isValid())
continue;
GlobalPoint refpoint = (*iseed)->globalPosition(); //starting from the one with smallest value of phi
muonRecHitsThetaTemp.clear();
muonRecHitsThetaTemp = findThetaCluster(muonCorrelatedHitsTmp, refpoint);
muonRecHitsThetaTemp = findThetaCluster(muonCorrelatedHits.at(stat), refpoint);
if (muonRecHitsThetaTemp.size() > 1) {
float dtheta = fabs((float)muonRecHitsThetaTemp.back()->globalPosition().theta() -
(float)muonRecHitsThetaTemp.front()->globalPosition().theta());
Expand Down

0 comments on commit 324d91d

Please sign in to comment.