ATLAS Offline Software
Loading...
Searching...
No Matches
SctSensor_CTB.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3*/
4
5/****************************************************************
6 SCT Sensitive Detector class
7 Davide Costanzo Jul 14th 2003.
8 ****************************************************************/
9
10#ifndef SCT_G4_SD_SCTSENSOR_CTB_H
11#define SCT_G4_SD_SCTSENSOR_CTB_H
12
13// Base class
14#include "G4VSensitiveDetector.hh"
15
16// For the hits
18#include <gtest/gtest_prod.h>
19
21// G4 needed classes
22class G4Step;
23class G4TouchableHistory;
24
25//....oooOO0OOooo........oooOO0OOooo........oooOO0OOooo........oooOO0OOooo.....
26
27class SctSensor_CTB : public G4VSensitiveDetector
28{
29 FRIEND_TEST( SctSensor_CTBtest, ProcessHits );
30 FRIEND_TEST( SctSensor_CTBtest, AddHit );
31 public:
32 // Constructor
33 SctSensor_CTB( const std::string& name, const std::string& hitCollectionName );
34
35 // Process each G4 hit
36 G4bool ProcessHits(G4Step*, G4TouchableHistory*) override final;
37
38 // For setting up the hit collection
39 void Initialize(G4HCofThisEvent *) override final;
40
44 template <class... Args> void AddHit(Args&&... args){ m_HitColl->Emplace( args... ); }
45
46 private:
47 // The hits collection
48 std::string m_HitCollName;
51};
52
53#endif //SCT_G4_SD_SCTSENSOR_CTB_H
AtlasHitsVector< SiHit > SiHitCollection
This class is attached to G4Event objects as UserInformation.
void AddHit(Args &&... args)
Templated method to stuff a single hit into the sensitive detector class.
G4bool ProcessHits(G4Step *, G4TouchableHistory *) override final
std::string m_HitCollName
FRIEND_TEST(SctSensor_CTBtest, ProcessHits)
SctSensor_CTB(const std::string &name, const std::string &hitCollectionName)
FRIEND_TEST(SctSensor_CTBtest, AddHit)
void Initialize(G4HCofThisEvent *) override final
AtlasG4EventUserInfo * m_g4UserEventInfo
SiHitCollection * m_HitColl