Changeset 5658083 in git for modules/VertexSorter.cc
- Timestamp:
- May 18, 2016, 11:39:09 AM (8 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- bc4bff0
- Parents:
- 641cb3d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/VertexSorter.cc
r641cb3d r5658083 1 1 /** \class VertexSorter 2 2 * 3 * Merges particles from pile-up sample into event 4 * 5 * 6 * $Date: 2013-02-12 15:13:59 +0100 (Tue, 12 Feb 2013) $ 7 * $Revision: 907 $ 8 * 9 * 10 * \author M. Selvaggi - UCL, Louvain-la-Neuve 11 * 12 */ 3 * 4 * Sorts vertices according to different criteria 5 * 6 * \authors A. Hart, M. Selvaggi 7 * 8 * 9 */ 13 10 14 11 #include <unordered_map> 15 12 #include "modules/VertexSorter.h" 16 17 //#include "CLHEP/Units/GlobalSystemOfUnits.h"18 //#include "CLHEP/Units/GlobalPhysicalConstants.h"19 13 20 14 #include "classes/DelphesClasses.h" … … 37 31 #include "TVector3.h" 38 32 39 static const doublemm = 1.;40 static const doublem = 1000.*mm;41 static const doublens = 1.;42 static const doubles = 1.e+9 *ns;43 static const doublec_light = 2.99792458e+8 * m/s;33 static const Double_t mm = 1.; 34 static const Double_t m = 1000.*mm; 35 static const Double_t ns = 1.; 36 static const Double_t s = 1.e+9 *ns; 37 static const Double_t c_light = 2.99792458e+8 * m/s; 44 38 45 39 //------------------------------------------------------------------------------ … … 96 90 //------------------------------------------------------------------------------ 97 91 // 98 bool VertexSorter::secondDescending (pair<unsigned, double> pair0, pair<unsigned, double> pair1)92 Bool_t VertexSorter::secondDescending (pair<UInt_t, Double_t> pair0, pair<UInt_t, Double_t> pair1) 99 93 { 100 94 return (pair0.second > pair1.second); 101 95 } 102 bool VertexSorter::secondAscending (pair<unsigned, double> pair0, pair<unsigned, double> pair1)96 Bool_t VertexSorter::secondAscending (pair<UInt_t, Double_t> pair0, pair<UInt_t, Double_t> pair1) 103 97 { 104 98 return (pair0.second < pair1.second); … … 108 102 { 109 103 Candidate *candidate, *jetCandidate, *beamSpotCandidate; 110 unordered_map< int, unsigned> clusterIDToIndex;111 unordered_map< int, double> clusterIDToSumPT2;112 vector<pair< int, double> > sortedClusterIDs;113 114 for ( int iCluster = 0; iCluster < fInputArray->GetEntries (); iCluster++)104 unordered_map<Int_t, UInt_t> clusterIDToIndex; 105 unordered_map<Int_t, Double_t> clusterIDToSumPT2; 106 vector<pair<Int_t, Double_t> > sortedClusterIDs; 107 108 for (Int_t iCluster = 0; iCluster < fInputArray->GetEntries (); iCluster++) 115 109 { 116 110 const Candidate &cluster = *((Candidate *) fInputArray->At (iCluster)); … … 135 129 continue; 136 130 TLorentzVector p (candidate->Momentum.Px (), candidate->Momentum.Py (), candidate->Momentum.Pz (), candidate->Momentum.E ()); 137 boolisInJet = false;131 Bool_t isInJet = false; 138 132 139 133 fItJetInputArray->Reset(); … … 173 167 174 168 beamSpotCandidate = (Candidate *) fBeamSpotInputArray->At (0); 175 for ( int iCluster = 0; iCluster < fInputArray->GetEntries (); iCluster++)169 for (Int_t iCluster = 0; iCluster < fInputArray->GetEntries (); iCluster++) 176 170 { 177 171 const Candidate &cluster = *((Candidate *) fInputArray->At (iCluster));
Note:
See TracChangeset
for help on using the changeset viewer.