Skip to content

Commit

Permalink
Hammer Time
Browse files Browse the repository at this point in the history
  • Loading branch information
glukicov committed Dec 6, 2017
1 parent d5b02d3 commit e4ee91b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
7 changes: 3 additions & 4 deletions mpIIDESY/AlignTracker_methods.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -464,9 +464,8 @@ MCData Tracker::MC_launch(float scatterError, ofstream& debug_calc, ofstream& de
float x1 = x0; // for parallel lines only
float xSlope = 0.0; // for parallel lines only

// bool generalLines = true; // XXX quick hack
// float slopeFactor=1.0; // XXX another quick hack add in front of beamPositionLength
// if (generalLines == true) {
bool generalLines = true; // XXX quick hack
if (generalLines == true) {

float signXSlope;
if (Tracker::generate_uniform() >= 0.5) {
Expand All @@ -479,7 +478,7 @@ MCData Tracker::MC_launch(float scatterError, ofstream& debug_calc, ofstream& de
xSlope = (Tracker::generate_uniform() * signXSlope) * 0.015; // unifrom slope between -0.015 and 0.015: provides nice coverage for 8 straws
x1 = xSlope * beamStop + xIntercept; // "xExit"

// } // end of generalLines == true HACK
} // end of generalLines == true HACK

float xTrack; //true track position x=zm+c

Expand Down
2 changes: 1 addition & 1 deletion mpIIDESY/AlignTracker_methods.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ class Tracker {
// MF + inhomogeneity, E_loss, MS

// float dispX[8] = {0.00, 0.0, 0.0, 0.00, 0.0, 0.0, 0.0, 0.0}; // manual misalignment [relative misalignment per module]
float dispZ[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; // manual misalignment [relative misalignment per module]
float dispZ[8] = {0.0, 0.03, -0.03, 0.0, 0.0, 0.0, 0.0, 0.0}; // manual misalignment [relative misalignment per module]
// float offsetX[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; // To the ideal detector, for second pede iteration
float offsetZ[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; // To the ideal detector, for second pede iteration

Expand Down
10 changes: 5 additions & 5 deletions mpIIDESY/PEDE_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import time
import subprocess

tracksCut=(1000, 3000, 8000, 12000, 19000, 29000, 40000, 50000, 65000, 70000, 80000, 90000, 100800)
tracksCut=(1000, 3000, 8000, 12000, 19000, 29000, 40000, 50000, 65000, 70000, 80000, 90000, 100000)
#tracksCut=(1000, 3000, 8000, 12000)

subprocess.call(["clear"])
Expand All @@ -27,12 +27,12 @@
intercept = float(number_str[1])

for i in range(0, len(tracksCut)):
subprocess.call(["./AlignTracker", "n" , str(tracksCut[i]) ])
time.sleep(intercept+slope*tracksCut[i]+0.5) # now we delay for the correct amount of time
subprocess.call(["./AlignTracker", "n" , str(tracksCut[i]), "0.0", "0.0" ])

subprocess.call(["./pede", "Tracker_str.txt" ])
time.sleep(2.0)

subprocess.call(["./ConcatenatePEDE.py"])
time.sleep(0.1)


subprocess.call(["./TrackerLaunch.py"])
print "PEDE Tests Complete. "
Expand Down
2 changes: 1 addition & 1 deletion mpIIDESY/TrackerLaunch.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@
plt.title('FoM Module %s' %(i_module+1), fontsize=10)
#axes.set_ylim([beamX0-1,beamX1+1])
axes.set_xlim(-500,trackN[lineN-1]+100)
axes.set_ylim(-20, 20)
axes.set_ylim(-1000, 1000)


plt.xlabel("Number of Tracks", fontsize=10)
Expand Down
4 changes: 2 additions & 2 deletions mpIIDESY/functions.tex
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ \section{Introduction} \label{sec:intro}
DGL_1 = \frac{\partial R}{\partial z} = \frac{ m(c+mz-x) } { \sqrt{m^2+1} \cdot |c+mz-x| },
\end{equation}

where $DGL_1 \rightarrow \frac{m}{\sqrt{m^2+1}} \rightarrow m$

where $DGL_1 \rightarrow \pm \frac{m}{\sqrt{m^2+1}} \rightarrow \pm m$
(using TS expansion: $\pm \frac{m}{\sqrt{m^2+1}} \approx \pm m (1-\frac{1}{2}m^2) = \pm m - \frac{1}{2}m^3 \approx \pm m $)

\clearpage

Expand Down

0 comments on commit e4ee91b

Please sign in to comment.