LDMX Software
TrackingGeometryUser.h
1#pragma once
2
3#include <memory>
4#include <string>
5
6#include "Acts/Geometry/GeometryContext.hpp"
7#include "Acts/MagneticField/MagneticFieldContext.hpp"
8#include "Acts/MagneticField/MagneticFieldProvider.hpp"
9#include "Acts/Utilities/CalibrationContext.hpp"
10#include "Framework/Configure/Parameters.h"
12#include "Tracking/Sim/BFieldXYZUtils.h"
13#include "Tracking/geo/TrackersTrackingGeometry.h"
14
15namespace tracking::reco {
22 public:
23 TrackingGeometryUser(const std::string& name, framework::Process& p);
24
25 protected:
26 const Acts::GeometryContext& geometryContext();
27 const Acts::MagneticFieldContext& magneticFieldContext();
28 const Acts::CalibrationContext& calibrationContext();
29 const geo::TrackersTrackingGeometry& geometry();
30
42 void loadBField(const std::string& path,
43 const BFieldDistortion& distortion = {});
44
46 void loadBField(const BFieldDistortion& distortion = {});
47
63 const framework::config::Parameters& parameters);
64
66 std::shared_ptr<Acts::MagneticFieldProvider> bField() const {
67 return b_field_;
68 }
69
70 private:
71 std::shared_ptr<Acts::MagneticFieldProvider> b_field_{nullptr};
72
82 template <typename ConditionType>
83 const ConditionType& getNamedCondition() {
84 return getCondition<ConditionType>(ConditionType::NAME);
85 }
86};
87
88} // namespace tracking::reco
Base classes for all user event processing components to extend.
const T & getCondition(const std::string &condition_name)
Access a conditions object for the current event.
Class which represents the process under execution.
Definition Process.h:34
Base class for a module which produces a data product.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:26
a helper base class providing some methods to shorten access to common conditions used within the tra...
static BFieldDistortion bFieldDistortion(const framework::config::Parameters &parameters)
Build a BFieldDistortion from processor configuration.
const ConditionType & getNamedCondition()
Templated condition access code for our conditions with static names.
void loadBField(const std::string &path, const BFieldDistortion &distortion={})
Load the interpolated B-field map from path and cache it.
std::shared_ptr< Acts::MagneticFieldProvider > bField() const
Return the loaded B-field provider.
A deliberate mis-placement of the reconstruction magnetic field, used to quantify how well we need to...