Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

LCDG4EventAction.hh

Go to the documentation of this file.
00001 #ifndef LCDG4EventAction_H
00002 #define LCDG4EventAction_H 1
00003 
00004 #include "G4UserEventAction.hh"
00005 #include "LCDG4McPartManager.hh"
00006 #include "CalorimeterHit.h"
00007 #include "LCDG4CalHit.hh"
00008 #include "globals.hh"
00009 #include <fstream>
00010 #include <vector>
00011 #include <map>
00012 
00013 #include "SIO_stream.h"
00014 class MCPrintSIO;
00015 class MCParticleSIO;
00016 
00017 #include "LCDG4LcioHelper.hh"
00018 #include "IMPL/LCCollectionVec.h"
00019 
00020 class LCDG4EventAction : public G4UserEventAction {
00021 public:
00022   LCDG4EventAction(SIO_stream *,LCDG4McPartManager*);
00023   ~LCDG4EventAction();
00024 
00025   inline void SetRandSeed(G4int r) { rndSeed = r; HepRandom::setTheSeed(rndSeed);}
00026   inline G4int GetRandSeed() { return rndSeed;}
00027 
00028 public:
00029   void BeginOfEventAction(const G4Event*);
00030   void EndOfEventAction(const G4Event*);
00031   SIO_stream *stream;
00032 
00033 #ifdef TXT_MODE
00034   void SetupOutputTextFile();
00035 #endif
00036   void SetupOutputLcio(const char* lcio_file);
00037 
00038 private:
00039 void SaveCalorimeterHits(const LCDG4CalHitsCollection* pHitColl,
00040                          std::vector<CalorimeterHit>& calhits,
00041                          IMPL::LCCollectionVec* lcioColl) const;
00042 
00043 private:
00044   G4int m_vertexCollID;
00045   G4int m_trackerCollID;
00046   G4int m_lumCollID;
00047   G4int m_muonCollID;
00048   G4int m_ecalBCollID;
00049   G4int m_ecalECCollID;
00050   G4int m_hcalBCollID;
00051   G4int m_hcalECCollID;
00052   G4bool m_event;
00053   G4int rndSeed;
00054   G4int fixedSeed;
00055 
00056   LCDG4McPartManager* m_mcmgr;
00057   std::map<int,MCParticleSIO*> mcpartmap;
00058 
00059   LCDG4LcioHelper* _lcioHelper;
00060 #ifdef TXT_MODE
00061   std::ofstream* outf_txt;
00062 #endif
00063 };
00064 
00065 #endif

Generated on Thu Oct 7 18:44:46 2004 for LCDG4 by doxygen 1.3.4