Difference between revisions of "Looking at effects of Solenoid on Phi Shifts"

From New IAC Wiki
Jump to navigation Jump to search
(Undo revision 105796 by Vanwdani (Talk))
 
(50 intermediate revisions by the same user not shown)
Line 1: Line 1:
=[[Using Moller Data to alter energy range]]==
+
=[[Using Moller Data to alter energy range]]=
  
 +
Using the Moller event file MollerScattering_NH3_4e8incident.dat, we can use the fact that GEMC will only recreate a particle based on the Moller electron.  While the data for the scattered electron is passed within a LUND file, kinematically this electron doesn't leave the beam line, and thus never enters the detectors to be recreated.  Since the solenoid's purpose is draw electrons trajectories closer the the beam line any electron close the the beam line will be drawn even closer, ensuring that it is never recreated in a GEMC simulation.
  
 +
We can alter the energy conversion from MollerScattering_NH3_4e8incident.dat to investigate the energy-phi shift relationship
  
=[[Solenoid effect in > 2 GeV range]]=
+
<center>[[File:FinalTheta.jpg]]</center>
  
=[[Solenoid effect in >200 MeV range]]=
 
  
=[[Solenoid effect in >20 MeV range]]=
+
Plotting Scattering angle Theta vs. Total Energy for the Moller and scattered electron in the Lab frame.
  
 +
<center>[[File:Theta_Energy_Lab.png]]</center>
  
 +
 +
For the scattered electrons at theta of 90 degrees, these particles will not enter the detector and as a result are of no concern.  Zooming in on the Moller electron in the scattering angle theta vs. energy:
 +
 +
<center>[[File:Moller_Theta_E_lab.png]]</center>
 +
 +
 +
Using the fact that the minimum momentum of MollerScattering_NH3_4e8incident.dat is about 2 MeV,
 +
 +
<pre>
 +
awk 'NR == 1 {line = $0; min = $15} NR >1 && $15 < min {line =$0; min =$15} END{print line}' MollerScattering_NH3_4e8incident.dat
 +
 +
11000    0    0    11000.5    0    0    0    10997.9    1.42548    -0.177032    10998.4    0    0    0    2.01929    -1.42548    0.177032    2.01939    0    0    0 </pre>
 +
 +
and the maximum of about 5500 MeV,
 
<pre>
 
