ATLAS Offline Software
Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
DumpEventDataToJsonAlg Class Reference

Algorithm to dump some Event data to JSON. More...

#include <DumpEventDataToJsonAlg.h>

Inheritance diagram for DumpEventDataToJsonAlg:
Collaboration diagram for DumpEventDataToJsonAlg:

Public Member Functions

 DumpEventDataToJsonAlg (const std::string &name, ISvcLocator *pService)
 Algorithm constructor. More...
 
virtual ~DumpEventDataToJsonAlg ()=default
 
virtual StatusCode initialize () override
 inherited from Algorithm More...
 
virtual StatusCode execute () override
 
virtual StatusCode finalize () override
 
template<>
nlohmann::json getData (const xAOD::Jet &jet)
 
template<>
nlohmann::json getData (const xAOD::CaloCluster &clust)
 
template<>
nlohmann::json getData (const CaloCell &cell)
 
template<>
nlohmann::json getData (const xAOD::TrackParticle &tp)
 
template<>
nlohmann::json getData (const Trk::Track &track)
 
template<>
nlohmann::json getData (const xAOD::Muon &muon)
 
template<>
nlohmann::json getData (const xAOD::TauJet &tauJet)
 
template<>
nlohmann::json getData (const xAOD::Electron &electron)
 
template<>
nlohmann::json getData (const xAOD::Photon &photon)
 
virtual StatusCode sysInitialize () override
 Override sysInitialize. More...
 
virtual const DataObjIDColl & extraOutputDeps () const override
 Return the list of extra output dependencies. More...
 
ServiceHandle< StoreGateSvc > & evtStore ()
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & evtStore () const
 The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc. More...
 
const ServiceHandle< StoreGateSvc > & detStore () const
 The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc. More...
 
virtual StatusCode sysStart () override
 Handle START transition. More...
 
virtual std::vector< Gaudi::DataHandle * > inputHandles () const override
 Return this algorithm's input handles. More...
 
virtual std::vector< Gaudi::DataHandle * > outputHandles () const override
 Return this algorithm's output handles. More...
 
Gaudi::Details::PropertyBase & declareProperty (Gaudi::Property< T > &t)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
 Declare a new Gaudi property. More...
 
Gaudi::Details::PropertyBase * declareProperty (const std::string &name, T &property, const std::string &doc="none")
 Declare a new Gaudi property. More...
 
void updateVHKA (Gaudi::Details::PropertyBase &)
 
MsgStream & msg () const
 
MsgStream & msg (const MSG::Level lvl) const
 
bool msgLvl (const MSG::Level lvl) const
 

Protected Member Functions

void prependTestEvent ()
 Dumps a dummy event with some objects at specific eta/phi coordinates for calibration. More...
 
template<class TYPE >
StatusCode getAndFillArrayOfContainers (nlohmann::json &event, const SG::ReadHandleKeyArray< TYPE > &keys, const std::string &jsonType)
 
template<class TYPE >
StatusCode getAndFillContainer (nlohmann::json &event, const SG::ReadHandleKey< TYPE > &key, const std::string &jsonType)
 
template<class TYPE >
nlohmann::json getData (const TYPE &object)
 
nlohmann::json getActsData (const Acts::TrackProxy< ActsTrk::TrackSummaryContainer, ActsTrk::MultiTrajectory, ActsTrk::DataLinkHolder, true > &track, const Acts::GeometryContext &gctx)
 
template<class TYPE >
void addLink (const TYPE &link, nlohmann::json &data)
 
void renounceArray (SG::VarHandleKeyArray &handlesArray)
 remove all handles from I/O resolution More...
 
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce (T &h)
 
void extraDeps_update_handler (Gaudi::Details::PropertyBase &ExtraDeps)
 Add StoreName to extra input/output deps as needed. More...
 

Protected Attributes

SG::ReadHandleKey< xAOD::EventInfom_eventInfoKey {this, "EventInfoKey", "EventInfo", "Key for the Event Info"}
 
SG::ReadHandleKeyArray< xAOD::TrackParticleContainerm_trackParticleKeys {this, "TrackParticleContainerKeys", {"InDetTrackParticles", "CombinedMuonTrackParticles"}, "Keys for TrackParticle Containers"}
 
SG::ReadHandleKeyArray< xAOD::JetContainerm_jetKeys {this, "JetContainerKeys", {"AntiKt4EMTopoJets"}, "Keys for Jet Containers"}
 
SG::ReadHandleKeyArray< xAOD::MuonContainerm_muonKeys {this, "MuonContainerKeys", {"Muons"}, "Keys for Muon Containers"}
 
SG::ReadHandleKeyArray< xAOD::TauJetContainerm_tauJetKeys {this, "TauJetContainerKeys", {"TauJets"}, "Keys for Tau Containers"}
 
SG::ReadHandleKeyArray< xAOD::ElectronContainerm_electronKeys {this, "ElectronContainerKeys", {"Electrons"}, "Keys for Electron Containers"}
 
SG::ReadHandleKeyArray< xAOD::PhotonContainerm_photonKeys {this, "PhotonContainerKeys", {"Photons"}, "Keys for Photon Containers"}
 
SG::ReadHandleKeyArray< xAOD::CaloClusterContainerm_caloClustersKeys {this, "CaloClusterContainerKeys", {"CaloCalTopoClusters"}, "Keys for CaloClusters Containers"}
 
SG::ReadHandleKeyArray< CaloCellContainerm_caloCellKey {this, "CaloCellContainerKey", {"AllCalo"}, "Key for CaloCell Container"}
 
SG::ReadHandleKeyArray< TrackCollectionm_trackCollectionKeys {this, "TrackCollectionKeys", {"CombinedInDetTracks", "CombinedMuonTracks", "MuonSpectrometerTracks"}, "Keys for Track Containers"}
 
SG::ReadHandleKeyArray< ActsTrk::TrackContainerm_trackContainerKeys {this, "TrackContainerKeys", {"ConvertedTracks"}, "Location of the converted Acts TrackContainer"}
 
SG::ReadHandleKey< Muon::CscPrepDataContainerm_cscPrepRawDataKey {this, "CscPrepRawDataKey", "CSC_Clusters", "Key for CSC PRD Container"}
 
SG::ReadHandleKey< Muon::MdtPrepDataContainerm_mdtPrepRawDataKey {this, "MdtPrepRawDataKey", "MDT_DriftCircles", "Key for MDT PRD Container"}
 
SG::ReadHandleKey< Muon::RpcPrepDataContainerm_rpcPrepRawDataKey {this, "RpcPrepRawDataKey", "RPC_Measurements", "Key for RPC PRD Container"}
 
SG::ReadHandleKey< Muon::TgcPrepDataContainerm_tgcPrepRawDataKey {this, "TgcPrepRawDataKey", "TGC_MeasurementsAllBCs", "Key for TGC PRD Container"}
 
SG::ReadHandleKey< Muon::MMPrepDataContainerm_mmPrepRawDataKey {this, "MMPrepRawDataKey", "MM_Measurements", "Key for MM PRD Container"}
 
SG::ReadHandleKey< Muon::sTgcPrepDataContainerm_stgcPrepRawDataKey {this, "sTgcPrepRawDataKey", "STGC_Measurements", "Key for sTGC PRD Container"}
 
SG::ReadHandleKey< InDet::PixelClusterContainerm_pixelPrepRawDataKey {this, "PixelPrepRawDataKey", "PixelClusters", "Key for Pixel PRD Container"}
 
SG::ReadHandleKey< InDet::SCT_ClusterContainerm_sctPrepRawDataKey {this, "SctPrepRawDataKey", "SCT_Clusters", "Key for SCT PRD Container"}
 
SG::ReadHandleKey< InDet::TRT_DriftCircleContainerm_trtPrepRawDataKey {this, "TrtPrepRawDataKey", "TRT_DriftCircles", "Key for TRT PRD Container"}
 
