////////////////////////////////////////////////////////////////////////
/// \class RAT::ParentPrimaryVertexInformation
/// \brief  Concrete instance of G4 Information class to pass
///  information alongside PrimaryVertex.
///
/// \author Jeanne Wilson <j.r.wilson@qmul.ac.uk> -- contact person
///
/// Revison history:
///   - 2014-11-26: Matt Strait - doxygen fixes
///
/// \details
///  This class includes a G4PrimaryParticle object that stores the
///  information required about the parent particle for a vertex.
///  This parent is not propagated but we wish to store the information
///  into the Rat DS for later use - eg neutrino parent of ES event
////////////////////////////////////////////////////////////////////////


#ifndef __RAT_ParentPrimaryVertexInformation__
#define __RAT_ParentPrimaryVertexInformation__

#include <G4PrimaryParticle.hh>
#include <G4VUserPrimaryVertexInformation.hh>

namespace RAT {

class ParentPrimaryVertexInformation : public G4VUserPrimaryVertexInformation
{
public:
  explicit ParentPrimaryVertexInformation() {parent = 0; meta_info = "";};

  ~ParentPrimaryVertexInformation() {};
  void Print() const {};

  inline bool ExistParentParticle() const
  {
    if(parent){
      return true;
    }else{
      return false;
    }
  };

  inline G4PrimaryParticle *GetVertexParentParticle() const
  {
    return parent;
  };

  virtual void SetVertexParentParticle(G4PrimaryParticle *p) {parent = p;};

  inline bool ExistParentMetaInfo() const {return (meta_info != "");};
  inline G4String GetVertexParentMetaInfo() const { return meta_info;};
  virtual void SetVertexParentMetaInfo(G4String &data) {meta_info = data;};

private:
  G4PrimaryParticle *parent;
  G4String meta_info;
};
} // namespace RAT
#endif