From 78c2f1774797914a9530af5ada6e90de1a79c5e6 Mon Sep 17 00:00:00 2001 From: Andrea Tugores <tugoresa@jupyterMiLAB> Date: Tue, 11 May 2021 21:56:05 -0500 Subject: [PATCH] atlas-data folder --- ...hon-13-TeV-framework-script-analysis.ipynb | 416 +++++------------- atlas-data/atlas-outreach-cpp-framework-13tev | 1 + 2 files changed, 106 insertions(+), 311 deletions(-) create mode 160000 atlas-data/atlas-outreach-cpp-framework-13tev diff --git a/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb b/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb index 4da886d..f4592c8 100644 --- a/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb +++ b/ATLAS-Open-Data-Python-13-TeV-framework-script-analysis.ipynb @@ -49,7 +49,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -74,18 +74,9 @@ }, { "cell_type": "code", - "execution_count": 2, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tue 11 May 2021 05:52:10 PM -05\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "starttime = datetime.datetime.now()\n", "\n", @@ -98,18 +89,22 @@ "metadata": {}, "source": [ "## Get the code the 13TeV analysis\n", + "\n", "<p style='text-align: justify;'>\n", "Create folder named 'atlas-data' where the information of twelve physics analysis examples inspired by the published results of ATLAS Collaboration will be cloned and stored to demonstrate the wide range of scenarios. The folder will be created and the data will be cloned only the first time the notebook is run.\n", - "</p>" + "</p>\n", + "\n", + "Setting the path as a variable. To get the location of the current working directory os.getcwd() is used." ] }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ - "folder_demo = 'atlas-data'" + "directory = os.getcwd()\n", + "print(directory)" ] }, { @@ -125,23 +120,17 @@ }, { "cell_type": "code", - "execution_count": 4, + "execution_count": null, "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "256" - ] - }, - "execution_count": 4, - "metadata": {}, - "output_type": "execute_result" - } - ], + "outputs": [], "source": [ - "command = 'mkdir '+folder_demo\n", - "os.system(command)" + "folder_demo = 'atlas-data'\n", + "\n", + "if os.path.exists(directory+\"/atlas-data\"):\n", + " print(\"The folder exists\")\n", + "else:\n", + " command = 'mkdir '+folder_demo\n", + " os.system(command)" ] }, { @@ -160,21 +149,9 @@ }, { "cell_type": "code", - "execution_count": 5, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "total 28K\n", - "-rw-r--r-- 1 tugoresa laconga 0 May 10 16:12 log\n", - "drwxr-xr-x 3 tugoresa laconga 4.0K May 10 17:07 atlas-data\n", - "-rw-r--r-- 1 tugoresa laconga 21K May 11 17:50 ATLAS-Open-Data-Python-13-TeV-framework-script-HZZ-analysis (1).ipynb\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('ls -lhrt').read()\n", "print(myCmd)" @@ -192,18 +169,9 @@ }, { "cell_type": "code", - "execution_count": 6, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('pwd').read()\n", "print(myCmd)" @@ -220,7 +188,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -236,18 +204,9 @@ }, { "cell_type": "code", - "execution_count": 8, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('pwd').read()\n", "print(myCmd)" @@ -257,22 +216,14 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "Setting the path as a variable. To get the location of the current working directory os.getcwd() is used." + "Setting the path as a variable." ] }, { "cell_type": "code", - "execution_count": 9, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "directory = os.getcwd()\n", "print(directory)" @@ -289,17 +240,9 @@ }, { "cell_type": "code", - "execution_count": 10, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The repository exists\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "if os.path.exists(directory+\"/atlas-outreach-cpp-framework-13tev\"):\n", " print(\"The repository exists\")\n", @@ -317,7 +260,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -333,18 +276,9 @@ }, { "cell_type": "code", - "execution_count": 12, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data/atlas-outreach-cpp-framework-13tev\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('pwd').read()\n", "print(myCmd)" @@ -359,18 +293,9 @@ }, { "cell_type": "code", - "execution_count": 13, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tue 11 May 2021 05:53:38 PM -05\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('date').read()\n", "print(myCmd)" @@ -392,23 +317,9 @@ }, { "cell_type": "code", - "execution_count": 14, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "total 28K\n", - "drwxr-xr-x 14 tugoresa laconga 4.0K May 10 17:07 Analysis\n", - "-rwxr-xr-x 1 tugoresa laconga 370 May 10 17:07 welcome_web.sh\n", - "-rwxr-xr-x 1 tugoresa laconga 1.7K May 10 17:07 welcome.sh\n", - "-rw-r--r-- 1 tugoresa laconga 11K May 10 17:07 README.md\n", - "drwxr-xr-x 5 tugoresa laconga 4.0K May 10 17:07 Plotting\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('ls -lhrt').read()\n", "print(myCmd)" @@ -423,17 +334,9 @@ }, { "cell_type": "code", - "execution_count": 15, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data/atlas-outreach-cpp-framework-13tev\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "directory = os.getcwd()\n", "print(directory)" @@ -459,17 +362,9 @@ }, { "cell_type": "code", - "execution_count": 16, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Folders exists\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "if os.path.exists(directory+\"/Analysis/ZBosonAnalysis/Output_ZBosonAnalysis\"):\n", " print(\"Folders exists\")\n", @@ -487,24 +382,9 @@ }, { "cell_type": "code", - "execution_count": 17, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "total 56K\n", - "-rwxr-xr-x 1 tugoresa laconga 615 May 10 17:07 run.sh\n", - "-rw-r--r-- 1 tugoresa laconga 9.4K May 10 17:07 main_HZZAnalysis.C\n", - "-rw-r--r-- 1 tugoresa laconga 5.3K May 10 17:07 HZZAnalysisHistograms.h\n", - "-rw-r--r-- 1 tugoresa laconga 10K May 10 17:07 HZZAnalysis.h\n", - "-rw-r--r-- 1 tugoresa laconga 13K May 10 17:07 HZZAnalysis.C\n", - "drwxr-xr-x 2 tugoresa laconga 4.0K May 10 17:07 Output_HZZAnalysis\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('ls -lhrt Analysis/HZZAnalysis').read()\n", "print(myCmd)" @@ -525,46 +405,18 @@ }, { "cell_type": "code", - "execution_count": 18, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "The options are:\n", - " WBosonAnalysis\n", - " ZBosonAnalysis\n", - " TTbarAnalysis\n", - " SingleTopAnalysis\n", - " WZDiBosonAnalysis\n", - " ZZDiBosonAnalysis\n", - " HZZAnalysis\n", - " HWWAnalysis\n", - " ZTauTauAnalysis\n", - " HyyAnalysis\n", - " SUSYAnalysis\n", - " ZPrimeBoostedAnalysis\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "print(\"The options are:\\n WBosonAnalysis\\n ZBosonAnalysis\\n TTbarAnalysis\\n SingleTopAnalysis\\n WZDiBosonAnalysis\\n ZZDiBosonAnalysis\\n HZZAnalysis\\n HWWAnalysis\\n ZTauTauAnalysis\\n HyyAnalysis\\n SUSYAnalysis\\n ZPrimeBoostedAnalysis\")" ] }, { "cell_type": "code", - "execution_count": 19, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Enter your choice: HyyAnalysis\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "while True:\n", " analysis = input(\"Enter your choice: \")\n", @@ -584,18 +436,9 @@ }, { "cell_type": "code", - "execution_count": 20, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data/atlas-outreach-cpp-framework-13tev/Analysis/HyyAnalysis\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('pwd').read()\n", "print(myCmd)" @@ -603,27 +446,9 @@ }, { "cell_type": "code", - "execution_count": 21, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "total 52K\n", - "-rw-r--r-- 1 tugoresa laconga 6.4K May 10 17:07 HyyAnalysis.C\n", - "-rwxr-xr-x 1 tugoresa laconga 492 May 10 17:07 run_web.sh\n", - "-rwxr-xr-x 1 tugoresa laconga 492 May 10 17:07 run_web2.sh\n", - "-rwxr-xr-x 1 tugoresa laconga 665 May 10 17:07 run.sh\n", - "-rw-r--r-- 1 tugoresa laconga 3.0K May 10 17:07 main_HyyAnalysis_web.C\n", - "-rw-r--r-- 1 tugoresa laconga 3.2K May 10 17:07 main_HyyAnalysis.C\n", - "-rw-r--r-- 1 tugoresa laconga 1.3K May 10 17:07 HyyAnalysisHistograms.h\n", - "-rw-r--r-- 1 tugoresa laconga 15K May 10 17:07 HyyAnalysis.h\n", - "drwxr-xr-x 2 tugoresa laconga 4.0K May 10 17:07 Output_HyyAnalysis\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('ls -lhrt').read()\n", "print(myCmd)" @@ -661,20 +486,9 @@ }, { "cell_type": "code", - "execution_count": 22, - "metadata": {}, - "outputs": [ - { - "data": { - "text/plain": [ - "0" - ] - }, - "execution_count": 22, - "metadata": {}, - "output_type": "execute_result" - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "command4 = \"echo \\\"0\\n0\\\" | ./run.sh >log\"\n", "os.system(command4)" @@ -692,7 +506,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": null, "metadata": {}, "outputs": [], "source": [ @@ -708,18 +522,9 @@ }, { "cell_type": "code", - "execution_count": 24, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/tugoresa/andrea_proyect/atlas-data/atlas-outreach-cpp-framework-13tev/Plotting\n", - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('pwd').read()\n", "print(myCmd)" @@ -782,23 +587,9 @@ }, { "cell_type": "code", - "execution_count": 34, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Choose your analysis. Enter a number: casa\n", - "Try it again.\n", - "Choose your analysis. Enter a number: cosa\n", - "Try it again.\n", - "Choose your analysis. Enter a number: 54\n", - "Valid range, please: 0-9.\n", - "Choose your analysis. Enter a number: 9\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "while True:\n", " number = input('Choose your analysis. Enter a number: ')\n", @@ -832,17 +623,9 @@ }, { "cell_type": "code", - "execution_count": 28, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('ls -lhrt histograms/*png').read()\n", "print(myCmd)" @@ -850,19 +633,9 @@ }, { "cell_type": "code", - "execution_count": 31, - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Tue 11 May 2021 05:59:40 PM -05\n", - "\n", - "Analysis finished in 7 min 30 s\n" - ] - } - ], + "execution_count": null, + "metadata": {}, + "outputs": [], "source": [ "myCmd = os.popen('date').read()\n", "print(myCmd)\n", @@ -876,6 +649,27 @@ "source": [ "### Done!" ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { diff --git a/atlas-data/atlas-outreach-cpp-framework-13tev b/atlas-data/atlas-outreach-cpp-framework-13tev new file mode 160000 index 0000000..0fabe1d --- /dev/null +++ b/atlas-data/atlas-outreach-cpp-framework-13tev @@ -0,0 +1 @@ +Subproject commit 0fabe1d45102cb4339d808c9187276e6c555bf8c -- GitLab