ToolHandle< Trk::IExtrapolationEnginem_extrapolator {this, "Extrapolator", "Trk::ExtrapolationEngine/AtlasExtrapolation"}
 
SG::ReadHandleKey< ActsGeometryContextm_geometryContextKey
 
Gaudi::Property< std::string > m_outputJSON_Name {this, "OutputLocation", "EventData.json", "Default filename for "}
 
Gaudi::Property< bool > m_dumpTestEvent {this, "DumpTestEvent", false, "If true, prepend a test event with some calibration data in it."}
 
Gaudi::Property< bool > m_physlite {this, "PHYSLITE", false, "If true, do not try to access data which is not available in PHYSLITE files."}
 
nlohmann::json m_eventData
 

Private Types

typedef ServiceHandle< StoreGateSvcStoreGateSvc_t
 

Private Member Functions

Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
 specialization for handling Gaudi::Property<SG::VarHandleKey> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleKeyArrayType &)
 specialization for handling Gaudi::Property<SG::VarHandleKeyArray> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &hndl, const SG::VarHandleType &)
 specialization for handling Gaudi::Property<SG::VarHandleBase> More...
 
Gaudi::Details::PropertyBase & declareGaudiProperty (Gaudi::Property< T > &t, const SG::NotHandleType &)
 specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray> More...
 

Private Attributes

DataObjIDColl m_extendedExtraObjects
 
StoreGateSvc_t m_evtStore
 Pointer to StoreGate (event store by default) More...
 
StoreGateSvc_t m_detStore
 Pointer to StoreGate (detector store by default) More...
 
std::vector< SG::VarHandleKeyArray * > m_vhka
 
bool m_varHandleArraysDeclared
 

Detailed Description

Algorithm to dump some Event data to JSON.

Definition at line 49 of file DumpEventDataToJsonAlg.h.

Member Typedef Documentation

◆ StoreGateSvc_t

typedef ServiceHandle<StoreGateSvc> AthCommonDataStore< AthCommonMsg< Algorithm > >::StoreGateSvc_t
privateinherited

Definition at line 388 of file AthCommonDataStore.h.

Constructor & Destructor Documentation

◆ DumpEventDataToJsonAlg()

DumpEventDataToJsonAlg::DumpEventDataToJsonAlg ( const std::string &  name,
ISvcLocator *  pService 
)

Algorithm constructor.

Definition at line 30 of file DumpEventDataToJsonAlg.cxx.

32  : AthAlgorithm(name, pSvcLocator) {}

◆ ~DumpEventDataToJsonAlg()

virtual DumpEventDataToJsonAlg::~DumpEventDataToJsonAlg ( )
virtualdefault

Member Function Documentation

◆ addLink()

template<class TYPE >
void DumpEventDataToJsonAlg::addLink ( const TYPE link,
nlohmann::json data 
)
protected

Definition at line 480 of file DumpEventDataToJsonAlg.cxx.

480  {
481  if (link.isValid()) {
482  data.push_back(link.dataID() + ":" + std::to_string(link.index()));
483  }
484 }

◆ declareGaudiProperty() [1/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyArrayType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKeyArray>

Definition at line 170 of file AthCommonDataStore.h.

172  {
173  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
174  hndl.value(),
175  hndl.documentation());
176 
177  }

◆ declareGaudiProperty() [2/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleKeyType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleKey>

Definition at line 156 of file AthCommonDataStore.h.

158  {
159  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
160  hndl.value(),
161  hndl.documentation());
162 
163  }

◆ declareGaudiProperty() [3/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  hndl,
const SG::VarHandleType  
)
inlineprivateinherited

specialization for handling Gaudi::Property<SG::VarHandleBase>

Definition at line 184 of file AthCommonDataStore.h.

186  {
187  return *AthCommonDataStore<PBASE>::declareProperty(hndl.name(),
188  hndl.value(),
189  hndl.documentation());
190  }

◆ declareGaudiProperty() [4/4]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareGaudiProperty ( Gaudi::Property< T > &  t,
const SG::NotHandleType  
)
inlineprivateinherited

specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHandleKeyArray>

Definition at line 199 of file AthCommonDataStore.h.

200  {
201  return PBASE::declareProperty(t);
202  }

