2 continue

phi=rlu(0)*twopi

dstr=y11-cahn1*cos(phi)+cahn2*cos(2.*phi)

if(dstr/cahnmax .lt. rlu(0)) goto 2

phiq=phi

return

Here rlu(0) returns a random number between 0 and 1, which is converted to a random φ by multiplying by 2π. y11, cahn1, and cahn2 are calculated as functions of y, P

To reproduce the above loop, I impliment it as follows into my own program:

while(dstr/cahnmax < rlu){

rlu = (double) rand()/RAND_MAX;

randphi = rlu*2*PI;

dstr = y11 - cahn1*cos(randphi)+cahn2*cos(2*randphi);

}

Here all quantities are calculated exactly as above. rand() returns a random number between 0 and RAND_MAX, so dividing by RAND_MAX makes it the same as rlu(0) in the Lund function. When the weighting is applied using this function, the weights come out to be completely flat in φ, as can be seen below.

I am currently investigating the following:

- rlu(0) is called twice in the Fortran loop. Does it give a different random number each time, or is it somehow fixed for an iteration of the loop?
- What is phiq? It seems to not be used again in the program after it is set in the loop. Maybe it is passed into a variable with a different name?
- In order for the weight to get a φ dependence, it seems that I should use the random φ as the φ for the event (and maybe this is the phiq?), but this seems like it must be wrong. How can I measure φ dependence if I am not looking at the same φ?

I have identified a possibility for what I was doing wrong with the weighting method, and I am currently working to properly incorporate that into my weighting procedure. In the clasDIS code, it does not actually weight as a function of φ for the event, but uses a randomly generated φ, and tests to see that the computed weight passes a certain threshhold. I hope that my using the identical procedure in my weighting program, it will accurately reproduce the φ distributions given from the MC. This is still being tested, but I will show results soon.

I hoped that by determining the analytic function of the Cahn effect, this may help to see how the z-dependence is introduced in clasDIS. I have studied Cahn's original paper, and so far the function given by clasDIS does not seem to be in agreement. The following table compares the functions used in clasDIS to that given in the Cahn paper.

clasDIS | Cahn paper | |
---|---|---|

<cosφ> | 4(1-y)^{1/2}(2-y)P_{T}/Q |
2(1-y)^{1/2}(2-y)P_{T}/Q × (1+(1-y)^{2})^{-1}z^{2}/(1+z^{2}) |

<cos2φ> | 4(1-y)P_{T}^{2}/Q^{2} |
2(1-y)P_{T}^{2}/Q^{2} × (1+(1-y)^{2})^{-1}z^{4}/(1+z^{2})^{2} |

As you can see, the analytic functions are not the same. Since I am still unsure of how z-dependence is introduced into the MC function, I also compared the analytic curves to the generated φ distribution in fixed bins as was done before. From the plots below, you can see that the Cahn effect intoduced into the program by the MC is significantly larger than that computed based on the function given in Cahn's paper.

The first two plots show the coeffictients on cosφ and cos2φ as functions of z, and fit with a 2nd order polynomial.

The next four plots show the comparison of the φ distributions. The black curve is the analytic curve of the Cahn effect using the z-dependence from the above fits. The grey curve is the fit to the φ distribution that is generated with the Cahn effect included.

I am in the process of reproducing the above for further fixed kinematic points, including fixed values of z.

- Uncorrected φ:

- Acceptance:

- Corrected φ:

- 2-dimensional plots comparing simulation generated with Cahn effect and simulation generated with a flat φ and weighted with the Cahn effect. Some bins in x and Q
^{2}show some small discrepencies between the two procedures and wide values of φ. There are very large discrepancies between the two procedures are large P_{T}and low z.- P
_{T}vs. z. Red/blue = Event Weighting, black = Cahn in generator.

- x vs. z.

- Q
^{2}vs. z.

