Fork me on GitHub

Changeset d870fc5 in git for modules/FastJetFinder.cc


Ignore:
Timestamp:
Dec 21, 2014, 4:03:35 PM (10 years ago)
Author:
Michele Selvaggi <michele.selvaggi@…>
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.
Message:

Merge remote-tracking branch 'upstream/master'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • modules/FastJetFinder.cc

    r7f12612 rd870fc5  
    22 *  Delphes: a framework for fast simulation of a generic collider experiment
    33 *  Copyright (C) 2012-2014  Universite catholique de Louvain (UCL), Belgium
    4  * 
     4 *
    55 *  This program is free software: you can redistribute it and/or modify
    66 *  it under the terms of the GNU General Public License as published by
    77 *  the Free Software Foundation, either version 3 of the License, or
    88 *  (at your option) any later version.
    9  * 
     9 *
    1010 *  This program is distributed in the hope that it will be useful,
    1111 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
    1212 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    1313 *  GNU General Public License for more details.
    14  * 
     14 *
    1515 *  You should have received a copy of the GNU General Public License
    1616 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
     
    2121 *
    2222 *  Finds jets using FastJet library.
    23  *
    24  *  $Date$
    25  *  $Revision$
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    241237  Candidate *candidate, *constituent;
    242238  TLorentzVector momentum;
    243  
    244   TLorentzVector constmomentum;
    245  
     239
    246240  Double_t deta, dphi, detaMax, dphiMax;
    247   Double_t time, weightTime, avTime;
     241  Double_t time, timeWeight;
    248242  Int_t number;
    249   Double_t rho = 0;
     243  Double_t rho = 0.0;
    250244  PseudoJet jet, area;
    251245  vector<PseudoJet> inputList, outputList;
     
    309303    jet = *itOutputList;
    310304    if(fJetAlgorithm == 7) jet = join(jet.constituents());
    311    
     305
    312306    momentum.SetPxPyPzE(jet.px(), jet.py(), jet.pz(), jet.E());
    313    
     307
    314308    area.reset(0.0, 0.0, 0.0, 0.0);
    315309    if(fAreaDefinition) area = itOutputList->area_4vector();
     
    317311    candidate = factory->NewCandidate();
    318312
    319     time=0;
    320     weightTime=0;
     313    time = 0.0;
     314    timeWeight = 0.0;
    321315
    322316    inputList.clear();
    323317    inputList = sequence->constituents(*itOutputList);
    324 
    325     constmomentum.SetPxPyPzE(0.0,0.0,0.0,0.0);;
    326318
    327319    for(itInputList = inputList.begin(); itInputList != inputList.end(); ++itInputList)
    328320    {
    329321      constituent = static_cast<Candidate*>(fInputArray->At(itInputList->user_index()));
    330 
    331       constmomentum += constituent->Momentum;
    332322
    333323      deta = TMath::Abs(momentum.Eta() - constituent->Momentum.Eta());
     
    337327
    338328      time += TMath::Sqrt(constituent->Momentum.E())*(constituent->Position.T());
    339       weightTime += TMath::Sqrt(constituent->Momentum.E());
     329      timeWeight += TMath::Sqrt(constituent->Momentum.E());
    340330
    341331      candidate->AddCandidate(constituent);
    342332    }
    343333
    344     avTime = time/weightTime;
    345 
    346334    candidate->Momentum = momentum;
    347     candidate->Position.SetT(avTime);
     335    candidate->Position.SetT(time/timeWeight);
    348336    candidate->Area.SetPxPyPzE(area.px(), area.py(), area.pz(), area.E());
    349337
Note: See TracChangeset for help on using the changeset viewer.