Changeset 341014c in git for modules/Merger.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/Merger.cc
r45e58be r341014c 17 17 */ 18 18 19 20 19 /** \class Merger 21 20 * … … 33 32 #include "classes/DelphesFormula.h" 34 33 34 #include "ExRootAnalysis/ExRootClassifier.h" 35 #include "ExRootAnalysis/ExRootFilter.h" 35 36 #include "ExRootAnalysis/ExRootResult.h" 36 #include "ExRootAnalysis/ExRootFilter.h"37 #include "ExRootAnalysis/ExRootClassifier.h"38 37 38 #include "TDatabasePDG.h" 39 #include "TFormula.h" 40 #include "TLorentzVector.h" 39 41 #include "TMath.h" 42 #include "TObjArray.h" 43 #include "TRandom3.h" 40 44 #include "TString.h" 41 #include "TFormula.h"42 #include "TRandom3.h"43 #include "TObjArray.h"44 #include "TDatabasePDG.h"45 #include "TLorentzVector.h"46 45 47 #include <algorithm> 48 #include <stdexcept> 46 #include <algorithm> 49 47 #include <iostream> 50 48 #include <sstream> 49 #include <stdexcept> 51 50 52 51 using namespace std; … … 89 88 90 89 fMomentumOutputArray = ExportArray(GetString("MomentumOutputArray", "momentum")); 91 90 92 91 fEnergyOutputArray = ExportArray(GetString("EnergyOutputArray", "energy")); 93 92 } … … 97 96 void Merger::Finish() 98 97 { 99 vector< TIterator *>::iterator itInputList;98 vector<TIterator *>::iterator itInputList; 100 99 TIterator *iterator; 101 100 … … 113 112 Candidate *candidate; 114 113 TLorentzVector momentum; 115 Double_t sumPT, sumE; 116 vector< TIterator *>::iterator itInputList;114 Double_t sumPT, sumE; 115 vector<TIterator *>::iterator itInputList; 117 116 TIterator *iterator; 118 117 119 118 DelphesFactory *factory = GetFactory(); 120 119 121 120 momentum.SetPxPyPzE(0.0, 0.0, 0.0, 0.0); 122 121 sumPT = 0; … … 130 129 // loop over all candidates 131 130 iterator->Reset(); 132 while((candidate = static_cast<Candidate *>(iterator->Next())))131 while((candidate = static_cast<Candidate *>(iterator->Next()))) 133 132 { 134 133 const TLorentzVector &candidateMomentum = candidate->Momentum; … … 143 142 144 143 candidate = factory->NewCandidate(); 145 144 146 145 candidate->Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 147 146 candidate->Momentum = momentum; 148 147 149 148 fMomentumOutputArray->Add(candidate); 150 149 151 150 candidate = factory->NewCandidate(); 152 151 153 152 candidate->Position.SetXYZT(0.0, 0.0, 0.0, 0.0); 154 153 candidate->Momentum.SetPtEtaPhiE(sumPT, 0.0, 0.0, sumE); 155 154 156 155 fEnergyOutputArray->Add(candidate); 157 156 }
Note:
See TracChangeset
for help on using the changeset viewer.