<pre>
void Effects_GeV()
+
awk 'NR == 1 {line = $0; max = $15} NR >1 && $15 > max {line =$0; max =$15} END{print line}' MollerScattering_NH3_4e8incident.dat
{
+
 
        struct evt_t
+
11000    0    0    11000.5    0    0    0    5500.31    28.1338    -44.9298    5500.56    0    0    0    5498.52    -28.1338    44.9298    5498.78    0    0    0</pre>
                {
+
 
                Int_t event;
+
At this energy for the scattered electron:
                Float_t KE;
+
 
                Float_t shift;
+
Relativistically, the x and y components remain the same in the conversion from the Lab frame to the Center of Mass frame, since the direction of motion is only in the z direction.
                };
+
 
        ifstream in;
+
 
        evt_t evt;
+
 
 +
{| class="wikitable" align="center"
 +
| style="background: gray"      | <math>p^*_{2(x)}\Leftrightarrow p_{2(x)}'</math>
 +
|}
 +
 
 +
 
 +
{| class="wikitable" align="center"
 +
| style="background: gray"  | <math>p^*_{2(y)}\Leftrightarrow p_{2(y)}'</math>
 +
|}
 +
 
 +
 
 +
 
 +
{| class="wikitable" align="center"
 +
| style="background: gray"  | <math>p^*_{2(z)}=\sqrt {(p^*_2)^2-(p^*_{2(x)})^2-(p^*_{2(y)})^2}</math>
 +
|}
  
        double E,delta_phi;
 
        Int_t nlines=0;
 
  
        float Base_Number1,Base_Number2,Base_Number3,Base_Number4,Base_Number5=0;
 
        float normal1,normal2,normal3,normal4,normal5;
 
        float neg5T_number1,neg5T_number2,neg5T_number3,neg5T_number4,neg5T_number5;
 
        float pos5T_number1,pos5T_number2,pos5T_number3,pos5T_number4,pos5T_number5;
 
        float neg25T_number1,neg25T_number2,neg25T_number3,neg25T_number4,neg25T_number5;
 
        float pos25T_number1,pos25T_number2,pos25T_number3,pos25T_number4,pos25T_number5;
 
        float pos6T_number1,pos6T_number2,pos6T_number3,pos6T_number4,pos6T_number5;
 
        float pos4T_number1,pos4T_number2,pos4T_number3,pos4T_number4,pos4T_number5;
 
        float avg_0T,avg_pos5T,avg_neg5T,avg_neg25T,avg_pos25T,avg_pos4T,avg_pos6T;
 
        float total_0T,total_pos5T,total_neg5T,total_pos25T,total_neg25T,total_pos4T,total_pos6T;
 
        float stderror_0T,stderror_pos5T,stderror_neg5T,stderror_pos25T,stderror_neg25T,stderror_pos4T,stderror_pos6T;
 
  
        TFile *f = new TFile("Phi_Shift_counts_GeV.root","RECREATE");
 
        TTree *tree = new TTree("Phi_Shift_counts_GeV","Phi Shift counts wrt 0T");
 
  
 +
<center>[[File:xz_lab.png | 400 px]]</center>
 +
<center>'''Figure 2: Definition of Moller electron variables in the Lab Frame in the x-z plane.'''</center>
  
//
 
//Count entries from 0T
 
//
 
        in.open("Energy_Phi_Shift_GeV_0T_1.dat");
 
        tree->Branch("evt",&evt.event,"event/I:KE/F:shift");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
                }
 
        Base_Number1=nlines;
 
        normal1=Base_Number1/Base_Number1;
 
        nlines=0;
 
        in.close();
 
  
        in.open("Energy_Phi_Shift_GeV_0T_2.dat");
+
<center><math>\theta '_2\equiv \arccos \left(\frac{p^'_{2(z)}}{p^'_{2}}\right) = \arccos \left(\frac{28.1338}{5500.8154}\right) \approx 1.5</math> degrees</center>
        tree->Branch("evt",&evt.event,"event/I:KE/F:shift");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
                }
 
        Base_Number2=nlines;
 
        normal2=Base_Number2/Base_Number2;
 
        nlines=0;
 
        in.close();
 
  
        in.open("Energy_Phi_Shift_GeV_0T_3.dat");
+
This is still within the 7 degrees of the detector "cone" with respect to the beam line.
  
        tree->Branch("evt",&evt.event,"event/I:KE/F:shift");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
                } 
 
        Base_Number3=nlines;
 
        normal3=Base_Number3/Base_Number3;
 
        nlines=0;
 
        in.close();
 
  
        in.open("Energy_Phi_Shift_GeV_0T_4.dat");
+
We can alter the lines
        tree->Branch("evt",&evt.event,"event/I:KE/F:shift");
+
<pre>
        while(in.good())
+
    Px=evt.FnlMom[0]/1000;
                {
+
                 Py=evt.FnlMom[1]/1000;
                 evt.event=nlines;
+
                 Pz=evt.FnlMom[2]/1000;              
                 in >> evt.KE >> evt.shift;
+
                 px=evt.MolMom[0]/1000;
                nlines++;
+
                py=evt.MolMom[1]/1000;
                 }
+
                 pz=evt.MolMom[2]/1000;
        Base_Number4=nlines;
 
        normal4=Base_Number4/Base_Number4;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_0T_5.dat");
 
        tree->Branch("evt",&evt.event,"event/I:KE/F:shift");
 
        while(in.good())
 
                {
 
                 evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
                }
 
        Base_Number5=nlines;
 
        normal5=Base_Number5/Base_Number5;
 
        nlines=0;
 
        in.close();
 
 
                  
 
                  
               
