Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-28 07:18:00

0001 //
0002 // ********************************************************************
0003 // * License and Disclaimer                                           *
0004 // *                                                                  *
0005 // * The  Geant4 software  is  copyright of the Copyright Holders  of *
0006 // * the Geant4 Collaboration.  It is provided  under  the terms  and *
0007 // * conditions of the Geant4 Software License,  included in the file *
0008 // * LICENSE and available at  http://cern.ch/geant4/license .  These *
0009 // * include a list of copyright holders.                             *
0010 // *                                                                  *
0011 // * Neither the authors of this software system, nor their employing *
0012 // * institutes,nor the agencies providing financial support for this *
0013 // * work  make  any representation or  warranty, express or implied, *
0014 // * regarding  this  software system or assume any liability for its *
0015 // * use.  Please see the license in the file  LICENSE  and URL above *
0016 // * for the full disclaimer and the limitation of liability.         *
0017 // *                                                                  *
0018 // * This  code  implementation is the result of  the  scientific and *
0019 // * technical work of the GEANT4 collaboration.                      *
0020 // * By using,  copying,  modifying or  distributing the software (or *
0021 // * any work based  on the software)  you  agree  to acknowledge its *
0022 // * use  in  resulting  scientific  publications,  and indicate your *
0023 // * acceptance of all terms of the Geant4 Software license.          *
0024 // ********************************************************************
0025 //
0026 /// \file Par04EventInformation.hh
0027 /// \brief Definition of the Par04EventInformation class
0028 
0029 #ifndef PAR04EVENTINFORMATION_HH
0030 #define PAR04EVENTINFORMATION_HH
0031 
0032 #include "G4ThreeVector.hh"  // for G4ThreeVector
0033 #include "G4VUserEventInformation.hh"  // for G4VUserEventInformation
0034 
0035 #include <G4Types.hh>  // for G4bool
0036 
0037 /**
0038  * @brief Event information
0039  *
0040  * Additional data associated to the primary particle.
0041  * Contains information on the direction of the primary particle used to determine
0042  * how energy is scored (mesh around the particle direction).
0043  *
0044  */
0045 
0046 class Par04EventInformation : public G4VUserEventInformation
0047 {
0048   public:
0049     Par04EventInformation();
0050     virtual ~Par04EventInformation();
0051 
0052     /// Set particle direction
0053     inline void SetDirection(const G4ThreeVector& aDirection) { fDirection = aDirection; };
0054     /// Get particle direction
0055     inline G4ThreeVector GetDirection() const { return fDirection; };
0056     /// Set particle position
0057     inline void SetPosition(const G4ThreeVector& aPosition) { fPosition = aPosition; };
0058     /// Get particle position
0059     inline G4ThreeVector GetPosition() const { return fPosition; };
0060     /// Set flag
0061     inline void SetFlag(G4bool aFlag) { fIfSet = aFlag; };
0062     /// Get flag
0063     inline G4bool GetFlag() const { return fIfSet; };
0064     /// Print
0065     void Print() const final;
0066 
0067   private:
0068     /// Particle direction. By default equal to the default particle gun direction.
0069     G4ThreeVector fDirection = {0, 1, 0};
0070     /// Particle position. By default equal to the default inner radius.
0071     G4ThreeVector fPosition = {0, 800, 0};
0072     /// Flag
0073     G4bool fIfSet = false;
0074 };
0075 
0076 #endif /* PAR04EVENTINFORMATION_HH */