Changeset 8336b6e in git
- Timestamp:
- Nov 4, 2013, 11:59:27 AM (11 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- e9065e7
- Parents:
- 498cda4
- Location:
- modules
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/FastJetFinder.cc
r498cda4 r8336b6e 30 30 #include "TLorentzVector.h" 31 31 32 #include <algorithm> 32 #include <algorithm> 33 33 #include <stdexcept> 34 34 #include <iostream> … … 70 70 { 71 71 JetDefinition::Plugin *plugin = NULL; 72 73 // read eta ranges 74 75 ExRootConfParam param = GetParam("RhoEtaRange"); 76 Long_t i, size; 77 78 fEtaRangeMap.clear(); 79 size = param.GetSize(); 80 for(i = 0; i < size/2; ++i) 81 { 82 fEtaRangeMap[param[i*2].GetDouble()] = param[i*2 + 1].GetDouble(); 83 } 72 84 73 85 // define algorithm … … 90 102 fAreaAlgorithm = GetInt("AreaAlgorithm", 0); 91 103 fComputeRho = GetBool("ComputeRho", false); 92 fRhoEtaMax = GetDouble("RhoEtaMax", 5.0);93 104 // - ghost based areas - 94 105 fGhostEtaMax = GetDouble("GhostEtaMax", 5.0); … … 126 137 switch(fJetAlgorithm) 127 138 { 128 case 1: 139 case 1: 129 140 plugin = new fastjet::CDFJetCluPlugin(fSeedThreshold, fConeRadius, fAdjacencyCut, fMaxIterations, fIratch, fOverlapThreshold); 130 141 fDefinition = new fastjet::JetDefinition(plugin); … … 149 160 break; 150 161 } 151 162 152 163 fPlugin = plugin; 153 164 154 165 ClusterSequence::print_banner(); 155 166 156 167 // import input array 157 168 … … 187 198 vector<PseudoJet> inputList, outputList; 188 199 ClusterSequence *sequence; 200 map< Double_t, Double_t >::iterator itEtaRangeMap; 189 201 190 202 DelphesFactory *factory = GetFactory(); … … 196 208 number = 0; 197 209 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 198 { 210 { 199 211 momentum = candidate->Momentum; 200 212 jet = PseudoJet(momentum.Px(), momentum.Py(), momentum.Pz(), momentum.E()); … … 203 215 ++number; 204 216 } 205 206 // construct jets 217 218 // construct jets 207 219 if(fAreaDefinition) 208 220 { … … 212 224 { 213 225 sequence = new ClusterSequence(inputList, *fDefinition); 214 } 226 } 215 227 216 228 // compute rho and store it 217 229 if(fComputeRho && fAreaDefinition) 218 230 { 219 Selector select_rapidity = SelectorAbsRapMax(fRhoEtaMax); 220 JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition); 221 estimator.set_particles(inputList); 222 rho = estimator.rho(); 223 224 candidate = factory->NewCandidate(); 225 candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho); 226 fRhoOutputArray->Add(candidate); 227 } 228 231 for(itEtaRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap) 232 { 233 Selector select_rapidity = SelectorAbsRapRange(itEtaRangeMap->first, itEtaRangeMap->second); 234 JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition); 235 estimator.set_particles(inputList); 236 rho = estimator.rho(); 237 238 candidate = factory->NewCandidate(); 239 candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho); 240 candidate->Edges[0] = itEtaRangeMap->first; 241 candidate->Edges[1] = itEtaRangeMap->second; 242 fRhoOutputArray->Add(candidate); 243 } 244 } 245 229 246 outputList.clear(); 230 247 outputList = sorted_by_pt(sequence->inclusive_jets(fJetPTMin)); -
modules/FastJetFinder.h
r498cda4 r8336b6e 16 16 #include "classes/DelphesModule.h" 17 17 18 #include < vector>18 #include <map> 19 19 20 20 class TObjArray; … … 37 37 void Process(); 38 38 void Finish(); 39 39 40 40 private: 41 41 42 42 void *fPlugin; //! 43 43 fastjet::JetDefinition *fDefinition; //! 44 44 45 45 Int_t fJetAlgorithm; 46 46 Double_t fParameterR; … … 54 54 Double_t fAdjacencyCut; 55 55 Double_t fOverlapThreshold; 56 56 57 57 // --- FastJet Area method -------- 58 58 59 59 fastjet::AreaDefinition *fAreaDefinition; 60 Int_t fAreaAlgorithm; 61 Bool_t fComputeRho; 62 Double_t fRhoEtaMax; 63 60 Int_t fAreaAlgorithm; 61 Bool_t fComputeRho; 62 64 63 // -- ghost based areas -- 65 64 Double_t fGhostEtaMax; … … 68 67 Double_t fGridScatter; 69 68 Double_t fPtScatter; 70 Double_t fMeanGhostPt; 71 69 Double_t fMeanGhostPt; 70 72 71 // -- voronoi areas -- 73 72 Double_t fEffectiveRfact; 74 75 73 74 std::map< Double_t, Double_t > fEtaRangeMap; //! 75 76 76 TIterator *fItInputArray; //! 77 77 -
modules/JetPileUpSubtractor.cc
r498cda4 r8336b6e 39 39 40 40 JetPileUpSubtractor::JetPileUpSubtractor() : 41 fItJetInputArray(0) 41 fItJetInputArray(0), fItRhoInputArray(0) 42 42 { 43 43 … … 63 63 64 64 fRhoInputArray = ImportArray(GetString("RhoInputArray", "Rho/rho")); 65 fItRhoInputArray = fRhoInputArray->MakeIterator(); 65 66 66 67 // create output array(s) … … 74 75 void JetPileUpSubtractor::Finish() 75 76 { 77 if(fItRhoInputArray) delete fItRhoInputArray; 76 78 if(fItJetInputArray) delete fItJetInputArray; 77 79 } … … 83 85 Candidate *candidate; 84 86 TLorentzVector momentum, area; 87 Double_t eta = 0.0; 85 88 Double_t rho = 0.0; 86 89 87 if(fRhoInputArray && fRhoInputArray->GetEntriesFast() > 0) 88 { 89 candidate = static_cast<Candidate*>(fRhoInputArray->At(0)); 90 rho = candidate->Momentum.Pt(); 91 } 90 if(!fRhoInputArray) return; 92 91 93 92 // loop over all input candidates … … 97 96 momentum = candidate->Momentum; 98 97 area = candidate->Area; 98 eta = TMath::Abs(momentum.Eta()); 99 100 // find rho 101 rho = 0.0; 102 while((candidate = static_cast<Candidate*>(fItRhoInputArray->Next()))) 103 { 104 if(eta >= candidate->Edges[0] && eta < candidate->Edges[1]) 105 { 106 rho = candidate->Momentum.Pt(); 107 } 108 } 99 109 100 110 // apply pile-up correction -
modules/JetPileUpSubtractor.h
r498cda4 r8336b6e 36 36 37 37 TIterator *fItJetInputArray; //! 38 TIterator *fItRhoInputArray; //! 38 39 39 40 const TObjArray *fJetInputArray; //!
Note:
See TracChangeset
for help on using the changeset viewer.