Belle II Software  release-08-01-10
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 
13 std::string Belle2::SVDCrossTalkStripsCalibrations::name = std::string("SVDCrossTalkStripsCalibrations");
14 
15 
16 bool 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::get(
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...
static const SensorInfoBase & get(Belle2::VxdID id)
Return a reference to the SensorInfo of a given SensorID.
Definition: GeoCache.h:139
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