Changes in modules/Hector.cc [cab38f6:341014c] in git
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/Hector.cc
rcab38f6 r341014c 17 17 */ 18 18 19 20 19 /** \class Hector 21 20 * … … 32 31 #include "classes/DelphesFormula.h" 33 32 33 #include "ExRootAnalysis/ExRootClassifier.h" 34 #include "ExRootAnalysis/ExRootFilter.h" 34 35 #include "ExRootAnalysis/ExRootResult.h" 35 #include "ExRootAnalysis/ExRootFilter.h"36 #include "ExRootAnalysis/ExRootClassifier.h"37 36 37 #include "TDatabasePDG.h" 38 #include "TFormula.h" 39 #include "TLorentzVector.h" 38 40 #include "TMath.h" 41 #include "TObjArray.h" 42 #include "TRandom3.h" 39 43 #include "TString.h" 40 #include "TFormula.h"41 #include "TRandom3.h"42 #include "TObjArray.h"43 #include "TDatabasePDG.h"44 #include "TLorentzVector.h"45 44 46 45 #include <algorithm> 47 #include <stdexcept>48 46 #include <iostream> 49 47 #include <sstream> 48 #include <stdexcept> 50 49 51 50 #include "Hector/H_BeamLine.h" 51 #include "Hector/H_BeamParticle.h" 52 52 #include "Hector/H_RecRPObject.h" 53 #include "Hector/H_BeamParticle.h"54 53 55 54 using namespace std; … … 120 119 121 120 fItInputArray->Reset(); 122 while((candidate = static_cast<Candidate *>(fItInputArray->Next())))121 while((candidate = static_cast<Candidate *>(fItInputArray->Next()))) 123 122 { 124 123 const TLorentzVector &candidatePosition = candidate->Position; … … 132 131 z = 1.0E-3 * candidatePosition.Z(); 133 132 134 // tx = 1.0E6 * TMath::ATan(candidateMomentum.Px()/pz);135 // ty = 1.0E6 * TMath::ATan(candidateMomentum.Py()/pz);133 // tx = 1.0E6 * TMath::ATan(candidateMomentum.Px()/pz); 134 // ty = 1.0E6 * TMath::ATan(candidateMomentum.Py()/pz); 136 135 137 136 tx = 0.0; 138 137 ty = 0.0; 139 138 140 theta = TMath::Hypot(TMath::ATan(candidateMomentum.Px() /pz), TMath::ATan(candidateMomentum.Py()/pz));141 distance = (fDistance - 1.0E-3 * candidatePosition.Z()) /TMath::Cos(theta);142 time = gRandom->Gaus((distance + 1.0E-3 * candidatePosition.T()) /c_light, fSigmaT);139 theta = TMath::Hypot(TMath::ATan(candidateMomentum.Px() / pz), TMath::ATan(candidateMomentum.Py() / pz)); 140 distance = (fDistance - 1.0E-3 * candidatePosition.Z()) / TMath::Cos(theta); 141 time = gRandom->Gaus((distance + 1.0E-3 * candidatePosition.T()) / c_light, fSigmaT); 143 142 144 143 H_BeamParticle particle(candidate->Mass, candidate->Charge); 145 // particle.set4Momentum(candidateMomentum);146 particle.set4Momentum(candidateMomentum.Px(), candidateMomentum.Py(), 147 144 // particle.set4Momentum(candidateMomentum); 145 particle.set4Momentum(candidateMomentum.Px(), candidateMomentum.Py(), 146 candidateMomentum.Pz(), candidateMomentum.E()); 148 147 particle.setPosition(x, y, tx, ty, z); 149 148 … … 158 157 159 158 mother = candidate; 160 candidate = static_cast<Candidate *>(candidate->Clone());159 candidate = static_cast<Candidate *>(candidate->Clone()); 161 160 candidate->Position.SetXYZT(particle.getX(), particle.getY(), particle.getS(), time); 162 161 candidate->Momentum.SetPxPyPzE(particle.getTX(), particle.getTY(), 0.0, particle.getE());
Note:
See TracChangeset
for help on using the changeset viewer.