1 //--------------------------------------------------------------------------
4 // This software is part of the EvtGen package. If you use all or part
5 // of it, please give an appropriate acknowledgement.
7 // Copyright Information: See EvtGen/COPYRIGHT
8 // Copyright (C) 2011 University of Warwick, UK
10 // Module: EvtHepMCEvent
12 // Description: Create an HepMC::GenEvent for the complete EvtParticle
15 // Modification history:
17 // John Back June 2011 Module created
19 //------------------------------------------------------------------------
21 #ifndef EVTHEPMCEVENT_HH
22 #define EVTHEPMCEVENT_HH
24 #include "EvtGenBase/EvtVector4R.hh"
26 #include "HepMC/GenEvent.h"
27 #include "HepMC/GenParticle.h"
28 #include "HepMC/SimpleVector.h"
37 virtual ~EvtHepMCEvent();
39 // Select what frame a given GenParticle is in:
40 // its own restframe, the lab frame (first mother), or its mother's frame
41 enum HepMCFrame {RESTFRAME = 1, LAB = 2, MOTHER = 3};
42 // Select the GenParticle status
43 enum HepMCStatus {STABLE = 1, DECAYED = 2, HISTORY = 3};
45 void constructEvent(EvtParticle* baseParticle);
46 void constructEvent(EvtParticle* baseParticle, EvtVector4R& translation);
48 HepMC::GenEvent* getEvent() {return _theEvent;}
50 // Methods used to create GenParticles and FourVectors of vertices.
51 // Make these public so that other classes may call them if they use EvtHepMCEvent.
53 // Create a GenParticle using info from the EvtParticle, specifying what frame
54 // the 4-momentum is from.
55 HepMC::GenParticle* createGenParticle(EvtParticle* theParticle, int frameType);
57 // Find out the decay vertex position for the given EvtParticle.
58 HepMC::FourVector getVertexCoord(EvtParticle* theParticle);
64 // Delete the event structure (called by destructor)
67 // Add a vertex to the event. This is called by the constructEvent function
68 // and is recursive, i.e. it loops through all possible daughter particles and
70 void addVertex(EvtParticle* inEvtParticle, HepMC::GenParticle* inGenParticle);
72 HepMC::GenEvent* _theEvent;
73 EvtVector4R _translation;