Belle II Software  release-05-02-19
SVDCluster.h
1 /**************************************************************************
2  * BASF2 (Belle Analysis Framework 2) *
3  * Copyright(C) 2010 - Belle II Collaboration *
4  * *
5  * Author: The Belle II Collaboration *
6  * Contributors: Martin Ritter *
7  * *
8  * This software is provided "as is" without any warranty. *
9  **************************************************************************/
10 
11 #ifndef SVDCLUSTER_H
12 #define SVDCLUSTER_H
13 
14 #include <framework/datastore/RelationsObject.h>
15 #include <vxd/dataobjects/VxdID.h>
16 #include <vxd/geometry/SensorInfoBase.h>
17 #include <vxd/geometry/GeoCache.h>
18 
19 #include <sstream>
20 
21 namespace Belle2 {
30  class SVDCluster: public RelationsObject {
31  public:
32 
46  SVDCluster(VxdID sensorID, bool isU, float position, float positionSigma,
47  double clsTime, double clsTimeSigma, float clsCharge, float seedCharge,
48  unsigned short clsSize, float clsSN, float clsChi2, int firstFrame = 0):
49  m_sensorID(sensorID), m_isU(isU),
50  m_position(position), m_positionSigma(positionSigma),
51  m_clsTime(clsTime), m_clsTimeSigma(clsTimeSigma), m_clsCharge(clsCharge),
52  m_seedCharge(seedCharge), m_clsSize(clsSize), m_clsSN(clsSN),
53  m_clsChi2(clsChi2), m_firstFrame(firstFrame)
54  {}
55 
57  SVDCluster(): SVDCluster(0, false, 0.0, 1.0, 0.0, 100.0, 0.0, 0.0, 0, 1.0,
58  100.0)
59  {}
60 
72  SVDCluster(VxdID sensorID, bool isU, float position, double clsTime,
73  double clsTimeSigma, float clsCharge, float seedCharge,
74  unsigned short clsSize):
75  SVDCluster(sensorID, isU, position, 1.0, clsTime, clsTimeSigma,
76  clsCharge, seedCharge, clsSize, 1.0, 100.0)
77  {}
78 
92  SVDCluster(VxdID sensorID, bool isU, float position, float positionSigma,
93  double clsTime, double clsTimeSigma, float clsCharge, float seedCharge,
94  unsigned short clsSize, float clsSN):
95  SVDCluster(sensorID, isU, position, positionSigma, clsTime, clsTimeSigma,
96  clsCharge, seedCharge, clsSize, clsSN, 100.0)
97  {}
98 
102  VxdID getSensorID() const { return m_sensorID; }
103 
105  unsigned short getRawSensorID() const { return m_sensorID; }
106 
110  bool isUCluster() const { return m_isU; }
111 
117  float getPosition(double v = 0) const
118  {
119  if (v == 0) return m_position;
120  else {
122  return (aSensorInfo->getWidth(v) / aSensorInfo->getWidth()) * m_position;
123  }
124  }
125 
129  float getPositionSigma() const { return m_positionSigma; }
130 
134  float getClsTime() const { return m_clsTime; }
135 
139  float getClsTimeSigma() const { return m_clsTimeSigma; }
140 
144  float getCharge() const { return m_clsCharge; }
145 
149  float getSeedCharge() const { return m_seedCharge; }
150 
154  unsigned short getSize() const { return m_clsSize; }
155 
159  float getSNR() const { return m_clsSN; }
160 
164  float getChi2() const { return m_clsChi2; }
165 
169  int getFirstFrame() const { return m_firstFrame; }
170 
174  double getQuality() const { return m_qualityIndicator; }
175 
179  double getQualityError() const { return m_qualityIndicatorError; }
180 
184  void setQualityIndicator(const double qualityIndicator)
185  {
186  m_qualityIndicator = qualityIndicator;
187  }
188 
192  void setQualityIndicatorError(double qualityIndicatorError)
193  {
194  m_qualityIndicatorError = qualityIndicatorError;
195  }
196 
197 
198 
200  std::string print() const
201  {
202  VxdID thisSensorID(m_sensorID);
203  std::ostringstream os;
204  os << "VXDID : " << m_sensorID << " = " << std::string(thisSensorID)
205  << " side: " << ((m_isU) ? "U" : "V") << " position: " << m_position
206  << " +/- " << m_positionSigma << " time: " << m_clsTime << " +/- "
207  << m_clsTimeSigma << " charge: " << m_clsCharge << " seed charge: "
208  << m_seedCharge << " size: " << m_clsSize << " S/N: " << m_clsSN
209  << " Fit Chi2: " << m_clsChi2 << " Signal Prob.: " << m_qualityIndicator
210  << " Signal Prob. Error " << m_qualityIndicatorError << std::endl;
211  return os.str();
212  }
213 
214  protected:
215  unsigned short m_sensorID;
216  bool m_isU;
217  float m_position;
218  float m_positionSigma;
219  double m_clsTime;
220  double m_clsTimeSigma;
221  float m_clsCharge;
222  float m_seedCharge;
223  unsigned short m_clsSize;
224  float m_clsSN;
225  float m_clsChi2;
227  double m_qualityIndicator = {0.};
228  double m_qualityIndicatorError = {0.};
231 
232  };
233 
234 
236 } //Belle2 namespace
237 #endif
Belle2::SVDCluster::getCharge
float getCharge() const
Get collected charge.
Definition: SVDCluster.h:152
Belle2::SVDCluster::m_position
float m_position
Reconstructed hit position in r-phi or z.
Definition: SVDCluster.h:225
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::SVDCluster::getQualityError
double getQualityError() const
Get cluster quality indicator error.
Definition: SVDCluster.h:187
Belle2::SVDCluster::getChi2
float getChi2() const
Get chi2 of the time/amplitude fit.
Definition: SVDCluster.h:172
Belle2::SVDCluster::m_sensorID
unsigned short m_sensorID
Compressed sensor identifier.
Definition: SVDCluster.h:223
Belle2::SVDCluster::m_qualityIndicatorError
double m_qualityIndicatorError
Error associated with probability calcualtion.
Definition: SVDCluster.h:236
Belle2::RelationsInterface::ClassDef
ClassDef(RelationsInterface, 0)
defines interface for accessing relations of objects in StoreArray.
Belle2::VXD::SensorInfoBase
Base class to provide Sensor Information for PXD and SVD.
Definition: SensorInfoBase.h:40
Belle2::SVDCluster::m_isU
bool m_isU
True if clusters of u-strips, otherwise false.
Definition: SVDCluster.h:224
Belle2::SVDCluster::SVDCluster
SVDCluster()
Default constructor for the ROOT IO.
Definition: SVDCluster.h:65
Belle2::SVDCluster::getFirstFrame
int getFirstFrame() const
Get firstFrame of the MaxSum algorithm.
Definition: SVDCluster.h:177
Belle2::VXD::SensorInfoBase::getWidth
double getWidth(double v=0) const
Return the width of the sensor.
Definition: SensorInfoBase.h:91
Belle2::SVDCluster::getSNR
float getSNR() const
Get cluster SNR.
Definition: SVDCluster.h:167
Belle2::SVDCluster::m_clsTimeSigma
double m_clsTimeSigma
Standard deviation of waveform maximum times.
Definition: SVDCluster.h:228
Belle2::SVDCluster::getPositionSigma
float getPositionSigma() const
Get the error of the reconstructed hit coordinate.
Definition: SVDCluster.h:137
Belle2::SVDCluster::m_clsCharge
float m_clsCharge
Deposited charge in electrons.
Definition: SVDCluster.h:229
Belle2::SVDCluster::getClsTimeSigma
float getClsTimeSigma() const
Get standard deviation of waveform maximum times of cluster strip signals.
Definition: SVDCluster.h:147
Belle2::SVDCluster::m_seedCharge
float m_seedCharge
Cluster seed charge in electrons.
Definition: SVDCluster.h:230
Belle2::VXD::GeoCache::getInstance
static GeoCache & getInstance()
Return a reference to the singleton instance.
Definition: GeoCache.cc:215
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::SVDCluster::getSeedCharge
float getSeedCharge() const
Get seed charge.
Definition: SVDCluster.h:157
Belle2::SVDCluster::isUCluster
bool isUCluster() const
Get the direction of strips.
Definition: SVDCluster.h:118
Belle2::SVDCluster::m_clsTime
double m_clsTime
Average waveform maximum time.
Definition: SVDCluster.h:227
Belle2::SVDCluster::getSensorID
VxdID getSensorID() const
Get the sensor ID.
Definition: SVDCluster.h:110
Belle2::SVDCluster::getPosition
float getPosition(double v=0) const
Get the coordinate of reconstructed hit.
Definition: SVDCluster.h:125
Belle2::SVDCluster::getRawSensorID
unsigned short getRawSensorID() const
Get raw sensor ID.
Definition: SVDCluster.h:113
Belle2::SVDCluster::m_clsSize
unsigned short m_clsSize
Cluster size in pixels.
Definition: SVDCluster.h:231
Belle2::SVDCluster::getSize
unsigned short getSize() const
Get cluster size.
Definition: SVDCluster.h:162
Belle2::SVDCluster
The SVD Cluster class This class stores all information about reconstructed SVD clusters.
Definition: SVDCluster.h:38
Belle2::SVDCluster::print
std::string print() const
Get a string representation of the cluster.
Definition: SVDCluster.h:208
Belle2::SVDCluster::m_firstFrame
int m_firstFrame
firstFrame computed with the MaxSum algorithm
Definition: SVDCluster.h:234
Belle2::SVDCluster::m_positionSigma
float m_positionSigma
Standard deviation of hit position in r-phi or z.
Definition: SVDCluster.h:226
Belle2::RelationsObject
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Definition: RelationsObject.h:443
Belle2::VXD::GeoCache::getSensorInfo
const SensorInfoBase & getSensorInfo(Belle2::VxdID id) const
Return a referecne to the SensorInfo of a given SensorID.
Definition: GeoCache.cc:68
Belle2::SVDCluster::getQuality
double getQuality() const
Get cluster quality indicator.
Definition: SVDCluster.h:182
Belle2::SVDCluster::m_qualityIndicator
double m_qualityIndicator
Probability of signal cluster.
Definition: SVDCluster.h:235
Belle2::SVDCluster::setQualityIndicatorError
void setQualityIndicatorError(double qualityIndicatorError)
Add quality indicator error to object.
Definition: SVDCluster.h:200
Belle2::SVDCluster::getClsTime
float getClsTime() const
Get average of waveform maximum times of cluster strip signals.
Definition: SVDCluster.h:142
Belle2::SVDCluster::m_clsChi2
float m_clsChi2
Chi2 for time/amplitude fit.
Definition: SVDCluster.h:233
Belle2::SVDCluster::m_clsSN
float m_clsSN
Cluster S/N ratio.
Definition: SVDCluster.h:232
Belle2::SVDCluster::setQualityIndicator
void setQualityIndicator(const double qualityIndicator)
Add quality indicator to object.
Definition: SVDCluster.h:192