 |
Belle II Software
release-05-02-19
|
11 #include <tracking/trackFindingCDC/topology/CDCWire.h>
13 #include <tracking/trackFindingCDC/topology/CDCWireTopology.h>
14 #include <tracking/trackFindingCDC/topology/CDCWireSuperLayer.h>
15 #include <tracking/trackFindingCDC/topology/CDCWireLayer.h>
17 #include <tracking/trackFindingCDC/topology/EWirePositionToCDC.h>
18 #include <tracking/trackFindingCDC/topology/EWirePosition.h>
20 #include <cdc/geometry/CDCGeometryPar.h>
21 #include <cdc/dataobjects/CDCHit.h>
24 using namespace TrackFindingCDC;
39 WireID wireID(hit.getID());
40 B2ERROR(
"Invalid encoded wire id of cdc hit " << wireID);
43 B2ERROR(
"Layer id: " << wireID.
getILayer());
44 B2ERROR(
"Wire id: " << wireID.
getIWire());
45 B2FATAL(
"Do not continue with wrong wire id");
51 if (wire.
getEWire() != hit.getID()) {
52 B2ERROR(
"WireID.getEWire() differs from CDCHit.getID()");
53 B2ERROR(
"WireID.getEWire() : " << wire.
getEWire());
54 B2ERROR(
"CDCHit.getEWire() : " << hit.getID());
81 double sagCoeff = ignoreWireSag ? 0 : cdcgp.
getWireSagCoef(wirePosSet, iCLayer, iWire);
88 B2WARNING(
"Odd wire " << *
this);
89 B2WARNING(
"wireForwardPosition " << forwardPos);
90 B2WARNING(
"wireBackwardPosition " << backwardPos);
103 if (not inZ)
return false;
113 bool inCylindricalR = innerCylindricalR < cylindricalR and cylindricalR < outerCylindricalR;
114 if (not inCylindricalR)
return false;
118 iWire %= wireLayer.
size();
Class to identify a wire inside the CDC.
WireNeighborPair getNeighborsInwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer inwards.
double getForwardZ() const
Getter for the z coordinate at the forward joint points of the wires.
const TVector3 wireForwardPosition(int layerId, int cellId, EWirePosition set=c_Base) const
Returns the forward position of the input sense wire.
MayBePtr< const CDCWire > getNeighborCW(const WireID &wireID) const
Getter for the nearest clockwise neighbor.
std::size_t size() const
Returns the total number of objects in this range.
WireNeighborPair getNeighborsInwards() const
Gives the two wires in the next layer inward.
unsigned short getILayer() const
Getter for layer within the Super-Layer.
IWire getIWire() const
Getter for the wire id within its layer.
const Vector2D & getRefPos2D() const
Getter for the wire reference position for 2D tracking Gives the wire's reference position projected ...
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
static CDCWireTopology & getInstance()
Getter for the singleton instance of the wire topology.
WireNeighborKind getNeighborKind(const CDCWire &wire) const
Returns gives the kind of neighborhood relation from this wire to the given wire.
unsigned short getEWire() const
Getter for the encoded wire number.
unsigned short getISuperLayer() const
Getter for Super-Layer.
Vector3D forward3D() const
Gives the position of the forward point.
double getBackwardZ() const
Getter for the z coordinate at the backward joint points of the wires.
MayBePtr< const CDCWire > getNeighborCWInwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getNeighborCW() const
Gives the closest neighbor in the clockwise direction - always exists.
double m_refCylindricalR
Precomputed distance to the beam line at the reference position.
const CDCWireLayer & getWireLayer() const
Getter for the wire layer.
const CDCWireLayer & getWireLayer(const WireID &wireId) const
Getter for wire layer getter by wireID object.
MayBePtr< const CDCWire > getNeighborCWInwards() const
Gives the closest neighbor in the clockwise inwards direction This does not cross superlayer boundari...
void initialize(EWirePosition wirePosition, bool ignoreWireSag)
(Re)load all geometry parameters form the CDCGeometryPar to adjust to changes in geometry.
ISuperLayer getISuperLayer() const
Gives the superlayer id ranging from 0 - 8.
const CDCWire & getWire(const WireID &wireId) const
Getter for wire getter by wireID object.
double getOuterCylindricalR() const
Getter for outer radius of the layer as taken from the CDCGeometryPar.
double getLateralCellWidth() const
Getter for the cell widths in lateral direction.
double getRadialCellWidth() const
Getter for the width of the wire layer in the radial direction.
The Class for CDC Geometry Parameters.
MayBePtr< const CDCWire > getNeighborCCWOutwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
ILayer getICLayer() const
Getter for the continious layer id ranging from 0 - 55.
const TVector3 wireBackwardPosition(int layerId, int cellId, EWirePosition set=c_Base) const
Returns the backward position of the input sense wire.
static CDCGeometryPar & Instance(const CDCGeometry *=nullptr)
Static method to get a reference to the CDCGeometryPar instance.
bool isPrimaryNeighborWith(const CDCWire &wire) const
Returns whether the give wire is a neighbor of this wire.
Abstract base class for different kinds of events.
A three dimensional limited line represented by its closest approach to the z-axes (reference positio...
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection, const WireID &wireID) const
Getter for the secondary neighbor of the given wire id.
WireNeighborPair getNeighborsOutwards(const WireID &wireID) const
Getter for the two closest neighbors in the layer outwards.
A three dimensional vector.
const CDCWireSuperLayer & getWireSuperLayer(const WireID &wireID) const
Getter for wire superlayer getter by wireID object.
MayBePtr< const CDCWire > getNeighborCCWOutwards() const
Gives the closest neighbor in the countclockwise outwards direction This does not cross superlayer bo...
const Vector3D & refPos3D() const
Returns the reference position.
static const CDCWire * getInstance(const WireID &wireID)
Getter from the wireID convinience object. Does not construct a new object.
unsigned cellId(unsigned layerId, const TVector3 &position) const
The method to get cell id based on given layer id and the position.
double tanTheta() const
Returns the tangent of the opening angle between tangential vector and the z axes Also know as ds / d...
bool arePrimaryNeighbors(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are primary neighbors.
Class representating a sense wire layer in the central drift chamber.
bool isAxial() const
Indicates if the wire is axial or stereo.
WireLine m_wireLine
The line representation of the wire.
const WireID & getWireID() const
Getter for the wire id.
Vector3D backward3D() const
Gives the position of the backward point.
CDCWire(const WireID &wireID)
Constructor taking the combined wire id convenience object.
double getLateralCellWidth() const
Getter for the width of the wire layer in the lateral direction.
EWirePosition
Wire position set.
Class representating a sense wire superlayer in the central drift chamber.
double norm() const
Calculates the length of the vector.
bool isInCell(const Vector3D &pos3D) const
Checks whether the position is in the drift cell surrounding the wire.
EWirePosition
Wire position set.
Class representing a sense wire in the central drift chamber.
MayBePtr< const CDCWire > getSecondaryNeighbor(short oClockDirection) const
Getter for the secondary neighbors of this wire id following the direction on the clock.
double getWireSagCoef(EWirePosition set, int layerId, int cellId) const
Returns coefficient for the sense wire sag.
const CDCWireSuperLayer & getWireSuperLayer() const
Getter for the wire super layer.
MayBePtr< const CDCWire > getNeighborCCW(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor.
double z() const
Getter for the z coordinate.
Type for the neighbor relationship from one wire to another.
double getRadialCellWidth() const
Getter for the cell widths in radial direction.
MayBePtr< const CDCWire > getNeighborCCWInwards() const
Gives the closest neighbor in the countclockwise inwards direction This does not cross superlayer bou...
WireNeighborPair getNeighborsOutwards() const
Gives the two wires in the next layer outward.
double getInnerCylindricalR() const
Getter for inner radius of the layer as taken from the CDCGeometryPar.
unsigned short getIWire() const
Getter for wire within the layer.
unsigned short getICLayer() const
Getter for continuous layer numbering.
Class representing a pair of neighbors in the CDC in a single layer For certain circumstances it is a...
MayBePtr< const CDCWire > getNeighborCWOutwards(const WireID &wireID) const
Getter for the nearest clockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getNeighborCWOutwards() const
Gives the closest neighbor in the clockwise outwards direction This does not cross superlayer boundar...
double cylindricalR() const
Getter for the cylindrical radius ( xy projected norm )
WireNeighborKind getNeighborKind(const WireID &wireID, const WireID &otherWireID) const
Checks if two wires are closest neighbors.
MayBePtr< const CDCWire > getNeighborCCWInwards(const WireID &wireID) const
Getter for the nearest counterclockwise neighbor in the next layer outwards.
MayBePtr< const CDCWire > getNeighborCCW() const
Gives the closest neighbor in the counterclockwise direction - always exists.