Skip to content
Snippets Groups Projects
Commit 8e04a25c authored by Anna Maria CORSI SPhN's avatar Anna Maria CORSI SPhN
Browse files

Added methods for spectra in ExogamPhysics

parent 66f037e6
No related branches found
No related tags found
No related merge requests found
...@@ -52,7 +52,7 @@ class TExogamData : public TObject { ...@@ -52,7 +52,7 @@ class TExogamData : public TObject {
vector<UShort_t> fEXO_GOCCE_T_Time; vector<UShort_t> fEXO_GOCCE_T_Time;
// GeFill // GeFill
UShort_t fEXO_Fill; UShort_t fEXO_Fill;
int m_NumberOfClover;
public: public:
TExogamData(); TExogamData();
virtual ~TExogamData(); virtual ~TExogamData();
......
...@@ -47,6 +47,8 @@ TExogamPhysics::TExogamPhysics() ...@@ -47,6 +47,8 @@ TExogamPhysics::TExogamPhysics()
GOCCE_Multiplicity = 0 ; GOCCE_Multiplicity = 0 ;
NumberOfHitClover = 0 ; NumberOfHitClover = 0 ;
NumberOfHitCristal = 0 ; NumberOfHitCristal = 0 ;
m_Spectra = NULL;
NumberOfClover=0;
PreTreatedData = new TExogamData ; PreTreatedData = new TExogamData ;
EventData = new TExogamData ; EventData = new TExogamData ;
...@@ -529,6 +531,29 @@ void TExogamPhysics::ReadConfiguration(string Path) ...@@ -529,6 +531,29 @@ void TExogamPhysics::ReadConfiguration(string Path)
} }
///////////////////////////////////////////////////////////////////////////
void TExogamPhysics::InitSpectra(){
m_Spectra = new TExogamSpectra(NumberOfClover);
}
///////////////////////////////////////////////////////////////////////////
void TExogamPhysics::FillSpectra(){
m_Spectra -> FillRawSpectra(EventData);
m_Spectra -> FillPreTreatedSpectra(PreTreatedData);
m_Spectra -> FillPhysicsSpectra(EventPhysics);
}
///////////////////////////////////////////////////////////////////////////
void TExogamPhysics::CheckSpectra(){
m_Spectra->CheckSpectra();
}
///////////////////////////////////////////////////////////////////////////
void TExogamPhysics::ClearSpectra(){
// To be done
}
///////////////////////////////////////////////////////////////////////////
map< vector<TString> , TH1*> TExogamPhysics::GetSpectra() {
return m_Spectra->GetMapHisto();
}
void TExogamPhysics::AddClover(string AngleFile) void TExogamPhysics::AddClover(string AngleFile)
{ {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
#include "../include/CalibrationManager.h" #include "../include/CalibrationManager.h"
#include "../include/VDetector.h" #include "../include/VDetector.h"
#include "TExogamData.h" #include "TExogamData.h"
#include "TExogamSpectra.h"
// ROOT // ROOT
#include "TVector2.h" #include "TVector2.h"
#include "TVector3.h" #include "TVector3.h"
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
//#include "TH1.h" //#include "TH1.h"
using namespace std ; using namespace std ;
// Forward Declaration
class TExogamSpectra;
class TExogamPhysics : public TObject, public NPA::VDetector class TExogamPhysics : public TObject, public NPA::VDetector
{ {
...@@ -129,6 +131,16 @@ class TExogamPhysics : public TObject, public NPA::VDetector ...@@ -129,6 +131,16 @@ class TExogamPhysics : public TObject, public NPA::VDetector
void ClearEventData() {EventData->Clear();} void ClearEventData() {EventData->Clear();}
void ClearPreTreatedData() {PreTreatedData->Clear();} void ClearPreTreatedData() {PreTreatedData->Clear();}
// Method related to the TSpectra classes, aimed at providing a framework for online applications
// Instantiate the Spectra class and the histogramm throught it
void InitSpectra();
// Fill the spectra hold by the spectra class
void FillSpectra();
// Used for Online mainly, perform check on the histo and for example change their color if issues are found
void CheckSpectra();
// Used for Online only, clear all the spectra hold by the Spectra class
void ClearSpectra();
private: // Root Input and Output tree classes private: // Root Input and Output tree classes
...@@ -148,7 +160,11 @@ class TExogamPhysics : public TObject, public NPA::VDetector ...@@ -148,7 +160,11 @@ class TExogamPhysics : public TObject, public NPA::VDetector
Double_t GetSegmentAnglePhi(int Clover, int Cristal, int Segment) {return(Clover_Angles_Theta_Phi[Clover][Cristal][Segment][1]);}; Double_t GetSegmentAnglePhi(int Clover, int Cristal, int Segment) {return(Clover_Angles_Theta_Phi[Clover][Cristal][Segment][1]);};
Double_t GetSegmentAngleTheta(int Clover, int Cristal, int Segment) {return(Clover_Angles_Theta_Phi[Clover][Cristal][Segment][0]);}; Double_t GetSegmentAngleTheta(int Clover, int Cristal, int Segment) {return(Clover_Angles_Theta_Phi[Clover][Cristal][Segment][0]);};
private: // Spectra Class
TExogamSpectra* m_Spectra;//!
public: // Spectra Getter
map< vector<TString> , TH1*> GetSpectra();
ClassDef(TExogamPhysics,1) // ExogamPhysics structure ClassDef(TExogamPhysics,1) // ExogamPhysics structure
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment