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 {
string ParticleName;
UShort_t AnodeNbr;
Double_t Q1;
Double_t Time;
audrey.chatillon
committed
// vector of {DEstep, DTstep} :
// attention steps are modified to have a fix width along the z axis
std::vector<Double_t> DE;
std::vector<Double_t> DT; // DT=Ti-T0, with T0=Tfission or Tfirst_alpha
// Getters
int GetTrackID() const { return TrackID; }
string GetParticleName() const { return ParticleName; }
UShort_t GetAnodeNbr() const { return AnodeNbr; }
Double_t GetQ1() const { return Q1; }
Double_t GetTime() const { return Time; }
const std::vector<Double_t>& GetDE() const { return DE; }
const std::vector<Double_t>& GetDT() const { return DT; }
};
//////////////////////////////////////////////////////////////
// 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 int& tid, const string& name, const UShort_t& n, const Double_t& q1, const Double_t& t,
audrey.chatillon
committed
const std::vector<double>& de, const std::vector<double>& dt) {
fEpic_Data.push_back({tid, name, n, q1, t, de, dt});
}
const EpicAnodeData& operator[](const unsigned int& i) const {return fEpic_Data[i];}
//////////////////////// GETTERS ////////////////////////
inline UShort_t GetMultiplicity() const {return fEpic_Data.size();}
int GetTrackID(const unsigned int& i) const { return fEpic_Data[i].TrackID; }
string GetParticleName(const unsigned int& i) const { return fEpic_Data[i].ParticleName; }
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 GetTime(const unsigned int& i) const { return fEpic_Data[i].Time; }
const std::vector<Double_t>& GetDE(const unsigned int& i) const { return fEpic_Data[i].DE; }
const std::vector<Double_t>& GetDT(const unsigned int& i) const { return fEpic_Data[i].DT; }
//////////////////////////////////////////////////////////////
// Required for ROOT dictionnary
ClassDef(TEpicData,1) // EpicData structure
};
#endif