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