+
                KE=evt.FnlKE/1000;
//
+
                ke=evt.MolKE/1000;
// Normalize the -5T file
+
</pre>
//
+
 
        in.open("Energy_Phi_Shift_GeV_neg5T_1.dat");
+
Dividing by 1 will give us a distribution of 2GeV-5500 GeV.
        while(in.good())
+
 
                {
+
Divinding by 10 will give us a distribution of 0.2GeV-550 GeV
                evt.event=nlines;
+
 
                in >> evt.KE >> evt.shift;
+
Dividing by 100 will give us a distribution of 0.02GeV-55 GeV
                nlines++;
+
 
               
+
=[[Solenoid_effect_in_ 2_GeV_and_up_range|Solenoid effect > 2GeV]]=
                }
+
 
        neg5T_number1=nlines/Base_Number1;
+
The number of of reconstructed GEMC events  registering a shift in their phi angle due to the magnetic field of the solenoid are recorded. This is repeated for each of the five unique LUND files for each of the 7 magnetic fields being investigated. A similar process of recording the number of phi shifts is repeated for each magnetic field. Each quantity of phi shifts for non-zero magnetic fields  is normalized with respect to the number of phi shifts at with the corresponding LUND file for 0T (<math>x_i</math>).  This information is used to find the corrected sample standard deviation:
        nlines=0;
+
 
        in.close();
+
<center><math>\sigma \equiv \sqrt{\frac{1}{N-1} \sum_{k=1}^N (x_i+\bar{x})^2}</math></center>
       
+
 
        in.open("Energy_Phi_Shift_GeV_neg5T_2.dat");
+
 
        while(in.good())
+
Creating a dat file with the magnetic field, phi shift, and the corrected sample standard deviation:
                {
+
 
                evt.event=nlines;
+
{| border=1 align=center
                in >> evt.KE >> evt.shift;
+
  |+ Phi Change vs. Magnetic Field of Solenoid for 2-11GeV Moller Electrons
                nlines++;
+
|-
               
+
  ! Magnetic Field (T)
                }
+
  ! <math>\Delta \ \phi </math>(degrees)
        neg5T_number2=nlines/Base_Number2;
+
  ! <math>\sigma</math>(degrees)
        nlines=0;
+
|-
        in.close();
+
  | -5
       
+
  | 0.748315
        in.open("Energy_Phi_Shift_GeV_neg5T_3.dat");
+
  | 0.0164881
        while(in.good())
+
|-
                { 
+
  | -2
                evt.event=nlines;
+
  | 0.899798
                in >> evt.KE >> evt.shift;
+
  | 0.0147794
                nlines++;
+
|-
       
+
  | 0
                }
+
  | 1
        neg5T_number3=nlines/Base_Number3;
+
  | 0
        nlines=0;
+
|-
        in.close();
+
  | 2
               
+
  | 0.895382
        in.open("Energy_Phi_Shift_GeV_neg5T_4.dat");
+
  | 0.0235786
        while(in.good())
+
|-
                {
+
  | 4
                evt.event=nlines;
+
  | 0.809941
                in >> evt.KE >> evt.shift;
+
  | 0.00795766
                nlines++;
+
|-
       
+
  | 5
                }
+
  |  0.740047
        neg5T_number4=nlines/Base_Number4;
+
  | 0.0201546
        nlines=0;
+
|-
        in.close();
+
  | 6
               
+
  | 0.708541
        in.open("Energy_Phi_Shift_GeV_neg5T_5.dat");
+
  | 0.0172073
        while(in.good())
+
|}
                {
+
 
                evt.event=nlines;
+
Xmgrace can be used to plot this:
                in >> evt.KE >> evt.shift;
+
<center>[[File:GeV.png]]</center>
                nlines++;
+
 
               
+
Investigating a plot of the distribution of the particles energy as a function of the change in the angle phi for the different magnetic fields.
                }
