10#include "CLHEP/Units/SystemOfUnits.h"
37 const std::string& name,
38 const IInterface* parent)
77 declareProperty(
"EMBCalculator",
m_embcalc);
85 declareProperty(
"HECWActiveCalculator",
m_heccalc);
91 declareProperty(
"shift_lar_subhit",
m_config.shift_lar_subhit,
"");
92 declareProperty(
"shorten_lar_step",
m_config.shorten_lar_step,
"");
94 declareProperty(
"maxRadiusLateral",
m_config.m_maxRadiusLateral,
"");
95 declareProperty(
"maxRadiusLongitudinal",
m_config.m_maxRadiusLongitudinal,
98 declareProperty(
"maxTime",
m_config.m_maxTime,
"");
99 declareProperty(
"maxTimeLAr",
m_config.m_maxTimeLAr,
"");
100 declareProperty(
"maxTimeHEC",
m_config.m_maxTimeHEC,
"");
101 declareProperty(
"maxTimeFCAL",
m_config.m_maxTimeFCAL,
"");
102 declareProperty(
"maxTimeTile",
m_config.m_maxTimeTile,
"");
112 CHECK(detStore()->retrieve(idMgr));
116 return StatusCode::FAILURE;
121 return StatusCode::FAILURE;
126 return StatusCode::FAILURE;
131 return StatusCode::FAILURE;
139 return StatusCode::SUCCESS;
162 return StatusCode::SUCCESS;
172 auto sdPair = m_sdThreadMap.find(std::this_thread::get_id());
173 if(sdPair == m_sdThreadMap.end()) {
174 ATH_MSG_ERROR(
"No FCS_StepInfoSDWrapper instance not found");
175 return StatusCode::FAILURE;
180 return StatusCode::FAILURE;
182 sdWrapper->EndOfAthenaEvent();
183 return StatusCode::SUCCESS;
195 sdWrapper->addSD(
makeOneLArSD(
"Barrel::Presampler::Module::StepInfo",
199 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Pos::InnerWheel::StepInfo",
201 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Neg::InnerWheel::StepInfo",
203 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Pos::OuterWheel::StepInfo",
205 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Neg::OuterWheel::StepInfo",
207 sdWrapper->addSD(
makeOneLArSD(
"Endcap::Presampler::LiquidArgon::StepInfo",
209 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Pos::BackOuterBarrette::StepInfo",
211 sdWrapper->addSD(
makeOneLArSD(
"EMEC::Neg::BackOuterBarrette::StepInfo",
219 sdWrapper->addSD(
makeOneLArSD(
"HEC::Module::Depth::Slice::Wheel::StepInfo",
221 sdWrapper->addSD(
makeOneTileSD(
"Tile::Scintillator::StepInfo",
224 m_sdThreadMap.insert( std::make_pair(std::this_thread::get_id(), sdWrapper) );
233 const std::vector<std::string>& volumes)
const {
242 config.m_LArCalculator = calc;
244 throw GaudiException(
245 "nullptr for ILArCalculatorSvc provided to constructor for: " + sdName,
246 name(), StatusCode::FAILURE);
248 if (msgLvl(MSG::VERBOSE)) {
249 config.verboseLevel = 10;
250 }
else if (msgLvl(MSG::DEBUG)) {
251 config.verboseLevel = 5;
254 auto sd = std::make_unique<LArFCS_StepInfoSD>(sdName, config);
255 auto* sdPtr = sd.get();
259 if (this->
assignSD(std::move(sd), parsedVolumes).isFailure()) {
261 throw GaudiException(
"Failed to assign sd: " + sdName, name(),
262 StatusCode::FAILURE);
273 const std::vector<std::string>& volumes)
const {
278 config.m_TileCalculator = calc;
280 throw GaudiException(
281 "nullptr for ITileCalculator provided to constructor for: " + sdName,
282 name(), StatusCode::FAILURE);
284 if (msgLvl(MSG::VERBOSE)) {
285 config.verboseLevel = 10;
286 }
else if (msgLvl(MSG::DEBUG)) {
287 config.verboseLevel = 5;
290 auto sd = std::make_unique<TileFCS_StepInfoSD>(sdName, config);
291 auto* sdPtr = sd.get();
295 if (this->
assignSD(std::move(sd), volumes).isFailure()) {
297 throw GaudiException(
"Failed to assign sd: " + sdName, name(),
298 StatusCode::FAILURE);
#define ATH_CHECK
Evaluate an expression and check for errors.
#define ATH_MSG_VERBOSE(x)
#define CHECK(...)
Evaluate an expression and check for errors.
Standalone functions for dealing with LAr G4 volumes.
This class initializes the Calo (LAr and Tile) offline identifiers.
const TileID * getTileID(void) const
const LArHEC_ID * getHEC_ID(void) const
const LArFCAL_ID * getFCAL_ID(void) const
const LArEM_ID * getEM_ID(void) const
A template class which wraps multiple sensitive detectors.
Common sensitive detector class for LAr systems.
Small wrapper around hit collection map to facilitate accessing the hit collection.
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
StatusCode assignSD(std::unique_ptr< G4VSensitiveDetector > sd, const std::vector< std::string > &volumes) const
Assign SD to a list of volumes.
Gaudi::Property< bool > m_noVolumes
This SensitiveDetector has no volumes associated with it.
SensitiveDetectorBase(const std::string &type, const std::string &name, const IInterface *parent)
Standard constructor.
detail::SDWrapper< FCS_StepInfoSD, ISF_FCS_Parametrization::FCS_StepInfoCollection > FCS_StepInfoSDWrapper
Template instantiation for LArG4SimpleSD.
std::set< std::string > findLogicalVolumes(const std::string &pattern)
Search for logical volumes in the G4 volume store.