December 6, 2011

I am still working on reproducing the Cahn effect implementation in the event generator in my weighting program. In the event generator, the effect is applied by:

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

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, PT and Q2, and cahnmax = y11+cahn1+2*cahn2.

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:
  1. 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?
  2. 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?
  3. 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 φ?
Here the red points are the data applying the weighting procedure above.

December 3, 2011

I am still working on understanding how the Cahn effect is included in the clasDIS event generator. I am using two methods. The first is to go through the clasDIS code to try to better understand how the Cahn effect is included. The second is to go back to the original Cahn paper to see what the analytic function should be.

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.
clasDISCahn paper
<cosφ> 4(1-y)1/2(2-y)PT/Q 2(1-y)1/2(2-y)PT/Q × (1+(1-y)2)-1z2/(1+z2)
<cos2φ> 4(1-y)PT2/Q2 2(1-y)PT2/Q2 × (1+(1-y)2)-1z4/(1+z2)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.

November 16, 2011

Using fixed kinematics, I am attempting to determine the z-dependence of the Cahn effect as it is included in the event generator. I fit the distribution in φ due to the Cahn effect in four z bins holding PT, y, and Q2 constant. By fitting the coefficients on the φ function as a function of z, I can estimate the required z-dependence. Many functions of z were attempted, but a 2nd order polynomial has given the closest results.

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.

November 11, 2011

The following are plots of φ for fixed kinematics using the same values of PT, Q2, and y, and two different values of z. The low statistics make it hard to see variations by eye, so the MC data including the Cahn effect are fit to make a comparison. The solid black curve is the analytic function calculated from PT, Q2, and y (It is NOT a fit). Small differences in the analytic function are because the values used for each kinematic variable are the RMS values after the z cuts, so although the cuts on PT, Q2, and y do not change, the RMS can still have a small fluctuation. I am in the prcess of reproducing the two plots below for two different values of z in order to better see the relationship.

November 9, 2011

Below are two plots of the generated φ using very specific kinematics, overlaid with the analysic function of the Cahn effect that is used to weight the flat events. Two kinematic points are compared, both of which show good agreement between the weighted events and the analytic function. The function is a function of PT, Q2, and y. Specific values of PT and Q2 were chosen for each test, and the RMS value of y after the cut is used to compute the Cahn function.

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

November 3, 2011

Below is a comparison of φ binned in z for each of the six sectors in CLAS. At first glance there does not seem to be a large difference between the sectors, but when the data is fit it can be seen that the discrepencies between each sector are very large. The plots below use only the flat φ with no weighting, but a comparison using data generated with the Cahn effect and flat data weighted with the Cahn effect is underway.

October 26, 2011

October 25, 2011

I am working on an event weighting procedure to mirror the Cahn routing implemented in the event generator. To do so I weight each event from the flat φ distribution with the following function:
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.

October 21, 2011

The following are plots showing the weighting procedure for acceptance calculation.

October 19, 2011

Today's update contains the following:
  1. Comparison between MX>1.2 and MX>1.5 using flat φ
  2. Comparison between flat φ and Cahn effect using MX>1.5 GeV and y<0.8.
  3. Purity plots using flat φ and Cahn effect.
  4. Kinematic plots using MX>1.5 GeV and y<0.8.

October 18, 2011

October 17, 2011

Below are plots of kinematic variables between experimental and simulated data. There is a large difference in pion θ, as well as small differences in some other variables. I am currently running my analysis program on simulated data using a momentum-matching algorithm to assure that for each event, the reconstructed pion with the highest energy is coming from the generated pion with the highest energy. Tomorrow I will remake the kinematic plots below to see if this matching algorithm provides any improvement. I am also currently creating histograms to calculate the purity in each bin. Next I will perform the weighting analysis procedure.

October 15, 2011

October 14, 2011

I fixed a bug in my code that was causing the missing mass cut to not be correctly applied. which greatly improved the φ distributions. For the following plots and fits to φ I used the simulation including the Cahn effect. I am currently running the program on the files simulated with the flat φ distribution for comparison.

October 12, 2011

The following show acceptance corrections in three dimensions in terms of (z, x, φ) and (z, Q2, φ) using 72 bins in φ.

October 11, 2011

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 φ.

October 10, 2011

October 6, 2011

These are showing Monte-carlo data that has been reconstructed in GSim, and then corrected with the computed acceptance. We want to see the 2nd row reproducing the 1st row and the 4th row reproducing the 3rd row. I adjusted the range of the fits to only include data points between 30-330o, ignoring the edges.

October 5, 2011

Here is z-dependence for π+ using 2o bins in φ..

October 4, 2011

Here using 2o bins in φ (previous plots used 5o bins).

October 3, 2011

September 29, 2011

Here are fits giving the z dependence of Acosφ using 40M generated events comparing the two φ distributions.

September 27, 2011

September 26, 2011

September 22, 2011

September 21, 2011

September 19, 2011

September 16, 2011

September 6, 2011

August 24, 2011

August 18, 2011

August 15, 2011

August 11, 2011

August 9, 2011

August 6, 2011

August 5, 2011

August 3, 2011

August 1, 2011

July 31, 2011

July 28, 2011

July 27, 2011

July 26, 2011

July 25, 2011