Changeset d870fc5 in git for modules/ImpactParameterSmearing.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/ImpactParameterSmearing.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 * Performs transverse impact parameter smearing. 22 22 * 23 * $Date: 2014-16-03 14:57:44 +010024 *25 *26 23 * \author M. Selvaggi - UCL, Louvain-la-Neuve 27 24 * 28 25 */ 29 26 30 27 31 28 #include "modules/ImpactParameterSmearing.h" … … 47 44 #include "TLorentzVector.h" 48 45 49 #include <algorithm> 46 #include <algorithm> 50 47 #include <stdexcept> 51 48 #include <iostream> … … 99 96 { 100 97 Candidate *candidate, *particle, *mother; 101 Double_t xd, yd, zd, dxy, dz, sx, sy, sz, ddxy, ddz; 102 Double_t pt, eta, px, py, ang_mom; 103 104 // cout<<"New event"<<endl; 98 Double_t xd, yd, zd, dxy, sx, sy, sz, ddxy; 99 Double_t pt, eta, px, py; 105 100 106 101 fItInputArray->Reset(); 107 102 while((candidate = static_cast<Candidate*>(fItInputArray->Next()))) 108 103 { 109 110 // take momentum before smearing (otherwise apply double smearing on dxy)104 105 // take momentum before smearing (otherwise apply double smearing on dxy) 111 106 particle = static_cast<Candidate*>(candidate->GetCandidates()->At(0)); 112 107 113 108 const TLorentzVector &candidateMomentum = particle->Momentum; 114 // const TLorentzVector &candidateMomentum = candidate->Momentum; 115 109 116 110 eta = candidateMomentum.Eta(); 117 111 pt = candidateMomentum.Pt(); 118 112 px = candidateMomentum.Px(); 119 113 py = candidateMomentum.Py(); 120 114 121 115 // calculate coordinates of closest approach to track circle in transverse plane xd, yd, zd 122 116 xd = candidate->Xd; 123 117 yd = candidate->Yd; 124 118 zd = candidate->Zd; 125 126 // calculate smeared values 127 sx = gRandom->Gaus(0 ,fFormula->Eval(pt, eta));128 sy = gRandom->Gaus(0 ,fFormula->Eval(pt, eta));129 sz = gRandom->Gaus(0 ,fFormula->Eval(pt, eta));130 119 120 // calculate smeared values 121 sx = gRandom->Gaus(0.0, fFormula->Eval(pt, eta)); 122 sy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta)); 123 sz = gRandom->Gaus(0.0, fFormula->Eval(pt, eta)); 124 131 125 xd += sx; 132 126 yd += sy; 133 zd += sz; 134 135 // calculate impact paramater (after-smearing) 136 ang_mom = (xd*py - yd*px); 137 dxy = ang_mom/pt; 138 dz = zd; 139 140 ddxy = gRandom->Gaus(0,fFormula->Eval(pt, eta)); 141 ddz = gRandom->Gaus(0,fFormula->Eval(pt, eta)); 142 143 //fill smeared values in candidate 127 zd += sz; 128 129 // calculate impact parameter (after-smearing) 130 dxy = (xd*py - yd*px)/pt; 131 132 ddxy = gRandom->Gaus(0.0, fFormula->Eval(pt, eta)); 133 134 // fill smeared values in candidate 144 135 mother = candidate; 145 136 146 137 candidate = static_cast<Candidate*>(candidate->Clone()); 147 138 candidate->Xd = xd; 148 139 candidate->Yd = yd; 149 140 candidate->Zd = zd; 150 141 151 142 candidate->Dxy = dxy; 152 143 candidate->SDxy = ddxy; 153 144 154 145 candidate->AddCandidate(mother); 155 146 fOutputArray->Add(candidate);
Note:
See TracChangeset
for help on using the changeset viewer.