Changeset d870fc5 in git for modules/TimeSmearing.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/TimeSmearing.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 * Performs transverse momentum resolution smearing. 23 *24 * $Date: 2013-02-13 16:58:53 +0100 (Wed, 13 Feb 2013) $25 * $Revision: 911 $26 *27 23 * 28 24 * \author P. Demin - UCL, Louvain-la-Neuve … … 48 44 #include "TLorentzVector.h" 49 45 50 #include <algorithm> 46 #include <algorithm> 51 47 #include <stdexcept> 52 48 #include <iostream> … … 99 95 Double_t t; 100 96 const Double_t c_light = 2.99792458E8; 101 97 102 98 fItInputArray->Reset(); 103 99 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) … … 105 101 const TLorentzVector &candidatePosition = candidate->Position; 106 102 t = candidatePosition.T()*1.0E-3/c_light; 107 103 108 104 // apply smearing formula 109 105 t = gRandom->Gaus(t, fTimeResolution); 110 106 111 107 mother = candidate; 112 108 candidate = static_cast<Candidate*>(candidate->Clone()); 113 109 candidate->Position.SetT(t*1.0E3*c_light); 114 110 115 111 candidate->AddCandidate(mother); 116 112 117 113 fOutputArray->Add(candidate); 118 114 }
Note:
See TracChangeset
for help on using the changeset viewer.