 |
ATLAS Offline Software
|
#include <TileFCS_StepInfoSD.h>
Definition at line 29 of file TileFCS_StepInfoSD.h.
◆ TileFCS_StepInfoSD() [1/2]
◆ TileFCS_StepInfoSD() [2/2]
◆ C10_connected()
bool TileFCS_StepInfoSD::C10_connected |
( |
int |
module | ) |
const |
|
inlineprivate |
◆ cellReadOutByOnePMT()
bool TileFCS_StepInfoSD::cellReadOutByOnePMT |
( |
const Identifier & |
id | ) |
const |
|
inlineprivate |
◆ EndOfAthenaEvent()
End of athena event processing.
Definition at line 146 of file FCS_StepInfoSD.cxx.
150 for (
auto* a_s : *
it.second) {
152 hitContainer->push_back(a_s);
159 G4cout << this->GetName()
160 <<
" DEBUG EndOfAthenaEvent: After initial cleanup, N="
161 << hitContainer->size() << G4endl;
◆ getCaloDDManager()
void FCS_StepInfoSD::getCaloDDManager |
( |
| ) |
|
|
protectedinherited |
Keep a map instead of trying to keep the full vector.
At the end of the event we'll push the map back into the FCS_StepInfoCollection in StoreGate.
Definition at line 49 of file FCS_StepInfoSD.cxx.
51 if (caloMgrKey.initialize().isFailure()) {
53 description <<
"Failed to get CaloDetDescrManager!";
54 G4Exception(
"FCS_StepInfoSD",
"FCSBadCall", FatalException,
description);
58 caloMgrKey, Gaudi::Hive::currentContext());
◆ getMaxTime()
NB The result of this function should actually be constant for each SD
Definition at line 34 of file FCS_StepInfoSD.cxx.
◆ operator=()
◆ ProcessHits()
G4bool TileFCS_StepInfoSD::ProcessHits |
( |
G4Step * |
a_step, |
|
|
G4TouchableHistory * |
|
|
) |
| |
|
finaloverridevirtual |
Main processing method.
Reimplemented from FCS_StepInfoSD.
Definition at line 34 of file TileFCS_StepInfoSD.cxx.
41 if (a_step->GetTotalEnergyDeposit() <= 0.) {
52 if ((micHit.
pmt_up == invalid_id) && (micHit.
pmt_down == invalid_id)) {
53 G4cout << this->GetName() <<
" WARNING ProcessHits: Invalid hit in Tile??"
59 if ((micHit.
pmt_up == invalid_id) &&
61 G4cout << this->GetName()
62 <<
" WARNING ProcessHits: Something wrong in identifier: tile "
64 << micHit.
pmt_up << std::endl;
65 G4cout << this->GetName()
66 <<
" WARNING ProcessHits: tile pmt_down : " << micHit.
pmt_down
68 G4cout << this->GetName()
69 <<
" WARNING ProcessHits: E up: " << micHit.
e_up
70 <<
" E down: " << micHit.
e_down <<
" T up: " << micHit.
time_up
71 <<
" T down: " << micHit.
time_down << std::endl;
73 if ((micHit.
pmt_down == invalid_id) &&
75 G4cout << this->GetName()
76 <<
" WARNING ProcessHits: Something wrong in identifier: tile "
79 G4cout << this->GetName()
80 <<
" WARNING ProcessHits: tile pmt_up: " << micHit.
pmt_up <<
" "
82 G4cout << this->GetName()
83 <<
" WARNING ProcessHits: E up: " << micHit.
e_up
84 <<
" E down: " << micHit.
e_down <<
" T up: " << micHit.
time_up
85 <<
" T down: " << micHit.
time_down << std::endl;
88 const G4ThreeVector
pos =
89 0.5 * (a_step->GetPreStepPoint()->GetPosition() +
90 a_step->GetPostStepPoint()->GetPosition());
91 const int numberOfProcessedHits(1);
96 numberOfProcessedHits);
98 true, numberOfProcessedHits);
◆ setupHelpers()
◆ update_map()
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 |
|
) |
| |
|
protectedinherited |
Definition at line 62 of file FCS_StepInfoSD.cxx.
74 G4cout << this->GetName() <<
" DEBUG update_map: bad identifier: "
75 << l_identifier.
getString() <<
" skipping this hit." << G4endl;
80 auto map_item =
m_hit_map.find(l_identifier);
83 new std::vector<ISF_FCS_Parametrization::FCS_StepInfo*>;
87 l_time, l_valid, l_detector));
100 for (
auto* map_it : *map_item->second) {
102 const double delta_t = std::fabs(map_it->time() - l_time);
103 if (delta_t >= tsame) {
106 if (delta_t >= timeWindow) {
111 const CLHEP::Hep3Vector& currentPosition = map_it->position();
112 const double currentPosition_mag = currentPosition.mag();
113 const double proj_longitudinal =
114 currentPosition.dot(l_vec) / currentPosition_mag;
115 const double delta_longitudinal = currentPosition_mag - proj_longitudinal;
116 if (std::fabs(delta_longitudinal) >= distWinLong) {
121 double delta_lateral_2 = l_vec.mag2() - proj_longitudinal * proj_longitudinal;
122 if (delta_lateral_2 < 0) {
125 const double delta_lateral =
126 std::sqrt(delta_lateral_2);
127 if (delta_lateral >= distWinLat) {
133 l_vec, l_identifier, l_energy, l_time, l_valid, l_detector);
140 l_vec, l_identifier, l_energy, l_time, l_valid, l_detector));
◆ m_calculator
◆ m_calo_dd_man
◆ m_config
◆ m_hit_map
◆ m_larEmID
◆ m_larFcalID
◆ m_larHecID
◆ m_tileID
The documentation for this class was generated from the following files:
bool cellReadOutByOnePMT(const Identifier &id) const
Some Tile Cells are only read out by one PMT rather than two.
std::vector< double > m_maxRadiusLateral
property, see LArG4GenShowerLib::LArG4GenShowerLib
void getCaloDDManager()
Keep a map instead of trying to keep the full vector.
int sample(const Identifier &id) const
double getMaxTime(const CaloCell_ID::CaloSample &layer) const
void update_map(const CLHEP::Hep3Vector &l_vec, const Identifier &l_identifier, double l_energy, double l_time, bool l_valid, int l_detector)
const int NC
Number of levels for Carbon.
CxxUtils::CachedPointer< const CaloDetDescrManager > m_calo_dd_man
Variables to identify Hit objects.
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.
virtual TileMicroHit GetTileMicroHit(const G4Step *, TileHitData &hitData) const =0
Used by FastCaloSimParamAction.
std::vector< double > m_maxRadiusLongitudinal
property, see LArG4GenShowerLib::LArG4GenShowerLib
bool is_tile_gapscin(const Identifier &id) const
int module(const Identifier &id) const
const LArHEC_ID * m_larHecID
const LArEM_ID * m_larEmID
Pointers to the identifier helpers.
std::string getString() const
Provide a string form of the identifier - hexadecimal.
std::string to_string(const Identifier &id, int level=0) const
pointer_t get() const
Return the current value of the element.
ITileCalculator * m_calculator
FCS_Param::Config m_config
int section(const Identifier &id) const
bool C10_connected(int module) const
A copy of the method in TileCablingService.cxx.
int verboseLevel
Helper to keep the same verbosity everywhere.
bool match(std::string s1, std::string s2)
match the individual directories of two strings
std::map< Identifier, std::vector< ISF_FCS_Parametrization::FCS_StepInfo * > * > m_hit_map
std::string description
glabal timer - how long have I taken so far?
const LArFCAL_ID * m_larFcalID