// -------------------------------------------------------- // ---- MvdDigi header file --- // ---- Created 19.10.07 by T.Stockmanns --- // -------------------------------------------------------- /** MvdDigi.h *@author T.Stockmanns ** ** \brief Base class for Digi information ** ** **/ #ifndef PNDHYPDIGI_H #define PNDHYPDIGI_H #include "TObject.h" #include "TString.h" #include #include class PndHypDigi : public TObject { friend std::ostream& operator<< (std::ostream& out, PndHypDigi& digi){ out << "Hyp Digi in: " << digi.GetDetName() << " FE: " << digi.GetFE() << " " << " charge " << digi.GetCharge() << " e"; std::vector indices = digi.GetIndices(); for (int i = 0; i < indices.size(); i++){ std::cout << digi.GetIndex(i) << " " << std::endl; } return out; } public : PndHypDigi(); PndHypDigi(Int_t index, Int_t detID, TString detName, Int_t fe, Double_t charge); /**GetID(gGeoManager->GetPath()) information * \param fe front end ID * \param charge deposited charge in electrons */ virtual ~PndHypDigi(){}; Int_t GetFE() const { return fFE;} TString GetDetName() const { return fDetName; } Double_t GetCharge() const { return fCharge; } Int_t GetDetID() const { return fDetID;} std::vector GetIndices() const { return fIndex;} Int_t GetIndex(int i = 0) const { return fIndex[i];} void AddIndex(int index){fIndex.push_back(index);} void AddCharge(double charge){fCharge += charge;} virtual void print(){ std::cout << *this; } protected : std::vector fIndex;Int_t fDetID; TString fDetName; Double_t fCharge; Int_t fFE; ClassDef(PndHypDigi,1); }; #endif