9 #include <tracking/svdROIFinder/ROIStripTranslator.h>
10 #include <framework/logging/Logger.h>
11 #include <vxd/geometry/GeoCache.h>
12 #include <vxd/geometry/SensorInfoBase.h>
17 double user_numSigmaTotV,
double user_maxWidthU,
double user_maxWidthV)
18 : m_sigmaSystU(user_sigmaSystU)
19 , m_sigmaSystV(user_sigmaSystV)
20 , m_numSigmaTotU(user_numSigmaTotU)
21 , m_numSigmaTotV(user_numSigmaTotV)
22 , m_maxWidthU(user_maxWidthU)
23 , m_maxWidthV(user_maxWidthV)
28 : m_sigmaSystU(theROIinfo->sigmaSystU)
29 , m_sigmaSystV(theROIinfo->sigmaSystV)
30 , m_numSigmaTotU(theROIinfo->numSigmaTotU)
31 , m_numSigmaTotV(theROIinfo->numSigmaTotV)
32 , m_maxWidthU(theROIinfo->maxWidthU)
33 , m_maxWidthV(theROIinfo->maxWidthV)
48 for (
int i = 0; i < listOfIntercepts->
getEntries(); i++) {
50 B2DEBUG(20,
" --->> a NEW INTERCEPT!");
60 double minU = (*listOfIntercepts)[i]->getCoorU() - widthTotU / 2 ;
61 double maxU = (*listOfIntercepts)[i]->getCoorU() + widthTotU / 2 ;
62 const int nStripsU = aSensorInfo.
getUCells() - 1;
64 double minV = (*listOfIntercepts)[i]->getCoorV() - widthTotV / 2;
65 double maxV = (*listOfIntercepts)[i]->getCoorV() + widthTotV / 2;
66 const int nStripsV = aSensorInfo.
getVCells() - 1;
68 const int firstStripID = 0;
70 double min_uID = aSensorInfo.
getUCellID(minU, minV,
false);
71 double min_vID = aSensorInfo.
getVCellID(minV,
false);
72 double max_uID = aSensorInfo.
getUCellID(maxU, maxV,
false);
73 double max_vID = aSensorInfo.
getVCellID(maxV,
false);
75 B2DEBUG(20,
" LAYER = " <<
VxdID((*listOfIntercepts)[i]->getSensorID()).getLayerNumber()
76 <<
" LADDER = " <<
VxdID((*listOfIntercepts)[i]->getSensorID()).getLadderNumber()
77 <<
" SENSOR = " <<
VxdID((*listOfIntercepts)[i]->getSensorID()).getSensorNumber()
80 B2DEBUG(20,
" nStrips (U,V) = (" << nStripsU <<
"," << nStripsV <<
")");
82 B2DEBUG(20,
" widthU = " << maxU - minU
85 <<
" lengthU = " << aSensorInfo.
getUSize((*listOfIntercepts)[i]->getCoorV())
88 B2DEBUG(20,
" widthV = " << maxV - minV
91 <<
" lengthV = " << aSensorInfo.
getVSize());
93 B2DEBUG(20,
" U strips in (" << min_uID <<
"," << max_uID <<
")");
94 B2DEBUG(20,
" V strips in (" << min_vID <<
"," << max_vID <<
")");
99 if (min_uID > nStripsU || max_uID < firstStripID || min_vID > nStripsV || max_vID < firstStripID) {
100 B2DEBUG(5,
" OOOPS: this pixel does NOT belong to the sensor");
111 tmpROIid.
setSensorID((*listOfIntercepts)[i]->getSensorID()) ;
double m_maxWidthV
ROI maximum width allowed in the V direction.
double m_maxWidthU
ROI maximum width allowed in the U direction.
~ROIStripTranslator()
Destructor.
ROIStripTranslator(const ROIinfo *theROIinfo)
Constructor.
double m_sigmaSystV
systematic error along the V coordinate
double m_numSigmaTotV
number of standard deviations to be taken to define a ROI along V
double m_sigmaSystU
systematic error along the U coordinate
void fillRoiIDList(StoreArray< SVDIntercept > *listOfIntercepts, StoreArray< ROIid > *ROIidList)
Append the ROIid to the list listToBeFilled.
double m_numSigmaTotU
number of standard deviations to be taken to define a ROI along U
ROIid stores the U and V ids and the sensor id of the Region Of Interest.
void setMaxUid(double user_maxUid)
set the maximum U id of the ROI
void setMinUid(double user_minUid)
set the minimum U id of the ROI
void setMaxVid(double user_maxVid)
set the maximum V id of the ROI
void setSensorID(VxdID::baseType user_sensorID)
set the sensor ID of the ROI
void setMinVid(double user_minVid)
set the minimum V id of the ROI
void addRelationTo(const RelationsInterface< BASE > *object, float weight=1.0, const std::string &namedRelation="") const
Add a relation from this object to another object (with caching).
Accessor to arrays stored in the data store.
T * appendNew()
Construct a new T object at the end of the array.
int getEntries() const
Get the number of objects in the array.
Class to faciliate easy access to sensor information of the VXD like coordinate transformations or pi...
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
static GeoCache & getInstance()
Return a reference to the singleton instance.
Base class to provide Sensor Information for PXD and SVD.
double getVSize() const
Return the length of the sensor.
int getVCells() const
Return number of pixel/strips in v direction.
int getUCells() const
Return number of pixel/strips in u direction.
double getUSize(double v=0) const
Return the width of the sensor.
int getVCellID(double v, bool clamp=false) const
Return the corresponding pixel/strip ID of a given v coordinate.
int getUCellID(double u, double v=0, bool clamp=false) const
Return the corresponding pixel/strip ID of a given u coordinate.
Class to uniquely identify a any structure of the PXD and SVD.
double sqrt(double a)
sqrt for double
Abstract base class for different kinds of events.
ROIinfo contains the parameters that can be changed by the user in the python script.