Skip to content
Snippets Groups Projects
Commit d2a45f54 authored by John Chapman's avatar John Chapman
Browse files

Protect TileFCS_StepInfoSD against more case where Tile Cells are read out by 1 PMT

Special C10 cells are only read out by one PMT. This commit prevents TileFCS_StepInfoSD
from printing a warning when only one valid PMT identifier is returned for these cells.
See discussion in ATLASSIM-3601.


Former-commit-id: 7ffdf4a81554fa8f62a706bf42a4173b3eb0e216
parent 67a24d58
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,6 @@
#include "G4TouchableHistory.hh"
/// Athena headers
#include "CaloIdentifier/TileID.h"
#include "CaloDetDescr/CaloDetDescrManager.h"
#include "TileG4Interfaces/ITileCalculator.h"
......@@ -56,12 +55,12 @@ G4bool TileFCS_StepInfoSD::ProcessHits(G4Step* a_step, G4TouchableHistory* /*ROh
else {
// Some cells is the gap scintillator are only read out by one
// PMT, so only print warnings if this is not the case.
if ((micHit.pmt_up == invalid_id) && !(m_tileID->is_tile_gapscin(micHit.pmt_down))) {
if ((micHit.pmt_up == invalid_id) && !(cellReadOutByOnePMT(micHit.pmt_down))) {
G4cout <<this->GetName()<<" WARNING ProcessHits: Something wrong in identifier: tile pmt_up: "<<micHit.pmt_up<<std::endl;
G4cout <<this->GetName()<<" WARNING ProcessHits: tile pmt_down : "<<micHit.pmt_down<<" "<<m_tileID->to_string(micHit.pmt_down,-1)<<std::endl;
G4cout <<this->GetName()<<" WARNING ProcessHits: E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl;
}
if ((micHit.pmt_down == invalid_id) && !(m_tileID->is_tile_gapscin(micHit.pmt_up))) {
if ((micHit.pmt_down == invalid_id) && !(cellReadOutByOnePMT(micHit.pmt_up))) {
G4cout <<this->GetName()<<" WARNING ProcessHits: Something wrong in identifier: tile pmt_down: "<<micHit.pmt_down<<std::endl;
G4cout <<this->GetName()<<" WARNING ProcessHits: tile pmt_up: "<<micHit.pmt_up<<" "<<m_tileID->to_string(micHit.pmt_up,-1)<<std::endl;
G4cout <<this->GetName()<<" WARNING ProcessHits: E up: "<<micHit.e_up<<" E down: "<<micHit.e_down<<" T up: "<<micHit.time_up<<" T down: "<<micHit.time_down<<std::endl;
......
......@@ -19,6 +19,9 @@
// Base class header
#include "FCS_StepInfoSD.h"
// Athena headers
#include "CaloIdentifier/TileID.h"
class G4Step;
class G4TouchableHistory;
class ITileCalculator;
......@@ -35,8 +38,36 @@ public:
TileFCS_StepInfoSD& operator=(const TileFCS_StepInfoSD&) = delete;
private:
ITileCalculator* m_calculator;
/// A copy of the method in TileCablingService.cxx
bool C10_connected(int module) const;
/// Some Tile Cells are only read out by one PMT rather than two.
bool cellReadOutByOnePMT(const Identifier& id) const;
ITileCalculator* m_calculator;
};
inline bool TileFCS_StepInfoSD::C10_connected(int module) const {
const bool C = true;
const bool NC = false;
const bool cell_present[64] = {
// counting from 1 in comments
C, C, C, C, C, C, C, C, // 1-8
C, C, C, C, C, C, C, C, // 9-16
C, C, C, C, C, C, C, C, // 17-24
C, C, C, C, C, C, C, C, // 25-32
C, C, C, C, C, C,NC,NC, // 33-40 39-40 do not exist
NC,NC, C, C, C, C, C, C, // 41-48 41-42 do not exist
C, C, C, C, C, C,NC,NC, // 49-56 55-56 do not exist
NC,NC, C, C, C, C, C, C // 57-64 57-58 do not exist
};
return cell_present[module];
}
inline bool TileFCS_StepInfoSD::cellReadOutByOnePMT(const Identifier& id) const {
return m_tileID->is_tile_gapscin(id) || // gap/crack cells
((m_tileID->section(id) == TileID::GAPDET && m_tileID->sample(id) == TileID::SAMP_C && !(this->C10_connected(m_tileID->module(id))) )); //Special C10 cells
}
#endif // ISF_FASTCALOSIMSD_TILEFCS_STEPINFOSD_H
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment