Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-06 08:19:23

0001 // Tell emacs that this is a C++ source
0002 //  -*- C++ -*-.
0003 #ifndef G4MAIN_PHG4PRIMARYGENERATORACTION_H
0004 #define G4MAIN_PHG4PRIMARYGENERATORACTION_H
0005 
0006 #include <Geant4/G4VUserPrimaryGeneratorAction.hh>
0007 
0008 class G4Event;
0009 class PHG4InEvent;
0010 
0011 class PHG4PrimaryGeneratorAction : public G4VUserPrimaryGeneratorAction
0012 {
0013  public:
0014   PHG4PrimaryGeneratorAction()
0015     : verbosity(0)
0016     , inEvent(0)
0017   {
0018   }
0019 
0020   ~PHG4PrimaryGeneratorAction() override
0021   {
0022   }
0023 
0024   void GeneratePrimaries(G4Event* anEvent) override;
0025 
0026   //! set top node (from where particle list is retrieved for passing to geant
0027   void SetInEvent(PHG4InEvent* const inevt)
0028   {
0029     inEvent = inevt;
0030   }
0031 
0032   //! Set/Get verbosity
0033   void Verbosity(const int val) { verbosity = val; }
0034   int Verbosity() const { return verbosity; }
0035 
0036  protected:
0037   int verbosity;
0038 
0039  private:
0040   //! temporary pointer to input event on node tree
0041   PHG4InEvent* inEvent;
0042 };
0043 
0044 #endif  // PHG4PrimaryGeneratorAction_H__