- P
- Test of manually adding z-dependence to weighting procedure. Multiplying the cos(φ) term by z provides a large improvement in the matching between the simulation generated with the Cahn effect and that generated with flat φ and weighted with the Cahn effect.

q2pt = pt/sqrt(q2)

q2pt2 = pt**2/q2

y1 = (1.-y)

y11 = 1.+y1**2+4.*y1*q2pt2

y12 = sqrt(y1)

y2 = 2.-y

cahn1 = 4.*y12*y2*q2pt

cahn2 = 4.*y1*q2pt2

weight = y11-cahn1*cos(phi)+cahn2*cos(2.*phi)

Events are weighted with the above function, and then compared to both the flat φ distribution and the MC produced with the Cahn Effect. The events weighted with the Cahn effect compare better with events generated with the Cahn effect than to those with a flat φ distribution, but the systemmatic error between the two fits is still too high. I am working on the weighting procedure to see if it can be improved. In particular, the generated φ distributions are different between events weighted with the Cahn effect and those generated with the Cahn effect, so I am trying to understand this difference.

- Comparison to flat φ:
- Comparison to Cahn function in the event generator:

- Red is generated with flat φ and weighted with the Cahn effect, and black is generated with the Cahn effect.

- Fits to φ corrected with weighted Cahn.

- Fits to φ corrected with Cahn in event generator.

- Red is generated with flat φ and weighted with the Cahn effect, and black is generated with the Cahn effect.

- The following shows generated events using each of the three weights. The red (blue) histograms are generated (reconstructed) histograms using the weighting method. The histograms plotted in black are those using a flat φ distribution.

- The following are acceptances produced from each of the three weighting procedures and compared to the acceptance calculated from the flat φ (black points):

- Here are ratios of each acceptance to that produced from the flat φ distribution.

- The remaining are fits to the φ distributions after being corrected by each of the four acceptances (flat and the three weights).
- Flat φ:

- 1+0.05*cosφ:

- >1+0.1*cosφ:

- >1+0.2*cosφ:

- Flat φ:

- Comparison between M
_{X}>1.2 and M_{X}>1.5 using flat φ - Comparison between flat φ and Cahn effect using M
_{X}>1.5 GeV and y<0.8. - Purity plots using flat φ and Cahn effect.
- Kinematic plots using M
_{X}>1.5 GeV and y<0.8.

- Using flat φ, comparison between M
_{X}>1.2 and M_{X}>1.5 GeV.- Uncorrected φ with M
_{X}>1.5 GeV:

- Acceptance with the two missing mass cuts:

- Ratio of Acceptances with M
_{X}>1.5 and M_{X}>1.2.:

- Corrected φ using M
_{X}>1.5 GeV and y<0.8.:

- Uncorrected φ with M
- Comparison between simulations using flat φ and Cahn effect, both now with momentum-matching, M
_{X}>1.5 GeV, and y<0.8.- Uncorrected φ:

- Acceptance with and without Cahn effect:

- Ratio of Acceptances with and without Cahn effect:

- Corrected φ:

- Uncorrected φ:
- Purity plots using simulation with flat φ and Cahn effect, both with M
_{X}>1.5 GeV and y<0.8.- Simulation with Cahn effect:

- Simulation with flat φ:

- Simulation with Cahn effect:
- Kinematic plots using cuts on M
_{X}>1.5 GeV and y<0.8.- Simulated with Cahn Effect:

- Simulated with flat φ:

- Simulated with Cahn Effect:

- Here are plots of purity, defined as purity in the nth bin = the number of reconstructed events at the same time generated in the nth bin divided by the number of reconstructed events in that bin. The calculation is done in (z,φ) binning using 72, 36, and 18 bins.
- Here is acceptance in (z,φ) binnng using the pion momentum-matching.
- Uncorrected φ (unchanged):

- Simulated φ with momentum-matching imposed on reconstructed events:

- Acceptance:

- Ratio of Acceptances with and without momentum-matching:

- Corrected φ:

- Uncorrected φ (unchanged):
- Posted below are kinematic plots after the momentum-matching algorithm is implemented for simulated events. The plots of Q
^{2}, P_{T}, and x include the cuts on W>2, Q^{2}>1, 0.4<z<0.7, M_{X}>1.2 GeV, and y<0.85. The plots of z and E_{π}include cuts on Q^{2}, W and y. Plots of θ and φ use only the particle identification cuts.

- Comparison of acceptance using a flat φ distribution to that using the Cahn Effect in 2-dimensions (z,φ).
- Uncorrected φ:

- Simulated φ with Cahn effect:

- Simulated φ without Cahn effect:

- Acceptance:

- Ratio of Acceptances:

- Corrected φ:

- Uncorrected φ:
- Comparison of acceptance using a flat φ distribution to that using the Cahn Effect in 3-dimensions (z,x,φ).
- Uncorrected φ:

- Simulated φ

- Acceptance:

- Ratio of Acceptances:

- Corrected φ:

- Uncorrected φ:
- Comparison of acceptance using a flat φ distribution to that using the Cahn Effect in 3-dimensions (z,Q
^{2},φ).- Uncorrected φ:

- Simulated φ

- Acceptance:

- Ratio of Acceptances:

- Corrected φ:

- Uncorrected φ:
- Test of the two acceptance calculations. The acceptance using the Cahn effect is used to correct reconstructed events with a flat φ distribution and vice versa.
- Events simulated with Cahn effect and corrected with acceptance using Cahn effect.

- Events simulated with Cahn effect and corrected with acceptance with flat φ.

- Events simulated with flat φ and corrected with acceptance using flat φ

- Events simulated with flat φ and corrected with acceptance using the Cahn effect.

- Events simulated with Cahn effect and corrected with acceptance using Cahn effect.

- (z, x, φ)
- Uncorrected φ

- Simulated φ

- Acceptance

- Ratio of acceptances:

- Corrected φ

- Uncorrected φ
- (z, Q
^{2}, φ)- Uncorrected φ

- Simulated φ

- Acceptance

- Ratio of acceptances:

- Corrected φ

- Uncorrected φ

- Plots for π
^{+}using 20 degree bins in φ:- Uncorrected φ from E1-f:

- Simulated φ.

- Acceptance. Red uses Cahn effect and black is flat φ.

- Ratio of Acceptances:

- Comparison of corrected φ:

- Uncorrected φ from E1-f:
- Plots for π
^{+}using 10 degree bins in φ:- Uncorrected φ from E1-f:

- Simulated φ.

- Acceptance. Red uses Cahn effect and black is flat φ.

- Ratio of Acceptances:

- Comparison of corrected φ:

- Uncorrected φ from E1-f:

I also tested the effect of the elctron fiducial cut on acceptance. I used the events simulated with a flat φ distribution, but used a tighter electron fiducial cut. The following plots compare the acceptance due to the two cuts. For this comparison I used 180 bins in φ.

- Uncorrected φ distribution from E1-f:

- Simulated φ distributions:

- Acceptance. Black is original and red uses the tighter cut:

- Ratio of acceptance using tight fiducial cut over acceptance using normal fiducial cut:

- Corrected data:

- Here is a comparison of the φ distribution in each z bin after being corrected with each of the two acceptance corrections.

- The first plot shows data generated with the Cahn effect, and corrected with acceptance including the Cahn effect (returns exactly the generated data).

- The second plots shows data generated with the Cahn effect, and corrected with acceptance with no Cahn effect.

- Next is data generated with flat φ and corrected with flat φ (returns exactly generated flat φ distribution).

- Last is data generated with a flat φ distribution and corrected with acceptance including the Cahn effect.

- Uncorrected φ from E1-f:

- Simulated φ with Cahn effect. Red is generated and blue is after GSim.

