LcioMcpFactory.hh

Go to the documentation of this file.
00001 // $Header: /cvs/lcd/slic/include/LcioMcpFactory.hh,v 1.8 2007/04/27 01:54:32 jeremy Exp $
00002 
00003 #ifndef SLIC_LCIOMCPFACTORY_HH
00004 #define SLIC_LCIOMCPFACTORY_HH 1
00005 
00006 // lcio
00007 #include "EVENT/LCCollection.h"
00008 #include "EVENT/LCEvent.h"
00009 #include "EVENT/MCParticle.h"
00010 #include "IMPL/MCParticleImpl.h"
00011 
00012 // slic
00013 #include "Module.hh"
00014 
00015 class G4PrimaryParticle;
00016 class G4TrajectoryContainer;
00017 class G4Event;
00018 
00019 namespace slic
00020 {
00021   class LcioMcpManager;
00022   class Trajectory;
00023 
00028   class LcioMcpFactory : public Module
00029   {
00030 
00031   public:
00032     LcioMcpFactory(LcioMcpManager*);
00033     virtual ~LcioMcpFactory();
00034 
00035   public:
00036 
00037     // create new, blank Mcp coll
00038     EVENT::LCCollection* createEmptyMcpCollection(const std::string& collName, bool errorOnExist = true);
00039 
00040     // chooses to create from initial or traj cont
00041     void createFinalMcpCollection(const G4Event* event);
00042 
00043   private:
00044 
00045     // use StdHep-generated mcpVec to create final mcpVec for an event
00046     void createFinalMcpCollectionFromInitial(EVENT::LCCollection* mcpVecInitial);
00047 
00048     // These two functions create the Mcp coll from trajectories only in case of G4 GPS or gun
00049     void createFinalMcpCollectionFromTrajectoryContainer(G4TrajectoryContainer* trjCont);
00050 
00051     /* Create Mcp daughters of a trajectory with the given track ID. */
00052     void addMcpDaughtersFromTrajectoryContainer(IMPL::MCParticleImpl* parMcp, int parTrkID);
00053 
00054     // create an Mcp from a trajectory only
00055     IMPL::MCParticleImpl* createMcpFromTrajectory( Trajectory* );
00056 
00057     // create Mcps recursively given an initial Mcp
00058     IMPL::MCParticleImpl* createMcpFromInitialRecurse(EVENT::MCParticle* mcp);
00059 
00060     // create an Mcp from another, associated initial Mcp only
00061     IMPL::MCParticleImpl* createMcpFromInitialOnly(EVENT::MCParticle* mcpInit);
00062 
00063     // create an Mcp from a G4PrimaryParticle
00064     IMPL::MCParticleImpl* createMcpFromPrimary(G4PrimaryParticle*, EVENT::MCParticle* );
00065 
00066     // create an Mcp from primary and input Mcp
00067     IMPL::MCParticleImpl* createMcpFromInitialAndPrimary(G4PrimaryParticle* primary, EVENT::MCParticle* mcpInit);
00068 
00069     // create an Mcp from a trajectory and an input Mcp
00070     IMPL::MCParticleImpl* createMcpFromInitialAndTrajectory( Trajectory*, EVENT::MCParticle* mcpInit );
00071 
00072     // create an Mcp from a G4PrimaryParticle, shallow copy only
00073     IMPL::MCParticleImpl* createMcpFromPrimaryShallowCopy(G4PrimaryParticle*);
00074 
00075     // create new Mcp and shallow copy from input Mcp
00076     IMPL::MCParticleImpl* createMcpShallowCopy(EVENT::MCParticle* mcp);
00077 
00078     // create and add MCP daughters based on G4PrimaryParticle and associated MCP from StdHep
00079     void createDaughtersFromPrimary(G4PrimaryParticle* primary,
00080                                     EVENT::MCParticle* mcpInit,
00081                                     IMPL::MCParticleImpl* mcpPar);
00082 
00083     // add daughters to a MCP based on associated intial MCP from StdHep
00084     void addMcpDaughtersFromInitial( IMPL::MCParticleImpl* mcpNew, EVENT::MCParticle* mcpInit );
00085 
00086     void fillMcpEndPointEnergy(IMPL::LCCollectionVec* mcpColl);
00087 
00088   private:
00089     LcioMcpManager* m_manager;
00090     IMPL::LCCollectionVec* m_finalColl;
00091     G4TrajectoryContainer* m_currentTrajectoryContainer;
00092   };
00093 }
00094 
00095 #endif

Generated on Thu Nov 15 15:24:16 2007 for Simulator for the Linear Collider by  doxygen 1.5.4