Skip to content
Snippets Groups Projects
Commit c47eaf37 authored by Zhan Li's avatar Zhan Li Committed by lintao@ihep.ac.cn
Browse files

Beam bkg charge added

parent c5211f03
No related branches found
No related tags found
No related merge requests found
...@@ -4,4 +4,4 @@ spack* ...@@ -4,4 +4,4 @@ spack*
./Generator/output/ ./Generator/output/
./Generator/options/ ./Generator/options/
InstallArea/ InstallArea/
\ No newline at end of file
...@@ -51,6 +51,7 @@ bool BeamBackgroundFileParserV1::load(IBeamBackgroundFileParser::BeamBackgroundD ...@@ -51,6 +51,7 @@ bool BeamBackgroundFileParserV1::load(IBeamBackgroundFileParser::BeamBackgroundD
// Now, we get a almost valid data // Now, we get a almost valid data
const double m2mm = 1e3; // convert from m to mm const double m2mm = 1e3; // convert from m to mm
result.pdgid = pid; result.pdgid = pid;
result.charge = (pid == 11) ? -1 : (pid == -11) ? 1 : -1;
result.x = x * m2mm; result.x = x * m2mm;
result.y = y * m2mm; result.y = y * m2mm;
result.z = (z+dz) * m2mm; result.z = (z+dz) * m2mm;
......
...@@ -23,7 +23,7 @@ private: ...@@ -23,7 +23,7 @@ private:
double m_timewindow; double m_timewindow;
double x, y, z, cosx, cosy, dz, dp, cosz; double x, y, z, cosx, cosy, dz, dp, cosz;
int pid; int pid, charge;
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment