From 316b15ecaaeccdcaef9054ca8e5fd7967034d8d8 Mon Sep 17 00:00:00 2001
From: morfouace <pierre.morfouace@cea.fr>
Date: Tue, 15 Oct 2024 08:29:07 +0200
Subject: [PATCH] updating e850 analysis

---
 Projects/ana_e850/Analysis.cxx | 18 +++++++++++++++++-
 Projects/ana_e850/Analysis.h   |  2 ++
 2 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/Projects/ana_e850/Analysis.cxx b/Projects/ana_e850/Analysis.cxx
index a35f7a531..7d8235006 100644
--- a/Projects/ana_e850/Analysis.cxx
+++ b/Projects/ana_e850/Analysis.cxx
@@ -95,6 +95,9 @@ void Analysis::Init(){
   Xmean_iter = 0;
   Ymean_iter = 0;
   iteration = 0;
+
+  //string bfilename = "IC_Charge.dat";
+  //bfile.open(bfilename.c_str());
 }
 
 ////////////////////////////////////////////////////////////////////////////////
@@ -160,10 +163,12 @@ void Analysis::ExogamAnalysis(){
 
   //for(unsigned int i=0; i<size; i++){
   if(size==1){
+    EXOGAM_TS_hour = EXOGAM->TS_AB[0]*1e-8/3600;
     Exo_Theta = EXOGAM->Theta[0];
     Exo_Phi   = EXOGAM->Phi[0];
     Exo_E     = EXOGAM->E_AB[0];
 
+
     if(Exo_Theta!=-1000){
       if(FF_Theta!=-100){
         Exo_cosa  = sin(FF_Theta)*cos(FF_Phi)*sin(Exo_Theta)*cos(Exo_Phi) + sin(FF_Theta)*sin(FF_Phi)*sin(Exo_Theta)*sin(Exo_Phi) + cos(FF_Theta)*cos(Exo_Theta);
@@ -408,6 +413,16 @@ void Analysis::VamosAnalysis(){
     FPMW_Section = FPMWPat;
     IC->SetFPMWSection(FPMW_Section);
     IC->BuildSimplePhysicalEvent();
+
+    // Pour benoit //
+    //if(FPMW->Thetaf!=-1000 && IC->fIC[2]!=0){
+    //  bfile << FPMW->Xf << " " << FPMW->Yf << " " << FPMW->Thetaf << " ";
+    //  for(int b=0; b<10; b++){
+    //    bfile << IC->fIC[b] << " ";
+    //  }
+    //  bfile << endl;
+    //}
+
     double Theta = -1000;
     if(FPMW->Xf!=-1000){
       FF_DE   = IC->DE;
@@ -589,7 +604,7 @@ void Analysis::InitOutputBranch(){
 
   RootOutput::getInstance()->GetTree()->Branch("FF_Etot13",&FF_Etot13,"FF_Etot13/D");
   RootOutput::getInstance()->GetTree()->Branch("FPMW_Section",&FPMW_Section,"FPMW_Section/I");
-  
+
   RootOutput::getInstance()->GetTree()->Branch("theta_lab_fission",&theta_lab_fission,"theta_lab_fission/D");
   RootOutput::getInstance()->GetTree()->Branch("theta_cm_fission",&theta_cm_fission,"theta_cm_fission/D");
   RootOutput::getInstance()->GetTree()->Branch("theta_240Pu",&theta_240Pu,"theta_240Pu/D");
@@ -614,6 +629,7 @@ void Analysis::InitOutputBranch(){
 
   RootOutput::getInstance()->GetTree()->Branch("VAMOS_TS_hour",&VAMOS_TS_hour,"VAMOS_TS_hour/D");
   RootOutput::getInstance()->GetTree()->Branch("PISTA_TS_hour",&PISTA_TS_hour,"PISTA_TS_hour/D");
+  RootOutput::getInstance()->GetTree()->Branch("EXOGAM_TS_hour",&EXOGAM_TS_hour,"EXOGAM_TS_hour/D");
 
 
 }
diff --git a/Projects/ana_e850/Analysis.h b/Projects/ana_e850/Analysis.h
index 0cf066099..079268361 100644
--- a/Projects/ana_e850/Analysis.h
+++ b/Projects/ana_e850/Analysis.h
@@ -100,6 +100,7 @@ class Analysis: public NPL::VAnalysis{
     ULong64_t fPISTA_TS_sec;
     double VAMOS_TS_hour;
     double PISTA_TS_hour;
+    double EXOGAM_TS_hour;
 
     int FPMW_Section;
     double theta_lab_fission;
@@ -217,6 +218,7 @@ class Analysis: public NPL::VAnalysis{
     double m_T13_Offset[20];
     double m_T14_Offset[20];
 
+    //ofstream bfile;
   private:
     TPISTAPhysics* PISTA;
     TFPMWPhysics* FPMW;
-- 
GitLab