From f3a6d2b2babc6d0ea54b7ebf7fc17a0a92b36b60 Mon Sep 17 00:00:00 2001
From: Adrien Matta <matta@lpccaen.in2p3.fr>
Date: Fri, 11 Jun 2021 17:23:54 +0200
Subject: [PATCH] * Adding option to change Threshold in Nebula

---
 NPLib/Detectors/Nebula/TNebulaPhysics.h    | 5 ++++-
 Projects/S034/Calibration/Nebula/gamma.cxx | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/NPLib/Detectors/Nebula/TNebulaPhysics.h b/NPLib/Detectors/Nebula/TNebulaPhysics.h
index be14226c6..5e1499b8e 100644
--- a/NPLib/Detectors/Nebula/TNebulaPhysics.h
+++ b/NPLib/Detectors/Nebula/TNebulaPhysics.h
@@ -193,6 +193,9 @@ class TNebulaPhysics : public TObject, public NPL::VDetector {
     double m_Q_Threshold;     //!
     double m_V_Threshold;     //!
 
+  public: 
+    void SetQThreshold(double t) {m_Q_Threshold=t;};
+    void SetVThreshold(double t) {m_V_Threshold=t;};
     // number of detectors
   private:
     int m_NumberOfBars;  //!
@@ -237,7 +240,7 @@ class TNebulaPhysics : public TObject, public NPL::VDetector {
     // spectra getter
   public:
     map<string, TH1*>   GetSpectra(); 
-
+  
     // Static constructor to be passed to the Detector Factory
   public:
     static NPL::VDetector* Construct();
diff --git a/Projects/S034/Calibration/Nebula/gamma.cxx b/Projects/S034/Calibration/Nebula/gamma.cxx
index d8a7d0d64..e1bdeb940 100644
--- a/Projects/S034/Calibration/Nebula/gamma.cxx
+++ b/Projects/S034/Calibration/Nebula/gamma.cxx
@@ -3,6 +3,6 @@ void gamma(){
   auto chain = new TChain("PhysicsTree");
   chain->Add("root/analysis/gamma/run418.root");
 
-  chain->Draw("Nebula.Time:Nebula.DetectorNumber>>h(150,0,150,1000,0,150)","","colz");
+  chain->Draw("(Nebula.PosZ+4650)/Nebula.TOF:Nebula.DetectorNumber>>h(150,0,150,2000,0,500)","","colz");
 
   }
-- 
GitLab