Fork me on GitHub

Changeset d870fc5 in git for modules/TimeSmearing.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/TimeSmearing.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 *  Performs transverse momentum resolution smearing.
    23  *
    24  *  $Date: 2013-02-13 16:58:53 +0100 (Wed, 13 Feb 2013) $
    25  *  $Revision: 911 $
    26  *
    2723 *
    2824 *  \author P. Demin - UCL, Louvain-la-Neuve
     
    4844#include "TLorentzVector.h"
    4945
    50 #include <algorithm> 
     46#include <algorithm>
    5147#include <stdexcept>
    5248#include <iostream>
     
    9995  Double_t t;
    10096  const Double_t c_light = 2.99792458E8;
    101  
     97
    10298  fItInputArray->Reset();
    10399  while((candidate = static_cast<Candidate*>(fItInputArray->Next())))
     
    105101    const TLorentzVector &candidatePosition = candidate->Position;
    106102    t = candidatePosition.T()*1.0E-3/c_light;
    107    
     103
    108104    // apply smearing formula
    109105    t = gRandom->Gaus(t, fTimeResolution);
    110    
     106
    111107    mother = candidate;
    112108    candidate = static_cast<Candidate*>(candidate->Clone());
    113109    candidate->Position.SetT(t*1.0E3*c_light);
    114    
     110
    115111    candidate->AddCandidate(mother);
    116        
     112
    117113    fOutputArray->Add(candidate);
    118114  }
Note: See TracChangeset for help on using the changeset viewer.