ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
G4PrimaryTransformer.hh
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file G4PrimaryTransformer.hh
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 //
28 
29 #ifndef G4PromaryTransformer_h
30 #define G4PromaryTransformer_h 1
31 
32 #include "G4TrackVector.hh"
33 #include "G4ParticleTable.hh"
34 #include "globals.hh"
35 class G4Event;
36 class G4PrimaryVertex;
37 #include "G4PrimaryParticle.hh"
38 #include "G4DynamicParticle.hh"
39 
40 // class description:
41 //
42 // This class is exclusively used by G4EventManager for the conversion
43 // from G4PrimaryVertex/G4PrimaryParticle to G4DynamicParticle/G4Track.
44 //
45 
47 {
48  public:
50  virtual ~G4PrimaryTransformer();
51 
52  G4TrackVector* GimmePrimaries(G4Event* anEvent, G4int trackIDCounter=0);
53  void CheckUnknown();
54 
55  protected:
60 
65 
67 
68  public:
69  inline void SetVerboseLevel(G4int vl)
70  { verboseLevel = vl; };
71 
72  public: //with description
74  // By invoking this Set method, the user can alter the treatment of unknown
75  // particle. The ideal place to invoke this method is in the BeginOfRunAction.
76 
78  { return unknownParticleDefined; }
79 
80  protected:
81  void GenerateTracks(G4PrimaryVertex* primaryVertex);
82  void GenerateSingleTrack(G4PrimaryParticle* primaryParticle,
85  G4DynamicParticle* motherDP);
87 
88  protected: //with description
89  // Following two virtual methods are provided to customize the use of PrimaryTransformer
90  // for particle types exotic to Geant4.
91 
93  // Return appropriate G4ParticleDefinition w.r.t. the primary particle.
94  // If NULL is returned, the particle will not be treated as a track, but its daughters
95  // will be examined in case it has "pre-assigned decay products".
96 
98  // Return true if a primary particle should be converted into a track.
99  // By default, all particles of non-shortlived and shortlived with valid decay
100  // tables are converted.
101 };
102 
103 #endif
104 
105