+
 
        neg5T_number5=nlines/Base_Number5;
+
<center>[[File:Composite_Fields.png]]</center>
        nlines=0;
+
 
        in.close();
+
=[[Solenoid effect in 200 MeV and up range|Solenoid effect > 200 MeV]]=
       
+
 
               
+
Creating a dat file with the magnetic field, phi shift, and the corrected sample standard deviation:
//
+
 
// Normalize the 5T file
+
{| border=1 align=center
//
+
  |+ Phi Change vs. Magnetic Field of Solenoid for 2-11GeV Moller Electrons
        in.open("Energy_Phi_Shift_GeV_pos5T_1.dat");
+
|-
        while(in.good())
+
  ! Magnetic Field (T)
                {
+
  ! <math>\Delta \ \phi </math>(degrees)
                evt.event=nlines;
+
  ! <math>\sigma</math>(degrees)
                in >> evt.KE >> evt.shift;
+
|-
                nlines++;
+
  | -5
       
+
  | 0.0585341
                }
+
  | 0.00740803
        pos5T_number1=nlines/Base_Number1;
+
|-
        nlines=0;
+
  | -2
        in.close();
+
  | 0.138686
               
+
  | 0.0308416
        in.open("Energy_Phi_Shift_GeV_pos5T_2.dat");
+
|-
        while(in.good())
+
  | 0
                {
+
  | 1
                evt.event=nlines;
+
  | 0
                in >> evt.KE >> evt.shift;
+
|-
                nlines++;
+
  | 2
       
+
  | 0.131325
                }
+
  | 0.0234678
        pos5T_number2=nlines/Base_Number2;
+
|-
        nlines=0;
+
  | 4
        in.close();
+
  | 0.0646613
               
+
  | 0.0133132
       
+
|-
        in.open("Energy_Phi_Shift_GeV_pos5T_3.dat");
+
  | 5
        while(in.good())
+
  |  0.059031
                {
+
  | 0.0122767
                evt.event=nlines;
+
|-
                in >> evt.KE >> evt.shift;
+
  | 6
                nlines++;
+
  | 0.051293
       
+
  | 0.00876825
                }
+
|}
        pos5T_number3=nlines/Base_Number3;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos5T_4.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos5T_number4=nlines/Base_Number4;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos5T_5.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
 
    
 
    
                }
+
Xmgrace can be used to plot this:
        pos5T_number5=nlines/Base_Number5;
+
<center>[[File:MeV.png]]</center>
        nlines=0;
+
 
        in.close();
+
=[[Solenoid effect 20 MeV and up|Solenoid effect > 20MeV]]=
               
+
 
               
+
No Phi shifts for Energies in this range where found in the simulation.
//
+
 
// Normalize the -2.5T file
 
