|
ATLAS Offline Software
|
Go to the documentation of this file.
15 #include "CaloDetDescr/CaloDetDescrElement.h"
21 #include "G4ThreeVector.hh"
24 : G4VSensitiveDetector(std::move(a_name))
26 , m_calo_dd_man(nullptr)
33 description <<
"ProcessHits: Base class method should not be called!!!";
34 G4Exception(
"FCS_StepInfoSD",
"FCSBadCall", FatalException,
description);
148 if(caloMgrKey.initialize().isFailure()) {
150 description <<
"Failed to get CaloDetDescrManager!";
151 G4Exception(
"FCS_StepInfoSD",
"FCSBadCall", FatalException,
description);
158 void FCS_StepInfoSD::update_map(
const CLHEP::Hep3Vector & l_vec,
const Identifier & l_identifier,
double l_energy,
double l_time,
bool l_valid,
int l_detector,
double timeWindow,
double distanceWindow)
167 G4cout<<this->GetName()<<
" DEBUG update_map: bad identifier: "<<l_identifier.
getString()<<
" skipping this hit."<<G4endl;
172 auto map_item =
m_hit_map.find( l_identifier );
174 m_hit_map[l_identifier] =
new std::vector< ISF_FCS_Parametrization::FCS_StepInfo* >;
184 for (
auto *map_it : * map_item->second) {
186 const double delta_t = std::fabs(map_it->time()-l_time);
187 if ( delta_t >= tsame ) {
continue; }
188 if ( delta_t >= timeWindow ) {
continue; }
191 const CLHEP::Hep3Vector & currentPosition = map_it->position();
192 const double hit_diff2 = currentPosition.diff2( l_vec );
194 if ( hit_diff2 >= distanceWindow ) {
continue; }
213 for (
auto *a_s : *
it.second) {
222 G4cout <<this->GetName()<<
" DEBUG EndOfAthenaEvent: After initial cleanup, N=" << hitContainer->
size() << G4endl;
std::map< Identifier, std::vector< ISF_FCS_Parametrization::FCS_StepInfo * > * > m_hit_map
void update_map(const CLHEP::Hep3Vector &l_vec, const Identifier &l_identifier, double l_energy, double l_time, bool l_valid, int l_detector, double timeWindow, double distanceWindow)
void getCaloDDManager()
Keep a map instead of trying to keep the full vector.
double m_maxRadius
property, see LArG4GenShowerLib::LArG4GenShowerLib
double getMaxTime(const CaloCell_ID::CaloSample &layer) const
CxxUtils::CachedPointer< const CaloDetDescrManager > m_calo_dd_man
double getMaxDeltaR(const CaloCell_ID::CaloSample &layer) const
void set(pointer_t elt) const
Set the element, assuming it is currently null.
FCS_StepInfoSD(G4String a_name, const FCS_Param::Config &config)
Constructor.
double getMaxRadius(const CaloCell_ID::CaloSample &layer) const
double getMaxDeltaPhi(const CaloCell_ID::CaloSample &layer) const
double m_maxRadiusLAr
property, see LArG4GenShowerLib::LArG4GenShowerLib
value_type push_back(value_type pElem)
Add an element to the end of the collection.
void EndOfAthenaEvent(ISF_FCS_Parametrization::FCS_StepInfoCollection *hitContnainer)
End of athena event processing.
std::string getString() const
Provide a string form of the identifier - hexadecimal.
pointer_t get() const
Return the current value of the element.
Class for collection of StepInfo class (G4 hits) copied and modified version to ISF.
FCS_Param::Config m_config
int verboseLevel
Helper to keep the same verbosity everywhere.
size_type size() const noexcept
Returns the number of elements in the collection.
double m_maxRadiusFCAL
property, see LArG4GenShowerLib::LArG4GenShowerLib
virtual G4bool ProcessHits(G4Step *a_step, G4TouchableHistory *) override
Main processing method.
double m_maxRadiusHEC
property, see LArG4GenShowerLib::LArG4GenShowerLib
bool match(std::string s1, std::string s2)
match the individual directories of two strings
std::string description
glabal timer - how long have I taken so far?
double getMaxDeltaEta(const CaloCell_ID::CaloSample &layer) const