Newer
Older
#ifndef __EpicDATA__
#define __EpicDATA__
/*****************************************************************************
* Copyright (C) 2009-2024 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: Audrey Chatillon contact address: audrey.chatillon@cea.fr *
* *
* Creation Date : décembre 2024 *
* Last update : *
*---------------------------------------------------------------------------*
* Decription: *
* This class hold Epic Raw data *
* *
*---------------------------------------------------------------------------*
* Comment: *
* *
* *
*****************************************************************************/
// STL
#include <vector>
using namespace std;
// ROOT
#include "TObject.h"
class TEpicData : public TObject {
public:
struct EpicAnodeData {
UShort_t AnodeNbr;
Double_t Q1;
Double_t Q2;
Double_t Qmax;
Double_t Time;
Double_t Time_HF;
Double_t ToF;
Bool_t isFakeFission;
std::vector<Double_t> PosZ;
std::vector<Double_t> DE;
// Getters
UShort_t GetAnodeNbr() const { return AnodeNbr; }
Double_t GetQ1() const { return Q1; }
Double_t GetQ2() const { return Q2; }
Double_t GetQmax() const { return Qmax; }
Double_t GetTime() const { return Time; }
Double_t GetTimeHF() const { return Time_HF; }
Double_t GetToF() const { return ToF; }
Bool_t IsFakeFission() const { return isFakeFission; }
const std::vector<Double_t>& GetPosZ() const { return PosZ; }
const std::vector<Double_t>& GetDE() const { return DE; }
};
//////////////////////////////////////////////////////////////
// data members are hold into vectors in order
// to allow multiplicity treatment
private:
vector<EpicAnodeData> fEpic_Data;
//////////////////////////////////////////////////////////////
// Constructor and destructor
public:
TEpicData();
~TEpicData();
//////////////////////////////////////////////////////////////
// Inherited from TObject and overriden to avoid warnings
public:
void Clear();
void Clear(const Option_t*) {};
void Dump() const;
//////////////////////////////////////////////////////////////
// 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 ////////////////////////
void Set(const UShort_t& n, const Double_t& q1, const Double_t& q2, const Double_t& qmax,
const Double_t& t, const Double_t& thf, const Double_t& tof, const Bool_t& fake,
const std::vector<double>& z, const std::vector<double>& de) {
fEpic_Data.push_back({n, q1, q2, qmax, t, thf, tof, fake, z, de});
}
const EpicAnodeData& operator[](const unsigned int& i) const {return fEpic_Data[i];}
//////////////////////// GETTERS ////////////////////////
inline UShort_t GetMultiplicity() const {return fEpic_Data.size();}
UShort_t GetAnodeNbr(const unsigned short& i) const { return fEpic_Data[i].AnodeNbr; }
Double_t GetQ1(const unsigned int& i) const { return fEpic_Data[i].Q1; }
Double_t GetQ2(const unsigned int& i) const { return fEpic_Data[i].Q2; }
Double_t GetQmax(const unsigned int& i) const { return fEpic_Data[i].Qmax; }
Double_t GetTime(const unsigned int& i) const { return fEpic_Data[i].Time; }
Double_t GetTimeHF(const unsigned int& i) const { return fEpic_Data[i].Time_HF; }
Double_t GetToF(const unsigned int& i) const { return fEpic_Data[i].ToF; }
Bool_t GetFakeFissionStatus(const unsigned int& i) const { return fEpic_Data[i].isFakeFission; }
const std::vector<Double_t>& GetPosZ(const unsigned int& i) const { return fEpic_Data[i].PosZ; }
const std::vector<Double_t>& GetDE(const unsigned int& i) const { return fEpic_Data[i].DE; }
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
ClassDef(TEpicData,1) // EpicData structure
};
#endif