8#include <trg/cdc/dataobjects/CDCTriggerSegmentHit.h>
13 unsigned short priorityPosition,
14 unsigned short leftRight,
19 unsigned int hitpattern,
20 unsigned int hitpattern_adc):
21 m_segmentID(segmentID), m_priorityPosition(priorityPosition), m_leftRight(leftRight),
22 m_priorityTime(priorityTime), m_fastestTime(fastestTime), m_foundTime(foundTime), m_quadrant(quadrant), m_hitpattern(hitpattern),
23 m_hitpattern_adc(hitpattern_adc)
26 std::array<int, 9> nWiresInSuperLayer = {
27 160, 160, 192, 224, 256, 288, 320, 352, 384
29 unsigned short iSL = 0;
30 unsigned short iWire = segmentID;
31 while (iWire >= nWiresInSuperLayer[iSL]) {
32 iWire -= nWiresInSuperLayer[iSL];
36 if (priorityPosition == 1) {
38 iWire = nWiresInSuperLayer[iSL] - 1;
42 unsigned short iLayer = (iSL == 0) ? 3 : 2;
43 if (priorityPosition == 1 || priorityPosition == 2)
50 unsigned short priorityPosition,
51 unsigned short leftRight,
56 unsigned int hitpattern,
57 unsigned int hitpattern_adc):
58 m_priorityPosition(priorityPosition), m_leftRight(leftRight),
59 m_priorityTime(priorityTime), m_fastestTime(fastestTime), m_foundTime(foundTime), m_quadrant(quadrant), m_hitpattern(hitpattern),
60 m_hitpattern_adc(hitpattern_adc)
63 std::array<int, 9> nWiresInSuperLayer = {
64 160, 160, 192, 224, 256, 288, 320, 352, 384
67 for (
unsigned i = 0; i < iSL; ++i) {
71 if (priorityPosition == 1) {
73 iWire = nWiresInSuperLayer[iSL] - 1;
77 unsigned short iLayer = (iSL == 0) ? 3 : 2;
78 if (priorityPosition == 1 || priorityPosition == 2)
84 unsigned short segmentID,
85 unsigned short priorityPosition,
86 unsigned short leftRight,
91 unsigned int hitpattern,
92 unsigned int hitpattern_adc):
93 m_segmentID(segmentID), m_priorityPosition(priorityPosition), m_leftRight(leftRight),
94 m_priorityTime(priorityTime), m_fastestTime(fastestTime), m_foundTime(foundTime),
95 m_eWire(priorityHit.
getID()), m_quadrant(quadrant), m_hitpattern(hitpattern), m_hitpattern_adc(hitpattern_adc)
101 std::array<int, 9> nWiresInSuperLayer = {
102 160, 160, 192, 224, 256, 288, 320, 352, 384
108 if (iWire == nWiresInSuperLayer[iSL]) {
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
unsigned short m_priorityPosition
position of the priority cell as an id: 0: no hit, 3: 1st priority, 1: 2nd right, 2: 2nd left
unsigned short m_eWire
Wire encoding of the priority wire.
unsigned short getIWire() const
get wire number of priority wire within layer.
unsigned short m_segmentID
continuous ID of the track segment
unsigned short getISuperLayer() const
get super layer number.
CDCTriggerSegmentHit()
default constructor.
unsigned short getIWireCenter() const
get wire number of center wire within layer.
Class to identify a wire inside the CDC.
unsigned short getEWire() const
Getter for encoded wire number.
int getID(const std::vector< double > &breaks, double t)
get id of the time point t
Abstract base class for different kinds of events.