#include <iostream>

#include "PamVMCDetectorHit.h"
#include <TLorentzVector.h>

using std::cout;
using std::endl;

ClassImp(pHitData)
ClassImp(PamVMCDetectorHit)

pHitData & operator+=( pHitData &a, const pHitData & p) {
    a.fPOS = p.fPOS;
    a.fPDG = p.fPDG;
    a.fPATH= p.fPATH;
    a.fTOF= p.fTOF;
    a.fPIN += p.fPIN;
    a.fXOUT= p.fXOUT;
    a.fYOUT=  p.fYOUT;
    a.fZOUT= p.fZOUT;
    a.fEREL +=  p.fEREL;
    a.fXIN = p.fXIN;
    a.fYIN =  p.fYIN;
    a.fZIN =  p.fZIN;
    return a;
    //    return *this;
}

PamVMCDetectorHit::PamVMCDetectorHit() 
  : TObject(),
    //    fHITN(hitnum),
    //    fPOS(-1),
    fnocall(0)
   
{
}

PamVMCDetectorHit::~PamVMCDetectorHit() 
{
  //  delete &fhitdata;  
}

void PamVMCDetectorHit::Print(Option_t* /*option*/) const
{
// Prints hit info
  cout << "Actual Hit :" 
       <<", Energy deposit (keV): " << fhitdata.fEREL * 1.0e06 << endl ;
}

void PamVMCDetectorHit::Reset()
{
// Reset all accounted values.
    fhitdata.Clean();
    //    fHITN=0;
    // fPOS=-1;
    fnocall=0;
      
}

