Fork me on GitHub

Changeset 341014c in git for modules/Weighter.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/Weighter.cc

    r45e58be r341014c  
    1717 */
    1818
    19 
    2019/** \class Weighter
    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"
    3736
     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;
     
    5352//------------------------------------------------------------------------------
    5453
    55 bool Weighter::TIndexStruct::operator< (const Weighter::TIndexStruct &value) const
     54bool Weighter::TIndexStruct::operator<(const Weighter::TIndexStruct &value) const
    5655{
    5756  Int_t i;
     
    9089  fWeightSet.clear();
    9190
    92 
    9391  // set default weight value
    9492  fWeightMap.clear();
    95   memset(index.codes, 0, 4*sizeof(Int_t));
     93  memset(index.codes, 0, 4 * sizeof(Int_t));
    9694  fWeightMap[index] = 1.0;
    9795
     
    9997  param = GetParam("Weight");
    10098  size = param.GetSize();
    101   for(i = 0; i < size/2; ++i)
     99  for(i = 0; i < size / 2; ++i)
    102100  {
    103     paramCodes = param[i*2];
     101    paramCodes = param[i * 2];
    104102    sizeCodes = paramCodes.GetSize();
    105     weight = param[i*2 + 1].GetDouble();
     103    weight = param[i * 2 + 1].GetDouble();
    106104
    107105    if(sizeCodes < 1 || sizeCodes > 4)
     
    110108    }
    111109
    112     memset(index.codes, 0, 4*sizeof(Int_t));
     110    memset(index.codes, 0, 4 * sizeof(Int_t));
    113111
    114112    for(j = 0; j < sizeCodes; ++j)
     
    157155  fCodeSet.clear();
    158156  fItInputArray->Reset();
    159   while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     157  while((candidate = static_cast<Candidate *>(fItInputArray->Next())))
    160158  {
    161159    if(candidate->Status != 3) continue;
     
    167165
    168166  // find default weight value
    169   memset(index.codes, 0, 4*sizeof(Int_t));
     167  memset(index.codes, 0, 4 * sizeof(Int_t));
    170168  itWeightMap = fWeightMap.find(index);
    171169  weight = itWeightMap->second;
Note: See TracChangeset for help on using the changeset viewer.