Belle II Software development
SVDCrossTalkStripsCalibrations.cc
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#include <svd/calibration/SVDCrossTalkStripsCalibrations.h>
9#include <vxd/geometry/GeoCache.h>
10#include <vxd/geometry/SensorInfoBase.h>
11
12
13std::string Belle2::SVDCrossTalkStripsCalibrations::name = std::string("SVDCrossTalkStripsCalibrations");
14
15
16bool Belle2::SVDCrossTalkStripsCalibrations::isInCrossTalkRegion(const VxdID& sensorID, const bool& isU, const float& clsPosition)
17{
18 const VXD::SensorInfoBase* currentSensorInfo = dynamic_cast<const VXD::SensorInfoBase*>(&VXD::GeoCache::getInstance().getSensorInfo(
19 sensorID));
21 float m_uPitch = currentSensorInfo->getUPitch(0);
23 float m_vPitch = currentSensorInfo->getVPitch(0);
25 float currentPitch;
26 if (isU) currentPitch = m_uPitch;
27 else currentPitch = m_vPitch;
28
29 return isCrossTalkStrip(sensorID, isU, (int)(clsPosition / currentPitch + 0.5));
30}
31
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 ...
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...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:67
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:214
Base class to provide Sensor Information for PXD and SVD.
double getUPitch(double v=0) const
Return the pitch of the sensor.
double getVPitch(double v=0) const
Return the pitch of the sensor.
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:33