//  
// Author: Oliver Maria Kind <mailto: kind@mail.desy.de>
// Update: $Id: HepMCVertex.h,v 1.2 2010/12/23 15:13:42 herrberg Exp $
// Copyright: 2008 (C) Oliver Maria Kind
//
#ifndef HEP_HepMCVertex
#define HEP_HepMCVertex
#ifndef ROOT_TObject
#include <TObject.h>
#endif
#ifndef ROOT_TVector3
#include <TVector3.h>
#endif
#ifndef ROOT_TRef
#include <TRef.h>
#endif
#ifndef ROOT_TRefArray
#include <TRefArray.h>
#endif
#ifndef HEP_HepMCParticle
#include <HepMCParticle.h>
#endif

class HepMCParticle;

class HepMCVertex : public TObject {

protected:
    Int_t      fId;        // Id number (for convenience only)
    TVector3   fPos;       // Vertex position (cm)
    TRef      *fMother;    // Incoming particle
    TRefArray *fDaughters; // Outgoing particles
    
public:
    HepMCVertex();
    HepMCVertex(Int_t Id, Float_t x, Float_t y, Float_t z);
    virtual ~HepMCVertex();
    virtual void Clear(Option_t *option = "");
    virtual void Print(Option_t *option = "") const;
    static void PrintHeader();
    static void PrintFooter();
    void AddDaughter(HepMCParticle *Daughter);
    
    inline Float_t X() const { return fPos.X(); }
    inline Float_t Y() const { return fPos.Y(); }
    inline Float_t Z() const { return fPos.Z(); }
    inline Int_t GetId() { return fId; }
    inline void SetId(Int_t Id) { fId = Id; }
    inline HepMCParticle* GetMother() const
	{ return (HepMCParticle*)fMother->GetObject(); }
    inline TRefArray* GetDaughters() const { return fDaughters; }
    inline void SetMother(HepMCParticle *Mother)
	{ *fMother = (TObject*)Mother; }
    
    ClassDef(HepMCVertex,2) // HEP MC vertex class
};
#endif

 HepMCVertex.h:1
 HepMCVertex.h:2
 HepMCVertex.h:3
 HepMCVertex.h:4
 HepMCVertex.h:5
 HepMCVertex.h:6
 HepMCVertex.h:7
 HepMCVertex.h:8
 HepMCVertex.h:9
 HepMCVertex.h:10
 HepMCVertex.h:11
 HepMCVertex.h:12
 HepMCVertex.h:13
 HepMCVertex.h:14
 HepMCVertex.h:15
 HepMCVertex.h:16
 HepMCVertex.h:17
 HepMCVertex.h:18
 HepMCVertex.h:19
 HepMCVertex.h:20
 HepMCVertex.h:21
 HepMCVertex.h:22
 HepMCVertex.h:23
 HepMCVertex.h:24
 HepMCVertex.h:25
 HepMCVertex.h:26
 HepMCVertex.h:27
 HepMCVertex.h:28
 HepMCVertex.h:29
 HepMCVertex.h:30
 HepMCVertex.h:31
 HepMCVertex.h:32
 HepMCVertex.h:33
 HepMCVertex.h:34
 HepMCVertex.h:35
 HepMCVertex.h:36
 HepMCVertex.h:37
 HepMCVertex.h:38
 HepMCVertex.h:39
 HepMCVertex.h:40
 HepMCVertex.h:41
 HepMCVertex.h:42
 HepMCVertex.h:43
 HepMCVertex.h:44
 HepMCVertex.h:45
 HepMCVertex.h:46
 HepMCVertex.h:47
 HepMCVertex.h:48
 HepMCVertex.h:49
 HepMCVertex.h:50
 HepMCVertex.h:51
 HepMCVertex.h:52
 HepMCVertex.h:53
 HepMCVertex.h:54
 HepMCVertex.h:55
 HepMCVertex.h:56
 HepMCVertex.h:57
 HepMCVertex.h:58