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