source: trunk/examples/extended/eventgenerator/HepMC/MCTruth/include/MCTruthManager.hh@ 1036

Last change on this file since 1036 was 807, checked in by garnier, 17 years ago

update

File size: 3.3 KB
Line 
1//
2// ********************************************************************
3// * License and Disclaimer *
4// * *
5// * The Geant4 software is copyright of the Copyright Holders of *
6// * the Geant4 Collaboration. It is provided under the terms and *
7// * conditions of the Geant4 Software License, included in the file *
8// * LICENSE and available at http://cern.ch/geant4/license . These *
9// * include a list of copyright holders. *
10// * *
11// * Neither the authors of this software system, nor their employing *
12// * institutes,nor the agencies providing financial support for this *
13// * work make any representation or warranty, express or implied, *
14// * regarding this software system or assume any liability for its *
15// * use. Please see the license in the file LICENSE and URL above *
16// * for the full disclaimer and the limitation of liability. *
17// * *
18// * This code implementation is the result of the scientific and *
19// * technical work of the GEANT4 collaboration. *
20// * By using, copying, modifying or distributing the software (or *
21// * any work based on the software) you agree to acknowledge its *
22// * use in resulting scientific publications, and indicate your *
23// * acceptance of all terms of the Geant4 Software license. *
24// ********************************************************************
25//
26//
27// $Id: MCTruthManager.hh,v 1.1 2006/11/22 14:51:28 gcosmo Exp $
28// GEANT4 tag $Name: $
29//
30//
31// --------------------------------------------------------------
32// GEANT 4 - MCTruthManager class
33// --------------------------------------------------------------
34//
35// Author: Witold POKORSKI (Witold.Pokorski@cern.ch)
36// Date : 2006-02-28
37//
38// --------------------------------------------------------------
39#ifndef INCLUDE_MCTRUTHMANAGER_H
40#define INCLUDE_MCTRUTHMANAGER_H 1
41
42#include "G4Types.hh"
43#include "G4LorentzVector.hh"
44
45#include "HepMC/GenEvent.h"
46#include "HepMC/GenParticle.h"
47
48#include "MCTruthConfig.hh"
49
50class MCTruthManager
51{
52
53public:
54
55 static MCTruthManager* GetInstance();
56
57 void NewEvent();
58 HepMC::GenEvent* GetCurrentEvent() const {return event;}
59 void PrintEvent();
60
61 void AddParticle(G4LorentzVector&, G4LorentzVector&, G4LorentzVector&,
62 G4int, G4int, G4int, G4bool);
63
64 void SetConfig(MCTruthConfig* c) {config=c;}
65 MCTruthConfig* GetConfig() const {return config;}
66
67protected:
68
69 MCTruthManager( );
70
71 virtual ~MCTruthManager( );
72
73private:
74
75 HepMC::GenEvent* event;
76
77 // vector containing barcodes of primary particles (not having any mother)
78 //
79 std::vector<G4int> primarybarcodes;
80
81 // map containing number of 'segmentations' for each particle (i.e. number
82 // of additional vertices introduced in order to attach secondary particles
83 // which were created 'in-flight', for instance bremstrahlung gammas, etc)
84 //
85 std::map<G4int,G4int> segmentations;
86
87 // different criteria for storing (or not) particles
88 //
89 MCTruthConfig* config;
90
91 // recursive printing of the tree
92 //
93 void printTree(HepMC::GenParticle*, G4String);
94
95};
96#endif // INCLUDE_MCTRUTHMANAGER_H
Note: See TracBrowser for help on using the repository browser.