Changeset 7278220 in git for modules/FastJetFinder.cc
- Timestamp:
- Dec 21, 2014, 9:37:54 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- b78adf8
- Parents:
- d4b9697
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/FastJetFinder.cc
rd4b9697 r7278220 92 92 JetDefinition::Plugin *plugin = 0; 93 93 JetDefinition::Recombiner *recomb = 0; 94 NjettinessPlugin *njetPlugin = 0; 95 96 // read eta ranges 97 98 ExRootConfParam param = GetParam("RhoEtaRange"); 94 ExRootConfParam param; 99 95 Long_t i, size; 100 101 fEtaRangeMap.clear(); 102 size = param.GetSize(); 103 for(i = 0; i < size/2; ++i) 104 { 105 fEtaRangeMap[param[i*2].GetDouble()] = param[i*2 + 1].GetDouble(); 106 } 96 Double_t etaMin, etaMax; 97 TEstimatorStruct estimatorStruct; 107 98 108 99 // define algorithm … … 197 188 break; 198 189 case 8: 199 njetPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff);200 fDefinition = new JetDefinition( njetPlugin);190 fNjettinessPlugin = new NjettinessPlugin(fN, Njettiness::wta_kt_axes, Njettiness::unnormalized_cutoff_measure, fBeta, fRcutOff); 191 fDefinition = new JetDefinition(fNjettinessPlugin); 201 192 break; 202 193 } … … 204 195 fPlugin = plugin; 205 196 fRecomb = recomb; 206 fNjettinessPlugin = njetPlugin;207 197 208 198 ClusterSequence::print_banner(); 199 200 if(fComputeRho && fAreaDefinition) 201 { 202 // read eta ranges 203 204 param = GetParam("RhoEtaRange"); 205 size = param.GetSize(); 206 207 fEstimators.clear(); 208 for(i = 0; i < size/2; ++i) 209 { 210 etaMin = param[i*2].GetDouble(); 211 etaMax = param[i*2 + 1].GetDouble(); 212 estimatorStruct.estimator = new JetMedianBackgroundEstimator(SelectorEtaRange(etaMin, etaMax), *fDefinition, *fAreaDefinition); 213 estimatorStruct.etaMin = etaMin; 214 estimatorStruct.etaMax = etaMax; 215 fEstimators.push_back(estimatorStruct); 216 } 217 } 209 218 210 219 // import input array … … 223 232 void FastJetFinder::Finish() 224 233 { 234 vector< TEstimatorStruct >::iterator itEstimators; 235 236 for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators) 237 { 238 if(itEstimators->estimator) delete itEstimators->estimator; 239 } 240 225 241 if(fItInputArray) delete fItInputArray; 226 242 if(fDefinition) delete fDefinition; … … 243 259 Double_t rho = 0.0; 244 260 PseudoJet jet, area; 245 vector<PseudoJet> inputList, outputList;246 261 ClusterSequence *sequence; 247 map< Double_t, Double_t >::iterator itEtaRangeMap; 262 vector< PseudoJet > inputList, outputList; 263 vector< PseudoJet >::iterator itInputList, itOutputList; 264 vector< TEstimatorStruct >::iterator itEstimators; 248 265 249 266 DelphesFactory *factory = GetFactory(); … … 276 293 if(fComputeRho && fAreaDefinition) 277 294 { 278 for(itE taRangeMap = fEtaRangeMap.begin(); itEtaRangeMap != fEtaRangeMap.end(); ++itEtaRangeMap)295 for(itEstimators = fEstimators.begin(); itEstimators != fEstimators.end(); ++itEstimators) 279 296 { 280 Selector select_rapidity = SelectorAbsRapRange(itEtaRangeMap->first, itEtaRangeMap->second); 281 JetMedianBackgroundEstimator estimator(select_rapidity, *fDefinition, *fAreaDefinition); 282 estimator.set_particles(inputList); 283 rho = estimator.rho(); 297 itEstimators->estimator->set_particles(inputList); 298 rho = itEstimators->estimator->rho(); 284 299 285 300 candidate = factory->NewCandidate(); 286 301 candidate->Momentum.SetPtEtaPhiE(rho, 0.0, 0.0, rho); 287 candidate->Edges[0] = itE taRangeMap->first;288 candidate->Edges[1] = itE taRangeMap->second;302 candidate->Edges[0] = itEstimators->etaMin; 303 candidate->Edges[1] = itEstimators->etaMax; 289 304 fRhoOutputArray->Add(candidate); 290 305 } … … 298 313 detaMax = 0.0; 299 314 dphiMax = 0.0; 300 vector<PseudoJet>::iterator itInputList, itOutputList;301 315 for(itOutputList = outputList.begin(); itOutputList != outputList.end(); ++itOutputList) 302 316 { … … 377 391 } 378 392 379 380 393 fOutputArray->Add(candidate); 381 394 }
Note:
See TracChangeset
for help on using the changeset viewer.