Changeset 341014c in git for modules/Weighter.cc
- Timestamp:
- Feb 12, 2019, 9:29:17 PM (6 years ago)
- Branches:
- ImprovedOutputFile, Timing, llp, master
- Children:
- 6455202
- Parents:
- 45e58be
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Weighter.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class Weighter 21 20 * … … 32 31 #include "classes/DelphesFormula.h" 33 32 33 #include "ExRootAnalysis/ExRootClassifier.h" 34 #include "ExRootAnalysis/ExRootFilter.h" 34 35 #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" 38 40 #include "TMath.h" 41 #include "TObjArray.h" 42 #include "TRandom3.h" 39 43 #include "TString.h" 40 #include "TFormula.h"41 #include "TRandom3.h"42 #include "TObjArray.h"43 #include "TDatabasePDG.h"44 #include "TLorentzVector.h"45 44 46 45 #include <algorithm> 47 #include <stdexcept>48 46 #include <iostream> 49 47 #include <sstream> 48 #include <stdexcept> 50 49 51 50 using namespace std; … … 53 52 //------------------------------------------------------------------------------ 54 53 55 bool Weighter::TIndexStruct::operator< 54 bool Weighter::TIndexStruct::operator<(const Weighter::TIndexStruct &value) const 56 55 { 57 56 Int_t i; … … 90 89 fWeightSet.clear(); 91 90 92 93 91 // set default weight value 94 92 fWeightMap.clear(); 95 memset(index.codes, 0, 4 *sizeof(Int_t));93 memset(index.codes, 0, 4 * sizeof(Int_t)); 96 94 fWeightMap[index] = 1.0; 97 95 … … 99 97 param = GetParam("Weight"); 100 98 size = param.GetSize(); 101 for(i = 0; i < size /2; ++i)99 for(i = 0; i < size / 2; ++i) 102 100 { 103 paramCodes = param[i *2];101 paramCodes = param[i * 2]; 104 102 sizeCodes = paramCodes.GetSize(); 105 weight = param[i *2 + 1].GetDouble();103 weight = param[i * 2 + 1].GetDouble(); 106 104 107 105 if(sizeCodes < 1 || sizeCodes > 4) … … 110 108 } 111 109 112 memset(index.codes, 0, 4 *sizeof(Int_t));110 memset(index.codes, 0, 4 * sizeof(Int_t)); 113 111 114 112 for(j = 0; j < sizeCodes; ++j) … … 157 155 fCodeSet.clear(); 158 156 fItInputArray->Reset(); 159 while((candidate = static_cast<Candidate *>(fItInputArray->Next())))157 while((candidate = static_cast<Candidate *>(fItInputArray->Next()))) 160 158 { 161 159 if(candidate->Status != 3) continue; … … 167 165 168 166 // find default weight value 169 memset(index.codes, 0, 4 *sizeof(Int_t));167 memset(index.codes, 0, 4 * sizeof(Int_t)); 170 168 itWeightMap = fWeightMap.find(index); 171 169 weight = itWeightMap->second;
Note:
See TracChangeset
for help on using the changeset viewer.