Changeset d870fc5 in git for modules/FastJetFinder.cc
- Timestamp:
- Dec 21, 2014, 4:03:35 PM (10 years ago)
- Branches:
- ImprovedOutputFile, Timing, dual_readout, llp, master
- Children:
- d77b51d
- Parents:
- 7f12612 (diff), e5767b57 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/FastJetFinder.cc
r7f12612 rd870fc5 2 2 * Delphes: a framework for fast simulation of a generic collider experiment 3 3 * Copyright (C) 2012-2014 Universite catholique de Louvain (UCL), Belgium 4 * 4 * 5 5 * This program is free software: you can redistribute it and/or modify 6 6 * it under the terms of the GNU General Public License as published by 7 7 * the Free Software Foundation, either version 3 of the License, or 8 8 * (at your option) any later version. 9 * 9 * 10 10 * This program is distributed in the hope that it will be useful, 11 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 13 * GNU General Public License for more details. 14 * 14 * 15 15 * You should have received a copy of the GNU General Public License 16 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. … … 21 21 * 22 22 * Finds jets using FastJet library. 23 *24 * $Date$25 * $Revision$26 *27 23 * 28 24 * \author P. Demin - UCL, Louvain-la-Neuve … … 241 237 Candidate *candidate, *constituent; 242 238 TLorentzVector momentum; 243 244 TLorentzVector constmomentum; 245 239 246 240 Double_t deta, dphi, detaMax, dphiMax; 247 Double_t time, weightTime, avTime;241 Double_t time, timeWeight; 248 242 Int_t number; 249 Double_t rho = 0 ;243 Double_t rho = 0.0; 250 244 PseudoJet jet, area; 251 245 vector<PseudoJet> inputList, outputList; … … 309 303 jet = *itOutputList; 310 304 if(fJetAlgorithm == 7) jet = join(jet.constituents()); 311 305 312 306 momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E()); 313 307 314 308 area.reset(0.0, 0.0, 0.0, 0.0); 315 309 if(fAreaDefinition) area = itOutputList->area_4vector(); … … 317 311 candidate = factory->NewCandidate(); 318 312 319 time =0;320 weightTime=0;313 time = 0.0; 314 timeWeight = 0.0; 321 315 322 316 inputList.clear(); 323 317 inputList = sequence->constituents(*itOutputList); 324 325 constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;326 318 327 319 for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList) 328 320 { 329 321 constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index())); 330 331 constmomentum += constituent->Momentum;332 322 333 323 deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta()); … … 337 327 338 328 time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T()); 339 weightTime+= TMath::Sqrt(constituent->Momentum.E());329 timeWeight += TMath::Sqrt(constituent->Momentum.E()); 340 330 341 331 candidate->AddCandidate(constituent); 342 332 } 343 333 344 avTime = time/weightTime;345 346 334 candidate->Momentum = momentum; 347 candidate->Position.SetT( avTime);335 candidate->Position.SetT(time/timeWeight); 348 336 candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E()); 349 337
Note:
See TracChangeset
for help on using the changeset viewer.