◆ declareProperty() [1/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleBase hndl,
const std::string &  doc,
const SG::VarHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleBase. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 245 of file AthCommonDataStore.h.

249  {
250  this->declare(hndl.vhKey());
251  hndl.vhKey().setOwner(this);
252 
253  return PBASE::declareProperty(name,hndl,doc);
254  }

◆ declareProperty() [2/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKey hndl,
const std::string &  doc,
const SG::VarHandleKeyType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
hndlObject holding the property value.
docDocumentation string for the property.

This is the version for types that derive from SG::VarHandleKey. The property value object is put on the input and output lists as appropriate; then we forward to the base class.

Definition at line 221 of file AthCommonDataStore.h.

225  {
226  this->declare(hndl);
227  hndl.setOwner(this);
228 
229  return PBASE::declareProperty(name,hndl,doc);
230  }

◆ declareProperty() [3/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
SG::VarHandleKeyArray hndArr,
const std::string &  doc,
const SG::VarHandleKeyArrayType  
)
inlineinherited

Definition at line 259 of file AthCommonDataStore.h.

263  {
264 
265  // std::ostringstream ost;
266  // ost << Algorithm::name() << " VHKA declareProp: " << name
267  // << " size: " << hndArr.keys().size()
268  // << " mode: " << hndArr.mode()
269  // << " vhka size: " << m_vhka.size()
270  // << "\n";
271  // debug() << ost.str() << endmsg;
272 
273  hndArr.setOwner(this);
274  m_vhka.push_back(&hndArr);
275 
276  Gaudi::Details::PropertyBase* p = PBASE::declareProperty(name, hndArr, doc);
277  if (p != 0) {
278  p->declareUpdateHandler(&AthCommonDataStore<PBASE>::updateVHKA, this);
279  } else {
280  ATH_MSG_ERROR("unable to call declareProperty on VarHandleKeyArray "
281  << name);
282  }
283 
284  return p;
285 
286  }

◆ declareProperty() [4/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc,
const SG::NotHandleType  
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This is the generic version, for types that do not derive from SG::VarHandleKey. It just forwards to the base class version of declareProperty.

Definition at line 333 of file AthCommonDataStore.h.

337  {
338  return PBASE::declareProperty(name, property, doc);
339  }

◆ declareProperty() [5/6]

Gaudi::Details::PropertyBase* AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( const std::string &  name,
T &  property,
const std::string &  doc = "none" 
)
inlineinherited

Declare a new Gaudi property.

Parameters
nameName of the property.
propertyObject holding the property value.
docDocumentation string for the property.

This dispatches to either the generic declareProperty or the one for VarHandle/Key/KeyArray.

Definition at line 352 of file AthCommonDataStore.h.

355  {
356  typedef typename SG::HandleClassifier<T>::type htype;
357  return declareProperty (name, property, doc, htype());
358  }

◆ declareProperty() [6/6]

Gaudi::Details::PropertyBase& AthCommonDataStore< AthCommonMsg< Algorithm > >::declareProperty ( Gaudi::Property< T > &  t)
inlineinherited

Definition at line 145 of file AthCommonDataStore.h.

145  {
146  typedef typename SG::HandleClassifier<T>::type htype;
148  }

◆ detStore()

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::detStore ( ) const
inlineinherited

The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 95 of file AthCommonDataStore.h.

95 { return m_detStore; }

◆ evtStore() [1/2]

ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( )
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 85 of file AthCommonDataStore.h.

85 { return m_evtStore; }

◆ evtStore() [2/2]

const ServiceHandle<StoreGateSvc>& AthCommonDataStore< AthCommonMsg< Algorithm > >::evtStore ( ) const
inlineinherited

The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.

Definition at line 90 of file AthCommonDataStore.h.

90 { return m_evtStore; }

◆ execute()

StatusCode DumpEventDataToJsonAlg::execute ( )
overridevirtual

Definition at line 135 of file DumpEventDataToJsonAlg.cxx.

135  {
137  if (!eventInfo.isValid()) {
138  ATH_MSG_WARNING("Did not find xAOD::EventInfo at " << m_eventInfoKey);
139  return StatusCode::SUCCESS;
140  }
141 
142  if (m_dumpTestEvent) {
144  m_dumpTestEvent = false;
145  }
146 
147  ATH_MSG_VERBOSE("Run num :" << eventInfo->runNumber()
148  << " Event num: " << eventInfo->eventNumber());
149 
150  nlohmann::json j;
151  j["event number"] = eventInfo->eventNumber();
152  j["run number"] = eventInfo->runNumber();
153 
163 
164  // ACTS
165  if (!m_geometryContextKey.empty()){
166  auto tcHandles = m_trackContainerKeys.makeHandles();
167  SG::ReadHandle<ActsGeometryContext> gcx(m_geometryContextKey, Gaudi::Hive::currentContext());
168 
169  for ( SG::ReadHandle<ActsTrk::TrackContainer>& tcHandle: tcHandles ) {
170  // Temporary debugging information
171  ATH_MSG_VERBOSE("TrackStateContainer has "<< tcHandle->size() << " elements");
172 
173  ATH_MSG_VERBOSE("Trying to load " << tcHandle.key() << " with " << tcHandle->size() << " tracks");
174  const ActsTrk::TrackContainer* tc = tcHandle.get();
175  for (auto track : *tc) {
176  nlohmann::json tmp = getActsData(track, gcx->context());
177  j["TrackContainers"][tcHandle.key()].push_back(tmp);
178  }
179  }
180  }
181 
182  // hits
191  // ATH_CHECK(getAndFillContainer(j, m_trtPrepRawDataKey, "Hits")); // Need
192  // specialisation. TODO.
193 
194  // For the moment the label is just the event/run number again, but can be
195  // manually overwritten in the output file
196  std::string label = std::to_string(eventInfo->eventNumber()) + "/" +
197  std::to_string(eventInfo->runNumber());
198  m_eventData[label] = j;
199 
200  return StatusCode::SUCCESS;
201 }

◆ extraDeps_update_handler()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::extraDeps_update_handler ( Gaudi::Details::PropertyBase &  ExtraDeps)
protectedinherited

Add StoreName to extra input/output deps as needed.

use the logic of the VarHandleKey to parse the DataObjID keys supplied via the ExtraInputs and ExtraOuputs Properties to add the StoreName if it's not explicitly given

◆ extraOutputDeps()

const DataObjIDColl & AthAlgorithm::extraOutputDeps ( ) const
overridevirtualinherited

Return the list of extra output dependencies.

This list is extended to include symlinks implied by inheritance relations.

Definition at line 50 of file AthAlgorithm.cxx.

51 {
52  // If we didn't find any symlinks to add, just return the collection
53  // from the base class. Otherwise, return the extended collection.
54  if (!m_extendedExtraObjects.empty()) {
56  }
57  return Algorithm::extraOutputDeps();
58 }

◆ finalize()

StatusCode DumpEventDataToJsonAlg::finalize ( )
overridevirtual

Definition at line 486 of file DumpEventDataToJsonAlg.cxx.

486  {
487  std::ofstream outputFile(m_outputJSON_Name);
488  if (!outputFile.is_open()) {
489  ATH_MSG_WARNING("Unable to open " << m_outputJSON_Name << " for writing.");
490  return StatusCode::FAILURE;
491  }
493  return StatusCode::SUCCESS;
494 }

◆ getActsData()

nlohmann::json DumpEventDataToJsonAlg::getActsData ( const Acts::TrackProxy< ActsTrk::TrackSummaryContainer, ActsTrk::MultiTrajectory, ActsTrk::DataLinkHolder, true > &  track,
const Acts::GeometryContext &  gctx 
)
protected

Definition at line 80 of file DumpEventDataToJsonAlg.cxx.

80  {
82 
83  // ACTS units are GeV, whilst ATLAS is MeV. So we need to convert.
84  data["dparams"] = {track.loc0(), track.loc1(), track.phi(), track.theta(), track.qOverP() * 0.001};
85  ATH_MSG_VERBOSE(" Track has dparams"<<data["dparams"][0]<<", "<<data["dparams"][1]<<", "<<data["dparams"][2]<<", "<<data["dparams"][3]<<", "<<data["dparams"][4]);
86  ATH_MSG_VERBOSE(track.referenceSurface().toString(gctx));
87 
88  // Add dparams positions to the output
89  const Acts::BoundTrackParameters trackparams(track.referenceSurface().getSharedPtr(),
90  track.parameters(), std::nullopt, Acts::ParticleHypothesis::pion());
91  auto trackPosition = trackparams.position(gctx);;
92  data["pos"].push_back(trackPosition.x());
93  data["pos"].push_back(trackPosition.y());
94  data["pos"].push_back(trackPosition.z());
95 
96  unsigned int nTrackStates = track.nTrackStates();
97  ATH_MSG_VERBOSE("Track has " << nTrackStates << " states.");
98  // Unfortunately actsTracks are stored in reverse order, so we need to do some gymnastics
99  // (There is certainly a more elegant way to do this, but since this will all be changed soon I don't think it matters)
100  std::vector<ActsTrk::MultiTrajectory::ConstTrackStateProxy> trackStates;
101  trackStates.reserve(nTrackStates);
102  for (auto trackstate : track.trackStatesReversed()) {
103  trackStates.push_back(trackstate);
104  }
105 
106  std::reverse(trackStates.begin(), trackStates.end());
107 
108  unsigned int count = 0;
109  for (auto trackstate : trackStates) {
110  // Currently only converting smoothed states, but we will extend this later.
111  if (trackstate.hasSmoothed() && trackstate.hasReferenceSurface()) {
112  const Acts::BoundTrackParameters params(trackstate.referenceSurface().getSharedPtr(),
113  trackstate.smoothed(),
114  trackstate.smoothedCovariance(),
116  ATH_MSG_VERBOSE("Track parameters: "<<params.parameters());
117 
118  auto pos = params.position(gctx);
119  data["pos"].push_back(pos.x());
120  data["pos"].push_back(pos.y());
121  data["pos"].push_back(pos.z());
122  ATH_MSG_VERBOSE("TrackState "<<count<<" has smoothed state and reference surface. Position is "<<pos.x()<<", "<<pos.y()<<", "<<pos.z());
123  ATH_MSG_VERBOSE(params.referenceSurface().toString(gctx));
124  ATH_MSG_VERBOSE("GeometryId "<<params.referenceSurface().geometryId().value());
125  } else {
126  ATH_MSG_WARNING("TrackState "<<count<<" does not have smoothed state ["<<trackstate.hasSmoothed()<<"] or reference surface ["<<trackstate.hasReferenceSurface()<<"]. Skipping.");
127  }
128  // TODO: Add measurements etc
129  count++;
130  }
131 
132  return data;
133 }

◆ getAndFillArrayOfContainers()

template<class TYPE >
StatusCode DumpEventDataToJsonAlg::getAndFillArrayOfContainers ( nlohmann::json event,
const SG::ReadHandleKeyArray< TYPE > &  keys,
const std::string &  jsonType 
)
protected

Definition at line 263 of file DumpEventDataToJsonAlg.cxx.

265  {
266  for (SG::ReadHandle<TYPE> handle : keys.makeHandles()) {
267  ATH_MSG_VERBOSE("Trying to load " << handle.key());
268  ATH_CHECK(handle.isValid());
269  ATH_MSG_VERBOSE("Got back " << handle->size());
270 
271  for (auto object : *handle) {
272  nlohmann::json tmp = getData(*object);
273  event[jsonType][handle.key()].push_back(tmp);
274  }
275  }
276  return StatusCode::SUCCESS;
277 }

◆ getAndFillContainer()

template<class TYPE >
StatusCode DumpEventDataToJsonAlg::getAndFillContainer ( nlohmann::json event,
const SG::ReadHandleKey< TYPE > &  key,
const std::string &  jsonType 
)
protected

Definition at line 497 of file DumpEventDataToJsonAlg.cxx.

499  {
500  if (key.empty()) {
501  return StatusCode::SUCCESS;
502  }
503  SG::ReadHandle<TYPE> handle(key);
504 
505  ATH_MSG_VERBOSE("Trying to load " << handle.key());
506  ATH_CHECK(handle.isValid());
507  ATH_MSG_VERBOSE("Which has " << handle->numberOfCollections()
508  << " collections: ");
509 
510  nlohmann::json tmp = getData(*handle);
511  if (!tmp.is_null()) {
512  ATH_MSG_VERBOSE("Writing " << jsonType << " : " << handle.key() << " with"
513  << tmp.size() << " elements:");
514  event[jsonType][handle.key()] = tmp;
515  }
516  return StatusCode::SUCCESS;
517 }

◆ getData() [1/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const CaloCell cell)

Definition at line 303 of file DumpEventDataToJsonAlg.cxx.

303  {
305  data["phi"] = cell.phi();
306  data["eta"] = cell.eta();
307  data["energy"] = cell.e();
308  // data["etaSize"] = clust.getClusterEtaSize(); // empty
309  // data["phiSize"] = clust.getClusterPhiSize(); // empty
310  return data;
311 }

◆ getData() [2/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const Trk::Track track)

Definition at line 381 of file DumpEventDataToJsonAlg.cxx.

381  {
383  const Trk::FitQuality *quality = track.fitQuality();
384 
385  data["chi2"] = (quality ? quality->chiSquared() : 0.0);
386  data["dof"] = (quality ? quality->doubleNumberDoF() : 0.0);
387 
388  const Trk::Perigee *peri = track.perigeeParameters();
389  if (peri) {
390  data["dparams"] = {peri->parameters()[Trk::d0], peri->parameters()[Trk::z0],
391  peri->parameters()[Trk::phi0],
392  peri->parameters()[Trk::theta],
393  peri->parameters()[Trk::qOverP]};
394 
395  } else {
396  data["pos"] = {};
397  }
398 
400  track.trackParameters();
401  if (parameters) {
402  for (const Trk::TrackParameters *param : *parameters) {
403  data["pos"].push_back(param->position().x());
404  data["pos"].push_back(param->position().y());
405  data["pos"].push_back(param->position().z());
406  }
407  } else {
408  const DataVector<const Trk::MeasurementBase> *measurements =
409  track.measurementsOnTrack();
410  if (measurements) {
411  for (const Trk::MeasurementBase *meas : *measurements) {
412  data["pos"].push_back(meas->globalPosition().x());
413  data["pos"].push_back(meas->globalPosition().y());
414  data["pos"].push_back(meas->globalPosition().z());
415  }
416  }
417  }
418 
419  return data;
420 }

◆ getData() [3/10]

template<class TYPE >
nlohmann::json DumpEventDataToJsonAlg::getData ( const TYPE object)
protected

Definition at line 521 of file DumpEventDataToJsonAlg.cxx.

521  {
522 
523  nlohmann::json colldata = {};
524  for (const auto &coll : container) {
525  for (const auto &prd : *coll) {
527  data["pos"] = {prd->globalPosition().x(), prd->globalPosition().y(),
528  prd->globalPosition().z()};
529  Identifier id = prd->identify();
530  data["id"] = id.get_compact();
531  colldata.push_back(data);
532  }
533  }
534 
535  return colldata;
536 }

◆ getData() [4/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::CaloCluster clust)

Definition at line 291 of file DumpEventDataToJsonAlg.cxx.

291  {
293  data["phi"] = clust.phi();
294  data["eta"] = clust.eta();
295  data["energy"] = clust.e();
296  // data["etaSize"] = clust.getClusterEtaSize(); // empty
297  // data["phiSize"] = clust.getClusterPhiSize(); // empty
298  return data;
299 }

◆ getData() [5/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Electron electron)

Definition at line 456 of file DumpEventDataToJsonAlg.cxx.

456  {
458  data["phi"] = electron.phi();
459  data["eta"] = electron.eta();
460  data["energy"] = electron.e();
461  addLink(electron.caloClusterLink(), data["LinkedClusters"]);
462  addLink(electron.trackParticleLink(), data["LinkedTracks"]);
463 
464  return data;
465 }

◆ getData() [6/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Jet jet)

Definition at line 281 of file DumpEventDataToJsonAlg.cxx.

281  {
283  data["phi"] = jet.phi();
284  data["eta"] = jet.eta();
285  data["energy"] = jet.e();
286  return data;
287 }

◆ getData() [7/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Muon muon)

Definition at line 424 of file DumpEventDataToJsonAlg.cxx.

424  {
426  data["Phi"] = muon.phi();
427  data["Eta"] = muon.eta();
428 
429  std::vector<std::string> quality = {"Tight", "Medium", "Loose", "VeryLoose"};
430  data["Quality"] = quality[static_cast<unsigned int>(muon.quality())];
431  std::vector<std::string> type = {"Combined", "Standalone", "SegmentTagged",
432  "CaloTagged", "SiAssociatedForward"};
433  data["Type"] = type[static_cast<unsigned int>(muon.muonType())];
434 
435  addLink(muon.clusterLink(), data["LinkedClusters"]);
436  addLink(muon.inDetTrackParticleLink(), data["LinkedTracks"]);
437  addLink(muon.muonSpectrometerTrackParticleLink(), data["LinkedTracks"]);
438  addLink(muon.extrapolatedMuonSpectrometerTrackParticleLink(),
439  data["LinkedTracks"]);
440 
441  return data;
442 }

◆ getData() [8/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::Photon photon)

Definition at line 469 of file DumpEventDataToJsonAlg.cxx.

469  {
471  data["phi"] = photon.phi();
472  data["eta"] = photon.eta();
473  data["energy"] = photon.e();
474  addLink(photon.caloClusterLink(), data["LinkedClusters"]);
475 
476  return data;
477 }

◆ getData() [9/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::TauJet tauJet)

Definition at line 446 of file DumpEventDataToJsonAlg.cxx.

446  {
448  data["phi"] = tauJet.phi();
449  data["eta"] = tauJet.eta();
450  data["energy"] = tauJet.e();
451  return data;
452 }

◆ getData() [10/10]

template<>
nlohmann::json DumpEventDataToJsonAlg::getData ( const xAOD::TrackParticle tp)

Definition at line 315 of file DumpEventDataToJsonAlg.cxx.

315  {
317  data["chi2"] = tp.chiSquared();
318  data["dof"] = tp.numberDoF();
319  data["dparams"] = {tp.d0(), tp.z0(), tp.phi0(), tp.theta(), tp.qOverP()};
320 
321  if (m_physlite) {
322  ATH_MSG_VERBOSE("Physlite mode enabled. Not adding track parameters.");
323  return data;
324  }
325 
326  if (m_extrapolator.empty()) {
327  data["pos"] = {tp.perigeeParameters().position().x(),
328  tp.perigeeParameters().position().y(),
329  tp.perigeeParameters().position().z()};
330  for (unsigned int i = 0; i < tp.numberOfParameters(); ++i) {
331  data["pos"].push_back(tp.parameterX(i));
332  data["pos"].push_back(tp.parameterY(i));
333  data["pos"].push_back(tp.parameterZ(i));
334  }
335  } else {
336  std::vector<Amg::Vector3D> positions;
337  const Trk::Perigee &peri = tp.perigeeParameters();
338  positions.push_back(Amg::Vector3D(peri.position().x(), peri.position().y(),
339  peri.position().z()));
340 
341  Trk::CurvilinearParameters startParameters(peri.position(), peri.momentum(),
342  peri.charge());
344  ecc.addConfigurationMode(Trk::ExtrapolationMode::StopAtBoundary);
345  ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectPassive);
346  ecc.addConfigurationMode(Trk::ExtrapolationMode::CollectSensitive);
347  Trk::ExtrapolationCode eCode = m_extrapolator->extrapolate(ecc);
348  if (eCode.isSuccess()) {
349  // loop over the collected information
350  for (auto &es : ecc.extrapolationSteps) {
351 
352  // continue if we have parameters
353  const Trk::TrackParameters *parameters = es.parameters;
354  if (parameters) {
355  Amg::Vector3D pos = parameters->position();
356  positions.push_back(pos);
357  delete parameters;
358  }
359  }
360  positions.push_back(ecc.endParameters->position());
361 
362  // Now add the positions to the output
363  for (auto pos : positions) {
364  data["pos"].push_back(pos.x());
365  data["pos"].push_back(pos.y());
366  data["pos"].push_back(pos.z());
367  }
368 
369  } else {
371  "Failure in extrapolation for Track with start parameters "
372  << startParameters);
373  }
374  }
375 
376  return data;
377 }

◆ initialize()

StatusCode DumpEventDataToJsonAlg::initialize ( )
overridevirtual

inherited from Algorithm

Definition at line 34 of file DumpEventDataToJsonAlg.cxx.

34  {
37  ATH_CHECK(m_jetKeys.initialize(!m_jetKeys.empty()));
38  ATH_CHECK(m_caloClustersKeys.initialize(!m_caloClustersKeys.empty()));
39  ATH_CHECK(m_caloCellKey.initialize(!m_caloCellKey.empty()));
40  ATH_CHECK(m_muonKeys.initialize(!m_muonKeys.empty()));
41  ATH_CHECK(m_tauJetKeys.initialize(!m_tauJetKeys.empty()));
42  ATH_CHECK(m_electronKeys.initialize(!m_electronKeys.empty()));
43  ATH_CHECK(m_photonKeys.initialize(!m_photonKeys.empty()));
45 
46  // ACTS
47  ATH_CHECK(m_trackContainerKeys.initialize());
48  if (!m_cscPrepRawDataKey.empty())
49  ATH_CHECK(m_cscPrepRawDataKey.initialize());
50  if (!m_mdtPrepRawDataKey.empty())
51  ATH_CHECK(m_mdtPrepRawDataKey.initialize());
52  if (!m_tgcPrepRawDataKey.empty())
53  ATH_CHECK(m_tgcPrepRawDataKey.initialize());
54  if (!m_rpcPrepRawDataKey.empty())
55  ATH_CHECK(m_rpcPrepRawDataKey.initialize());
56  if (!m_mmPrepRawDataKey.empty())
57  ATH_CHECK(m_mmPrepRawDataKey.initialize());
58  if (!m_stgcPrepRawDataKey.empty())
59  ATH_CHECK(m_stgcPrepRawDataKey.initialize());
66 
67  ATH_CHECK(m_extrapolator.retrieve( DisableTool{m_extrapolator.empty()} ));
68  if (m_extrapolator.empty()) {
69  ATH_MSG_WARNING("No extrapolator found. Will not be able to extrapolate tracks.");
70  } else {
71  ATH_MSG_INFO("Extrapolator found. Will be able to extrapolate tracks.");
72  }
73 
76 
77  return StatusCode::SUCCESS;
78 }

◆ inputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::inputHandles ( ) const
overridevirtualinherited

Return this algorithm's input handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ msg() [1/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( ) const
inlineinherited

Definition at line 24 of file AthCommonMsg.h.

24  {
25  return this->msgStream();
26  }

◆ msg() [2/2]

MsgStream& AthCommonMsg< Algorithm >::msg ( const MSG::Level  lvl) const
inlineinherited

Definition at line 27 of file AthCommonMsg.h.

27  {
28  return this->msgStream(lvl);
29  }

◆ msgLvl()

bool AthCommonMsg< Algorithm >::msgLvl ( const MSG::Level  lvl) const
inlineinherited

Definition at line 30 of file AthCommonMsg.h.

30  {
31  return this->msgLevel(lvl);
32  }

◆ outputHandles()

virtual std::vector<Gaudi::DataHandle*> AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles ( ) const
overridevirtualinherited

Return this algorithm's output handles.

We override this to include handle instances from key arrays if they have not yet been declared. See comments on updateVHKA.

◆ prependTestEvent()

void DumpEventDataToJsonAlg::prependTestEvent ( )
protected

Dumps a dummy event with some objects at specific eta/phi coordinates for calibration.

Definition at line 203 of file DumpEventDataToJsonAlg.cxx.

203  {
204  ATH_MSG_VERBOSE("Prepending a test event.");
205  nlohmann::json j;
206 
207  // FIXME - this
208  auto writeEtaPhiLabel = [](float eta, float phi) {
209  return std::to_string(eta) + "/" + std::to_string(phi);
210  };
211 
212  j["event number"] = 999;
213  j["run number"] = 999;
214 
215  // Here we want to draw some tracks at predefined positons
216  unsigned int maxSteps = 3;
217  Amg::Vector3D trackPos;
218  float phi, eta;
219  for (unsigned int nPhi = 0; nPhi < maxSteps; ++nPhi) {
220  phi = static_cast<float>(nPhi) / static_cast<float>(maxSteps) *
221  M_PI; // Want to range from 0 to M_PI
222  for (unsigned int nEta = 0; nEta < maxSteps; ++nEta) {
223  eta = static_cast<float>(nEta) / static_cast<float>(maxSteps) *
224  3.0; // Want to range from 0 to 3.0
225 
226  // Create a calo cluster at each value
227  nlohmann::json cluster;
228  cluster["phi"] = phi;
229  cluster["eta"] = eta;
230  cluster["energy"] = 999.9;
231  cluster["label"] = writeEtaPhiLabel(eta, phi);
232 
233  j["CaloClusters"]["TestClusters"].push_back(cluster);
234 
235  // create a jet at each value
237  jet["phi"] = phi;
238  jet["eta"] = eta;
239  jet["energy"] = 99999.9;
240  jet["label"] = writeEtaPhiLabel(eta, phi);
241  j["Jets"]["TestJets"].push_back(jet);
242 
244  track["chi2"] = 0.0;
245  track["dof"] = 0.0;
246 
247  double theta = 2 * std::atan(std::exp(-eta));
248  // d0, z0, phi, theta, qOverP
249  track["dparams"] = {0.0, 0.0, phi, theta, 0.0};
250  // Add three positions (less than this might not count as a)
251  for (unsigned int i = 0; i < 4; ++i) {
252  Amg::setRThetaPhi(trackPos, i * 1000., theta, phi);
253  track["pos"].push_back({trackPos.x(), trackPos.y(), trackPos.z()});
254  }
255  track["label"] = writeEtaPhiLabel(eta, phi);
256  j["Tracks"]["TestTracks"].push_back(track);
257  }
258  }
259  m_eventData["Test"] = j;
260 }

◆ renounce()

std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(T)> > && !std::is_base_of_v<SG::VarHandleKeyArray, T> && std::is_base_of_v<Gaudi::DataHandle, T>, void> AthCommonDataStore< AthCommonMsg< Algorithm > >::renounce ( T &  h)
inlineprotectedinherited

Definition at line 380 of file AthCommonDataStore.h.

381  {
382  h.renounce();
383  PBASE::renounce (h);
384  }

◆ renounceArray()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::renounceArray ( SG::VarHandleKeyArray handlesArray)
inlineprotectedinherited

remove all handles from I/O resolution

Definition at line 364 of file AthCommonDataStore.h.

364  {
365  handlesArray.renounce();
366  }

◆ sysInitialize()

StatusCode AthAlgorithm::sysInitialize ( )
overridevirtualinherited

Override sysInitialize.

Override sysInitialize from the base class.

Loop through all output handles, and if they're WriteCondHandles, automatically register them and this Algorithm with the CondSvc

Scan through all outputHandles, and if they're WriteCondHandles, register them with the CondSvc

Reimplemented from AthCommonDataStore< AthCommonMsg< Algorithm > >.

Reimplemented in AthAnalysisAlgorithm, AthFilterAlgorithm, PyAthena::Alg, and AthHistogramAlgorithm.

Definition at line 66 of file AthAlgorithm.cxx.

66  {
68 
69  if (sc.isFailure()) {
70  return sc;
71  }
72  ServiceHandle<ICondSvc> cs("CondSvc",name());
73  for (auto h : outputHandles()) {
74  if (h->isCondition() && h->mode() == Gaudi::DataHandle::Writer) {
75  // do this inside the loop so we don't create the CondSvc until needed
76  if ( cs.retrieve().isFailure() ) {
77  ATH_MSG_WARNING("no CondSvc found: won't autoreg WriteCondHandles");
78  return StatusCode::SUCCESS;
79  }
80  if (cs->regHandle(this,*h).isFailure()) {
81  sc = StatusCode::FAILURE;
82  ATH_MSG_ERROR("unable to register WriteCondHandle " << h->fullKey()
83  << " with CondSvc");
84  }
85  }
86  }
87  return sc;
88 }

◆ sysStart()

virtual StatusCode AthCommonDataStore< AthCommonMsg< Algorithm > >::sysStart ( )
overridevirtualinherited

Handle START transition.

We override this in order to make sure that conditions handle keys can cache a pointer to the conditions container.

◆ updateVHKA()

void AthCommonDataStore< AthCommonMsg< Algorithm > >::updateVHKA ( Gaudi::Details::PropertyBase &  )
inlineinherited

Definition at line 308 of file AthCommonDataStore.h.

308  {
309  // debug() << "updateVHKA for property " << p.name() << " " << p.toString()
310  // << " size: " << m_vhka.size() << endmsg;
311  for (auto &a : m_vhka) {
312  std::vector<SG::VarHandleKey*> keys = a->keys();
313  for (auto k : keys) {
314  k->setOwner(this);
315  }
316  }
317  }

Member Data Documentation

◆ m_caloCellKey

SG::ReadHandleKeyArray<CaloCellContainer> DumpEventDataToJsonAlg::m_caloCellKey {this, "CaloCellContainerKey", {"AllCalo"}, "Key for CaloCell Container"}
protected

Definition at line 99 of file DumpEventDataToJsonAlg.h.

◆ m_caloClustersKeys

SG::ReadHandleKeyArray<xAOD::CaloClusterContainer> DumpEventDataToJsonAlg::m_caloClustersKeys {this, "CaloClusterContainerKeys", {"CaloCalTopoClusters"}, "Keys for CaloClusters Containers"}
protected

Definition at line 97 of file DumpEventDataToJsonAlg.h.

◆ m_cscPrepRawDataKey

SG::ReadHandleKey<Muon::CscPrepDataContainer> DumpEventDataToJsonAlg::m_cscPrepRawDataKey {this, "CscPrepRawDataKey", "CSC_Clusters", "Key for CSC PRD Container"}
protected

Definition at line 106 of file DumpEventDataToJsonAlg.h.

◆ m_detStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
privateinherited

Pointer to StoreGate (detector store by default)

Definition at line 393 of file AthCommonDataStore.h.

◆ m_dumpTestEvent

Gaudi::Property<bool> DumpEventDataToJsonAlg::m_dumpTestEvent {this, "DumpTestEvent", false, "If true, prepend a test event with some calibration data in it."}
protected

Definition at line 123 of file DumpEventDataToJsonAlg.h.

◆ m_electronKeys

SG::ReadHandleKeyArray<xAOD::ElectronContainer> DumpEventDataToJsonAlg::m_electronKeys {this, "ElectronContainerKeys", {"Electrons"}, "Keys for Electron Containers"}
protected

Definition at line 93 of file DumpEventDataToJsonAlg.h.

◆ m_eventData

nlohmann::json DumpEventDataToJsonAlg::m_eventData
protected

Definition at line 126 of file DumpEventDataToJsonAlg.h.

◆ m_eventInfoKey

SG::ReadHandleKey<xAOD::EventInfo> DumpEventDataToJsonAlg::m_eventInfoKey {this, "EventInfoKey", "EventInfo", "Key for the Event Info"}
protected

Definition at line 83 of file DumpEventDataToJsonAlg.h.

◆ m_evtStore

StoreGateSvc_t AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
privateinherited

Pointer to StoreGate (event store by default)

Definition at line 390 of file AthCommonDataStore.h.

◆ m_extendedExtraObjects

DataObjIDColl AthAlgorithm::m_extendedExtraObjects
privateinherited

Definition at line 79 of file AthAlgorithm.h.

◆ m_extrapolator

ToolHandle<Trk::IExtrapolationEngine> DumpEventDataToJsonAlg::m_extrapolator {this, "Extrapolator", "Trk::ExtrapolationEngine/AtlasExtrapolation"}
protected

Definition at line 116 of file DumpEventDataToJsonAlg.h.

◆ m_geometryContextKey

SG::ReadHandleKey<ActsGeometryContext> DumpEventDataToJsonAlg::m_geometryContextKey
protected
Initial value:
{
this, "ActsAlignmentKey", "ActsAlignment", "cond read key for the alignment"}

Definition at line 118 of file DumpEventDataToJsonAlg.h.

◆ m_jetKeys

SG::ReadHandleKeyArray<xAOD::JetContainer> DumpEventDataToJsonAlg::m_jetKeys {this, "JetContainerKeys", {"AntiKt4EMTopoJets"}, "Keys for Jet Containers"}
protected

Definition at line 87 of file DumpEventDataToJsonAlg.h.

◆ m_mdtPrepRawDataKey

SG::ReadHandleKey<Muon::MdtPrepDataContainer> DumpEventDataToJsonAlg::m_mdtPrepRawDataKey {this, "MdtPrepRawDataKey", "MDT_DriftCircles", "Key for MDT PRD Container"}
protected

Definition at line 107 of file DumpEventDataToJsonAlg.h.

◆ m_mmPrepRawDataKey

SG::ReadHandleKey<Muon::MMPrepDataContainer> DumpEventDataToJsonAlg::m_mmPrepRawDataKey {this, "MMPrepRawDataKey", "MM_Measurements", "Key for MM PRD Container"}
protected

Definition at line 110 of file DumpEventDataToJsonAlg.h.

◆ m_muonKeys

SG::ReadHandleKeyArray<xAOD::MuonContainer> DumpEventDataToJsonAlg::m_muonKeys {this, "MuonContainerKeys", {"Muons"}, "Keys for Muon Containers"}
protected

Definition at line 89 of file DumpEventDataToJsonAlg.h.

◆ m_outputJSON_Name

Gaudi::Property<std::string> DumpEventDataToJsonAlg::m_outputJSON_Name {this, "OutputLocation", "EventData.json", "Default filename for "}
protected

Definition at line 121 of file DumpEventDataToJsonAlg.h.

◆ m_photonKeys

SG::ReadHandleKeyArray<xAOD::PhotonContainer> DumpEventDataToJsonAlg::m_photonKeys {this, "PhotonContainerKeys", {"Photons"}, "Keys for Photon Containers"}
protected

Definition at line 95 of file DumpEventDataToJsonAlg.h.

◆ m_physlite

Gaudi::Property<bool> DumpEventDataToJsonAlg::m_physlite {this, "PHYSLITE", false, "If true, do not try to access data which is not available in PHYSLITE files."}
protected

Definition at line 124 of file DumpEventDataToJsonAlg.h.

◆ m_pixelPrepRawDataKey

SG::ReadHandleKey<InDet::PixelClusterContainer> DumpEventDataToJsonAlg::m_pixelPrepRawDataKey {this, "PixelPrepRawDataKey", "PixelClusters", "Key for Pixel PRD Container"}
protected

Definition at line 112 of file DumpEventDataToJsonAlg.h.

◆ m_rpcPrepRawDataKey

SG::ReadHandleKey<Muon::RpcPrepDataContainer> DumpEventDataToJsonAlg::m_rpcPrepRawDataKey {this, "RpcPrepRawDataKey", "RPC_Measurements", "Key for RPC PRD Container"}
protected

Definition at line 108 of file DumpEventDataToJsonAlg.h.

◆ m_sctPrepRawDataKey

SG::ReadHandleKey<InDet::SCT_ClusterContainer> DumpEventDataToJsonAlg::m_sctPrepRawDataKey {this, "SctPrepRawDataKey", "SCT_Clusters", "Key for SCT PRD Container"}
protected

Definition at line 113 of file DumpEventDataToJsonAlg.h.

◆ m_stgcPrepRawDataKey

SG::ReadHandleKey<Muon::sTgcPrepDataContainer> DumpEventDataToJsonAlg::m_stgcPrepRawDataKey {this, "sTgcPrepRawDataKey", "STGC_Measurements", "Key for sTGC PRD Container"}
protected

Definition at line 111 of file DumpEventDataToJsonAlg.h.

◆ m_tauJetKeys

SG::ReadHandleKeyArray<xAOD::TauJetContainer> DumpEventDataToJsonAlg::m_tauJetKeys {this, "TauJetContainerKeys", {"TauJets"}, "Keys for Tau Containers"}
protected

Definition at line 91 of file DumpEventDataToJsonAlg.h.

◆ m_tgcPrepRawDataKey

SG::ReadHandleKey<Muon::TgcPrepDataContainer> DumpEventDataToJsonAlg::m_tgcPrepRawDataKey {this, "TgcPrepRawDataKey", "TGC_MeasurementsAllBCs", "Key for TGC PRD Container"}
protected

Definition at line 109 of file DumpEventDataToJsonAlg.h.

◆ m_trackCollectionKeys

SG::ReadHandleKeyArray<TrackCollection> DumpEventDataToJsonAlg::m_trackCollectionKeys {this, "TrackCollectionKeys", {"CombinedInDetTracks", "CombinedMuonTracks", "MuonSpectrometerTracks"}, "Keys for Track Containers"}
protected

Definition at line 101 of file DumpEventDataToJsonAlg.h.

◆ m_trackContainerKeys

SG::ReadHandleKeyArray<ActsTrk::TrackContainer> DumpEventDataToJsonAlg::m_trackContainerKeys {this, "TrackContainerKeys", {"ConvertedTracks"}, "Location of the converted Acts TrackContainer"}
protected

Definition at line 104 of file DumpEventDataToJsonAlg.h.

◆ m_trackParticleKeys

SG::ReadHandleKeyArray<xAOD::TrackParticleContainer> DumpEventDataToJsonAlg::m_trackParticleKeys {this, "TrackParticleContainerKeys", {"InDetTrackParticles", "CombinedMuonTrackParticles"}, "Keys for TrackParticle Containers"}
protected

Definition at line 85 of file DumpEventDataToJsonAlg.h.

◆ m_trtPrepRawDataKey

SG::ReadHandleKey<InDet::TRT_DriftCircleContainer> DumpEventDataToJsonAlg::m_trtPrepRawDataKey {this, "TrtPrepRawDataKey", "TRT_DriftCircles", "Key for TRT PRD Container"}
protected

Definition at line 114 of file DumpEventDataToJsonAlg.h.

◆ m_varHandleArraysDeclared

bool AthCommonDataStore< AthCommonMsg< Algorithm > >::m_varHandleArraysDeclared
privateinherited

Definition at line 399 of file AthCommonDataStore.h.

◆ m_vhka

std::vector<SG::VarHandleKeyArray*> AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
privateinherited

Definition at line 398 of file AthCommonDataStore.h.


The documentation for this class was generated from the following files:
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
Trk::ExtrapolationMode::CollectPassive
@ CollectPassive
Definition: ExtrapolationCell.h:57
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:195
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
DumpEventDataToJsonAlg::m_geometryContextKey
SG::ReadHandleKey< ActsGeometryContext > m_geometryContextKey
Definition: DumpEventDataToJsonAlg.h:118
ActsTrk::TrackContainer
Definition: TrackContainer.h:31
ReadCellNoiseFromCool.cell
cell
Definition: ReadCellNoiseFromCool.py:53
phi
Scalar phi() const
phi method
Definition: AmgMatrixBasePlugin.h:67
ATH_MSG_INFO
#define ATH_MSG_INFO(x)
Definition: AthMsgStreamMacros.h:31
xAOD::TauJet_v3::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
json
nlohmann::json json
Definition: HistogramDef.cxx:9
DumpEventDataToJsonAlg::m_extrapolator
ToolHandle< Trk::IExtrapolationEngine > m_extrapolator
Definition: DumpEventDataToJsonAlg.h:116
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:70
AthCommonDataStore::declareProperty
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T > &t)
Definition: AthCommonDataStore.h:145
PlotCalibFromCool.label
label
Definition: PlotCalibFromCool.py:78
Trk::ParametersT
Dummy class used to allow special convertors to be called for surfaces owned by a detector element.
Definition: EMErrorDetail.h:25
DumpEventDataToJsonAlg::m_stgcPrepRawDataKey
SG::ReadHandleKey< Muon::sTgcPrepDataContainer > m_stgcPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:111
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
DumpEventDataToJsonAlg::m_trackCollectionKeys
SG::ReadHandleKeyArray< TrackCollection > m_trackCollectionKeys
Definition: DumpEventDataToJsonAlg.h:101
DumpEventDataToJsonAlg::m_pixelPrepRawDataKey
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:112
DumpEventDataToJsonAlg::getAndFillArrayOfContainers
StatusCode getAndFillArrayOfContainers(nlohmann::json &event, const SG::ReadHandleKeyArray< TYPE > &keys, const std::string &jsonType)
Definition: DumpEventDataToJsonAlg.cxx:263
DumpEventDataToJsonAlg::m_rpcPrepRawDataKey
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_rpcPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:108
M_PI
#define M_PI
Definition: ActiveFraction.h:11
DumpEventDataToJsonAlg::m_trtPrepRawDataKey
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:114
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_evtStore
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
Definition: AthCommonDataStore.h:390
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_vhka
std::vector< SG::VarHandleKeyArray * > m_vhka
Definition: AthCommonDataStore.h:398
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:196
Trk::z0
@ z0
Definition: ParamDefs.h:64
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::VarHandleKey::empty
bool empty() const
Test if the key is blank.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:150
drawFromPickle.exp
exp
Definition: drawFromPickle.py:36
DumpEventDataToJsonAlg::prependTestEvent
void prependTestEvent()
Dumps a dummy event with some objects at specific eta/phi coordinates for calibration.
Definition: DumpEventDataToJsonAlg.cxx:203
xAOD::TauJet_v3::e
virtual double e() const
The total energy of the particle.
Definition: TauJet_v3.cxx:88
DumpEventDataToJsonAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: DumpEventDataToJsonAlg.h:83
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
DumpEventDataToJsonAlg::m_trackContainerKeys
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_trackContainerKeys
Definition: DumpEventDataToJsonAlg.h:104
XMLtoHeader.count
count
Definition: XMLtoHeader.py:85
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
AthenaPoolTestRead.sc
sc
Definition: AthenaPoolTestRead.py:27
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
SG::VarHandleKeyArray::setOwner
virtual void setOwner(IDataHandleHolder *o)=0
DumpEventDataToJsonAlg::m_tgcPrepRawDataKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:109
IDTPMcnv.htype
htype
Definition: IDTPMcnv.py:29
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
xAOD::TauJet_v3::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
DumpEventDataToJsonAlg::m_mmPrepRawDataKey
SG::ReadHandleKey< Muon::MMPrepDataContainer > m_mmPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:110
DumpEventDataToJsonAlg::m_tauJetKeys
SG::ReadHandleKeyArray< xAOD::TauJetContainer > m_tauJetKeys
Definition: DumpEventDataToJsonAlg.h:91
python.utils.AtlRunQueryDQUtils.p
p
Definition: AtlRunQueryDQUtils.py:210
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
AthCommonDataStore
Definition: AthCommonDataStore.h:52
AthAlgorithm::sysInitialize
virtual StatusCode sysInitialize() override
Override sysInitialize.
Definition: AthAlgorithm.cxx:66
ATH_MSG_ERROR
#define ATH_MSG_ERROR(x)
Definition: AthMsgStreamMacros.h:33
DumpEventDataToJsonAlg::m_dumpTestEvent
Gaudi::Property< bool > m_dumpTestEvent
Definition: DumpEventDataToJsonAlg.h:123
AthCommonDataStore< AthCommonMsg< Algorithm > >::outputHandles
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
xAOD::CaloCluster_v1::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
Definition: CaloCluster_v1.cxx:251
lumiFormat.i
int i
Definition: lumiFormat.py:85
DumpEventDataToJsonAlg::m_jetKeys
SG::ReadHandleKeyArray< xAOD::JetContainer > m_jetKeys
Definition: DumpEventDataToJsonAlg.h:87
Trk::theta
@ theta
Definition: ParamDefs.h:66
EL::StatusCode
::StatusCode StatusCode
StatusCode definition for legacy code.
Definition: PhysicsAnalysis/D3PDTools/EventLoop/EventLoop/StatusCode.h:22
Trk::ExtrapolationCode::isSuccess
bool isSuccess() const
return success
Definition: ExtrapolationCell.h:153
Trk::ExtrapolationCode
Definition: ExtrapolationCell.h:105
DumpEventDataToJsonAlg::m_outputJSON_Name
Gaudi::Property< std::string > m_outputJSON_Name
Definition: DumpEventDataToJsonAlg.h:121
DumpEventDataToJsonAlg::m_sctPrepRawDataKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:113
ATH_CHECK
#define ATH_CHECK
Definition: AthCheckMacros.h:40
Trk::ExtrapolationMode::CollectSensitive
@ CollectSensitive
Definition: ExtrapolationCell.h:56
Trk::FitQuality
Class to represent and store fit qualities from track reconstruction in terms of and number of degre...
Definition: FitQuality.h:97
AthCommonDataStore< AthCommonMsg< Algorithm > >::m_detStore
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Definition: AthCommonDataStore.h:393
Trk::ParametersBase
Definition: ParametersBase.h:55
SG::VarHandleKey::initialize
StatusCode initialize(bool used=true)
If this object is used as a property, then this should be called during the initialize phase.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleKey.cxx:103
Trk::CurvilinearParametersT
Definition: CurvilinearParametersT.h:48
DumpEventDataToJsonAlg::m_mdtPrepRawDataKey
SG::ReadHandleKey< Muon::MdtPrepDataContainer > m_mdtPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:107
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DumpEventDataToJsonAlg::m_eventData
nlohmann::json m_eventData
Definition: DumpEventDataToJsonAlg.h:126
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
SG::VarHandleKeyArray::renounce
virtual void renounce()=0
SG::HandleClassifier::type
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
Definition: HandleClassifier.h:54
Trk::MeasurementBase
Definition: MeasurementBase.h:58
DumpEventDataToJsonAlg::getAndFillContainer
StatusCode getAndFillContainer(nlohmann::json &event, const SG::ReadHandleKey< TYPE > &key, const std::string &jsonType)
Definition: DumpEventDataToJsonAlg.cxx:497
merge_scale_histograms.doc
string doc
Definition: merge_scale_histograms.py:9
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:228
DumpEventDataToJsonAlg::addLink
void addLink(const TYPE &link, nlohmann::json &data)
Definition: DumpEventDataToJsonAlg.cxx:480
Trk::d0
@ d0
Definition: ParamDefs.h:63
ActsTrk::to_string
std::string to_string(const DetectorType &type)
Definition: GeometryDefs.h:34
DumpEventDataToJsonAlg::m_caloClustersKeys
SG::ReadHandleKeyArray< xAOD::CaloClusterContainer > m_caloClustersKeys
Definition: DumpEventDataToJsonAlg.h:97
DumpEventDataToJsonAlg::getData
nlohmann::json getData(const TYPE &object)
Definition: DumpEventDataToJsonAlg.cxx:521
DumpEventDataToJsonAlg::m_cscPrepRawDataKey
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:106
DumpEventDataToJsonAlg::m_physlite
Gaudi::Property< bool > m_physlite
Definition: DumpEventDataToJsonAlg.h:124
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
DumpEventDataToJsonAlg::m_electronKeys
SG::ReadHandleKeyArray< xAOD::ElectronContainer > m_electronKeys
Definition: DumpEventDataToJsonAlg.h:93
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
DumpEventDataToJsonAlg::getActsData
nlohmann::json getActsData(const Acts::TrackProxy< ActsTrk::TrackSummaryContainer, ActsTrk::MultiTrajectory, ActsTrk::DataLinkHolder, true > &track, const Acts::GeometryContext &gctx)
Definition: DumpEventDataToJsonAlg.cxx:80
AthAlgorithm::m_extendedExtraObjects
DataObjIDColl m_extendedExtraObjects
Definition: AthAlgorithm.h:79
DumpEventDataToJsonAlg::m_photonKeys
SG::ReadHandleKeyArray< xAOD::PhotonContainer > m_photonKeys
Definition: DumpEventDataToJsonAlg.h:95
Trk::ExtrapolationCell
Definition: ExtrapolationCell.h:231
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:199
a
TList * a
Definition: liststreamerinfos.cxx:10
h
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
Amg::setRThetaPhi
void setRThetaPhi(Amg::Vector3D &v, double r, double theta, double phi)
sets radius, the theta and phi angle of a vector.
Definition: GeoPrimitivesHelpers.h:80
Trk::qOverP
@ qOverP
perigee
Definition: ParamDefs.h:67
xAOD::EgammaParameters::electron
@ electron
Definition: EgammaEnums.h:18
DumpEventDataToJsonAlg::m_caloCellKey
SG::ReadHandleKeyArray< CaloCellContainer > m_caloCellKey
Definition: DumpEventDataToJsonAlg.h:99
SG::VarHandleBase::vhKey
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
Definition: StoreGate/src/VarHandleBase.cxx:623
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
Trk::FitQuality::chiSquared
double chiSquared() const
returns the of the overall track fit
Definition: FitQuality.h:56
AthAlgorithm::AthAlgorithm
AthAlgorithm()
Default constructor:
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:798
xAOD::track
@ track
Definition: TrackingPrimitives.h:512
LHEF::Writer
Pythia8::Writer Writer
Definition: Prophecy4fMerger.cxx:12
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
TrigVSI::AlgConsts::nEta
constexpr int nEta
Default bin number of eta for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:26
Trk::ExtrapolationMode::StopAtBoundary
@ StopAtBoundary
Definition: ExtrapolationCell.h:55
AthCommonDataStore::declareGaudiProperty
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
Definition: AthCommonDataStore.h:156
xAOD::CaloCluster_v1::e
virtual double e() const
The total energy of the particle.
Definition: CaloCluster_v1.cxx:265
Trk::phi0
@ phi0
Definition: ParamDefs.h:65
DumpEventDataToJsonAlg::m_trackParticleKeys
SG::ReadHandleKeyArray< xAOD::TrackParticleContainer > m_trackParticleKeys
Definition: DumpEventDataToJsonAlg.h:85
Trk::FitQuality::doubleNumberDoF
double doubleNumberDoF() const
returns the number of degrees of freedom of the overall track or vertex fit as double
Definition: FitQuality.h:68
fitman.k
k
Definition: fitman.py:528
ServiceHandle< ICondSvc >
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
DumpEventDataToJsonAlg::m_muonKeys
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_muonKeys
Definition: DumpEventDataToJsonAlg.h:89
Identifier
Definition: IdentifierFieldParser.cxx:14