|
|
|||
File indexing completed on 2026-03-28 07:51:07
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 Par04MLFastSimModel.hh 0027 /// \brief Definition of the Par04MLFastSimModel class 0028 0029 #ifdef USE_INFERENCE 0030 # ifndef PAR04MLFASTSIMMODEL_HH 0031 # define PAR04MLFASTSIMMODEL_HH 0032 0033 # include "G4VFastSimulationModel.hh" // for G4VFastSimulationModel 0034 0035 # include <G4String.hh> // for G4String 0036 # include <G4ThreeVector.hh> // for G4ThreeVector 0037 # include <G4Types.hh> // for G4bool, G4double 0038 # include <memory> // for unique_ptr 0039 # include <vector> // for vector 0040 class G4FastSimHitMaker; 0041 class G4FastStep; 0042 class G4FastHit; 0043 class G4FastTrack; 0044 class G4ParticleDefinition; 0045 class G4Region; 0046 class Par04InferenceSetup; 0047 0048 /** 0049 * @brief Inference for the fast simulation model. 0050 * 0051 * Parametrisation of electrons, positrons, and gammas. Energy is deposited and 0052 * distributed according to ML inference. This class is only a shell that 0053 * triggers the inference, asks for values, and deposits energies at 0054 * given positions. 0055 * 0056 **/ 0057 0058 class Par04MLFastSimModel : public G4VFastSimulationModel 0059 { 0060 public: 0061 Par04MLFastSimModel(G4String, G4Region*); 0062 Par04MLFastSimModel(G4String); 0063 ~Par04MLFastSimModel(); 0064 /// There are no kinematics constraints. True is returned. 0065 virtual G4bool ModelTrigger(const G4FastTrack&) final; 0066 /// Model is applicable to electrons, positrons, and photons. 0067 virtual G4bool IsApplicable(const G4ParticleDefinition&) final; 0068 /// Take particle out of the full simulation (kill it at the entrance 0069 /// depositing all the energy). Calculate energy deposited in the detector 0070 /// from the NN model inference. 0071 virtual void DoIt(const G4FastTrack&, G4FastStep&) final; 0072 0073 private: 0074 /// Inference model that is NN aware 0075 Par04InferenceSetup* fInference; 0076 /// Inference model that is NN aware 0077 /// Helper class for creation of hits within the sensitive detector 0078 std::unique_ptr<G4FastSimHitMaker> fHitMaker; 0079 std::unique_ptr<G4FastSimHitMaker> fParallelHitMaker; 0080 /// Vector of energy values 0081 std::vector<G4double> fEnergies; 0082 /// Vector of positions corresponding to energy values (const for one NN 0083 /// model) 0084 std::vector<G4ThreeVector> fPositions; 0085 }; 0086 # endif /* PAR04INFERENCEMODEL_HH */ 0087 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|