Fork me on GitHub

Changeset 1bf8604 in git for modules/DenseTrackFilter.cc


Ignore:
Timestamp:
Jun 6, 2018, 8:52:35 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, dual_readout, llp, master
Children:
95e6b7a
Parents:
90ce654
Message:

improve formatting in DenseTrackFilter.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/DenseTrackFilter.cc

    r90ce654 r1bf8604  
    244244
    245245  // saving track with highest pT that hit the tower
    246   if(fTowerTrackHits > 0)
    247   {
     246  if(fTowerTrackHits < 1) return;
    248247   
    249     numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast();
    250     if (numberOfCandidates > 1)
    251     { 
    252 
    253       track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 1));
    254       candidate = static_cast<Candidate*>(track->Clone());
    255       pt = candidate->Momentum.Pt();
    256       eta = candidate->Momentum.Eta();
    257       phi = candidate->Momentum.Phi();
    258       eta = gRandom->Gaus(eta, fEtaPhiRes);
    259       phi = gRandom->Gaus(phi, fEtaPhiRes);
    260       candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta));
    261       candidate->AddCandidate(track);
    262       fTrackOutputArray->Add(candidate);
    263       switch(TMath::Abs(candidate->PID))
    264       {
    265         case 11:
    266           fElectronOutputArray->Add(candidate);
    267           break;
    268         case 13:
    269           fMuonOutputArray->Add(candidate);
    270           break;
    271         default:
    272           fChargedHadronOutputArray->Add(candidate);
    273       }
    274 
    275     }
    276   }
    277 
    278 }
     248  numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast();
     249  if(numberOfCandidates < 1) return;
     250
     251  track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 1));
     252  candidate = static_cast<Candidate*>(track->Clone());
     253  pt = candidate->Momentum.Pt();
     254  eta = candidate->Momentum.Eta();
     255  phi = candidate->Momentum.Phi();
     256  eta = gRandom->Gaus(eta, fEtaPhiRes);
     257  phi = gRandom->Gaus(phi, fEtaPhiRes);
     258  candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta));
     259  candidate->AddCandidate(track);
     260
     261  fTrackOutputArray->Add(candidate);
     262  switch(TMath::Abs(candidate->PID))
     263  {
     264    case 11:
     265      fElectronOutputArray->Add(candidate);
     266      break;
     267    case 13:
     268      fMuonOutputArray->Add(candidate);
     269      break;
     270    default:
     271      fChargedHadronOutputArray->Add(candidate);
     272  }
     273}
Note: See TracChangeset for help on using the changeset viewer.