Changeset 341014c in git for modules/ConstituentFilter.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/ConstituentFilter.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class ConstituentFilter 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; … … 88 87 param = GetParam("ConstituentInputArray"); 89 88 size = param.GetSize(); 90 for(i = 0; i < size /2; ++i)89 for(i = 0; i < size / 2; ++i) 91 90 { 92 array = ImportArray(param[i *2].GetString());91 array = ImportArray(param[i * 2].GetString()); 93 92 iterator = array->MakeIterator(); 94 93 95 fInputMap[iterator] = ExportArray(param[i *2 + 1].GetString());94 fInputMap[iterator] = ExportArray(param[i * 2 + 1].GetString()); 96 95 } 97 96 } … … 101 100 void ConstituentFilter::Finish() 102 101 { 103 map< TIterator *, TObjArray *>::iterator itInputMap;104 vector< TIterator *>::iterator itInputList;102 map<TIterator *, TObjArray *>::iterator itInputMap; 103 vector<TIterator *>::iterator itInputList; 105 104 TIterator *iterator; 106 105 … … 123 122 { 124 123 Candidate *jet, *constituent; 125 map< TIterator *, TObjArray *>::iterator itInputMap;126 vector< TIterator *>::iterator itInputList;124 map<TIterator *, TObjArray *>::iterator itInputMap; 125 vector<TIterator *>::iterator itInputList; 127 126 TIterator *iterator; 128 127 TObjArray *array; … … 135 134 // loop over all jets 136 135 iterator->Reset(); 137 while((jet = static_cast<Candidate *>(iterator->Next())))136 while((jet = static_cast<Candidate *>(iterator->Next()))) 138 137 { 139 138 TIter itConstituents(jet->GetCandidates()); … … 142 141 143 142 // loop over all constituents 144 while((constituent = static_cast<Candidate *>(itConstituents.Next())))143 while((constituent = static_cast<Candidate *>(itConstituents.Next()))) 145 144 { 146 145 // set the IsConstituent flag … … 158 157 // loop over all constituents 159 158 iterator->Reset(); 160 while((constituent = static_cast<Candidate *>(iterator->Next())))159 while((constituent = static_cast<Candidate *>(iterator->Next()))) 161 160 { 162 161 // check the IsConstituent flag
Note:
See TracChangeset
for help on using the changeset viewer.