diff --git a/.DS_Store b/.DS_Store index 5172429f264de2441865cb4700216d4256da9242..0cb787fdbf3f6c348bf4f14ee5e65ece3976da46 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1741f37a9d6e4231bb4a2228725037853314efa1..32c2e9bf7ed3ad8cf82ad0958793cbac33e96a06 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,4 +1,4 @@ -add_library(NPExogam SHARED ExogamDetector.cxx ExogamData.cxx ExogamPhysics.cxx) -target_link_libraries(NPExogam PUBLIC PUBLIC ROOT::RIO ROOT::Tree ROOT::Physics ROOT::Imt NPRoot nptool ) +add_library(NPZdd SHARED ZddDetector.cxx ZddData.cxx ZddPhysics.cxx) +target_link_libraries(NPZdd PUBLIC PUBLIC ROOT::RIO ROOT::Tree ROOT::Physics ROOT::Imt NPRoot nptool ) install(DIRECTORY ./ DESTINATION ${CMAKE_INCLUDE_OUTPUT_DIRECTORY} FILES_MATCHING PATTERN "*.h" ) -ROOT_GENERATE_DICTIONARY(ExogamDict ExogamData.h ExogamPhysics.h LINKDEF Exogamlinkdef.hh MODULE NPExogam) +ROOT_GENERATE_DICTIONARY(ZddDict ZddData.h ZddPhysics.h LINKDEF Zddlinkdef.hh MODULE NPZdd) diff --git a/src/ZddData.cxx b/src/ZddData.cxx index b150fcae1d82c402007afa07a2a59d1bfb9aa7c5..39cf49d825f35a05e79910ae1d6933d00080ded4 100644 --- a/src/ZddData.cxx +++ b/src/ZddData.cxx @@ -1,13 +1,55 @@ #include <iostream> using namespace std; -#include "ExogamData.h" -exogam::ExogamData::ExogamData() {} +#include "ZddData.h" -exogam::ExogamData::~ExogamData() {} +zdd::ZddData::ZddData() {} -void exogam::ExogamData::Clear() { +zdd::ZddData::~ZddData() {} + +void zdd::ZddData::Clear() { + fZDD_IC_E.clear(); + fZDD_IC_N.clear(); + fZDD_IC_TS.clear(); + + fZDD_PL_E.clear(); + fZDD_PL_N.clear(); + fZDD_PL_TS.clear(); + + fZDD_DC_E.clear(); + fZDD_DC_N.clear(); + fZDD_DC_TS.clear(); + + fZDD_EXO_E.clear(); + fZDD_EXO_N.clear(); + fZDD_EXO_TS.clear(); } -void exogam::ExogamData::Dump() const { +void zdd::ZddData::Dump() const { + + // This method is very useful for debuging and worth the dev. + cout << "XXXXXXXXXXXXXXXXXXXXXXXX New Event [TZDDData::Dump()] " + "XXXXXXXXXXXXXXXXX" + << endl; + + cout << "ZDD_ICE Mult: " << fZDD_IC_E.size() << endl; + for (size_t i = 0; i < fZDD_IC_E.size(); i++) { + cout << "DetNbr: " << fZDD_IC_N[i] << " Energy: " << fZDD_IC_E[i] + << " TimeStamp: " << fZDD_IC_TS[i] << endl; + } + cout << "ZDD_PLE Mult: " << fZDD_PL_E.size() << endl; + for (size_t i = 0; i < fZDD_PL_E.size(); i++) { + cout << "DetNbr: " << fZDD_PL_N[i] << " Energy: " << fZDD_PL_E[i] + << " TimeStamp: " << fZDD_PL_TS[i] << endl; + } + cout << "ZDD_DCE Mult: " << fZDD_DC_E.size() << endl; + for (size_t i = 0; i < fZDD_DC_E.size(); i++) { + cout << "DetNbr: " << fZDD_DC_N[i] << " Energy: " << fZDD_DC_E[i] + << " TimeStamp: " << fZDD_DC_TS[i] << endl; + } + cout << "ZDD_EXOE Mult: " << fZDD_EXO_E.size() << endl; + for (size_t i = 0; i < fZDD_EXO_E.size(); i++) { + cout << "DetNbr: " << fZDD_EXO_N[i] << " Energy: " << fZDD_EXO_E[i] + << " TimeStamp: " << fZDD_EXO_TS[i] << endl; + } } diff --git a/src/ZddData.h b/src/ZddData.h index ca00279ca7d0ae85363a364c3d8acda9931a2929..1acce58099c7dc4559507f069ad7373deed65bd5 100644 --- a/src/ZddData.h +++ b/src/ZddData.h @@ -1,18 +1,118 @@ -#ifndef NPExogamData_H -#define NPExogamData_H +#ifndef NPZddData_H +#define NPZddData_H #include <vector> -namespace exogam { - class ExogamData { - private: +namespace zdd { +class ZddData { +private: +public: + ZddData(); + virtual ~ZddData(); - public: - ExogamData(); - virtual ~ExogamData(); + void Clear(); + void Dump() const; - void Clear(); - void Dump() const; + ////////////////////////////////////////////////////////////// + // data members are hold into std::vectors in order + // to allow multiplicity treatment +private: + // IC + std::vector<unsigned int> fZDD_IC_E; + std::vector<unsigned int> fZDD_IC_N; + std::vector<unsigned long long> fZDD_IC_TS; - }; -} // namespace exogam + // Plastic + std::vector<unsigned int> fZDD_PL_E; + std::vector<unsigned int> fZDD_PL_N; + std::vector<unsigned long long> fZDD_PL_TS; + + // DC + std::vector<unsigned int> fZDD_DC_E; + std::vector<unsigned int> fZDD_DC_N; + std::vector<unsigned long long> fZDD_DC_TS; + + // EXOZDD + std::vector<unsigned int> fZDD_EXO_E; + std::vector<unsigned int> fZDD_EXO_N; + std::vector<unsigned long long> fZDD_EXO_TS; + + ////////////////////////////////////////////////////////////// + // Getters and Setters + // Prefer inline declaration to avoid unnecessary called of + // frequently used methods + // add //! to avoid ROOT creating dictionnary for the methods +public: + ////////////////////// SETTERS //////////////////////// + // Energy + inline void SetZDDIC(const unsigned int& DetNumb, const unsigned int& Energy, + const unsigned long long& TimeStamp) { + fZDD_IC_E.push_back(Energy); + fZDD_IC_N.push_back(DetNumb); + fZDD_IC_TS.push_back(TimeStamp); + }; //! + inline void SetZDDPL(const unsigned int& DetNumb, const unsigned int& Energy, + const unsigned long long& TimeStamp) { + fZDD_PL_E.push_back(Energy); + fZDD_PL_N.push_back(DetNumb); + fZDD_PL_TS.push_back(TimeStamp); + }; //! + inline void SetZDDDC(const unsigned int& DetNumb, const unsigned int& Energy, + const unsigned long long& TimeStamp) { + fZDD_DC_E.push_back(Energy); + fZDD_DC_N.push_back(DetNumb); + fZDD_DC_TS.push_back(TimeStamp); + }; //! + inline void SetZDDEXO(const unsigned int& DetNumb, const unsigned int& Energy, + const unsigned long long& TimeStamp) { + fZDD_EXO_E.push_back(Energy); + fZDD_EXO_N.push_back(DetNumb); + fZDD_EXO_TS.push_back(TimeStamp); + }; //! + + ////////////////////// GETTERS //////////////////////// + inline unsigned int GetZDD_ICMult() const { return fZDD_IC_E.size(); } + inline unsigned int GetZDD_ICE(const unsigned int& i) const { + return fZDD_IC_E[i]; + } + inline unsigned int GetZDD_ICN(const unsigned int& i) const { + return fZDD_IC_N[i]; + } + inline unsigned long long GetZDD_ICTS(const unsigned int& i) const { + return fZDD_IC_TS[i]; + } + + inline unsigned int GetZDD_PLMult() const { return fZDD_PL_E.size(); } + inline unsigned int GetZDD_PLE(const unsigned int& i) const { + return fZDD_PL_E[i]; + } + inline unsigned int GetZDD_PLN(const unsigned int& i) const { + return fZDD_PL_N[i]; + } + inline unsigned long long GetZDD_PLTS(const unsigned int& i) const { + return fZDD_PL_TS[i]; + } + + inline unsigned int GetZDD_DCMult() const { return fZDD_DC_E.size(); } + inline unsigned int GetZDD_DCE(const unsigned int& i) const { + return fZDD_DC_E[i]; + } + inline unsigned int GetZDD_DCN(const unsigned int& i) const { + return fZDD_DC_N[i]; + } + inline unsigned long long GetZDD_DCTS(const unsigned int& i) const { + return fZDD_DC_TS[i]; + } + + inline unsigned int GetZDD_EXOMult() const { return fZDD_EXO_E.size(); } + inline unsigned int GetZDD_EXOE(const unsigned int& i) const { + return fZDD_EXO_E[i]; + } + inline unsigned int GetZDD_EXON(const unsigned int& i) const { + return fZDD_EXO_N[i]; + } + inline unsigned long long GetZDD_EXOTS(const unsigned int& i) const { + return fZDD_EXO_TS[i]; + } +}; +} // namespace zdd #endif diff --git a/src/ZddDetector.cxx b/src/ZddDetector.cxx index a20d113a868df321f8ee2e7227f791601744e23c..daec5a5fb41c1745c1a7d06fc16171fc4542368a 100644 --- a/src/ZddDetector.cxx +++ b/src/ZddDetector.cxx @@ -1,56 +1,259 @@ -#include "ExogamDetector.h" +#include "ZddDetector.h" #include "NPFunction.h" #include "NPRootPlugin.h" #include <iostream> -using namespace exogam; +using namespace zdd; using namespace std; using namespace ROOT::Math; //////////////////////////////////////////////////////////////////////////////// -ExogamDetector::ExogamDetector() { - m_RawData = new exogam::ExogamData(); - m_CalData = new exogam::ExogamData(); - m_PhysicsData = new exogam::ExogamPhysics(); +ZddDetector::ZddDetector() { + m_RawData = new zdd::ZddData(); + m_CalData = new zdd::ZddData(); + m_PhysicsData = new zdd::ZddPhysics(); m_Cal.InitCalibration(); } -ExogamDetector::~ExogamDetector() {} +ZddDetector::~ZddDetector() {} //////////////////////////////////////////////////////////////////////////////// -void ExogamDetector::ReadConfiguration(nptool::InputParser parser) { +void ZddDetector::ReadConfiguration(nptool::InputParser parser) { + auto blocks = parser.GetAllBlocksWithToken("zdd"); + + vector<string> TokenZDD = {"R", "Theta"}; + for(unsigned int i = 0 ; i < blocks.size() ; i++){ + if (blocks[i]->HasTokenList(TokenZDD)) { + double R = blocks[i]->GetDouble("R", "mm"); + double Theta = blocks[i]->GetDouble("Theta", "deg"); + Add_ZDD(R, Theta); + } + else{ + cout << "ERROR: check your input file formatting " << endl; + exit(1); + } + } + ReadAnalysisConfig(); } -void ExogamDetector::BuildPhysicalEvent() { +void ZddDetector::BuildPhysicalEvent() { + +// if (NPOptionManager::getInstance()->IsReader() == true) { +// m_RawData = &(**r_ReaderEventData); +// } + // apply thresholds and calibration + PreTreat(); + + // match energy and time together + Match_IC1(); + if(m_PhysicsData->IC_Nbr.size() > 0) + Match_PL(); + // Treat_DC(); } -void ExogamDetector::PreTreat() { +/////////////////////////////////////////////////////////////////////////// +void ZddDetector::Treat_DC(){ + /* // Dont have anything to modify for the moment + unsigned int mysizeDC = m_CalData->GetMultDrift(); + for(int i = 0; i < mysizeDC; i++){ + DC_DetectorNumber.push_back(m_CalData->GetDrift_DetectorNbr(i)); + DC_DriftTime.push_back(m_CalData->Get_DriftTime(i)); + }*/ +} +/////////////////////////////////////////////////////////////////////////// +void ZddDetector::Match_IC(){ +//////////////////////////////// Currently Simply matching if mult = 5, could be improved to treat mult > 5 + if(m_CalData->GetZDD_ICMult() == 5){ + // CHecking that each IC is only encountered once and then sorting them in the right order with the map + for(unsigned int i = 0; i < m_CalData->GetZDD_ICMult(); i++){ + if(SortIC.find(m_CalData->GetZDD_ICN(i)) != SortIC.end()){ + SortIC.clear(); + break; + } + SortIC[m_CalData->GetZDD_ICN(i)] = std::make_pair(m_CalData->GetZDD_ICE(i),m_CalData->GetZDD_ICTS(i)); + } + // Adding the IC info to the std::vectors + m_PhysicsData->ICSum = 0; + for(auto it = SortIC.begin(); it != SortIC.end(); ++it){ + m_PhysicsData->ICSum+= (it->second).first; + // std::cout << "Test " << it->first << " " << it->second.first << std::endl; + m_PhysicsData->IC_Nbr.push_back(it->first); + m_PhysicsData->IC_E.push_back((it->second).first); + m_PhysicsData->IC_TS.push_back((it->second).second); + } + } +} + +void ZddDetector::Match_IC1(){ +//////////////////////////////// Currently Simply matching if mult = 5, could be improved to treat mult > 5 + // CHecking that each IC is only encountered once and then sorting them in the right order with the map + for(unsigned int i = 0; i < m_CalData->GetZDD_ICMult(); i++){ + if(SortIC.find(m_CalData->GetZDD_ICN(i)) == SortIC.end()){ + SortIC[m_CalData->GetZDD_ICN(i)] = std::make_pair(m_CalData->GetZDD_ICE(i),m_CalData->GetZDD_ICTS(i)); + } + } + // Adding the IC info to the std::vectors + m_PhysicsData->ICSum = 0; + for(auto it = SortIC.begin(); it != SortIC.end(); ++it){ + m_PhysicsData->ICSum+= (it->second).first; + m_PhysicsData->IC_Nbr.push_back(it->first); + m_PhysicsData->IC_E.push_back((it->second).first); + m_PhysicsData->IC_TS.push_back((it->second).second); + } +} + +void ZddDetector::Match_PL(){ + for(unsigned int i = 0; i < m_CalData->GetZDD_PLMult(); i++){ + SortPL[m_CalData->GetZDD_PLN(i)] = std::make_pair(m_CalData->GetZDD_PLE(i),m_CalData->GetZDD_PLTS(i)); + } + for(auto it = SortPL.begin(); it != SortPL.end(); ++it){ + m_PhysicsData->PL_Nbr.push_back(it->first); + m_PhysicsData->PL_E.push_back((it->second).first); + m_PhysicsData->PL_TS.push_back((it->second).second); + } +} + +void ZddDetector::PreTreat() { ClearPreTreatedData(); } +/////////////////////////////////////////////////////////////////////////// +void ZddDetector::PreTreatEnergy(std::string Detector){ + /*unsigned int mysize = m_RawData->GetMultEnergy(Detector); + for (UShort_t i = 0; i < mysize ; ++i) { + if (m_RawData->Get_Energy(Detector, i) > m_E_RAW_Threshold) { + Double_t Energy = Cal->ApplyCalibration("ZDD/ENERGY"+nptool::itoa(m_RawData->GetE_DetectorNbr(Detector, i)),m_RawData->Get_Energy(Detector, i)); + if (Energy > m_E_Threshold) { + if(Detector == "IC") + m_CalData->Set_IC_Energy(m_RawData->GetE_DetectorNbr(Detector, i), Energy); + + else if(Detector == "Plastic") + m_CalData->Set_Plastic_Energy(m_RawData->GetE_DetectorNbr(Detector, i), Energy); + } + } + } +*/ +} + +/////////////////////////////////////////////////////////////////////////// +void ZddDetector::PreTreatTime(std::string Detector){ +/* unsigned int mysize = m_RawData->GetMultTime(Detector); + for (UShort_t i = 0; i < mysize; ++i) { + Double_t Time= Cal->ApplyCalibration("ZDD/TIME"+nptool::itoa(m_RawData->GetT_DetectorNbr(Detector, i)),m_RawData->Get_Time(Detector,i)); + if(Detector == "IC") + m_CalData->Set_IC_Time(m_RawData->GetT_DetectorNbr(Detector, i), Time); + else if(Detector == "Plastic") + m_CalData->Set_Plastic_Time(m_RawData->GetT_DetectorNbr(Detector, i), Time); + else if(Detector == "DC") + m_CalData->Set_DC_Time(m_RawData->GetT_DetectorNbr(Detector, i), Time); + } +*/ +} + +/////////////////////////////////////////////////////////////////////////// +void ZddDetector::ReadAnalysisConfig() { + bool ReadingStatus = false; + + // path to file + string FileName = "./configs/ConfigZDD.dat"; + + // open analysis config file + ifstream AnalysisConfigFile; + AnalysisConfigFile.open(FileName.c_str()); + + if (!AnalysisConfigFile.is_open()) { + cout << " No ConfigZDD.dat found: Default parameter loaded for Analayis " << FileName << endl; + return; + } + cout << " Loading user parameter for Analysis from ConfigZDD.dat " << endl; + + //// Save it in a TAsciiFile + //TAsciiFile* asciiConfig = RootOutput::getInstance()->GetAsciiFileAnalysisConfig(); + //asciiConfig->AppendLine("%%% ConfigZDD.dat %%%"); + //asciiConfig->Append(FileName.c_str()); + //asciiConfig->AppendLine(""); + // read analysis config file + string LineBuffer,DataBuffer,whatToDo; + while (!AnalysisConfigFile.eof()) { + // Pick-up next line + getline(AnalysisConfigFile, LineBuffer); + + // search for "header" + string name = "ConfigZDD"; + if (LineBuffer.compare(0, name.length(), name) == 0) + ReadingStatus = true; + + // loop on tokens and data + while (ReadingStatus ) { + whatToDo=""; + AnalysisConfigFile >> whatToDo; + + // Search for comment symbol (%) + if (whatToDo.compare(0, 1, "%") == 0) { + AnalysisConfigFile.ignore(numeric_limits<streamsize>::max(), '\n' ); + } + + else if (whatToDo=="IC_E_RAW_THRESHOLD") { + AnalysisConfigFile >> DataBuffer; + m_IC_E_RAW_Threshold = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_IC_E_RAW_Threshold << endl; + } + else if (whatToDo=="PL_E_RAW_THRESHOLD") { + AnalysisConfigFile >> DataBuffer; + m_PL_E_RAW_Threshold = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_PL_E_RAW_Threshold << endl; + } + else if (whatToDo=="DC_E_RAW_THRESHOLD") { + AnalysisConfigFile >> DataBuffer; + m_DC_E_RAW_Threshold = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_DC_E_RAW_Threshold << endl; + } + else if (whatToDo=="EXO_E_RAW_THRESHOLD") { + AnalysisConfigFile >> DataBuffer; + m_EXO_E_RAW_Threshold = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_EXO_E_RAW_Threshold << endl; + } + else if (whatToDo=="MAP_IC") { + AnalysisConfigFile >> DataBuffer; + Map_IC[atoi(DataBuffer.substr(0,1).c_str())] = atoi(DataBuffer.substr(1,1).c_str()); + cout << whatToDo << " " << atoi(DataBuffer.substr(0,1).c_str()) << " " << atoi(DataBuffer.substr(1,1).c_str()) << endl; + } + else if (whatToDo=="E_THRESHOLD") { + AnalysisConfigFile >> DataBuffer; + m_E_Threshold = atof(DataBuffer.c_str()); + cout << whatToDo << " " << m_E_Threshold << endl; + } + + else { + ReadingStatus = false; + } + } + } +} + //////////////////////////////////////////////////////////////////////////////// -void ExogamDetector::InitializeDataInputRaw( +void ZddDetector::InitializeDataInputRaw( std::shared_ptr<nptool::VDataInput> input) { - input->Attach("exogam", "exogam::ExogamData", &m_RawData); + input->Attach("zdd", "zdd::ZddData", &m_RawData); } //////////////////////////////////////////////////////////////////////////////// -void ExogamDetector::InitializeDataInputPhysics( +void ZddDetector::InitializeDataInputPhysics( std::shared_ptr<nptool::VDataInput> input) { - input->Attach("exogam", "exogam::ExogamPhysics", &m_PhysicsData); + input->Attach("zdd", "zdd::ZddPhysics", &m_PhysicsData); } //////////////////////////////////////////////////////////////////////////////// -void ExogamDetector::InitializeDataOutputRaw( +void ZddDetector::InitializeDataOutputRaw( std::shared_ptr<nptool::VDataOutput> output) { - output->Attach("exogam", "exogam::ExogamData", &m_RawData); + output->Attach("zdd", "zdd::ZddData", &m_RawData); } //////////////////////////////////////////////////////////////////////////////// -void ExogamDetector::InitializeDataOutputPhysics( +void ZddDetector::InitializeDataOutputPhysics( std::shared_ptr<nptool::VDataOutput> output) { - output->Attach("exogam", "exogam::ExogamPhysics", &m_PhysicsData); + output->Attach("zdd", "zdd::ZddPhysics", &m_PhysicsData); } //////////////////////////////////////////////////////////////////////////////// extern "C" { shared_ptr<nptool::VDetector> ConstructDetector() { - return make_shared<exogam::ExogamDetector>(); + return make_shared<zdd::ZddDetector>(); }; } diff --git a/src/ZddDetector.h b/src/ZddDetector.h index 24a3061728eb5206be6b191887a69130da80ab8b..a52a0837805b0c433fcd8395e8c33d0a2cf2189d 100644 --- a/src/ZddDetector.h +++ b/src/ZddDetector.h @@ -1,15 +1,15 @@ -#ifndef ExogamDetector_h -#define ExogamDetector_h +#ifndef ZddDetector_h +#define ZddDetector_h #include <map> #include <stdlib.h> #include <vector> #include "Math/Vector3D.h" -#include "ExogamData.h" -#include "ExogamPhysics.h" #include "NPCalibrationManager.h" #include "NPVDetector.h" +#include "ZddData.h" +#include "ZddPhysics.h" // ROOT #include "TGraphErrors.h" @@ -18,17 +18,17 @@ #include "TVector2.h" #include "TVector3.h" -namespace exogam { +namespace zdd { -class ExogamDetector : public nptool::VDetector { +class ZddDetector : public nptool::VDetector { public: // Constructor and Destructor - ExogamDetector(); - ~ExogamDetector(); + ZddDetector(); + ~ZddDetector(); public: // Data member - exogam::ExogamData* m_RawData; - exogam::ExogamData* m_CalData; - exogam::ExogamPhysics* m_PhysicsData; + zdd::ZddData* m_RawData; + zdd::ZddData* m_CalData; + zdd::ZddPhysics* m_PhysicsData; nptool::CalibrationManager m_Cal; public: // inherrited from nptool::VPlugin @@ -70,6 +70,57 @@ public: // inherrited from nptool::VDetector void ClearEventPhysics(){}; void ClearEventData(){}; + void Treat_DC(); + // Matching IC + void Match_IC(); + void Match_IC1(); + + void Match_PL(); + // bool CheckGoodEvent(); + + // PreTreating Energy for IC and Plastic + void PreTreatEnergy(std::string Detector); + + // Same for time + void PreTreatTime(std::string Detector); + + // read the user configuration file. If no file is found, load standard one + void ReadAnalysisConfig(); + + // give and external TZDDData object to TZDDPhysics. + // needed for online analysis for example + void SetRawDataPointer(ZddData* rawDataPointer) { + m_RawData = rawDataPointer; + } + + void Add_ZDD(double R, double Theta) { + m_R = R; + m_Theta = Theta; + m_NumberOfDetectors++; + } + bool fSortIC(int i, int j); + + // parameters used in the analysis +private: + // thresholds + double m_IC_E_RAW_Threshold; //! + double m_PL_E_RAW_Threshold; //! + double m_DC_E_RAW_Threshold; //! + double m_EXO_E_RAW_Threshold; //! + double m_E_Threshold; //! + double m_R; //! + double m_Theta; //! + unsigned int m_IC_Mult; //! + unsigned int m_PL_Mult; //! + unsigned int m_DC_Mult; //! + unsigned int m_EXO_Mult; //! + std::map<unsigned int, unsigned int> Map_IC; //! + std::map<unsigned int, std::pair<unsigned int, unsigned long long>> + SortIC; //! + std::map<unsigned int, std::pair<unsigned int, unsigned long long>> + SortPL; //! + int m_NumberOfDetectors; //! + // Method related to the TSpectra classes, aimed at providing a framework for // online applications Instantiate the Spectra class and the histogramm // throught it @@ -87,9 +138,8 @@ public: // inherrited from nptool::VDetector void SetRawDataPointer(void*){}; private: - private: // Parameter used in the analysis }; -} // namespace exogam +} // namespace zdd #endif diff --git a/src/ZddPhysics.cxx b/src/ZddPhysics.cxx index 9632b5bb4a9ca196f27f02be6ede9ed460917ad5..2f45eaf8bb60f268e34fa56ae4001462d54845a6 100644 --- a/src/ZddPhysics.cxx +++ b/src/ZddPhysics.cxx @@ -1 +1,16 @@ -#include "ExogamPhysics.h" +#include "ZddPhysics.h" + +/////////////////////////////////////////////////////////////////////////// +// void ZddDetector::Clear() { +// m_PhysicsData->IC_Nbr.clear(); +// m_PhysicsData->IC_E.clear(); +// m_PhysicsData->IC_TS.clear(); +// m_PhysicsData->PL_Nbr.clear(); +// m_PhysicsData->PL_E.clear(); +// m_PhysicsData->PL_TS.clear(); +// m_PhysicsData->ICSum = 0; +// SortIC.clear(); +// SortPL.clear(); +// DC_DetectorNumber.clear(); +// DC_DriftTime.clear(); +// } diff --git a/src/ZddPhysics.h b/src/ZddPhysics.h index 8642928a13202c3b99379dcd3fb12908b5f3c739..cd0bb9d625c762bc4e1c3a9bf34bf24fc022abc3 100644 --- a/src/ZddPhysics.h +++ b/src/ZddPhysics.h @@ -1,17 +1,33 @@ -#ifndef NPExogamPhysics_H -#define NPExogamPhysics_H +#ifndef NPZddPhysics_H +#define NPZddPhysics_H #include <vector> -namespace exogam { -class ExogamPhysics { +namespace zdd { +class ZddPhysics { public: - ExogamPhysics(){}; - ~ExogamPhysics(){}; + ZddPhysics(){}; + ~ZddPhysics(){}; public: void Clear(); void Dump() const; + ////////////////////////////////////////////////////////////// + // data obtained after BuildPhysicalEvent() and stored in + // output ROOT file + public: + std::vector<int> IC_Nbr; + std::vector<double> IC_E; + std::vector<unsigned long long> IC_TS; + double ICSum; + + std::vector<int> PL_Nbr; + std::vector<double> PL_E; + std::vector<unsigned long long> PL_TS; + + std::vector<int> DC_DetectorNumber; + std::vector<double> DC_DriftTime; + }; -} // namespace exogam +} // namespace zdd #endif diff --git a/src/Zddlinkdef.hh b/src/Zddlinkdef.hh index 9be2a73e2208aa9da655fcd9540379d6e1229d26..33fc96e342fc55b4afd5c70adbadb22b2970e37a 100644 --- a/src/Zddlinkdef.hh +++ b/src/Zddlinkdef.hh @@ -2,6 +2,6 @@ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; -#pragma link C++ class exogam::ExogamData; -#pragma link C++ class exogam::ExogamPhysics; +#pragma link C++ class zdd::ZddData; +#pragma link C++ class zdd::ZddPhysics; #endif