- Simulated φ with flat φ.

- Acceptance. Red uses Cahn effect and black is flat φ.

- Ratio of Acceptances:

- Corrected φ using simulation with Cahn effect:

- Corrected φ using simulation with flat φ.

- Uncorrected φ from E1-f:

- Simulated φ with Cahn effect. Red is generated and blue is after GSim.

- Simulated φ with flat φ.

- Acceptance. Red uses Cahn effect and black is flat φ.

- Ratio of Acceptances:

- Corrected φ using simulation with Cahn effect:

- Corrected φ using simulation with flat φ.

- Uncorrected φ from E1-f:

- Simulated φ with Cahn effect. Red is generated and blue is after GSim.

- Simulated φ with flat φ.

- Acceptance. Red uses Cahn effect and black is flat φ.

- Ratio of Acceptances (added on 10/4):

- Corrected φ using simulation with Cahn effect:

- Corrected φ using simulation with flat φ.

- Flat φ:

- With Cahn Effect:

- Comparisons of acceptance from the two simulations as function of P
_{T}and z:

- Here is a comparison of the kinematics resulting from each simulation. The simulation using the Cahn effect seems to give slightly more events at higher z.

- I found a bug in my code that was giving incoorect acceptance using the Cahn effect. I fixed it, and replaced the plots posted earlier today. The original plots are here and here. Now the acceptances from the two generated samples are much more similar. Both use 40M generated events.
- The first six plots show acceptance in each x bin resulting from data generated using a flat φ and data generated using the Cahn effect.

- Here are the generated and reconstructed φ distributions with the Cahn effect included.

- Here are fits to the φ distributions using 40M generated events (10% of my total sample) with the Cahn effect included. The minimum acceptance cut is at 2%.

- Completed Table 4, which divides each value in table 2 by the corresponding acceptance in table 3, and is observed to return exactly table 1 except for bins where acceptance is below 2%, which are set to zero.

- Have so far created the first three tables that Kyungseon asked for in email earlier today. The the first two show the number of generated and reconstructed events in each bin using the simulation including the Cahn effect. The third shows the acceptance in each bin.
- Table 1: Generated Events
- Table 2: Reconstructed Events
- Table 3: Acceptance

- Working on fits to the φ distributions in each x bin corrected with the flat acceptance for π
^{-}. Following Mauri's suggestion I have been testing a minimum acceptance cut. The following fits with different cuts are as follows:- Acceptance>0.1%

- Acceptance>0.5%

- Acceptance>1.0%

- Acceptance>2.0%

- Acceptance>0.1%

- Here are plots of acceptance for π
^{-}from the flat φ simulation, each as a function of only one kinematic variable z, x, and P_{T}with φ_{h}.

- A recap of yesterday's meeting is here.
- Fit the φ distributions from the event generator with the Cahn effect included, which shows larger values of A
^{cosφ}than I expected. The plots are posted here. - Below is the acceptance calculated in one dimension (φ only) for π
^{-}using the MC with a flat φ distribution.

In the first plot, the red is generated and the blue is reconstructed. The second plot shows the acceptance (or the ratio of the two).

The following plot applies the above acceptance to E1-f π^{-}data.

- I am currently creating a set of generated data files for using a flat φ distributions. These are running on the batch farm now.
- I have modified my program to match Osipenko's binning in z and P
_{T}to make a detailed comparison using the same bins. The program is running to fill the histograms using this binning. - I have been looking at my acceptance calculation and trying to determine the source of the few bins with very large A
^{cosφ}. I examined each bin in the 4-dimensional binning and compared the reconstructed φ distributions from GSim to those in the E1-f dataset [1], and made a list of bins where the distributions did not match. The bins that do not match all lie in the region of z<0.3 and P_{T}>0.6. There is no noticable dependence on x or Q^{2}. I integrated over x and Q^{2}and fit the data in each z, P_{T}bin. The results are displayed below, showing a trend opposite to my expectation that the low z, high P_{T}bins would have very large value of A^{cosφ}. Instead the magnitude of A^{cosφ}increases with z.

