LDMX Software
TrackingGeometryUser.h
1#pragma once
2
3#include <memory>
4#include <string>
5#include <vector>
6
7#include "Acts/MagneticField/MagneticFieldProvider.hpp"
8#include "Framework/Configure/Parameters.h"
10#include "Tracking/Sim/BFieldXYZUtils.h"
11#include "Tracking/geo/CalibrationContext.h"
12#include "Tracking/geo/GeometryContext.h"
13#include "Tracking/geo/MagneticFieldContext.h"
14#include "Tracking/geo/TrackersTrackingGeometry.h"
15
16namespace tracking::reco {
23 public:
24 TrackingGeometryUser(const std::string& name, framework::Process& p);
25
26 protected:
27 const Acts::GeometryContext& geometryContext();
28 const Acts::MagneticFieldContext& magneticFieldContext();
29 const Acts::CalibrationContext& calibrationContext();
30 const geo::TrackersTrackingGeometry& geometry();
31
43 void loadBField(const std::string& path,
44 const BFieldDistortion& distortion = {});
45
47 void loadBField(const BFieldDistortion& distortion = {});
48
64 const framework::config::Parameters& parameters);
65
67 std::shared_ptr<Acts::MagneticFieldProvider> bField() const {
68 return b_field_;
69 }
70
71 private:
72 std::shared_ptr<Acts::MagneticFieldProvider> b_field_{nullptr};
73
83 template <typename ConditionType>
84 const ConditionType& getNamedCondition() {
85 return getCondition<ConditionType>(ConditionType::NAME);
86 }
87};
88
89} // 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:37
Base class for a module which produces a data product.
Class encapsulating parameters for configuring a processor.
Definition Parameters.h:29
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...