Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/Geant4/G4VMoleculeReactionCounter.hh was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

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 // Author: Christian Velten (2025)
0027 #ifndef G4VMOLECULEREACTIONCOUNTER_HH
0028 #define G4VMOLECULEREACTIONCOUNTER_HH 1
0029 
0030 #include "G4VMoleculeCounterInternalBase.hh"
0031 
0032 #include <map>
0033 #include <memory>
0034 
0035 class G4Track;
0036 class G4DNAMolecularReactionData;
0037 
0038 //------------------------------------------------------------------------------
0039 
0040 class G4VMoleculeReactionCounter : public G4VMoleculeCounterInternalBase
0041 {
0042     template<typename>
0043     friend class G4VUserMoleculeReactionCounter;
0044 
0045   public:
0046     enum MoleculeReactionCounterType
0047     {
0048       Other,
0049       Basic,
0050     };
0051     struct G4VMoleculeReactionCounterIndex
0052     {
0053         virtual ~G4VMoleculeReactionCounterIndex() = default;
0054         virtual G4bool operator<(G4VMoleculeReactionCounterIndex const&) const = 0;
0055         virtual G4bool operator==(G4VMoleculeReactionCounterIndex const&) const = 0;
0056         virtual G4String GetInfo() const = 0;
0057         virtual const G4DNAMolecularReactionData* GetReactionData() const = 0;
0058     };
0059 
0060   private:
0061     G4VMoleculeReactionCounter();
0062     G4VMoleculeReactionCounter(const G4String&, MoleculeReactionCounterType =
0063                                                   MoleculeReactionCounterType::Basic);
0064     G4VMoleculeReactionCounter(G4VMoleculeReactionCounter const&) = delete;
0065     void operator=(G4VMoleculeReactionCounter const& x) = delete;
0066 
0067   public:
0068     ~G4VMoleculeReactionCounter() override = default;
0069 
0070   public:
0071     // virtual std::unique_ptr<G4VMoleculeReactionCounterIndex> BuildIndex(const G4Track*, const G4Track*, const G4DNAMolecularReactionData*) const = 0;
0072     virtual std::unique_ptr<G4VMoleculeReactionCounterIndex> BuildSimpleIndex(const G4DNAMolecularReactionData*) const = 0;
0073 
0074     virtual void RecordReaction(std::unique_ptr<G4VMoleculeReactionCounterIndex>, G4double, G4int = 1) = 0;
0075 
0076     virtual std::set<const G4DNAMolecularReactionData*> GetRecordedReactions() const = 0;
0077 
0078   protected:
0079     MoleculeReactionCounterType fType{MoleculeReactionCounterType::Basic};
0080 
0081   public:
0082       MoleculeReactionCounterType GetType() const;
0083 };
0084 
0085 //------------------------------------------------------------------------------
0086 
0087 inline G4VMoleculeReactionCounter::MoleculeReactionCounterType G4VMoleculeReactionCounter::GetType() const
0088 {
0089   return fType;
0090 }
0091 
0092 #endif