Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-22 09:54:42

0001 //----------------------------------*-C++-*----------------------------------//
0002 // Copyright 2023-2024 UT-Battelle, LLC, and other Celeritas developers.
0003 // See the top-level COPYRIGHT file for details.
0004 // SPDX-License-Identifier: (Apache-2.0 OR MIT)
0005 //---------------------------------------------------------------------------//
0006 //! \file accel/detail/GeantSimpleCaloSD.hh
0007 //---------------------------------------------------------------------------//
0008 #pragma once
0009 
0010 #include <memory>
0011 #include <G4VSensitiveDetector.hh>
0012 
0013 #include "corecel/Types.hh"
0014 
0015 namespace celeritas
0016 {
0017 namespace detail
0018 {
0019 struct GeantSimpleCaloStorage;
0020 //---------------------------------------------------------------------------//
0021 /*!
0022  * Accumulate energy deposition in volumes.
0023  *
0024  * This SD is returned by \c GeantSimpleCalo.
0025  */
0026 class GeantSimpleCaloSD : public G4VSensitiveDetector
0027 {
0028   public:
0029     //!@{
0030     //! \name Type aliases
0031     using SPStorage = std::shared_ptr<detail::GeantSimpleCaloStorage>;
0032     //!@}
0033 
0034   public:
0035     // Construct with name and shared params
0036     GeantSimpleCaloSD(SPStorage storage, size_type thread_id);
0037 
0038   protected:
0039     void Initialize(G4HCofThisEvent*) final {}
0040     bool ProcessHits(G4Step*, G4TouchableHistory*) final;
0041 
0042   private:
0043     SPStorage storage_;
0044     size_type thread_id_;
0045 };
0046 
0047 //---------------------------------------------------------------------------//
0048 }  // namespace detail
0049 }  // namespace celeritas