Belle II Software development
SVDOldDefaultErrorScaleFactors.h
1/**************************************************************************
2 * basf2 (Belle II Analysis Software Framework) *
3 * Author: The Belle II Collaboration *
4 * *
5 * See git log for contributors and copyright holders. *
6 * This file is licensed under LGPL-3.0, see LICENSE.md. *
7 **************************************************************************/
8
9#pragma once
10
11#include <vxd/dataobjects/VxdID.h>
12#include <svd/dbobjects/SVDCalibrationsBase.h>
13#include <svd/dbobjects/SVDCalibrationsScalar.h>
14#include <svd/dbobjects/SVDPosErrScaleFactors.h>
15#include <framework/database/DBObjPtr.h>
16#include <framework/logging/Logger.h>
17#include <string>
18
19namespace Belle2 {
30 public:
31 static std::string name;
38 {
39 m_aDBObjPtr.addCallback([ this ](const std::string&) -> void {
40 B2DEBUG(20, "SVDOldDefaultErrorScaleFactors: from now on we are using " <<
41 this->m_aDBObjPtr -> get_uniqueID()); });
42 }
54 const Belle2::VxdID& sensorID,
55 const bool& isU, const int& size,
56 const double& raw_error
57 ) const
58 {
59 return m_aDBObjPtr->getReference(sensorID.getLayerNumber(),
60 sensorID.getLadderNumber(),
61 sensorID.getSensorNumber(),
62 m_aDBObjPtr->sideIndex(isU),
63 0).getCorrectedValue(raw_error, size);
64
65 }
66
68 TString getUniqueID() { return m_aDBObjPtr->get_uniqueID(); }
69
71 bool isValid() { return m_aDBObjPtr.isValid(); }
72
73
74 private:
75
77 };
79}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
base class for calibrations classes
This class defines the dbobject and the methods to access the scaling factors for the OldDefault posi...
static std::string name
name of SVDPosErrScaleFactors payload
double getCorrectedClusterPositionError(const Belle2::VxdID &sensorID, const bool &isU, const int &size, const double &raw_error) const
Return the corrected cluster position error.
SVDCalibrationsBase< SVDCalibrationsScalar< SVDPosErrScaleFactors > > t_payload
typedef for the of SVDPosErrScaleFactors payload of all SVD sensors
TString getUniqueID()
returns the unique ID of the payload
DBObjPtr< t_payload > m_aDBObjPtr
SVDPosErrScaleFactors payload.
SVDOldDefaultErrorScaleFactors()
Constructor, no input argument is required.
bool isValid()
returns true if the m_aDBObtPtr is valid in the requested IoV
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33
baseType getSensorNumber() const
Get the sensor id.
Definition: VxdID.h:100
baseType getLadderNumber() const
Get the ladder id.
Definition: VxdID.h:98
baseType getLayerNumber() const
Get the layer id.
Definition: VxdID.h:96
Abstract base class for different kinds of events.