Belle II Software development
CDCDisplacement.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 <TObject.h>
12#include <Math/Vector3D.h>
13#include <cdc/dataobjects/WireID.h>
14
15
16namespace Belle2 {
25 class CDCDisplacement: public TObject {
26 public:
27
32 m_wire(65535), m_fwd(), m_bwd(), m_tension()
33 {
34 }
35
36
40 CDCDisplacement(const WireID& wire, ROOT::Math::XYZVector fwd, ROOT::Math::XYZVector bwd, float tension) :
41 m_wire(wire), m_fwd(fwd), m_bwd(bwd), m_tension(tension)
42 {
43 }
44
46 unsigned short getEWire() const
47 {
48 return m_wire;
49 }
50
51 //TODO: remove the following 4 functions (not needed).
52
54 unsigned short getISuperLayer() const
55 {
56 return (m_wire / 4096);
57 }
58
60 unsigned short getILayer() const
61 {
62 return ((m_wire % 4096) / 512);
63 }
64
69 unsigned short getIWire() const
70 {
71 return (m_wire % 512);
72 }
73
75 int getICLayer() const
76 {
77 if (getISuperLayer() == 0) { return getILayer(); }
78 return 8 + (getISuperLayer() - 1) * 6 + getILayer();
79 }
80
82 float getXFwd() const {return m_fwd.X();}
83
85 float getYFwd() const {return m_fwd.Y();}
86
88 float getZFwd() const {return m_fwd.Z();}
89
91 float getXBwd() const {return m_bwd.X();}
92
94 float getYBwd() const {return m_bwd.Y();}
95
97 float getZBwd() const {return m_bwd.Z();}
98
100 float getTension() const {return m_tension;}
101
102 private:
103 unsigned short m_wire;
104 ROOT::Math::XYZVector m_fwd;
105 ROOT::Math::XYZVector m_bwd;
106 float m_tension;
108 };
109
111} // end namespace Belle2
Database object for displacement of sense wire position.
CDCDisplacement(const WireID &wire, ROOT::Math::XYZVector fwd, ROOT::Math::XYZVector bwd, float tension)
Constructor.
unsigned short m_wire
Wire ID.
int getICLayer() const
Getter for continuous layer numbering.
float getXFwd() const
Getter for fwd x-position.
float getXBwd() const
Getter for bwd x-position.
float getYFwd() const
Getter for fwd y-position.
float getTension() const
Getter for wire tension.
float getZFwd() const
Getter for fwd z-position.
unsigned short getIWire() const
Getter for wire within the layer.
unsigned short getEWire() const
Getter for EWireID.
CDCDisplacement()
Default constructor.
ROOT::Math::XYZVector m_bwd
Displacement of backward side.
float m_tension
Displacement of wire tension (grW)
float getZBwd() const
Getter for bwd z-position.
unsigned short getISuperLayer() const
Getter for Super-Layer.
float getYBwd() const
Getter for bwd y-position.
ClassDef(CDCDisplacement, 4)
ClassDef.
unsigned short getILayer() const
Getter for layer within the Super-Layer.
ROOT::Math::XYZVector m_fwd
Displacement of forward side.
Class to identify a wire inside the CDC.
Definition: WireID.h:34
Abstract base class for different kinds of events.