Belle II Software development
SVDCrossTalkStripsCalibrations.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/SVDCalibrationsBitmap.h>
14#include <framework/database/DBObjPtr.h>
15
16
17#include <string>
18
19//#include <framework/logging/Logger.h>
20
21
22namespace Belle2 {
33 public:
34 static std::string name;
40 {
41 m_aDBObjPtr.addCallback([ this ](const std::string&) -> void {
42 B2DEBUG(20, "SVDCrossTalkStripsCalibrations: from now on we are using " <<
43 this->m_aDBObjPtr -> get_uniqueID()); });
44 }
45
46
58 inline bool isCrossTalkStrip(const VxdID& sensorID, const bool& isU, const unsigned short& strip) const
59 {
60 return m_aDBObjPtr->get(sensorID.getLayerNumber(), sensorID.getLadderNumber(),
61 sensorID.getSensorNumber(), m_aDBObjPtr->sideIndex(isU),
62 strip);
63 }
64
77 bool isInCrossTalkRegion(const VxdID& sensorID, const bool& isU, const float& clsPosition);
78
80 TString getUniqueID() { return m_aDBObjPtr->get_uniqueID(); }
81
83 bool isValid() { return m_aDBObjPtr.isValid(); }
84
85 private:
88 };
90}
Class for accessing objects in the database.
Definition: DBObjPtr.h:21
base class for calibrations classes
This class defines the dbobject and the method to access strips which are masked at FADC level.
bool isInCrossTalkRegion(const VxdID &sensorID, const bool &isU, const float &clsPosition)
This is the method for checking if a given region is affected by Cross Talk, according to the bitmap ...
SVDCrossTalkStripsCalibrations()
Constructor, no input argument is required.
SVDCalibrationsBase< SVDCalibrationsBitmap > t_payload
typedef of the SVDCrossTalkStripsCalibrations payload for all SVD strips
static std::string name
name of the SVDCrossTalkStripsCalibrations payload
bool isCrossTalkStrip(const VxdID &sensorID, const bool &isU, const unsigned short &strip) const
This is the method for getting the comprehensive list of strips flagged as "cross talk" by the SVDCro...
TString getUniqueID()
returns the unique ID of the payload
DBObjPtr< t_payload > m_aDBObjPtr
SVDCrossTalkStripsCalibrations payload.
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.