ATLAS Offline Software
Toggle main menu visibility
Loading...
Searching...
No Matches
Tracking
Acts
ActsMaterial
src
MaterialTrackWriter.h
Go to the documentation of this file.
1
/*
2
Copyright (C) 2002-2026 CERN for the benefit of the ATLAS collaboration
3
*/
4
5
#ifndef ACTSMATERIAL_MATERIALTRACKWRITER_H
6
#define ACTSMATERIAL_MATERIALTRACKWRITER_H
7
8
#include "
AthenaBaseComps/AthHistogramAlgorithm.h
"
9
10
#include "
StoreGate/ReadHandleKey.h
"
11
12
#include "
ActsEvent/ContextUtility.h
"
13
#include "
ActsGeometry/RecordedMaterialTrackCollection.h
"
14
15
#include <ActsPlugins/Root/RootMaterialTrackIo.hpp>
16
17
#include "TTree.h"
18
#include "TFile.h"
19
20
#include <mutex>
21
22
23
namespace
ActsTrk
{
24
31
32
class
MaterialTrackWriter
:
public
AthHistogramAlgorithm
{
33
public
:
34
using
AthHistogramAlgorithm::AthHistogramAlgorithm
;
35
virtual
StatusCode
initialize
()
override
;
36
virtual
StatusCode
execute
(
const
EventContext& ctx)
override
;
37
virtual
~MaterialTrackWriter
();
38
39
private
:
41
mutable
std::mutex
m_writeMutex
;
43
Gaudi::Property<std::string>
m_outStream
{
this
,
"OutStream"
,
"ACTSMATERIALWRITER"
,
"The output file name"
};
45
Gaudi::Property<std::string>
m_treeName
{
this
,
"TreeName"
,
"materialTracks"
,
"The output tree name"
};
47
Gaudi::Property<bool>
m_storeSurface
{
this
,
"StoreSurface"
,
false
,
"Write the surface to which the material step correpond"
};
49
Gaudi::Property<bool>
m_storeVolume
{
this
,
"StoreVolume"
,
false
,
"Write the volume to which the material step correpond"
};
51
Gaudi::Property<bool>
m_prePostStep
{
this
,
"PrePostStep"
,
false
,
"Write out pre and post step (for G4), otherwise central step position"
};
53
Gaudi::Property<bool>
m_recalculateTotals
{
this
,
"RecalculateTotals"
,
false
,
"Re-calculate total values from individual steps (for cross-checks)"
};
54
56
SG::ReadHandleKey<RecordedMaterialTrackCollection>
m_materialTrackCollectionKey
{
this
,
"MaterialTrackCollectionKey"
,
"OutputMaterialTracks"
,
"Name of the RecordedMaterialTrackCollection"
};
57
58
Gaudi::Property<bool>
m_useTrackingGeo
{
this
,
"useTrackingGeometry"
,
false
,
59
"Use the tracking geometry to retrieve the geometry context"
};
60
61
63
ContextUtility
m_ctxProvider
{
this
};
64
using
Config_t
= ActsPlugins::RootMaterialTrackIo::Config;
66
ActsPlugins::RootMaterialTrackIo
m_accessor
{
Config_t
{}};
68
69
TTree*
m_outputTree
{};
70
71
};
72
}
73
74
#endif
AthHistogramAlgorithm.h
ContextUtility.h
RecordedMaterialTrackCollection.h
ReadHandleKey.h
Property holding a SG store/key/clid from which a ReadHandle is made.
ActsTrk::ContextUtility
Utility class to handle the three contexts neeeded in an ACTS reconstruction job 1) GeometryContext -...
Definition
ContextUtility.h:27
ActsTrk::MaterialTrackWriter
Writes out RecordedMaterialTrackCollection to a root file.
Definition
MaterialTrackWriter.h:32
ActsTrk::MaterialTrackWriter::m_outStream
Gaudi::Property< std::string > m_outStream
The output file name.
Definition
MaterialTrackWriter.h:43
ActsTrk::MaterialTrackWriter::initialize
virtual StatusCode initialize() override
Definition
MaterialTrackWriter.cxx:17
ActsTrk::MaterialTrackWriter::m_ctxProvider
ContextUtility m_ctxProvider
Context provider for geometry, magnetic field and calibration contexts.
Definition
MaterialTrackWriter.h:63
ActsTrk::MaterialTrackWriter::m_treeName
Gaudi::Property< std::string > m_treeName
The output file name.
Definition
MaterialTrackWriter.h:45
ActsTrk::MaterialTrackWriter::m_recalculateTotals
Gaudi::Property< bool > m_recalculateTotals
Re-calculate total values from individual steps (for cross-checks).
Definition
MaterialTrackWriter.h:53
ActsTrk::MaterialTrackWriter::m_useTrackingGeo
Gaudi::Property< bool > m_useTrackingGeo
Definition
MaterialTrackWriter.h:58
ActsTrk::MaterialTrackWriter::m_materialTrackCollectionKey
SG::ReadHandleKey< RecordedMaterialTrackCollection > m_materialTrackCollectionKey
The RecordedMaterialTrackCollection to read.
Definition
MaterialTrackWriter.h:56
ActsTrk::MaterialTrackWriter::Config_t
ActsPlugins::RootMaterialTrackIo::Config Config_t
Definition
MaterialTrackWriter.h:64
ActsTrk::MaterialTrackWriter::~MaterialTrackWriter
virtual ~MaterialTrackWriter()
ActsTrk::MaterialTrackWriter::m_storeVolume
Gaudi::Property< bool > m_storeVolume
Write the volume to which the material step correpond.
Definition
MaterialTrackWriter.h:49
ActsTrk::MaterialTrackWriter::m_accessor
ActsPlugins::RootMaterialTrackIo m_accessor
The read - write payload.
Definition
MaterialTrackWriter.h:66
ActsTrk::MaterialTrackWriter::m_storeSurface
Gaudi::Property< bool > m_storeSurface
Write the surface to which the material step correpond.
Definition
MaterialTrackWriter.h:47
ActsTrk::MaterialTrackWriter::m_outputTree
TTree * m_outputTree
The output file and tree.
Definition
MaterialTrackWriter.h:69
ActsTrk::MaterialTrackWriter::m_writeMutex
std::mutex m_writeMutex
mutex used to protect multi-threaded writes
Definition
MaterialTrackWriter.h:41
ActsTrk::MaterialTrackWriter::execute
virtual StatusCode execute(const EventContext &ctx) override
Execute method.
Definition
MaterialTrackWriter.cxx:36
ActsTrk::MaterialTrackWriter::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthHistogramAlgorithm.cxx:31
ActsTrk::MaterialTrackWriter::m_prePostStep
Gaudi::Property< bool > m_prePostStep
Write out pre and post step (for G4), otherwise central step position.
Definition
MaterialTrackWriter.h:51
AthHistogramAlgorithm::AthHistogramAlgorithm
AthHistogramAlgorithm(const std::string &name, ISvcLocator *pSvcLocator)
Constructor with parameters:
Definition
AthHistogramAlgorithm.cxx:31
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition
StoreGate/StoreGate/ReadHandleKey.h:40
ActsTrk
The AlignStoreProviderAlg loads the rigid alignment corrections and pipes them through the readout ge...
Definition
MdtCalibInput.h:31
Generated on
for ATLAS Offline Software by
1.17.0