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;
21
22class ZDC_G4CalibSD : public G4VSensitiveDetector
23{
24 FRIEND_TEST( ZDC_G4CalibSDtest, ProcessHits );
25 FRIEND_TEST( ZDC_G4CalibSDtest, SpecialHit );
26 FRIEND_TEST( ZDC_G4CalibSDtest, SimpleHit );
27public:
28
29 // Constructor
30 ZDC_G4CalibSD(const G4String &a_name, const G4String& hitCollectionName, bool doPID=false);
31
32 // Destructor
33 virtual ~ZDC_G4CalibSD();
34
35 ZDC_G4CalibSD(const ZDC_G4CalibSD&) = delete;
37
38 // Main processing method
39 G4bool ProcessHits(G4Step* a_step,G4TouchableHistory*) override;
40 // For other classes that need to call into us...
41 G4bool SpecialHit(G4Step* a_step, const std::vector<G4double>& a_energies);
42protected:
43 //Add hit either from ProcessHits or SpecialHit to the collection
44 G4bool SimpleHit( const Identifier& id, const std::vector<double>& energies );
45
46 private:
48
50 // Non-owning cache; HitCollectionMap owns the collection.
52 std::vector<G4double> m_energies;
53
54 // Count the number of invalid hits.
56 // Are we set up to run with PID hits?
57 G4bool m_doPID;
61};
62
63#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
G4bool SimpleHit(const Identifier &id, const std::vector< double > &energies)
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
FRIEND_TEST(ZDC_G4CalibSDtest, SimpleHit)
G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
ZDC_G4CalibSD(const ZDC_G4CalibSD &)=delete
Identifier m_id