DEPRECATED AND WILL BE REMOVED.
More...
#include <LArG4H62004DeadSDTool.h>
|
G4VSensitiveDetector * | makeSD () const override final |
|
void | setupAllSDs (const std::map< G4VSensitiveDetector *, std::vector< std::string > * > &configuration) const |
| Method actually doing the work to assign all of these SDs FIXME: this argument type is nasty: More...
|
|
bool | match (const char *first, const char *second) const |
| Helper function for matching strings with wildcards. More...
|
|
StatusCode | assignSD (G4VSensitiveDetector *sd, const std::vector< std::string > &volumes) const |
| Assign SD to a list of volumes. More...
|
|
G4VSensitiveDetector * | getSD () |
| Retrieve the current SD. More...
|
|
void | SetSensitiveDetector (G4LogicalVolume *, G4VSensitiveDetector *) const |
| Method stolen from G4VUserDetectorConstruction in G4 10.2. More...
|
|
DEPRECATED AND WILL BE REMOVED.
Please see LArG4::H62004DeadSDTool instead.
Definition at line 21 of file LArG4H62004DeadSDTool.h.
◆ LArG4H62004DeadSDTool()
LArG4H62004DeadSDTool::LArG4H62004DeadSDTool |
( |
const std::string & |
type, |
|
|
const std::string & |
name, |
|
|
const IInterface * |
parent |
|
) |
| |
◆ ~LArG4H62004DeadSDTool()
virtual LArG4H62004DeadSDTool::~LArG4H62004DeadSDTool |
( |
| ) |
|
|
inlinevirtual |
◆ assignSD()
StatusCode SensitiveDetectorBase::assignSD |
( |
G4VSensitiveDetector * |
sd, |
|
|
const std::vector< std::string > & |
volumes |
|
) |
| const |
|
protectedinherited |
Assign SD to a list of volumes.
This method supports wild card matching
Definition at line 69 of file SensitiveDetectorBase.cxx.
78 auto sdMgr = G4SDManager::GetSDMpointer();
79 sdMgr->AddNewDetector(
sd);
81 if(!volumes.empty()) {
83 auto logicalVolumeStore = G4LogicalVolumeStore::GetInstance();
84 for(
const auto& volumeName : volumes) {
90 for(
auto* logVol : *logicalVolumeStore) {
92 ATH_MSG_VERBOSE(
"Check whether "<<logVol->GetName()<<
" belongs to the set of sensitive detectors "<<volumeName);
93 if(
matchStrings( volumeName.data(), logVol->GetName() ) ){
102 " not found in G4LogicalVolumeStore.");
105 ATH_MSG_VERBOSE(
"Found " << numFound <<
" copies of LV " << volumeName <<
106 "; SD " <<
sd->GetName() <<
" assigned.");
115 " and expected at least one. Size of the volume store "<<G4LogicalVolumeStore::GetInstance()->
size() );
116 return StatusCode::FAILURE;
120 return StatusCode::SUCCESS;
◆ Gather()
StatusCode LArG4H62004DeadSDTool::Gather |
( |
| ) |
|
|
finaloverridevirtual |
End of an athena event.
Store the output collection in SG at this point. If we are using a WriteHandle, then this can be empty!
Reimplemented from SensitiveDetectorBase.
◆ getSD()
G4VSensitiveDetector * SensitiveDetectorBase::getSD |
( |
| ) |
|
|
protectedinherited |
Retrieve the current SD.
In AthenaMT, this means the thread-local SD. Otherwise, it is simply the single SD.
Definition at line 123 of file SensitiveDetectorBase.cxx.
125 #ifdef G4MULTITHREADED
127 const auto tid = std::this_thread::get_id();
129 auto sdPair = m_sdThreadMap.find(tid);
130 if(sdPair == m_sdThreadMap.end())
return nullptr;
131 return sdPair->second;
◆ initialize()
StatusCode LArG4SDTool::initialize |
( |
| ) |
|
|
finaloverrideinherited |
◆ initializeCalculators()
StatusCode LArG4H62004DeadSDTool::initializeCalculators |
( |
| ) |
|
|
finaloverrideprivatevirtual |
Beginning of an athena event.
This is where collection initialization should happen. If we are using a WriteHandle, then this could be empty.
Reimplemented from LArG4SDTool.
◆ initializeSD()
StatusCode LArG4H62004DeadSDTool::initializeSD |
( |
| ) |
|
|
finaloverride |
◆ makeSD()
G4VSensitiveDetector* LArG4SDTool::makeSD |
( |
| ) |
const |
|
inlinefinaloverrideprotectedinherited |
◆ match()
bool LArG4SDTool::match |
( |
const char * |
first, |
|
|
const char * |
second |
|
) |
| const |
|
protectedinherited |
Helper function for matching strings with wildcards.
◆ matchStrings()
bool SensitiveDetectorBase::matchStrings |
( |
const char * |
first, |
|
|
const char * |
second |
|
) |
| |
|
staticprivateinherited |
Match two strings with wildcard support.
Compares two strings character by character with optional * wildcard in the first argument
Definition at line 150 of file SensitiveDetectorBase.cxx.
◆ setSD()
void SensitiveDetectorBase::setSD |
( |
G4VSensitiveDetector * |
sd | ) |
|
|
privateinherited |
Set the current SD.
In hive, this gets assigned as the thread-local SD.
Definition at line 137 of file SensitiveDetectorBase.cxx.
139 #ifdef G4MULTITHREADED
140 const auto tid = std::this_thread::get_id();
141 ATH_MSG_DEBUG(
"Creating and registering SD " <<
sd <<
" in thread " << tid);
142 m_sdThreadMap.insert( std::make_pair(tid,
sd) );
◆ SetSensitiveDetector()
void SensitiveDetectorBase::SetSensitiveDetector |
( |
G4LogicalVolume * |
logVol, |
|
|
G4VSensitiveDetector * |
aSD |
|
) |
| const |
|
protectedinherited |
Method stolen from G4VUserDetectorConstruction in G4 10.2.
Definition at line 177 of file SensitiveDetectorBase.cxx.
184 G4VSensitiveDetector* originalSD = logVol->GetSensitiveDetector();
185 if ( originalSD ==
nullptr )
187 logVol->SetSensitiveDetector(aSD);
191 G4MultiSensitiveDetector* msd =
dynamic_cast<G4MultiSensitiveDetector*
>(originalSD);
192 if ( msd !=
nullptr )
199 std::stringstream
ss;
200 ss << static_cast<const void*>(logVol);
201 const G4String msdname =
"/MultiSD_" + logVol->GetName() +
ss.str();
203 msd =
new G4MultiSensitiveDetector(msdname);
205 G4SDManager::GetSDMpointer()->AddNewDetector(msd);
206 msd->AddSD(originalSD);
208 logVol->SetSensitiveDetector(msd);
◆ setupAllSDs()
void LArG4SDTool::setupAllSDs |
( |
const std::map< G4VSensitiveDetector *, std::vector< std::string > * > & |
configuration | ) |
const |
|
protectedinherited |
Method actually doing the work to assign all of these SDs FIXME: this argument type is nasty:
- non-const ptr to list of strings
◆ SetupEvent()
virtual StatusCode SensitiveDetectorBase::SetupEvent |
( |
| ) |
|
|
inlineoverridevirtualinherited |
◆ setupHelpers() [1/2]
Overload of the above method for calib SDs.
◆ setupHelpers() [2/2]
Helper method to pass the ID helper pointers to the SDs.
◆ m_calculator
◆ m_caloDmID
◆ m_deadSD
◆ m_do_eep
bool LArG4H62004DeadSDTool::m_do_eep |
|
private |
◆ m_doPID
G4bool LArG4SDTool::m_doPID |
|
protectedinherited |
Are we set up to run with PID hits?
Definition at line 55 of file LArG4SDTool.h.
◆ m_HitColl
◆ m_larEmID
Pointers to the identifier helpers.
Definition at line 69 of file LArG4SDTool.h.
◆ m_larFcalID
◆ m_larHecID
◆ m_noVolumes
Gaudi::Property<bool> SensitiveDetectorBase::m_noVolumes {this, "NoVolumes", false} |
|
protectedinherited |
◆ m_outputCollectionNames
Gaudi::Property<std::vector<std::string> > SensitiveDetectorBase::m_outputCollectionNames {this, "OutputCollectionNames", {}} |
|
protectedinherited |
◆ m_SD
G4VSensitiveDetector* SensitiveDetectorBase::m_SD {} |
|
privateinherited |
◆ m_timeBinType
std::string LArG4SDTool::m_timeBinType |
|
protectedinherited |
What time binning type for regular hits?
Definition at line 57 of file LArG4SDTool.h.
◆ m_timeBinWidth
float LArG4SDTool::m_timeBinWidth |
|
protectedinherited |
What time bin width for regular hits?
Definition at line 59 of file LArG4SDTool.h.
◆ m_uninstSD
◆ m_useFrozenShowers
G4bool LArG4SDTool::m_useFrozenShowers = false |
|
protectedinherited |
Is there going to be a fast simulation coming into this SD?
Definition at line 61 of file LArG4SDTool.h.
◆ m_volumeNames
Gaudi::Property<std::vector<std::string> > SensitiveDetectorBase::m_volumeNames {this, "LogicalVolumeNames", {}} |
|
protectedinherited |
The documentation for this class was generated from the following file: