Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-23 09:22:34

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 #ifndef PAR04EVENTINFORMATION_HH
0027 #define PAR04EVENTINFORMATION_HH
0028 
0029 #include "G4ThreeVector.hh"  // for G4ThreeVector
0030 #include "G4VUserEventInformation.hh"  // for G4VUserEventInformation
0031 
0032 #include <G4Types.hh>  // for G4bool
0033 
0034 /**
0035  * @brief Event information
0036  *
0037  * Additional data associated to the primary particle.
0038  * Contains information on the direction of the primary particle used to determine
0039  * how energy is scored (mesh around the particle direction).
0040  *
0041  */
0042 
0043 class Par04EventInformation : public G4VUserEventInformation
0044 {
0045   public:
0046     Par04EventInformation();
0047     virtual ~Par04EventInformation();
0048 
0049     /// Set particle direction
0050     inline void SetDirection(const G4ThreeVector& aDirection) { fDirection = aDirection; };
0051     /// Get particle direction
0052     inline G4ThreeVector GetDirection() const { return fDirection; };
0053     /// Set particle position
0054     inline void SetPosition(const G4ThreeVector& aPosition) { fPosition = aPosition; };
0055     /// Get particle position
0056     inline G4ThreeVector GetPosition() const { return fPosition; };
0057     /// Set flag
0058     inline void SetFlag(G4bool aFlag) { fIfSet = aFlag; };
0059     /// Get flag
0060     inline G4bool GetFlag() const { return fIfSet; };
0061     /// Print
0062     void Print() const final;
0063 
0064   private:
0065     /// Particle direction. By default equal to the default particle gun direction.
0066     G4ThreeVector fDirection = {0, 1, 0};
0067     /// Particle position. By default equal to the default inner radius.
0068     G4ThreeVector fPosition = {0, 800, 0};
0069     /// Flag
0070     G4bool fIfSet = false;
0071 };
0072 
0073 #endif /* PAR04EVENTINFORMATION_HH */