//     
 
        in.open("Energy_Phi_Shift_GeV_neg25T_1.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        neg25T_number1=nlines/Base_Number1;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_neg25T_2.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        neg25T_number2=nlines/Base_Number2;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_neg25T_3.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        neg25T_number3=nlines/Base_Number3;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_neg25T_4.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        neg25T_number4=nlines/Base_Number4;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_neg25T_5.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        neg25T_number5=nlines/Base_Number5;
 
        nlines=0;
 
        in.close();
 
       
 
               
 
//
 
// Normalize the 2.5T file
 
//
 
        in.open("Energy_Phi_Shift_GeV_pos25T_1.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos25T_number1=nlines/Base_Number1;
 
        nlines=0;
 
               
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos25T_2.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos25T_number2=nlines/Base_Number2;
 
        nlines=0;
 
               
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos25T_3.dat");
 
        while(in.good())
 
                {  
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos25T_number3=nlines/Base_Number3;
 
        nlines=0;
 
       
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos25T_4.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos25T_number4=nlines/Base_Number4;
 
        nlines=0;
 
               
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos25T_5.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos25T_number5=nlines/Base_Number5;
 
        nlines=0;
 
               
 
        in.close();
 
       
 
               
 
//
 
// Normalize the 6T file
 
//             
 
        in.open("Energy_Phi_Shift_GeV_pos6T_1.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos6T_number1=nlines/Base_Number1;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos6T_2.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos6T_number2=nlines/Base_Number2;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos6T_3.dat");
 
        while(in.good())
 
                { 
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos6T_number3=nlines/Base_Number3;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos6T_4.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos6T_number4=nlines/Base_Number4;
 
        nlines=0;
 
        in.close();
 
       
 
        in.open("Energy_Phi_Shift_GeV_pos6T_5.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos6T_number5=nlines/Base_Number5;
 
        nlines=0;
 
        in.close();
 
       
 
               
 
//
 
// Normalize the 4T file
 
//
 
        in.open("Energy_Phi_Shift_GeV_pos4T_1.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos4T_number1=nlines/Base_Number1;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos4T_2.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos4T_number2=nlines/Base_Number2;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos4T_3.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos4T_number3=nlines/Base_Number3;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos4T_4.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
       
 
                }
 
        pos4T_number4=nlines/Base_Number4;
 
        nlines=0;
 
        in.close();
 
               
 
        in.open("Energy_Phi_Shift_GeV_pos4T_5.dat");
 
        while(in.good())
 
                {
 
                evt.event=nlines;
 
                in >> evt.KE >> evt.shift;
 
                nlines++;
 
               
 
                }
 
        pos4T_number5=nlines/Base_Number5;
 
        nlines=0;
 
        in.close();
 
       
 
               
 
//
 
// Calculate the error bars
 
//
 
//      B=0T
 
        total_0T=normal1+normal2+normal3+normal4+normal5;
 
        avg_0T=total_0T/5;
 
       
 
//      B=5T
 
        total_pos5T=pos5T_number1+pos5T_number2+pos5T_number3+pos5T_number4+pos5T_number5;
 
        avg_pos5T=total_pos5T/5;
 
       
 
//      B=-5T
 
        total_neg5T=neg5T_number1+neg5T_number2+neg5T_number3+neg5T_number4+neg5T_number5;
 
        avg_neg5T=total_neg5T/5;
 
               
 
//      B=2.5T
 
        total_pos25T=pos25T_number1+pos25T_number2+pos25T_number3+pos25T_number4+pos25T_number5;
 
        avg_pos25T=total_pos25T/5;
 
       
 
//      B=-2.5T
 
        total_neg25T=neg25T_number1+neg25T_number2+neg25T_number3+neg25T_number4+neg25T_number5;
 
        avg_neg25T=total_neg25T/5;
 
       
 
//      B=4T
 
        total_pos4T=pos4T_number1+pos4T_number2+pos4T_number3+pos4T_number4+pos4T_number5;
 
        avg_pos4T=total_pos4T/5;
 
               
 
//      B=6T
 
        total_pos6T=pos6T_number1+pos6T_number2+pos6T_number3+pos6T_number4+pos6T_number5;
 
        avg_pos6T=total_pos6T/5;
 
       
 
        stderror_0T=0;
 
        stderror_0T=(normal1-avg_0T)*(normal1-avg_0T)+stderror_0T;
 
        stderror_0T=(normal2-avg_0T)*(normal2-avg_0T)+stderror_0T;
 
        stderror_0T=(normal3-avg_0T)*(normal3-avg_0T)+stderror_0T;
 
        stderror_0T=(normal4-avg_0T)*(normal4-avg_0T)+stderror_0T;
 
        stderror_0T=(normal5-avg_0T)*(normal5-avg_0T)+stderror_0T;
 
        stderror_0T=sqrt(stderror_0T);
 
        stderror_0T=stderror_0T/4;
 
       
 
        stderror_pos5T=0;
 
        stderror_pos5T=(pos5T_number1-avg_pos5T)*(pos5T_number1-avg_pos5T)+stderror_pos5T;
 
        stderror_pos5T=(pos5T_number2-avg_pos5T)*(pos5T_number2-avg_pos5T)+stderror_pos5T;
 
        stderror_pos5T=(pos5T_number3-avg_pos5T)*(pos5T_number3-avg_pos5T)+stderror_pos5T;
 
        stderror_pos5T=(pos5T_number4-avg_pos5T)*(pos5T_number4-avg_pos5T)+stderror_pos5T;
 
        stderror_pos5T=(pos5T_number5-avg_pos5T)*(pos5T_number5-avg_pos5T)+stderror_pos5T;
 
        stderror_pos5T=sqrt(stderror_pos5T);
 
        stderror_pos5T=stderror_pos5T/4;
 
               
 
        stderror_neg5T=0;
 
        stderror_neg5T=(neg5T_number1-avg_neg5T)*(neg5T_number1-avg_neg5T)+stderror_neg25T;
 
        stderror_neg5T=(neg5T_number1-avg_neg5T)*(neg5T_number1-avg_neg5T)+stderror_neg25T;
 
        stderror_neg5T=(neg5T_number1-avg_neg5T)*(neg5T_number1-avg_neg5T)+stderror_neg25T;
 
        stderror_neg5T=(neg5T_number1-avg_neg5T)*(neg5T_number1-avg_neg5T)+stderror_neg25T;
 
        stderror_neg5T=(neg5T_number1-avg_neg5T)*(neg5T_number1-avg_neg5T)+stderror_neg25T;
 
        stderror_neg5T=sqrt(stderror_neg5T);
 
        stderror_neg5T=stderror_neg5T/4;
 
               
 
        stderror_neg25T=0;
 
        stderror_neg25T=(neg25T_number1-avg_neg25T)*(neg25T_number1-avg_neg25T)+stderror_neg25T;
 
        stderror_neg25T=(neg25T_number2-avg_neg25T)*(neg25T_number2-avg_neg25T)+stderror_neg25T;
 
        stderror_neg25T=(neg25T_number3-avg_neg25T)*(neg25T_number3-avg_neg25T)+stderror_neg25T;
 
        stderror_neg25T=(neg25T_number4-avg_neg25T)*(neg25T_number4-avg_neg25T)+stderror_neg25T;
 
        stderror_neg25T=(neg25T_number5-avg_neg25T)*(neg25T_number5-avg_neg25T)+stderror_neg25T;
 
        stderror_neg25T=sqrt(stderror_neg25T);
 
        stderror_neg25T=stderror_neg25T/4;
 
       
 
        stderror_pos25T=0;
 
        stderror_pos25T=(pos25T_number1-avg_pos25T)*(pos25T_number1-avg_pos25T)+stderror_pos25T;
 
        stderror_pos25T=(pos25T_number2-avg_pos25T)*(pos25T_number2-avg_pos25T)+stderror_pos25T;
 
        stderror_pos25T=(pos25T_number3-avg_pos25T)*(pos25T_number3-avg_pos25T)+stderror_pos25T;
 
        stderror_pos25T=(pos25T_number4-avg_pos25T)*(pos25T_number4-avg_pos25T)+stderror_pos25T;
 
        stderror_pos25T=(pos25T_number5-avg_pos25T)*(pos25T_number5-avg_pos25T)+stderror_pos25T;
 
        stderror_pos25T=sqrt(stderror_pos25T);
 
        stderror_pos25T=stderror_pos25T/4;
 
       
 
        stderror_pos4T=0;
 
        stderror_pos4T=(pos4T_number1-avg_pos4T)*(pos4T_number1-avg_pos4T)+stderror_pos4T;
 
        stderror_pos4T=(pos4T_number2-avg_pos4T)*(pos4T_number2-avg_pos4T)+stderror_pos4T;
 
        stderror_pos4T=(pos4T_number3-avg_pos4T)*(pos4T_number3-avg_pos4T)+stderror_pos4T;
 
        stderror_pos4T=(pos4T_number4-avg_pos4T)*(pos4T_number4-avg_pos4T)+stderror_pos4T;
 
        stderror_pos4T=(pos4T_number5-avg_pos4T)*(pos4T_number5-avg_pos4T)+stderror_pos4T;
 
        stderror_pos4T=sqrt(stderror_pos4T);
 
        stderror_pos4T=stderror_pos4T/4;
 
               
 
        stderror_pos6T=0;
 
        stderror_pos6T=(pos6T_number1-avg_pos6T)*(pos6T_number1-avg_pos6T)+stderror_pos6T;
 
        stderror_pos6T=(pos6T_number2-avg_pos6T)*(pos6T_number2-avg_pos6T)+stderror_pos6T;
 
        stderror_pos6T=(pos6T_number3-avg_pos6T)*(pos6T_number3-avg_pos6T)+stderror_pos6T;
 
        stderror_pos6T=(pos6T_number4-avg_pos6T)*(pos6T_number4-avg_pos6T)+stderror_pos6T;
 
        stderror_pos6T=(pos6T_number5-avg_pos6T)*(pos6T_number5-avg_pos6T)+stderror_pos6T;
 
        stderror_pos6T=sqrt(stderror_pos6T);
 
        stderror_pos6T=stderror_pos6T/4;
 
     
 
// Make an xmgrace file
 
       
 
        fprintf(stdout,"%d %g %g\n",-5,avg_neg5T,stderror_neg5T);
 
        fprintf(stdout,"%d %g %g\n",-2.5,avg_neg25T,stderror_neg25T);
 
        fprintf(stdout,"%d %g %g\n",0,avg_0T,stderror_0T);
 
        fprintf(stdout,"%d %g %g\n",2.5,avg_pos25T,stderror_pos25T);
 
        fprintf(stdout,"%d %g %g\n",4,avg_pos4T,stderror_pos4T);
 
        fprintf(stdout,"%d %g %g\n",5,avg_pos5T,stderror_pos5T);
 
        fprintf(stdout,"%d %g %g\n",6,avg_pos6T,stderror_pos6T);
 
       
 
       
 
        tree->Print();
 
        tree->Write(); 
 
        f->Write();
 
       
 
        delete tree;
 
        delete f;
 
       
 
}
 
</pre>
 
  
 
----
 
----

Latest revision as of 22:26, 14 April 2016

Using Moller Data to alter energy range

Using the Moller event file MollerScattering_NH3_4e8incident.dat, we can use the fact that GEMC will only recreate a particle based on the Moller electron. While the data for the scattered electron is passed within a LUND file, kinematically this electron doesn't leave the beam line, and thus never enters the detectors to be recreated. Since the solenoid's purpose is draw electrons trajectories closer the the beam line any electron close the the beam line will be drawn even closer, ensuring that it is never recreated in a GEMC simulation.

We can alter the energy conversion from MollerScattering_NH3_4e8incident.dat to investigate the energy-phi shift relationship

FinalTheta.jpg


Plotting Scattering angle Theta vs. Total Energy for the Moller and scattered electron in the Lab frame.

Theta Energy Lab.png


For the scattered electrons at theta of 90 degrees, these particles will not enter the detector and as a result are of no concern. Zooming in on the Moller electron in the scattering angle theta vs. energy:

Moller Theta E lab.png


Using the fact that the minimum momentum of MollerScattering_NH3_4e8incident.dat is about 2 MeV,

awk 'NR == 1 {line = $0; min = $15} NR >1 && $15 < min {line =$0; min =$15} END{print line}' MollerScattering_NH3_4e8incident.dat

11000    0     0     11000.5     0     0     0     10997.9     1.42548     -0.177032     10998.4     0     0     0     2.01929     -1.42548     0.177032     2.01939     0     0     0 

and the maximum of about 5500 MeV,

awk 'NR == 1 {line = $0; max = $15} NR >1 && $15 > max {line =$0; max =$15} END{print line}' MollerScattering_NH3_4e8incident.dat

11000    0     0     11000.5     0     0     0     5500.31     28.1338     -44.9298     5500.56     0     0     0     5498.52     -28.1338     44.9298     5498.78     0     0     0

At this energy for the scattered electron:

Relativistically, the x and y components remain the same in the conversion from the Lab frame to the Center of Mass frame, since the direction of motion is only in the z direction.


[math]p^*_{2(x)}\Leftrightarrow p_{2(x)}'[/math]


[math]p^*_{2(y)}\Leftrightarrow p_{2(y)}'[/math]


[math]p^*_{2(z)}=\sqrt {(p^*_2)^2-(p^*_{2(x)})^2-(p^*_{2(y)})^2}[/math]



Xz lab.png
Figure 2: Definition of Moller electron variables in the Lab Frame in the x-z plane.


[math]\theta '_2\equiv \arccos \left(\frac{p^'_{2(z)}}{p^'_{2}}\right) = \arccos \left(\frac{28.1338}{5500.8154}\right) \approx 1.5[/math] degrees

This is still within the 7 degrees of the detector "cone" with respect to the beam line.


We can alter the lines

    Px=evt.FnlMom[0]/1000;
                Py=evt.FnlMom[1]/1000;
                Pz=evt.FnlMom[2]/1000;                
                px=evt.MolMom[0]/1000;
                py=evt.MolMom[1]/1000;
                pz=evt.MolMom[2]/1000;
                
                KE=evt.FnlKE/1000;
                ke=evt.MolKE/1000;

Dividing by 1 will give us a distribution of 2GeV-5500 GeV.

Divinding by 10 will give us a distribution of 0.2GeV-550 GeV

Dividing by 100 will give us a distribution of 0.02GeV-55 GeV

Solenoid effect > 2GeV

The number of of reconstructed GEMC events registering a shift in their phi angle due to the magnetic field of the solenoid are recorded. This is repeated for each of the five unique LUND files for each of the 7 magnetic fields being investigated. A similar process of recording the number of phi shifts is repeated for each magnetic field. Each quantity of phi shifts for non-zero magnetic fields is normalized with respect to the number of phi shifts at with the corresponding LUND file for 0T ([math]x_i[/math]). This information is used to find the corrected sample standard deviation:

[math]\sigma \equiv \sqrt{\frac{1}{N-1} \sum_{k=1}^N (x_i+\bar{x})^2}[/math]


Creating a dat file with the magnetic field, phi shift, and the corrected sample standard deviation:

Phi Change vs. Magnetic Field of Solenoid for 2-11GeV Moller Electrons
Magnetic Field (T) [math]\Delta \ \phi [/math](degrees) [math]\sigma[/math](degrees)
-5 0.748315 0.0164881
-2 0.899798 0.0147794
0 1 0
2 0.895382 0.0235786
4 0.809941 0.00795766
5 0.740047 0.0201546
6 0.708541 0.0172073

Xmgrace can be used to plot this:

GeV.png

Investigating a plot of the distribution of the particles energy as a function of the change in the angle phi for the different magnetic fields.

Composite Fields.png

Solenoid effect > 200 MeV

Creating a dat file with the magnetic field, phi shift, and the corrected sample standard deviation:

Phi Change vs. Magnetic Field of Solenoid for 2-11GeV Moller Electrons
Magnetic Field (T) [math]\Delta \ \phi [/math](degrees) [math]\sigma[/math](degrees)
-5 0.0585341 0.00740803
-2 0.138686 0.0308416
0 1 0
2 0.131325 0.0234678
4 0.0646613 0.0133132
5 0.059031 0.0122767
6 0.051293 0.00876825

Xmgrace can be used to plot this:

MeV.png

Solenoid effect > 20MeV

No Phi shifts for Energies in this range where found in the simulation.



Links

Back