|
ATLAS Offline Software
|
Go to the documentation of this file.
9 #include "GaudiKernel/SystemOfUnits.h"
14 #include <unordered_map>
23 return StatusCode::SUCCESS;
27 const EventContext & context = Gaudi::Hive::currentContext();
28 std::ofstream
file{std::string(Form(
"event%09zu-",++
m_event))+
"MuonTruthSegment.csv"};
29 const std::string delim =
",";
31 file<<
"GlobalPositionCentroidX"<<delim<<
"GlobalPositionCentroidY"<<delim<<
"GlobalPositionCentroidZ"<<delim;
32 file<<
"GlobalDirectionX"<<delim<<
"GlobalDirectionY"<<delim<<
"GlobalDirectionZ"<<delim;
33 file<<
"Time"<<delim<<
"TimeError"<<delim;
34 file<<
"ChiSquared"<<delim<<
"NumberDoF"<<delim;
35 file<<
"PrecisionHits"<<delim<<
"PhiLayers"<<delim<<
"TrigEtaLayers"<<delim;
36 file<<
"Sector"<<delim <<
"Eta"<<delim<<
"Chamber"<<delim<<
"Technology"<<std::endl;
39 if(!readTruthSegment.
isValid()){
41 return StatusCode::FAILURE;
56 float seg_t0error =
segment->t0error();
59 float seg_chiSquared =
segment->chiSquared();
60 float seg_numberDoF =
segment->numberDoF();
63 int seg_PrecisionHits =
segment->nPrecisionHits();
64 int seg_PhiLayers =
segment->nPhiLayers();
65 int seg_TrigEtaLayers =
segment->nTrigEtaLayers();
68 int seg_sector =
segment->sector();
69 int seg_eta =
segment->etaIndex();
77 ATH_MSG_VERBOSE(
"chiSquared: "<<seg_chiSquared<<
" numberDoF: "<<seg_numberDoF);
78 ATH_MSG_VERBOSE(
"nPrecisionHits: "<<seg_PrecisionHits<<
" nPhiLayers: "<<seg_PhiLayers<<
" nTrigEtaLayers: "<<seg_TrigEtaLayers);
83 file<<seg_x<<delim<<seg_y<<delim<<seg_z<<delim;
84 file<<seg_px<<delim<<seg_py<<delim<<seg_pz<<delim;
85 file<<seg_t0<<delim<<seg_t0error<<delim;
86 file<<seg_chiSquared<<delim<<seg_numberDoF<<delim;
87 file<<seg_PrecisionHits<<delim<<seg_PhiLayers<<delim<<seg_TrigEtaLayers<<delim;
88 file<<seg_sector<<delim<<seg_eta<<delim<<seg_chamber<<delim<<seg_tec<<std::endl;
91 return StatusCode::SUCCESS;
def retrieve(aClass, aKey=None)
const MuonGMR4::MuonDetectorManager * m_r4DetMgr
ServiceHandle< Muon::IMuonIdHelperSvc > m_idHelperSvc
Class describing a MuonSegment.
#define ATH_MSG_VERBOSE(x)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
StatusCode execute() override
::StatusCode StatusCode
StatusCode definition for legacy code.
SG::ReadHandleKey< xAOD::MuonSegmentContainer > m_inSegmentKey
virtual bool isValid() override final
Can the handle be successfully dereferenced?
This header ties the generic definitions in this package.
TruthSegmentCsvDumperAlg(const std::string &name, ISvcLocator *pSvcLocator)
ChIndex
enum to classify the different chamber layers in the muon spectrometer
bool isPresent() const
Is the referenced object present in SG?
TechnologyIndex
enum to classify the different layers in the muon spectrometer
StatusCode initialize() override
Muon::NSW_PadTriggerSegment segment(const NSWL1::PadTrigger &data)