 |
Belle II Software
release-05-01-25
|
16 #include <Geant4/G4Transform3D.hh>
17 #include <root/TMatrixD.h>
18 #include <genfit/StateOnPlane.h>
19 #include <root/TGeoMatrix.h>
22 #include <framework/logging/Logger.h>
24 #include <mdst/dbobjects/BeamSpot.h>
25 #include <alignment/dbobjects/VXDAlignment.h>
26 #include <alignment/dbobjects/CDCCalibration.h>
27 #include <klm/dbobjects/bklm/BKLMAlignment.h>
28 #include <klm/dbobjects/eklm/EKLMAlignment.h>
29 #include <klm/dbobjects/eklm/EKLMSegmentAlignment.h>
31 #include <cdc/dbobjects/CDCTimeZeros.h>
32 #include <cdc/dbobjects/CDCTimeWalks.h>
33 #include <cdc/dbobjects/CDCAlignment.h>
34 #include <cdc/dbobjects/CDCXtRelations.h>
36 #include <alignment/GlobalParam.h>
37 #include <alignment/GlobalTimeLine.h>
38 #include <alignment/Hierarchy.h>
52 class GlobalCalibrationManager {
59 std::function<bool(
const EventMetaData&,
const EventMetaData&)>
cmpEventMetaData = [](
const EventMetaData& lhs,
61 if (lhs.getExperiment() < rhs.getExperiment())
return true;
62 if (lhs.getExperiment() > rhs.getExperiment())
return false;
64 if (lhs.getRun() < rhs.getRun())
return true;
65 if (lhs.getRun() > rhs.getRun())
return false;
67 if (lhs.getEvent() < rhs.getEvent())
return true;
100 void initialize(
const std::vector<std::string>& components = {},
const std::vector<EventMetaData>& timeSlices = {});
135 std::unique_ptr<RigidBodyHierarchy>
m_alignment {
new RigidBodyHierarchy()};
137 std::unique_ptr<LorentShiftHierarchy>
m_lorentzShift {
new LorentShiftHierarchy()};
139 std::unique_ptr<GlobalParamVector>
m_globalVector {
new GlobalParamVector()};
void initialize(const std::vector< std::string > &components={}, const std::vector< EventMetaData > &timeSlices={})
Initialize the manager with given configuration (from MillepedeCollector)
int updateTimeDepGlobalLabels(const EventMetaData &event)
Update the current time ID in the GlobalLabel.
void sortUniqueVector(std::vector< EventMetaData > &vec)
Sort vector of EventMetaData and make it unique to process user defined time splittings of the consta...
void preCollect(const EventMetaData &emd)
Notice manager of a comming event (from MillepedeCollector)
Constraints & getConstraints()
Get the constraints collected so far.
bool m_initialized
Finished initialization?
RigidBodyHierarchy & getAlignmentHierarchy() const
Get the rigid body alignment hierarchy.
GlobalCalibrationManager()
Singleton class, hidden constructor.
std::vector< EventMetaData > m_dbTimeSlicing
Vector of EventMetaData containing the time slicing of the calibration job.
The central user class to manipulate any global constant in any DB object Used to retrieve global par...
~GlobalCalibrationManager()
Destructor.
std::function< bool(const EventMetaData &, const EventMetaData &)> cmpEventMetaData
Comparison function for EventMetaData.
std::unique_ptr< LorentShiftHierarchy > m_lorentzShift
Hierarchy for Lorentz shift corrections.
std::unique_ptr< RigidBodyHierarchy > m_alignment
The alignment hierarchy.
Abstract base class for different kinds of events.
std::map< long, Constraint > m_constraints
Map of constraints {unique label, labels and coefficients}.
Class to hold hierarchy of whole Belle2.
GlobalCalibrationManager & operator=(const GlobalCalibrationManager &)
Singleton class, hidden assignment operator.
void writeConstraints(std::string txtFilename)
Write-out complete hierarchy to a text file.
static GlobalCalibrationManager & getInstance()
Get instance of the Manager auto& gcm = GlobalCalibrationManager::getInstance();.
LorentShiftHierarchy & getLorentzShiftHierarchy() const
Get the Lorentz shift hierarchy.
std::unique_ptr< GlobalParamVector > m_globalVector
The global vector for unified access to DB constants.
alignment::timeline::TimeTable m_iniTimeTable
The initial time table generated from time intervals in GlobalLabel used to check if payload (labels)...
static void initGlobalVector(GlobalParamVector &vector)
Initialize a given GlobalParamVector with all DB objects and interfaces.