From 1af1e11d28a8e6b15a17ba48b746ffa64ef59e98 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?GIRARD=20ALCINDOR=20Val=C3=A9rian?=
 <girard-alcindor@ijclab.in2p3.fr>
Date: Fri, 26 Jan 2024 14:20:13 +0100
Subject: [PATCH] Update e870

---
 .../MUST2_E870CD2.detector                    | 60 +++++++++++++++++++
 .../MUST2_E870CH2.detector                    | 60 +++++++++++++++++++
 Projects/e870/macros/DrawExInvariant.cxx      | 23 ++-----
 3 files changed, 125 insertions(+), 18 deletions(-)
 create mode 100644 Projects/e870/DetectorConfiguration/MUST2_E870CD2.detector
 create mode 100644 Projects/e870/DetectorConfiguration/MUST2_E870CH2.detector

diff --git a/Projects/e870/DetectorConfiguration/MUST2_E870CD2.detector b/Projects/e870/DetectorConfiguration/MUST2_E870CD2.detector
new file mode 100644
index 000000000..2484db6bf
--- /dev/null
+++ b/Projects/e870/DetectorConfiguration/MUST2_E870CD2.detector
@@ -0,0 +1,60 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Target
+ THICKNESS= 75 micrometer
+ ANGLE= 0 deg
+ RADIUS=  15 mm
+ MATERIAL= CD2
+ ANGLE= 0 deg
+ X= 0 mm
+ Y= 0 mm
+ Z= 0 mm
+
+%%%%%%% Telescope 1 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 	-13.57	-104.78	299.83 mm
+ X1_Y128= -25.1	    -12.62	328.63 mm
+ X128_Y1= -104.01	-104.85	263.88 mm
+ X128_Y128= -115.53	-12.71	292.67 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+%%%%%%% Telescope 2 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= -114.9	9.68	291.84 mm
+ X1_Y128= -24.56	9.8	327.88 mm
+ X128_Y1= -103.58	101.8	262.73 mm
+ X128_Y128= 	-13.24	102.09	298.75 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+%%%%%%% Telescope 3 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 	11.84	101.72	299.05 mm
+ X1_Y128= 23.44	9.68	328.38 mm
+ X128_Y1= 102.16	101.57	263.01 mm
+ X128_Y128= 113.81	9.57	292.3 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+
+%%%%%%% Telescope 4 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 113.56	-13.18	292.11 mm
+ X1_Y128= 23.23	-13.37	328.15 mm
+ X128_Y1= 102.39	-105.49	263.59 mm
+ X128_Y128= 	12.04	-105.69	299.63 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
diff --git a/Projects/e870/DetectorConfiguration/MUST2_E870CH2.detector b/Projects/e870/DetectorConfiguration/MUST2_E870CH2.detector
new file mode 100644
index 000000000..264e611ef
--- /dev/null
+++ b/Projects/e870/DetectorConfiguration/MUST2_E870CH2.detector
@@ -0,0 +1,60 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+Target
+ THICKNESS= 26 micrometer
+ %THICKNESS= 0.000001 micrometer
+ ANGLE= 0 deg
+ RADIUS=  15 mm
+ MATERIAL= CH2
+ ANGLE= 0 deg
+ X= 0 mm
+ Y= 0 mm
+ Z= 0 mm
+%%%%%%% Telescope 1 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 	-13.57	-104.78	299.83 mm
+ X1_Y128= -25.1	    -12.62	328.63 mm
+ X128_Y1= -104.01	-104.85	263.88 mm
+ X128_Y128= -115.53	-12.71	292.67 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+%%%%%%% Telescope 2 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= -114.9	9.68	291.84 mm
+ X1_Y128= -24.56	9.8	327.88 mm
+ X128_Y1= -103.58	101.8	262.73 mm
+ X128_Y128= 	-13.24	102.09	298.75 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+%%%%%%% Telescope 3 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 	11.84	101.72	299.05 mm
+ X1_Y128= 23.44	9.68	328.38 mm
+ X128_Y1= 102.16	101.57	263.01 mm
+ X128_Y128= 113.81	9.57	292.3 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
+
+%%%%%%% Telescope 4 %%%%%%% 		
+M2Telescope  		
+ X1_Y1= 113.56	-13.18	292.11 mm
+ X1_Y128= 23.23	-13.37	328.15 mm
+ X128_Y1= 102.39	-105.49	263.59 mm
+ X128_Y128= 	12.04	-105.69	299.63 mm
+ SI= 1		
+ SILI= 0		
+ CSI= 1		
+ VIS= all  
+ CsIOffset= 1
+
diff --git a/Projects/e870/macros/DrawExInvariant.cxx b/Projects/e870/macros/DrawExInvariant.cxx
index 52ea1c5fc..6dc788371 100644
--- a/Projects/e870/macros/DrawExInvariant.cxx
+++ b/Projects/e870/macros/DrawExInvariant.cxx
@@ -128,11 +128,6 @@ void DrawExInvariant() {
         p_alpha.SetMag(p_alpha_mag);
         LV_alpha.SetPxPyPzE(p_alpha.x(), p_alpha.y(), p_alpha.z(), etot_alpha);
 
-        // double etot_alpha = m_alpha + e_alpha;
-        // double p_alpha_mag = sqrt(etot_alpha * etot_alpha - m_alpha * m_alpha);
-        // LV_alpha.SetPxPyPzE(p_alpha_mag * sin(theta_alpha) * cos(phi_alpha), p_alpha_mag * sin(phi_alpha),
-        //                     p_alpha_mag * cos(theta_alpha), etot_alpha);
-
         ////////////////////////////////////////////////////////////////////////////////
         double gamma_li = e_li / m_7Li + 1;
         double beta_li = sqrt(1 - 1 / (pow(gamma_li, 2.)));
@@ -145,12 +140,6 @@ void DrawExInvariant() {
         p_li.SetMag(p_li_mag);
         LV_7Li.SetPxPyPzE(p_li.x(), p_li.y(), p_li.z(), etot_li);
 
-        //         double etot_li = m_7Li + e_li;
-        //         double p_li_mag = sqrt(etot_li * etot_li - m_7Li * m_7Li);
-        //         LV_7Li.SetPxPyPzE(p_li_mag * sin(theta_li) * cos(phi_li), p_li_mag * sin(phi_li), p_li_mag *
-        //         cos(theta_li),
-        //                           etot_li);
-
         LV_p.SetPxPyPzE(0, 0, 0, mp);
         TLorentzVector LV_total = LV_alpha + LV_7Li - LV_p;
 
@@ -167,8 +156,6 @@ void DrawExInvariant() {
   hExInv->Draw();
   hExMM->SetLineColor(kRed);
   hExMM->Draw("same");
-  hExMMNoCATS->SetLineColor(kGreen);
-  hExMMNoCATS->Draw("same");
 
   TF1* fitExTot = new TF1("fitExTot", "gaus", hExInv->GetXaxis()->GetXmin(), hExInv->GetXaxis()->GetXmax());
   fitExTot->SetNpx(10000);
@@ -184,11 +171,11 @@ void DrawExInvariant() {
   double sigmaEx = fitEx->GetParameter(2);
   std::cout << "FWHM of hEx: " << sigmaEx*2.35 << " MeV" << std::endl;
 
-  TF1* fitExNoCATS = new TF1("fitExNoCATS", "gaus", fitRangeMin, fitRangeMax);
-  fitExNoCATS->SetNpx(10000);
-  hExMMNoCATS->Fit(fitExNoCATS, "Q", "", -10, 10);
-  double sigmaExNoCATS = fitExNoCATS->GetParameter(2);
-  std::cout << "FWHM of hExNoCATS: " << sigmaExNoCATS*2.35 << " MeV" << std::endl;
+  // TF1* fitExNoCATS = new TF1("fitExNoCATS", "gaus", fitRangeMin, fitRangeMax);
+  // fitExNoCATS->SetNpx(10000);
+  // hExMMNoCATS->Fit(fitExNoCATS, "Q", "", -10, 10);
+  // double sigmaExNoCATS = fitExNoCATS->GetParameter(2);
+  // std::cout << "FWHM of hExNoCATS: " << sigmaExNoCATS*2.35 << " MeV" << std::endl;
 
   TLegend* legend = new TLegend(0.75, 0.75, 0.85, 0.85);
   legend->AddEntry(hExInv, "hExInv", "l"); // "l" for line
-- 
GitLab