#ifndef HEP_HepMCParticle
#define HEP_HepMCParticle
#ifndef HEP_Particle
#include <HepParticle.h>
#endif
#ifndef ROOT_TRef
#include <TRef.h>
#endif
#ifndef ROOT_TRefArray
#include <TRefArray.h>
#endif
#ifndef HEP_HepMCVertex
#include <HepMCVertex.h>
#endif
class HepMCVertex;
class HepMCParticle : public HepParticle {
protected:
TRefArray *fMothers;
TRefArray *fDaughters;
TRef *fStartVertex;
TRef *fDecayVertex;
Int_t fMCStatus;
Bool_t fIsGenerator;
Bool_t fIsGenNonInteracting;
Bool_t fIsGenStable;
Bool_t fIsGenSimulStable;
Bool_t fIsGenInteracting;
Bool_t fIsConversion;
Bool_t fIsBremsstrahlung;
public:
HepMCParticle();
HepMCParticle(Int_t Id, Int_t PdgCode, Float_t Px, Float_t Py, Float_t Pz,
Float_t E, Int_t MCStatus,
Bool_t IsGenerator,
Bool_t IsGenNonInteracting,
Bool_t IsGenStable,
Bool_t IsGenSimulStable,
Bool_t IsGenInteracting,
Bool_t IsConversion,
Bool_t IsBremsstrahlung);
virtual ~HepMCParticle();
virtual void Clear(Option_t *option = "");
virtual void Print(Option_t *option = "");
static void PrintHeader();
static void PrintFooter();
Bool_t IsGoodMother();
Double_t GetBremsLoss();
inline Bool_t IsGenerator() { return fIsGenerator; }
inline Bool_t IsGenNonInteracting() { return fIsGenNonInteracting; }
inline Bool_t IsGenStable() { return fIsGenStable; }
inline Bool_t IsGenSimulStable() { return fIsGenSimulStable; }
inline Bool_t IsGenInteracting() { return fIsGenInteracting; }
inline Bool_t IsConversion() { return fIsConversion; }
inline Bool_t IsBremsstrahlung() { return fIsBremsstrahlung; }
inline Int_t GetMCStatus() const { return fMCStatus; }
inline HepMCParticle* DaughterOf(Int_t i = 0) const {
return GetMother(i);
}
inline HepMCParticle* GetMother(Int_t i = 0) const {
return (HepMCParticle*)fMothers->At(i);
}
inline HepMCVertex* GetStartVertex() const
{ return (HepMCVertex*)fStartVertex->GetObject(); }
inline HepMCVertex* ProducedAt() const
{ return GetStartVertex(); }
inline HepMCVertex* GetDecayVertex() const
{ return (HepMCVertex*)fDecayVertex->GetObject(); }
inline HepMCVertex* DecayedAt() const
{ return GetDecayVertex(); }
inline TRefArray* GetDaughters() const { return fDaughters; }
inline TRefArray* GetMothers() const { return fMothers; }
inline void AddDaughter(HepMCParticle *Daughter)
{ fDaughters->Add((TObject*)Daughter); }
inline void AddMother(HepMCParticle *Mother)
{ fMothers->Add((TObject*)Mother); }
inline void SetStartVertex(HepMCVertex *vtx)
{ *fStartVertex = (TObject*)vtx; }
inline void SetDecayVertex(HepMCVertex *vtx)
{ *fDecayVertex = (TObject*)vtx; }
inline Int_t GetN_Daughters() const
{ return fDaughters->GetEntries(); }
inline Int_t GetN_Mothers() const
{ return fMothers->GetEntries(); }
ClassDef(HepMCParticle,6)
};
#endif