Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:59:27

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 // G4VTrajectoryPoint
0027 //
0028 // Class description:
0029 //
0030 // This class is the abstract base class representing the point
0031 // forming a trajectory. It includes information of a the point.
0032 
0033 // Contact:
0034 //   Questions and comments to this code should be sent to
0035 //     Katsuya Amako  (e-mail: Katsuya.Amako@kek.jp)
0036 //     Takashi Sasaki (e-mail: Takashi.Sasaki@kek.jp)
0037 // --------------------------------------------------------------------
0038 #ifndef G4VTrajectoryPoint_hh
0039 #define G4VTrajectoryPoint_hh 1
0040 
0041 #include "G4ThreeVector.hh"
0042 #include "globals.hh"
0043 
0044 #include <map>
0045 #include <vector>
0046 
0047 class G4AttDef;
0048 class G4AttValue;
0049 
0050 class G4VTrajectoryPoint
0051 {
0052  public:
0053   // Constructor/Destructor
0054   G4VTrajectoryPoint() = default;
0055   virtual ~G4VTrajectoryPoint() = default;
0056 
0057   // Equality operator
0058   G4bool operator==(const G4VTrajectoryPoint& right) const { return (this == &right); }
0059 
0060   // Return point position
0061   virtual const G4ThreeVector GetPosition() const = 0;
0062 
0063   // Get method for a vector of auxiliary points.
0064   // If implemented by a derived class, returns a pointer to a list
0065   // of auxiliary points, e.g., intermediate points used during the
0066   // calculation of the step that can be used for drawing a smoother
0067   // trajectory. The user must test the validity of this pointer
0068   virtual const std::vector<G4ThreeVector>* GetAuxiliaryPoints() const { return nullptr; }
0069 
0070   // Get method for HEPRep style attribute definitions.
0071   // If implemented by a derived class, returns a pointer to a map of
0072   // attribute definitions for the attribute values below. The user
0073   // must test the validity of this pointer. See G4Trajectory for an
0074   // example of a concrete implementation of this method
0075   virtual const std::map<G4String, G4AttDef>* GetAttDefs() const { return nullptr; }
0076 
0077   // Get method for HEPRep style attribute values.
0078   // If implemented by a derived class, returns a pointer to a list
0079   // of attribute values suitable, e.g., for picking. Each must
0080   // refer to an attribute definition in the above map; its name is
0081   // the key. The user must test the validity of this pointer (it
0082   // must be non-zero and conform to the G4AttDefs, which may be
0083   // checked with G4AttCheck) and delete the list after use. See
0084   // G4Trajectory for an example of a concrete implementation of this
0085   // method and G4VTrajectory::ShowTrajectory() for an example of its use.
0086   virtual std::vector<G4AttValue>* CreateAttValues() const { return nullptr; }
0087 };
0088 
0089 #endif