Also, here is a plot of z vs P_{t}for GSim reconstructed π^{-}

- I have updated my φ fits in 4-dimensional binning and when integrated over Q
^{2}. The plots are shown here: - Now working on two sets of 2D binning. For the first I integrate over 0.4<z<0.7 and look at x vs P
_{T}binning, and for the second I integrate over x and bin in P_{T}and z. The second set I will need for comparison to Osipenko's results.

- I have posted very preliminary fits for my cosφ and cos2φ moments. The fits shown are using the full 4D binning in x, P
_{T}, z, and Q^{2}. I am currently going through bin by bin to improve the fits. I also am testing different binning and seeing how much my fits improve if I integrate over Q^{2}and/or z. The fits are posted here. - I updated the simulated event numbers for π
^{-}here, - Today I gave Peter a revised copy of the theoretical chapter for my thesis.

- Posted a summary of my simulation so far. I am processing another batch of π
^{-}events to add to this total. - I am working on binning and fitting of the acceptance-corrected φ distributions.
- I have been working on an updated version of the theory chapter for my thesis incorporating Peter's comments, which I will send soon.

- Redid acceptance calculation for π
^{-}with updated code which eliminated the peak at φ=0. The plots on the web have been updated to reflect the change. - I met with Peter again to discuss my thesis chapter and am continuing to edit and add to it. I will send an updated version soon.

- One the web page showing acceptance plots there is now a button to choose the φ range between 0 to 360 or -180 to 180. I found a bug in my π
^{-}ID code that caused the spike at φ=0. I have corrected this and am running my code to refill the histograms. Plots are located here.

- Posted five-dimensional acceptance calculation for π
^{-}here. Some bins have a spike in the GSim reconstructed data at φ=0. I am currently working to determine the cause of this spike. - Processed about 35M simulated events on the batch farm.

- Began working on new calculation of acceptance for π
^{-} - Processed about 35M events on the batch farm.
- Peter gave me many suggestions to improve the theory chapter of my thesis, so I am working on implementing his comments.

- Posted five-dimensional acceptance calculation for π
^{+}here. - Batch farm processed about 6M simulated events today.

- Processed 29M pi- events on the batch farm and prepared another 130M pi+ events to be submitted tomorrow.
- Ran analysis program on simulated data, giving 22M reconstructed pi+ events passing the SIDIS cuts (compared to 9M from E1-f data).
- Currently working on acceptance calculation for pi+.

- Over the weekend the batch farm has completed processing 67M π
^{-}events. I have started generating a new batch of π^{+}events to be submitted when this finishes. - Completed pion id for simulated data, as shown below. I am currently running my analysis program over all my simulated data files for π
^{+}.

- Finished electron id part of analysis program for simulated data. Working on pion id.
- Batch farm processed 2M simulated pi- events today.

- Finished debugging analysis program for simulated data and am working on updating particle id routines.
- Batch farm completed processing of 5M simulated pi- events.

- Completed 15M simulated pi- events on the batch farm.
- Made progress updating new version of analysis program for simulated data.
- Finished preliminary draft of the theoretical chapter of my thesis. I plan to go through this with Peter and ask him for any suggestions.

- My jlab.org website is still not accessible, so I will temporarily post daily updates at this location.
- I am almost finished with a draft of my theoretical chapter for my thesis, and will send out the draft soon.
- I have been running my event generator to improve the size of my generated data sample. I started a batch of 130M events each of π
^{+}and π^{-}. I have completed about 90% of the π^{+}events, and am currently running the generator for the π^{-}events, which will be submitted to the batch farm tomorrow. - Since I have made several recent modifications to my analysis program, I am working on testing and updating the newest version of the program to work with my simulated data.