Skip to content
Snippets Groups Projects
Commit 9fc7f71c authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* updating nebula data class

parent 565079cc
No related branches found
No related tags found
No related merge requests found
Pipeline #114254 failed
......@@ -45,19 +45,30 @@ TNebulaData::~TNebulaData() {
//////////////////////////////////////////////////////////////////////
void TNebulaData::Clear() {
// Energy
fNebula_E_DetectorNbr.clear();
fNebula_Energy.clear();
// Time
fNebula_T_DetectorNbr.clear();
fNebula_Time.clear();
// UP //
// Charge
fNebula_Qu_ID.clear();
fNebula_Qu_Charge.clear();
// Time
fNebula_Tu_ID.clear();
fNebula_Tu_Time.clear();
// DOWN //
// Charge
fNebula_Qd_ID.clear();
fNebula_Qd_Charge.clear();
// Time
fNebula_Td_ID.clear();
fNebula_Td_Time.clear();
}
//////////////////////////////////////////////////////////////////////
void TNebulaData::Dump() const {
// This method is very useful for debuging and worth the dev.
/* // This method is very useful for debuging and worth the dev.
cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event [TNebulaData::Dump()] XXXXXXXXXXXXXXXXX" << endl;
// Energy
......@@ -77,4 +88,5 @@ void TNebulaData::Dump() const {
cout << "DetNbr: " << fNebula_T_DetectorNbr[i]
<< " Time: " << fNebula_Time[i];
}
*/
}
......@@ -34,14 +34,24 @@ class TNebulaData : public TObject {
// data members are hold into vectors in order
// to allow multiplicity treatment
private:
// Energy
vector<UShort_t> fNebula_E_DetectorNbr;
vector<Double_t> fNebula_Energy;
// UP //
// Charge
vector<UShort_t> fNebula_Qu_ID;
vector<Double_t> fNebula_Qu_Charge;
// Time
vector<UShort_t> fNebula_T_DetectorNbr;
vector<Double_t> fNebula_Time;
vector<UShort_t> fNebula_Tu_ID;
vector<Double_t> fNebula_Tu_Time;
// DOWN //
// Charge
vector<UShort_t> fNebula_Qd_ID;
vector<Double_t> fNebula_Qd_Charge;
// Time
vector<UShort_t> fNebula_Td_ID;
vector<Double_t> fNebula_Td_Time;
//////////////////////////////////////////////////////////////
// Constructor and destructor
......@@ -65,19 +75,32 @@ class TNebulaData : public TObject {
// add //! to avoid ROOT creating dictionnary for the methods
public:
////////////////////// SETTERS ////////////////////////
// Energy
inline void SetEnergy(const UShort_t& DetNbr,const Double_t& Energy){
fNebula_E_DetectorNbr.push_back(DetNbr);
fNebula_Energy.push_back(Energy);
// UP //
// Charge
inline void SetChargeUp(const Double_t& ID, const Double_t& Charge){
fNebula_Qu_ID.push_back(ID);
fNebula_Qu_Charge.push_back(Charge);
};//!
// Time
inline void SetTime(const UShort_t& DetNbr,const Double_t& Time) {
fNebula_T_DetectorNbr.push_back(DetNbr);
fNebula_Time.push_back(Time);
inline void SetTimeUp(const Double_t& ID, const Double_t& Time){
fNebula_Tu_ID.push_back(ID);
fNebula_Tu_Time.push_back(Time);
};//!
// DOWN //
// Charge
inline void SetChargeDown(const Double_t& ID, const Double_t& Charge){
fNebula_Qd_ID.push_back(ID);
fNebula_Qd_Charge.push_back(Charge);
};//!
// Time
inline void SetTimeDown(const Double_t& ID, const Double_t& Time){
fNebula_Td_ID.push_back(ID);
fNebula_Td_Time.push_back(Time);
};//!
/*
////////////////////// GETTERS ////////////////////////
// Energy
inline UShort_t GetMultEnergy() const
......@@ -94,7 +117,7 @@ class TNebulaData : public TObject {
{return fNebula_T_DetectorNbr[i];}//!
inline Double_t Get_Time(const unsigned int &i) const
{return fNebula_Time[i];}//!
*/
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
......
......@@ -81,7 +81,7 @@ void TNebulaPhysics::BuildSimplePhysicalEvent() {
void TNebulaPhysics::BuildPhysicalEvent() {
// apply thresholds and calibration
PreTreat();
/*
// match energy and time together
unsigned int mysizeE = m_PreTreatedData->GetMultEnergy();
unsigned int mysizeT = m_PreTreatedData->GetMultTime();
......@@ -93,7 +93,7 @@ void TNebulaPhysics::BuildPhysicalEvent() {
Time.push_back(m_PreTreatedData->Get_Time(t));
}
}
}
}*/
}
///////////////////////////////////////////////////////////////////////////
......@@ -106,7 +106,7 @@ void TNebulaPhysics::PreTreat() {
// instantiate CalibrationManager
static CalibrationManager* Cal = CalibrationManager::getInstance();
/*
// Energy
unsigned int mysize = m_EventData->GetMultEnergy();
for (UShort_t i = 0; i < mysize ; ++i) {
......@@ -124,6 +124,7 @@ void TNebulaPhysics::PreTreat() {
Double_t Time= Cal->ApplyCalibration("Nebula/TIME"+NPL::itoa(m_EventData->GetT_DetectorNbr(i)),m_EventData->Get_Time(i));
m_PreTreatedData->SetTime(m_EventData->GetT_DetectorNbr(i), Time);
}
*/
}
......@@ -334,8 +335,8 @@ extern "C"{
class proxy_Nebula{
public:
proxy_Nebula(){
NPL::DetectorFactory::getInstance()->AddToken("Nebula","Nebula");
NPL::DetectorFactory::getInstance()->AddDetector("Nebula",TNebulaPhysics::Construct);
NPL::DetectorFactory::getInstance()->AddToken("NEBULA","Nebula");
NPL::DetectorFactory::getInstance()->AddDetector("NEBULA",TNebulaPhysics::Construct);
}
};
......
/*****************************************************************************
* Copyright (C) 2009-2019 this file is part of the NPTool Project *
* Copyright (C) 2009-2019 this file is part of the NPTool Project *
* *
* For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
* For the list of contributors see $NPTOOL/Licence/Contributors *
*****************************************************************************/
/*****************************************************************************
* Original Author: Adrien Matta contact address: matta@lpccaen.in2p3.fr *
* Original Author: Adrien Matta contact address: matta@lpccaen.in2p3.fr *
* *
* Creation Date : December 2019 *
* Creation Date : December 2019 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold Nebula Spectra *
* This class hold Nebula Spectra *
* *
*---------------------------------------------------------------------------*
* Comment: *
......@@ -108,7 +108,7 @@ void TNebulaSpectra::InitPhysicsSpectra() {
////////////////////////////////////////////////////////////////////////////////
void TNebulaSpectra::FillRawSpectra(TNebulaData* RawData) {
static string name;
/* static string name;
static string family;
// Energy
......@@ -127,14 +127,14 @@ void TNebulaSpectra::FillRawSpectra(TNebulaData* RawData) {
family = "Nebula/RAW";
FillSpectra(family,name,RawData->Get_Time(i));
}
}*/
}
////////////////////////////////////////////////////////////////////////////////
void TNebulaSpectra::FillPreTreatedSpectra(TNebulaData* PreTreatedData) {
static string name;
/* static string name;
static string family;
// Energy
......@@ -153,14 +153,14 @@ void TNebulaSpectra::FillPreTreatedSpectra(TNebulaData* PreTreatedData) {
family = "Nebula/CAL";
FillSpectra(family,name,PreTreatedData->Get_Time(i));
}
}*/
}
////////////////////////////////////////////////////////////////////////////////
void TNebulaSpectra::FillPhysicsSpectra(TNebulaPhysics* Physics) {
static string name;
/* static string name;
static string family;
family= "Nebula/PHY";
......@@ -169,6 +169,6 @@ void TNebulaSpectra::FillPhysicsSpectra(TNebulaPhysics* Physics) {
for(unsigned int i = 0 ; i < sizeE ; i++){
name = "Nebula_ENERGY_TIME";
FillSpectra(family,name,Physics->Energy[i],Physics->Time[i]);
}
}*/
}
......@@ -126,6 +126,11 @@ namespace NPL{
Particle* GetParticle2() {return &fParticle2;}
Particle* GetParticle3() {return &fParticle3;}
Particle* GetParticle4() {return &fParticle4;}
Particle* GetNucleus1() {return GetParticle1();}
Particle* GetNucleus2() {return GetParticle2();}
Particle* GetNucleus3() {return GetParticle3();}
Particle* GetNucleus4() {return GetParticle4();}
TH1F* GetCrossSectionHist() const {return fCrossSectionHist;}
int GetVerboseLevel() const {return fVerboseLevel;}
bool GetShoot3() const {return fshoot3;}
......
......@@ -51,8 +51,8 @@ void NPToolLogon(){
// Create the NPTool Stype
std::string NPLPath = gSystem->Getenv("NPTOOL");
gROOT->ProcessLine(Form(".x %s/NPLib/scripts/Style_nptool.C+",NPLPath.c_str()));
gROOT->ProcessLine(Form(".x %s/NPLib/scripts/Style_nponline.C+",NPLPath.c_str()));
gROOT->ProcessLine(Form(".x %s/NPLib/scripts/Style_nptool.C",NPLPath.c_str()));
gROOT->ProcessLine(Form(".x %s/NPLib/scripts/Style_nponline.C",NPLPath.c_str()));
// Change the standard random generator to TRandom2
//gRandom = new TRandom2();
......
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