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