Fork me on GitHub

Changeset 341014c in git for modules/DenseTrackFilter.cc


Ignore:
Timestamp:
Feb 12, 2019, 9:29:17 PM (6 years ago)
Author:
Pavel Demin <pavel-demin@…>
Branches:
ImprovedOutputFile, Timing, llp, master
Children:
6455202
Parents:
45e58be
Message:

apply .clang-format to all .h, .cc and .cpp files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/DenseTrackFilter.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class DenseTrackFilter
    2120 *
     
    3231#include "classes/DelphesFormula.h"
    3332
     33#include "ExRootAnalysis/ExRootClassifier.h"
     34#include "ExRootAnalysis/ExRootFilter.h"
    3435#include "ExRootAnalysis/ExRootResult.h"
    35 #include "ExRootAnalysis/ExRootFilter.h"
    36 #include "ExRootAnalysis/ExRootClassifier.h"
    37 
     36
     37#include "TDatabasePDG.h"
     38#include "TFormula.h"
     39#include "TLorentzVector.h"
    3840#include "TMath.h"
     41#include "TObjArray.h"
     42#include "TRandom3.h"
    3943#include "TString.h"
    40 #include "TFormula.h"
    41 #include "TRandom3.h"
    42 #include "TObjArray.h"
    43 #include "TDatabasePDG.h"
    44 #include "TLorentzVector.h"
    4544
    4645#include <algorithm>
    47 #include <stdexcept>
    4846#include <iostream>
    4947#include <sstream>
     48#include <stdexcept>
    5049
    5150using namespace std;
     
    7170  Long_t i, j, k, size, sizeEtaBins, sizePhiBins;
    7271  TBinMap::iterator itEtaBin;
    73   set< Double_t >::iterator itPhiBin;
    74   vector< Double_t > *phiBins;
     72  set<Double_t>::iterator itPhiBin;
     73  vector<Double_t> *phiBins;
    7574
    7675  // read eta and phi bins
     
    8079  fEtaBins.clear();
    8180  fPhiBins.clear();
    82   for(i = 0; i < size/2; ++i)
    83   {
    84     paramEtaBins = param[i*2];
     81  for(i = 0; i < size / 2; ++i)
     82  {
     83    paramEtaBins = param[i * 2];
    8584    sizeEtaBins = paramEtaBins.GetSize();
    86     paramPhiBins = param[i*2 + 1];
     85    paramPhiBins = param[i * 2 + 1];
    8786    sizePhiBins = paramPhiBins.GetSize();
    8887
     
    101100  {
    102101    fEtaBins.push_back(itEtaBin->first);
    103     phiBins = new vector< double >(itEtaBin->second.size());
     102    phiBins = new vector<double>(itEtaBin->second.size());
    104103    fPhiBins.push_back(phiBins);
    105104    phiBins->clear();
     
    126125void DenseTrackFilter::Finish()
    127126{
    128   vector< vector< Double_t >* >::iterator itPhiBin;
     127  vector<vector<Double_t> *>::iterator itPhiBin;
    129128  if(fItTrackInputArray) delete fItTrackInputArray;
    130129  for(itPhiBin = fPhiBins.begin(); itPhiBin != fPhiBins.end(); ++itPhiBin)
     
    145144  Double_t ptmax;
    146145
    147   vector< Double_t >::iterator itEtaBin;
    148   vector< Double_t >::iterator itPhiBin;
    149   vector< Double_t > *phiBins;
    150 
    151   vector< Long64_t >::iterator itTowerHits;
     146  vector<Double_t>::iterator itEtaBin;
     147  vector<Double_t>::iterator itPhiBin;
     148  vector<Double_t> *phiBins;
     149
     150  vector<Long64_t>::iterator itTowerHits;
    152151
    153152  fTowerHits.clear();
     
    156155  fItTrackInputArray->Reset();
    157156  number = -1;
    158   while((track = static_cast<Candidate*>(fItTrackInputArray->Next())))
     157  while((track = static_cast<Candidate *>(fItTrackInputArray->Next())))
    159158  {
    160159    const TLorentzVector &trackPosition = track->Position;
     
    196195    towerHit = (*itTowerHits);
    197196    flags = (towerHit >> 24) & 0x00000000000000FFLL;
    198     number = (towerHit) & 0x0000000000FFFFFFLL;
     197    number = (towerHit)&0x0000000000FFFFFFLL;
    199198    hitEtaPhi = towerHit >> 32;
    200199
     
    216215    {
    217216      ++fTowerTrackHits;
    218       track = static_cast<Candidate*>(fTrackInputArray->At(number));
     217      track = static_cast<Candidate *>(fTrackInputArray->At(number));
    219218      momentum = track->Momentum;
    220219
     
    226225      continue;
    227226    }
    228 
    229227  }
    230228
    231229  // here fill last tower
    232230  FillTrack();
    233 
    234231}
    235232
     
    245242  // saving track with highest pT that hit the tower
    246243  if(fTowerTrackHits < 1) return;
    247    
     244
    248245  numberOfCandidates = fBestTrack->GetCandidates()->GetEntriesFast();
    249246  if(numberOfCandidates < 1) return;
    250247
    251   track = static_cast<Candidate*>(fBestTrack->GetCandidates()->At(numberOfCandidates - 1));
    252   candidate = static_cast<Candidate*>(track->Clone());
     248  track = static_cast<Candidate *>(fBestTrack->GetCandidates()->At(numberOfCandidates - 1));
     249  candidate = static_cast<Candidate *>(track->Clone());
    253250  pt = candidate->Momentum.Pt();
    254251  eta = candidate->Momentum.Eta();
     
    256253  eta = gRandom->Gaus(eta, fEtaPhiRes);
    257254  phi = gRandom->Gaus(phi, fEtaPhiRes);
    258   candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt*TMath::CosH(eta));
     255  candidate->Momentum.SetPtEtaPhiE(pt, eta, phi, pt * TMath::CosH(eta));
    259256  candidate->AddCandidate(track);
    260257
     
    262259  switch(TMath::Abs(candidate->PID))
    263260  {
    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 }
     261  case 11:
     262    fElectronOutputArray->Add(candidate);
     263    break;
     264  case 13:
     265    fMuonOutputArray->Add(candidate);
     266    break;
     267  default:
     268    fChargedHadronOutputArray->Add(candidate);
     269  }
     270}
Note: See TracChangeset for help on using the changeset viewer.