<jupyter_start><jupyter_text>Pseudorapidity Resolution  At CERN particles are accelerated and collided with the LHC (Large Hadron Collider) particle accelerator. With the CMS detector the new particles created in these collisions can be observed and measured. There is the opened CMS detector in the picture below. [https://commons.wikimedia.org/wiki/File:CMS@CERN.jpg] The pseudorapidity is a function of $\theta$, $\eta = -\ln\big|\tan \big(\frac{\theta}{2}\big)\big|$, where $\theta$ is defined as the angle from the z-axis in the xz-plane.  We can consider the invariant mass (M) from $\sqrt{2p_{T1}p_{T2}(\cosh(\eta_1 - \eta_2) - \cos(\phi_1 - \phi_2) }$.  1. จงแสดงกราฟระหว่าง Pseudorapidity และ $\theta$ เมื่อ $1^{\circ}\leq\theta\leq90^{\circ}$<jupyter_code>import pandas as pd
import numpy as np
import matplotlib.pyplot as plt

data = pd.read_csv("Final.csv")

x = np.arange(np.pi/180,np.pi/2,0.01)
y = -np.log(np.tan(x)/2)

plt.plot(x,y)
plt.show()<jupyter_output><empty_output><jupyter_text>2. จงแสดงวิธีการวิเคราะห์ข้อมูลและเติมข้อมูลลงในตารางต่อไปนี้ | Pseudorapidity      | Entries | The average mass (GeV) | The standard deviation (GeV)    | | :---    |  :---       |    :----:   |          ---: | | $|\eta|$ $\leq$ 0.5     | $N_1$ | $M_1$   |  $\sigma_1$   | | 0.5 < $|\eta|$ $\leq$ 1.0 | $N_2$  |   $M_2$     |  $\sigma_2$   |   | 1.0 < $|\eta|$ $\leq$ 2.0   | $N_3$ |  $M_3$     |  $\sigma_3$   | | 2.0 < $|\eta|$ $\leq$ 3.0   | $N_4$ | $M_4$     |  $\sigma_4$   | | 3.0 < $|\eta|$   | $N_5$ | $M_5$      |  $\sigma_5$   |<jupyter_code>invariant_mass = np.sqrt(2*data.pt1*data.pt2*(np.cosh(data.eta1 - data.eta2) - np.cos(data.phi1 - data.phi2)))
dataset = data.assign(M=invariant_mass)
dataset.head()
pseudorapidity1 = np.abs(-np.log(np.tan(data.eta1)/2 ) )
pseudorapidity2 = np.abs(-np.log(np.tan(data.eta2)/2 ) )
dataset = dataset.assign(nu1=pseudorapidity1)
dataset = dataset.assign(nu2=pseudorapidity2)

newdata1 = dataset[(dataset.nu1 >= 0) & (dataset.nu1 <= 0.5) & (dataset.nu2 >= 0) & (dataset.nu2 <= 0.5)]
newdata2 = dataset[(dataset.nu1 > 0.5) & (dataset.nu1 <= 1.0) & (dataset.nu2 > 0.5) & (dataset.nu2 <= 1.0)]
newdata3 = dataset[(dataset.nu1 > 1.0) & (dataset.nu1 <= 2.0) & (dataset.nu2 > 1.0) & (dataset.nu2 <= 2.0)]
newdata4 = dataset[(dataset.nu1 > 2.0) & (dataset.nu1 <= 3.0) & (dataset.nu2 > 2.0) & (dataset.nu2 <= 3.0)]
newdata5 = dataset[(dataset.nu1 > 3.0) & (dataset.nu2 > 3.0) ]


newdata1.M.mean()
newdata2.M.mean()
newdata3.M.mean()
newdata4.M.mean()
newdata5.M.mean()
newdata1.M.std()
newdata2.M.std()
newdata3.M.std()
newdata4.M.std()
newdata5.M.std()<jupyter_output><empty_output><jupyter_text>3. จงพล็อตกราฟระหว่าง Pseudorapidity vs The average mass (GeV)<jupyter_code>x1 = ['$|\eta|\leq0.5$', '$0.5<|\eta|\leq1.0$','$1.0<|\eta|\leq2.0$', '$2.0<|\eta|\leq3.0$', '$3.0<|\eta|$']
y1 = []<jupyter_output><empty_output><jupyter_text>4. จงพล็อตกราฟระหว่าง Pseudorapidity vs The standard deviation (GeV)<jupyter_code>x1 = ['$|\eta|\leq0.5$', '$0.5<|\eta|\leq1.0$','$1.0<|\eta|\leq2.0$', '$2.0<|\eta|\leq3.0$', '$3.0<|\eta|$']
y2 = []<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.22028985507246376, 'fraction_numerical': 0.05603864734299517, 'mean_word_length': 3.79320987654321, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 27, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '4', 'dir': 'jupyter-structured-clean-dedup', 'id': '347551', 'license': 'MIT', 'n_tokens_mistral': 1467, 'n_tokens_neox': 1405, 'n_words': 241, 'path': 'Codes/Quiz IntroductionParticlePhysics.ipynb', 'repo_name': 'Nacnano/particlephysics-cern', 'size': '3105'}