ATLAS Offline Software
Loading...
Searching...
No Matches
ZDC_G4CalibSD.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2025 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef ZDCG4CALIBSD_H
6#define ZDCG4CALIBSD_H
7
8#include "G4VSensitiveDetector.hh"
11
14#include "Identifier/Identifier.h"
15#include "ZdcIdentifier/ZdcID.h"
16
17#include <gtest/gtest_prod.h>
18
19class G4Step;
20class G4Track;
22
23class ZDC_G4CalibSD : public G4VSensitiveDetector
24{
25 FRIEND_TEST( ZDC_G4CalibSDtest, ProcessHits );
26 FRIEND_TEST( ZDC_G4CalibSDtest, SpecialHit );
27 FRIEND_TEST( ZDC_G4CalibSDtest, SimpleHit );
28public:
29
30 // Constructor
31 ZDC_G4CalibSD(const G4String &a_name, const G4String& hitCollectionName, bool doPID=false);
32
33 // Destructor
34 virtual ~ZDC_G4CalibSD();
35
36 ZDC_G4CalibSD(const ZDC_G4CalibSD&) = delete;
38
39 // Main processing method
40 G4bool ProcessHits(G4Step* a_step,G4TouchableHistory*) override;
41 // For other classes that need to call into us...
42 G4bool SpecialHit(G4Step* a_step, const std::vector<G4double>& a_energies);
43protected:
44 //Add hit either from ProcessHits or SpecialHit to the collection
45 G4bool SimpleHit( const Identifier& id, const std::vector<double>& energies, const G4Track* track = nullptr );
46
47 private:
49
51 // Non-owning cache; HitCollectionMap owns the collection.
53 std::vector<G4double> m_energies;
54
55 // Count the number of invalid hits.
57 // Are we set up to run with PID hits?
58 G4bool m_doPID;
62};
63
64#endif
This class implements the calculations requires to categorize the energies deposited during the simul...
CaloG4::SimulationEnergies * m_simulationEnergies
std::vector< G4double > m_energies
ZDC_G4CalibSD & operator=(const ZDC_G4CalibSD &)=delete
std::string m_hitCollectionName
ZDC_EscapedEnergyProcessing * m_zdc_eep
G4int m_numberInvalidHits
ZDC_CalibrationHitContainerBuilder * m_HitColl
G4bool SpecialHit(G4Step *a_step, const std::vector< G4double > &a_energies)
FRIEND_TEST(ZDC_G4CalibSDtest, SpecialHit)
virtual ~ZDC_G4CalibSD()
FRIEND_TEST(ZDC_G4CalibSDtest, ProcessHits)
ZDC_G4CalibSD(const G4String &a_name, const G4String &hitCollectionName, bool doPID=false)
ZDC_CalibrationHitContainerBuilder * getHitCollection() const
G4bool SimpleHit(const Identifier &id, const std::vector< double > &energies, const G4Track *track=nullptr)
FRIEND_TEST(ZDC_G4CalibSDtest, SimpleHit)
G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
ZDC_G4CalibSD(const ZDC_G4CalibSD &)=delete
Identifier m_id