ATLAS Offline Software
DumpEventDataToJsonAlg.cxx
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2023 CERN for the benefit of the ATLAS collaboration
3 */
4 
6 
7 #include <cmath>
8 #include <fstream>
9 #include <string>
10 #include <algorithm> // std::reverse
11 
12 #include "Acts/EventData/TrackContainer.hpp"
13 #include "Acts/EventData/TrackParameters.hpp"
15 #include "Gaudi/Property.h"
16 #include "GaudiKernel/Algorithm.h"
17 #include "GaudiKernel/MsgStream.h"
28 
29 
31  ISvcLocator *pSvcLocator)
32  : AthAlgorithm(name, pSvcLocator) {}
33 
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 }
79 
80 nlohmann::json DumpEventDataToJsonAlg::getActsData(const typename ActsTrk::TrackContainer::ConstTrackProxy &track,
81  const Acts::GeometryContext& gctx) {
83 
84  // ACTS units are GeV, whilst ATLAS is MeV. So we need to convert.
85  data["dparams"] = {track.loc0(), track.loc1(), track.phi(), track.theta(), track.qOverP() * 0.001};
86  ATH_MSG_VERBOSE(" Track has dparams"<<data["dparams"][0]<<", "<<data["dparams"][1]<<", "<<data["dparams"][2]<<", "<<data["dparams"][3]<<", "<<data["dparams"][4]);
87  ATH_MSG_VERBOSE(track.referenceSurface().toString(gctx));
88 
89  // Add dparams positions to the output
90  const Acts::BoundTrackParameters trackparams(track.referenceSurface().getSharedPtr(),
91  track.parameters(), std::nullopt, Acts::ParticleHypothesis::pion());
92  auto trackPosition = trackparams.position(gctx);;
93  data["pos"].push_back(trackPosition.x());
94  data["pos"].push_back(trackPosition.y());
95  data["pos"].push_back(trackPosition.z());
96 
97  unsigned int nTrackStates = track.nTrackStates();
98  ATH_MSG_VERBOSE("Track has " << nTrackStates << " states.");
99  // Unfortunately actsTracks are stored in reverse order, so we need to do some gymnastics
100  // (There is certainly a more elegant way to do this, but since this will all be changed soon I don't think it matters)
101  std::vector<typename ActsTrk::TrackContainer::ConstTrackStateProxy> trackStates;
102  trackStates.reserve(nTrackStates);
103  for (auto trackstate : track.trackStatesReversed()) {
104  trackStates.push_back(trackstate);
105  }
106 
107  std::reverse(trackStates.begin(), trackStates.end());
108 
109  unsigned int count = 0;
110  for (auto trackstate : trackStates) {
111  // Currently only converting smoothed states, but we will extend this later.
112  if (trackstate.hasSmoothed() && trackstate.hasReferenceSurface()) {
113  const Acts::BoundTrackParameters params(trackstate.referenceSurface().getSharedPtr(),
114  trackstate.smoothed(),
115  trackstate.smoothedCovariance(),
117  ATH_MSG_VERBOSE("Track parameters: "<<params.parameters());
118 
119  auto pos = params.position(gctx);
120  data["pos"].push_back(pos.x());
121  data["pos"].push_back(pos.y());
122  data["pos"].push_back(pos.z());
123  ATH_MSG_VERBOSE("TrackState "<<count<<" has smoothed state and reference surface. Position is "<<pos.x()<<", "<<pos.y()<<", "<<pos.z());
124  ATH_MSG_VERBOSE(params.referenceSurface().toString(gctx));
125  ATH_MSG_VERBOSE("GeometryId "<<params.referenceSurface().geometryId().value());
126  } else {
127  ATH_MSG_WARNING("TrackState "<<count<<" does not have smoothed state ["<<trackstate.hasSmoothed()<<"] or reference surface ["<<trackstate.hasReferenceSurface()<<"]. Skipping.");
128  }
129  // TODO: Add measurements etc
130  count++;
131  }
132 
133  return data;
134 }
135 
138  if (!eventInfo.isValid()) {
139  ATH_MSG_WARNING("Did not find xAOD::EventInfo at " << m_eventInfoKey);
140  return StatusCode::SUCCESS;
141  }
142 
143  if (m_dumpTestEvent) {
145  m_dumpTestEvent = false;
146  }
147 
148  ATH_MSG_VERBOSE("Run num :" << eventInfo->runNumber()
149  << " Event num: " << eventInfo->eventNumber());
150 
151  nlohmann::json j;
152  j["event number"] = eventInfo->eventNumber();
153  j["run number"] = eventInfo->runNumber();
154 
164 
165  // ACTS
166  if (!m_geometryContextKey.empty()){
167  auto tcHandles = m_trackContainerKeys.makeHandles();
168  SG::ReadHandle<ActsGeometryContext> gcx(m_geometryContextKey, Gaudi::Hive::currentContext());
169 
170  for ( SG::ReadHandle<ActsTrk::TrackContainer>& tcHandle: tcHandles ) {
171  // Temporary debugging information
172  ATH_MSG_VERBOSE("TrackStateContainer has "<< tcHandle->size() << " elements");
173 
174  ATH_MSG_VERBOSE("Trying to load " << tcHandle.key() << " with " << tcHandle->size() << " tracks");
175  const ActsTrk::TrackContainer* tc = tcHandle.get();
176  for (auto track : *tc) {
178  j["TrackContainers"][tcHandle.key()].push_back(tmp);
179  }
180  }
181  }
182 
183  // hits
192  // ATH_CHECK(getAndFillContainer(j, m_trtPrepRawDataKey, "Hits")); // Need
193  // specialisation. TODO.
194 
195  // For the moment the label is just the event/run number again, but can be
196  // manually overwritten in the output file
197  std::string label = std::to_string(eventInfo->eventNumber()) + "/" +
198  std::to_string(eventInfo->runNumber());
199  m_eventData[label] = j;
200 
201  return StatusCode::SUCCESS;
202 }
203 
205  ATH_MSG_VERBOSE("Prepending a test event.");
206  nlohmann::json j;
207 
208  // FIXME - this
209  auto writeEtaPhiLabel = [](float eta, float phi) {
210  return std::to_string(eta) + "/" + std::to_string(phi);
211  };
212 
213  j["event number"] = 999;
214  j["run number"] = 999;
215 
216  // Here we want to draw some tracks at predefined positons
217  unsigned int maxSteps = 3;
218  Amg::Vector3D trackPos;
219  float phi, eta;
220  for (unsigned int nPhi = 0; nPhi < maxSteps; ++nPhi) {
221  phi = static_cast<float>(nPhi) / static_cast<float>(maxSteps) *
222  M_PI; // Want to range from 0 to M_PI
223  for (unsigned int nEta = 0; nEta < maxSteps; ++nEta) {
224  eta = static_cast<float>(nEta) / static_cast<float>(maxSteps) *
225  3.0; // Want to range from 0 to 3.0
226 
227  // Create a calo cluster at each value
228  nlohmann::json cluster;
229  cluster["phi"] = phi;
230  cluster["eta"] = eta;
231  cluster["energy"] = 999.9;
232  cluster["label"] = writeEtaPhiLabel(eta, phi);
233 
234  j["CaloClusters"]["TestClusters"].push_back(cluster);
235 
236  // create a jet at each value
238  jet["phi"] = phi;
239  jet["eta"] = eta;
240  jet["energy"] = 99999.9;
241  jet["label"] = writeEtaPhiLabel(eta, phi);
242  j["Jets"]["TestJets"].push_back(jet);
243 
245  track["chi2"] = 0.0;
246  track["dof"] = 0.0;
247 
248  double theta = 2 * std::atan(std::exp(-eta));
249  // d0, z0, phi, theta, qOverP
250  track["dparams"] = {0.0, 0.0, phi, theta, 0.0};
251  // Add three positions (less than this might not count as a)
252  for (unsigned int i = 0; i < 4; ++i) {
253  Amg::setRThetaPhi(trackPos, i * 1000., theta, phi);
254  track["pos"].push_back({trackPos.x(), trackPos.y(), trackPos.z()});
255  }
256  track["label"] = writeEtaPhiLabel(eta, phi);
257  j["Tracks"]["TestTracks"].push_back(track);
258  }
259  }
260  m_eventData["Test"] = j;
261 }
262 
263 template <class TYPE>
266  const std::string &jsonType) {
267  for (SG::ReadHandle<TYPE> handle : keys.makeHandles()) {
268  ATH_MSG_VERBOSE("Trying to load " << handle.key());
269  ATH_CHECK(handle.isValid());
270  ATH_MSG_VERBOSE("Got back " << handle->size());
271 
272  for (auto object : *handle) {
273  nlohmann::json tmp = getData(*object);
274  event[jsonType][handle.key()].push_back(tmp);
275  }
276  }
277  return StatusCode::SUCCESS;
278 }
279 
280 // Specialisation for Jets
281 template <>
284  data["phi"] = jet.phi();
285  data["eta"] = jet.eta();
286  data["energy"] = jet.e();
287  return data;
288 }
289 
290 // Specialisation for CaloClusters
291 template <>
294  data["phi"] = clust.phi();
295  data["eta"] = clust.eta();
296  data["energy"] = clust.e();
297  // data["etaSize"] = clust.getClusterEtaSize(); // empty
298  // data["phiSize"] = clust.getClusterPhiSize(); // empty
299  return data;
300 }
301 
302 // Specialisation for CaloCells
303 template <>
306  data["phi"] = cell.phi();
307  data["eta"] = cell.eta();
308  data["energy"] = cell.e();
309  // data["etaSize"] = clust.getClusterEtaSize(); // empty
310  // data["phiSize"] = clust.getClusterPhiSize(); // empty
311  return data;
312 }
313 
314 // Specialisation for TracksParticles
315 template <>
318  data["chi2"] = tp.chiSquared();
319  data["dof"] = tp.numberDoF();
320  data["dparams"] = {tp.d0(), tp.z0(), tp.phi0(), tp.theta(), tp.qOverP()};
321 
322  if (m_physlite) {
323  ATH_MSG_VERBOSE("Physlite mode enabled. Not adding track parameters.");
324  return data;
325  }
326 
327  if (m_extrapolator.empty()) {
328  data["pos"] = {tp.perigeeParameters().position().x(),
329  tp.perigeeParameters().position().y(),
330  tp.perigeeParameters().position().z()};
331  for (unsigned int i = 0; i < tp.numberOfParameters(); ++i) {
332  data["pos"].push_back(tp.parameterX(i));
333  data["pos"].push_back(tp.parameterY(i));
334  data["pos"].push_back(tp.parameterZ(i));
335  }
336  } else {
337  std::vector<Amg::Vector3D> positions;
338  const Trk::Perigee &peri = tp.perigeeParameters();
339  positions.push_back(Amg::Vector3D(peri.position().x(), peri.position().y(),
340  peri.position().z()));
341 
342  Trk::CurvilinearParameters startParameters(peri.position(), peri.momentum(),
343  peri.charge());
348  Trk::ExtrapolationCode eCode = m_extrapolator->extrapolate(ecc);
349  if (eCode.isSuccess()) {
350  // loop over the collected information
351  for (auto &es : ecc.extrapolationSteps) {
352 
353  // continue if we have parameters
354  const Trk::TrackParameters *parameters = es.parameters;
355  if (parameters) {
356  Amg::Vector3D pos = parameters->position();
357  positions.push_back(pos);
358  delete parameters;
359  }
360  }
361  positions.push_back(ecc.endParameters->position());
362 
363  // Now add the positions to the output
364  for (auto pos : positions) {
365  data["pos"].push_back(pos.x());
366  data["pos"].push_back(pos.y());
367  data["pos"].push_back(pos.z());
368  }
369 
370  } else {
372  "Failure in extrapolation for Track with start parameters "
373  << startParameters);
374  }
375  }
376 
377  return data;
378 }
379 
380 // Specialisation for Tracks
381 template <>
384  const Trk::FitQuality *quality = track.fitQuality();
385 
386  data["chi2"] = (quality ? quality->chiSquared() : 0.0);
387  data["dof"] = (quality ? quality->doubleNumberDoF() : 0.0);
388 
389  const Trk::Perigee *peri = track.perigeeParameters();
390  if (peri) {
391  data["dparams"] = {peri->parameters()[Trk::d0], peri->parameters()[Trk::z0],
392  peri->parameters()[Trk::phi0],
393  peri->parameters()[Trk::theta],
394  peri->parameters()[Trk::qOverP]};
395 
396  } else {
397  data["pos"] = {};
398  }
399 
401  track.trackParameters();
402  if (parameters) {
403  for (const Trk::TrackParameters *param : *parameters) {
404  data["pos"].push_back(param->position().x());
405  data["pos"].push_back(param->position().y());
406  data["pos"].push_back(param->position().z());
407  }
408  } else {
409  const DataVector<const Trk::MeasurementBase> *measurements =
410  track.measurementsOnTrack();
411  if (measurements) {
412  for (const Trk::MeasurementBase *meas : *measurements) {
413  data["pos"].push_back(meas->globalPosition().x());
414  data["pos"].push_back(meas->globalPosition().y());
415  data["pos"].push_back(meas->globalPosition().z());
416  }
417  }
418  }
419 
420  return data;
421 }
422 
423 // Specialisation for Muons
424 template <>
427  data["Phi"] = muon.phi();
428  data["Eta"] = muon.eta();
429 
430  std::vector<std::string> quality = {"Tight", "Medium", "Loose", "VeryLoose"};
431  data["Quality"] = quality[static_cast<unsigned int>(muon.quality())];
432  std::vector<std::string> type = {"Combined", "Standalone", "SegmentTagged",
433  "CaloTagged", "SiAssociatedForward"};
434  data["Type"] = type[static_cast<unsigned int>(muon.muonType())];
435 
436  addLink(muon.clusterLink(), data["LinkedClusters"]);
437  addLink(muon.inDetTrackParticleLink(), data["LinkedTracks"]);
438  addLink(muon.muonSpectrometerTrackParticleLink(), data["LinkedTracks"]);
439  addLink(muon.extrapolatedMuonSpectrometerTrackParticleLink(),
440  data["LinkedTracks"]);
441 
442  return data;
443 }
444 
445 // Specialisation for Tau Jets
446 template <>
449  data["phi"] = tauJet.phi();
450  data["eta"] = tauJet.eta();
451  data["energy"] = tauJet.e();
452  return data;
453 }
454 
455 // Specialisation for Electrons
456 template <>
459  data["phi"] = electron.phi();
460  data["eta"] = electron.eta();
461  data["energy"] = electron.e();
462  addLink(electron.caloClusterLink(), data["LinkedClusters"]);
463  addLink(electron.trackParticleLink(), data["LinkedTracks"]);
464 
465  return data;
466 }
467 
468 // Specialisation for Photons
469 template <>
472  data["phi"] = photon.phi();
473  data["eta"] = photon.eta();
474  data["energy"] = photon.e();
475  addLink(photon.caloClusterLink(), data["LinkedClusters"]);
476 
477  return data;
478 }
479 
480 template <class TYPE>
482  if (link.isValid()) {
483  data.push_back(link.dataID() + ":" + std::to_string(link.index()));
484  }
485 }
486 
488  std::ofstream outputFile(m_outputJSON_Name);
489  if (!outputFile.is_open()) {
490  ATH_MSG_WARNING("Unable to open " << m_outputJSON_Name << " for writing.");
491  return StatusCode::FAILURE;
492  }
494  return StatusCode::SUCCESS;
495 }
496 
497 template <class TYPE>
500  const std::string &jsonType) {
501  if (key.empty()) {
502  return StatusCode::SUCCESS;
503  }
504  SG::ReadHandle<TYPE> handle(key);
505 
506  ATH_MSG_VERBOSE("Trying to load " << handle.key());
507  ATH_CHECK(handle.isValid());
508  ATH_MSG_VERBOSE("Which has " << handle->numberOfCollections()
509  << " collections: ");
510 
511  nlohmann::json tmp = getData(*handle);
512  if (!tmp.is_null()) {
513  ATH_MSG_VERBOSE("Writing " << jsonType << " : " << handle.key() << " with"
514  << tmp.size() << " elements:");
515  event[jsonType][handle.key()] = tmp;
516  }
517  return StatusCode::SUCCESS;
518 }
519 
520 // Generic PRD
521 template <class TYPE>
523 
524  nlohmann::json colldata = {};
525  for (const auto &coll : container) {
526  for (const auto &prd : *coll) {
528  data["pos"] = {prd->globalPosition().x(), prd->globalPosition().y(),
529  prd->globalPosition().z()};
530  Identifier id = prd->identify();
531  data["id"] = id.get_compact();
532  colldata.push_back(data);
533  }
534  }
535 
536  return colldata;
537 }
xAOD::CaloCluster_v1::phi
virtual double phi() const
The azimuthal angle ( ) of the particle.
Definition: CaloCluster_v1.cxx:256
DumpEventDataToJsonAlg.h
DumpEventDataToJsonAlg::initialize
virtual StatusCode initialize() override
inherited from Algorithm
Definition: DumpEventDataToJsonAlg.cxx:34
Trk::ExtrapolationMode::CollectPassive
@ CollectPassive
Definition: ExtrapolationCell.h:57
xAOD::muon
@ muon
Definition: TrackingPrimitives.h:196
data
char data[hepevt_bytes_allocation_ATLAS]
Definition: HepEvt.cxx:11
DumpEventDataToJsonAlg::m_geometryContextKey
SG::ReadHandleKey< ActsGeometryContext > m_geometryContextKey
Definition: DumpEventDataToJsonAlg.h:117
ActsTrk::TrackContainer
Definition: TrackContainer.h:30
Trk::ExtrapolationCell::extrapolationSteps
std::vector< ExtrapolationStep< T > > extrapolationSteps
parameters on sensitive detector elements
Definition: ExtrapolationCell.h:292
TrackStateAuxContainer.h
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::EventInfo_v1::eventNumber
uint64_t eventNumber() const
The current event's event number.
Trk::Track
The ATLAS Track class.
Definition: Tracking/TrkEvent/TrkTrack/TrkTrack/Track.h:73
xAOD::TauJet_v3::eta
virtual double eta() const
The pseudorapidity ( ) of the particle.
json
nlohmann::json json
Definition: HistogramDef.cxx:9
ActsGeometryContext.h
DumpEventDataToJsonAlg::m_extrapolator
ToolHandle< Trk::IExtrapolationEngine > m_extrapolator
Definition: DumpEventDataToJsonAlg.h:115
Trk::ExtrapolationCell::addConfigurationMode
void addConfigurationMode(ExtrapolationMode::eMode em)
add a configuration mode
Definition: ExtrapolationCell.h:345
eta
Scalar eta() const
pseudorapidity method
Definition: AmgMatrixBasePlugin.h:83
Trk::ParametersBase::position
const Amg::Vector3D & position() const
Access method for the position.
SG::ReadHandle
Definition: StoreGate/StoreGate/ReadHandle.h:67
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:110
theta
Scalar theta() const
theta method
Definition: AmgMatrixBasePlugin.h:75
DumpEventDataToJsonAlg::m_trackCollectionKeys
SG::ReadHandleKeyArray< TrackCollection > m_trackCollectionKeys
Definition: DumpEventDataToJsonAlg.h:100
DumpEventDataToJsonAlg::m_pixelPrepRawDataKey
SG::ReadHandleKey< InDet::PixelClusterContainer > m_pixelPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:111
DumpEventDataToJsonAlg::getAndFillArrayOfContainers
StatusCode getAndFillArrayOfContainers(nlohmann::json &event, const SG::ReadHandleKeyArray< TYPE > &keys, const std::string &jsonType)
Definition: DumpEventDataToJsonAlg.cxx:264
DumpEventDataToJsonAlg::m_rpcPrepRawDataKey
SG::ReadHandleKey< Muon::RpcPrepDataContainer > m_rpcPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:107
M_PI
#define M_PI
Definition: ActiveFraction.h:11
TrackParametersContainer.h
DumpEventDataToJsonAlg::m_trtPrepRawDataKey
SG::ReadHandleKey< InDet::TRT_DriftCircleContainer > m_trtPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:113
ParticleTest.tp
tp
Definition: ParticleTest.py:25
xAOD::pion
@ pion
Definition: TrackingPrimitives.h:197
Trk::z0
@ z0
Definition: ParamDefs.h:64
SG::HandleKeyArray
Definition: StoreGate/StoreGate/HandleKeyArray.h:38
ATH_MSG_VERBOSE
#define ATH_MSG_VERBOSE(x)
Definition: AthMsgStreamMacros.h:28
SG::ReadHandleKey
Property holding a SG store/key/clid from which a ReadHandle is made.
Definition: StoreGate/StoreGate/ReadHandleKey.h:39
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:204
xAOD::TauJet_v3::e
virtual double e() const
The total energy of the particle.
Definition: TauJet_v3.cxx:87
DumpEventDataToJsonAlg::finalize
virtual StatusCode finalize() override
Definition: DumpEventDataToJsonAlg.cxx:487
DumpEventDataToJsonAlg::m_eventInfoKey
SG::ReadHandleKey< xAOD::EventInfo > m_eventInfoKey
Definition: DumpEventDataToJsonAlg.h:82
TrigVSI::AlgConsts::nPhi
constexpr int nPhi
Default bin number of phi for vertex map.
Definition: Trigger/TrigTools/TrigVrtSecInclusive/TrigVrtSecInclusive/Constants.h:27
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
xAOD::Muon_v1
Class describing a Muon.
Definition: Muon_v1.h:38
xAOD::EventInfo_v1::runNumber
uint32_t runNumber() const
The current event's run number.
DumpEventDataToJsonAlg::m_trackContainerKeys
SG::ReadHandleKeyArray< ActsTrk::TrackContainer > m_trackContainerKeys
Definition: DumpEventDataToJsonAlg.h:103
XMLtoHeader.count
count
Definition: XMLtoHeader.py:84
drawFromPickle.atan
atan
Definition: drawFromPickle.py:36
DeMoUpdate.reverse
reverse
Definition: DeMoUpdate.py:563
DumpEventDataToJsonAlg::m_tgcPrepRawDataKey
SG::ReadHandleKey< Muon::TgcPrepDataContainer > m_tgcPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:108
ActsGeometryContext::context
Acts::GeometryContext context() const
Definition: ActsGeometryContext.h:45
compareGeometries.outputFile
string outputFile
Definition: compareGeometries.py:25
TrackStateContainer.h
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:109
DumpEventDataToJsonAlg::m_tauJetKeys
SG::ReadHandleKeyArray< xAOD::TauJetContainer > m_tauJetKeys
Definition: DumpEventDataToJsonAlg.h:90
xAOD::CaloCluster_v1
Description of a calorimeter cluster.
Definition: CaloCluster_v1.h:62
jet
Definition: JetCalibTools_PlotJESFactors.cxx:23
DumpEventDataToJsonAlg::m_dumpTestEvent
Gaudi::Property< bool > m_dumpTestEvent
Definition: DumpEventDataToJsonAlg.h:122
event
POOL::TEvent event(POOL::TEvent::kClassAccess)
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:86
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
xAOD::TauJet_v3
Class describing a tau jet.
Definition: TauJet_v3.h:41
Trk::ExtrapolationCode
Definition: ExtrapolationCell.h:105
add-xsec-uncert-quadrature-N.label
label
Definition: add-xsec-uncert-quadrature-N.py:104
Trk::ExtrapolationCell::endParameters
T * endParameters
by pointer - are newly created and can be optionally 0
Definition: ExtrapolationCell.h:238
DumpEventDataToJsonAlg::m_outputJSON_Name
Gaudi::Property< std::string > m_outputJSON_Name
Definition: DumpEventDataToJsonAlg.h:120
DumpEventDataToJsonAlg::m_sctPrepRawDataKey
SG::ReadHandleKey< InDet::SCT_ClusterContainer > m_sctPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:112
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
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:106
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
DumpEventDataToJsonAlg::m_eventData
nlohmann::json m_eventData
Definition: DumpEventDataToJsonAlg.h:125
DataVector
Derived DataVector<T>.
Definition: DataVector.h:794
AthAlgorithm
Definition: AthAlgorithm.h:47
SG::ReadHandle::isValid
virtual bool isValid() override final
Can the handle be successfully dereferenced?
TrackJacobianContainer.h
Trk::MeasurementBase
Definition: MeasurementBase.h:58
TYPE
#define TYPE(CODE, TYP, IOTYP)
DumpEventDataToJsonAlg::getAndFillContainer
StatusCode getAndFillContainer(nlohmann::json &event, const SG::ReadHandleKey< TYPE > &key, const std::string &jsonType)
Definition: DumpEventDataToJsonAlg.cxx:498
DumpEventDataToJsonAlg::execute
virtual StatusCode execute() override
Definition: DumpEventDataToJsonAlg.cxx:136
DumpEventDataToJsonAlg::getActsData
nlohmann::json getActsData(const typename ActsTrk::TrackContainer::ConstTrackProxy &track, const Acts::GeometryContext &gctx)
Definition: DumpEventDataToJsonAlg.cxx:80
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:240
DumpEventDataToJsonAlg::addLink
void addLink(const TYPE &link, nlohmann::json &data)
Definition: DumpEventDataToJsonAlg.cxx:481
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:96
DumpEventDataToJsonAlg::getData
nlohmann::json getData(const TYPE &object)
Definition: DumpEventDataToJsonAlg.cxx:522
DumpEventDataToJsonAlg::m_cscPrepRawDataKey
SG::ReadHandleKey< Muon::CscPrepDataContainer > m_cscPrepRawDataKey
Definition: DumpEventDataToJsonAlg.h:105
DumpEventDataToJsonAlg::m_physlite
Gaudi::Property< bool > m_physlite
Definition: DumpEventDataToJsonAlg.h:123
DumpEventDataToJsonAlg::DumpEventDataToJsonAlg
DumpEventDataToJsonAlg(const std::string &name, ISvcLocator *pService)
Algorithm constructor.
Definition: DumpEventDataToJsonAlg.cxx:30
Amg::Vector3D
Eigen::Matrix< double, 3, 1 > Vector3D
Definition: GeoPrimitives.h:47
SG::VarHandleBase::key
virtual const std::string & key() const override final
Return the StoreGate ID for the referenced object.
Definition: AthToolSupport/AsgDataHandles/Root/VarHandleBase.cxx:64
xAOD::Electron_v1
Definition: Electron_v1.h:34
TrackMeasurementAuxContainer.h
DumpEventDataToJsonAlg::m_electronKeys
SG::ReadHandleKeyArray< xAOD::ElectronContainer > m_electronKeys
Definition: DumpEventDataToJsonAlg.h:92
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:16
MultiTrajectory.h
xAOD::Jet_v1
Class describing a jet.
Definition: Jet_v1.h:57
DumpEventDataToJsonAlg::m_photonKeys
SG::ReadHandleKeyArray< xAOD::PhotonContainer > m_photonKeys
Definition: DumpEventDataToJsonAlg.h:94
Trk::ExtrapolationCell
Definition: ExtrapolationCell.h:231
xAOD::photon
@ photon
Definition: TrackingPrimitives.h:200
CaloCell
Data object for each calorimeter readout cell.
Definition: CaloCell.h:57
xAOD::Photon_v1
Definition: Photon_v1.h:37
ATH_MSG_WARNING
#define ATH_MSG_WARNING(x)
Definition: AthMsgStreamMacros.h:32
GeoPrimitivesHelpers.h
python.TrackLeptonConfig.quality
quality
Definition: TrackLeptonConfig.py:16
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:98
physics_parameters.parameters
parameters
Definition: physics_parameters.py:144
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:801
xAOD::track
@ track
Definition: TrackingPrimitives.h:513
xAOD::TrackParticle_v1
Class describing a TrackParticle.
Definition: TrackParticle_v1.h:43
PowhegControl_ttFCNC_NLO.params
params
Definition: PowhegControl_ttFCNC_NLO.py:226
TrackJacobianAuxContainer.h
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
TrackParametersAuxContainer.h
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:84
TrackMeasurementContainer.h
mapkey::key
key
Definition: TElectronEfficiencyCorrectionTool.cxx:37
DumpEventDataToJsonAlg::m_muonKeys
SG::ReadHandleKeyArray< xAOD::MuonContainer > m_muonKeys
Definition: DumpEventDataToJsonAlg.h:88
Identifier
Definition: IdentifierFieldParser.cxx:14