Belle II Software  release-05-01-25
VXDSensorInfoBasePar.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 #pragma once
12 
13 #include <vxd/dataobjects/VxdID.h>
14 #include <TObject.h>
15 
16 namespace Belle2 {
27  class VXDSensorInfoBasePar : public TObject {
28  public:
30  // FIXME: This is repeated, would be good to have only one instance.
31  enum SensorType {
32  PXD = 0,
33  SVD = 1,
34  TEL = 2,
35  VXD = -1,
36  };
37 
40 
62  VXDSensorInfoBasePar(SensorType type, VxdID id, double width, double length, double thickness,
63  int uCells, int vCells, double width2 = 0, double splitLength = -1, int vCells2 = 0):
64  m_type(type), m_id(id), m_width(width), m_length(length), m_thickness(thickness),
65  m_width2(width2), m_splitLength(splitLength), m_uCells(uCells), m_vCells(vCells), m_vCells2(vCells2)
66  {}
67 
69  virtual ~VXDSensorInfoBasePar() {}
70 
71  // Getters: exactly 1 for each data member and nothing more.
73  SensorType getType() const { return m_type; }
75  VxdID getID() const { return m_id; }
77  double getWidth2() const { return m_width2; }
79  double getWidth() const { return m_width; }
81  double getLength() const { return m_length; }
83  double getSplitLength() const { return m_splitLength; }
85  double getThickness() const { return m_thickness; }
87  int getUCells() const { return m_uCells; }
89  int getVCells() const { return m_vCells + m_vCells2; }
91  int getVCells1() const { return m_vCells; }
93  int getVCells2() const { return m_vCells2; }
94 
95 
96  protected:
100  unsigned short m_id;
102  double m_width;
104  double m_length;
106  double m_thickness;
108  double m_width2;
112  int m_uCells;
114  int m_vCells;
117 
118 
120  };
121 
123 } //Belle2 namespace
124 
Belle2::VXDSensorInfoBasePar::m_id
unsigned short m_id
ID of the Sensor.
Definition: VXDSensorInfoBasePar.h:108
Belle2::VxdID
Class to uniquely identify a any structure of the PXD and SVD.
Definition: VxdID.h:43
Belle2::VXDSensorInfoBasePar::m_width2
double m_width2
Forward width for wedge sensors, 0 for rectangular sensors.
Definition: VXDSensorInfoBasePar.h:116
Belle2::VXDSensorInfoBasePar::m_vCells2
int m_vCells2
Number of strips/pixels in v direction after splitLength, 0 for only one pixel size.
Definition: VXDSensorInfoBasePar.h:124
Belle2::VXDSensorInfoBasePar::getWidth
double getWidth() const
Return the (backward) width of the sensor.
Definition: VXDSensorInfoBasePar.h:87
Belle2::VXDSensorInfoBasePar::getSplitLength
double getSplitLength() const
Return the splitLength of the sensor.
Definition: VXDSensorInfoBasePar.h:91
Belle2::VXDSensorInfoBasePar::getVCells1
int getVCells1() const
Return number of pixel/strips in v direction for first segment.
Definition: VXDSensorInfoBasePar.h:99
Belle2::VXDSensorInfoBasePar::ClassDef
ClassDef(VXDSensorInfoBasePar, 6)
ClassDef, must be the last term before the closing {}.
Belle2::VXDSensorInfoBasePar
Namespace to provide code needed by both Vertex Detectors, PXD and SVD.
Definition: VXDSensorInfoBasePar.h:35
Belle2::VXDSensorInfoBasePar::getLength
double getLength() const
Return the length of the sensor.
Definition: VXDSensorInfoBasePar.h:89
Belle2::VXDSensorInfoBasePar::VXD
@ VXD
Any type of VXD Sensor.
Definition: VXDSensorInfoBasePar.h:43
Belle2::VXDSensorInfoBasePar::PXD
@ PXD
PXD Sensor.
Definition: VXDSensorInfoBasePar.h:40
Belle2::VXDSensorInfoBasePar::m_uCells
int m_uCells
Number of strips/pixels in u direction.
Definition: VXDSensorInfoBasePar.h:120
Belle2::VXDSensorInfoBasePar::SensorType
SensorType
Enum specifing the type of sensor the SensorInfo represents.
Definition: VXDSensorInfoBasePar.h:39
Belle2::VXDSensorInfoBasePar::~VXDSensorInfoBasePar
virtual ~VXDSensorInfoBasePar()
Virtual destructor to make class polymorph.
Definition: VXDSensorInfoBasePar.h:77
Belle2::VXDSensorInfoBasePar::m_type
SensorType m_type
Type of the Sensor.
Definition: VXDSensorInfoBasePar.h:106
Belle2::VXDSensorInfoBasePar::TEL
@ TEL
Testbeam telescope sensor.
Definition: VXDSensorInfoBasePar.h:42
Belle2::VXDSensorInfoBasePar::getID
VxdID getID() const
Return the ID of the Sensor.
Definition: VXDSensorInfoBasePar.h:83
Belle2
Abstract base class for different kinds of events.
Definition: MillepedeAlgorithm.h:19
Belle2::VXDSensorInfoBasePar::m_splitLength
double m_splitLength
Length at which second pixel size starts, 0 for only one pixel size.
Definition: VXDSensorInfoBasePar.h:118
Belle2::VXDSensorInfoBasePar::m_vCells
int m_vCells
Number of strips/pixels in v direction (up to splitLength for two pixel sizes)
Definition: VXDSensorInfoBasePar.h:122
Belle2::VXDSensorInfoBasePar::VXDSensorInfoBasePar
VXDSensorInfoBasePar()
Default constructor.
Definition: VXDSensorInfoBasePar.h:47
Belle2::VXDSensorInfoBasePar::SVD
@ SVD
SVD Sensor.
Definition: VXDSensorInfoBasePar.h:41
Belle2::VXDSensorInfoBasePar::getVCells2
int getVCells2() const
Return number of pixel/strips in v direction for second segment.
Definition: VXDSensorInfoBasePar.h:101
Belle2::VXDSensorInfoBasePar::getUCells
int getUCells() const
Return number of pixel/strips in u direction.
Definition: VXDSensorInfoBasePar.h:95
Belle2::VXDSensorInfoBasePar::getVCells
int getVCells() const
Return number of pixel/strips in v direction.
Definition: VXDSensorInfoBasePar.h:97
Belle2::VXDSensorInfoBasePar::m_width
double m_width
Width of the sensor, backward width for wedge sensors.
Definition: VXDSensorInfoBasePar.h:110
Belle2::VXDSensorInfoBasePar::getWidth2
double getWidth2() const
Return forward width for a slanted sensor.
Definition: VXDSensorInfoBasePar.h:85
Belle2::VXDSensorInfoBasePar::getType
SensorType getType() const
Return the Type of the Sensor.
Definition: VXDSensorInfoBasePar.h:81
Belle2::VXDSensorInfoBasePar::m_thickness
double m_thickness
Thickness of the Sensor.
Definition: VXDSensorInfoBasePar.h:114
Belle2::VXDSensorInfoBasePar::m_length
double m_length
Length of the Sensor.
Definition: VXDSensorInfoBasePar.h:112
Belle2::VXDSensorInfoBasePar::getThickness
double getThickness() const
Return the thickness of the sensor.
Definition: VXDSensorInfoBasePar.h:93