Belle II Software development
CDCTriggerSegmentHit.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#ifndef CDCTRIGGERSEGMENTHIT_H
9#define CDCTRIGGERSEGMENTHIT_H
10
11#include <framework/datastore/RelationsObject.h>
12#include <cdc/dataobjects/WireID.h>
13#include <cdc/dataobjects/CDCHit.h>
14
15namespace Belle2 {
24 public:
31
33 CDCTriggerSegmentHit(unsigned short segmentID,
34 unsigned short priorityPosition,
35 unsigned short leftRight,
36 short priorityTime,
37 short fastestTime,
38 short foundTime,
39 short quadrant = -1,
40 std::vector<float> hittime = std::vector<float>(),
41 unsigned int hitpattern = 0,
42 std::vector<float> adcinfo = std::vector<float>(),
43 unsigned int adcpattern = -1);
44
46 CDCTriggerSegmentHit(unsigned short iSL,
47 unsigned short iWire,
48 unsigned short priorityPosition,
49 unsigned short leftRight,
50 short priorityTime,
51 short fastestTime,
52 short foundTime,
53 short quadrant = -1,
54 std::vector<float> hittime = std::vector<float>(),
55 unsigned int hitpattern = 0,
56 std::vector<float> adcinfo = std::vector<float>(),
57 unsigned int adcpattern = -1);
58
59
63
64 CDCTriggerSegmentHit(const CDCHit& priorityHit,
65 unsigned short segmentID,
66 unsigned short priorityPosition,
67 unsigned short leftRight,
68 short priorityTime,
69 short fastestTime,
70 short foundTime,
71 short quadrant = -1,
72 std::vector<float> hittime = std::vector<float>(),
73 unsigned int hitpattern = 0,
74 std::vector<float> adcinfo = std::vector<float>(),
75 unsigned int adcpattern = -1);
76
77
80
81 //accessors
83 unsigned short getSegmentID() const { return m_segmentID; }
86 unsigned short getPriorityPosition() const { return m_priorityPosition; }
89 unsigned short getLeftRight() const { return m_leftRight; }
91 bool LRknown() const { return (m_leftRight == 1 || m_leftRight == 2); }
93 short priorityTime() const { return m_priorityTime; }
95 short fastestTime() const { return m_fastestTime; }
97 short foundTime() const { return m_foundTime; }
100 short getTDCCount() const { return m_priorityTime; }
102 unsigned int gethitpattern() const { return m_hitpattern; }
104 unsigned int getadcpattern() const { return m_adcpattern; }
106 std::vector<float> gethittime() const { return m_hittime; }
108 std::vector<float> getadc() const { return m_adcinfo; }
109
111 unsigned short getISuperLayer() const
112 {
113 return WireID(m_eWire).getISuperLayer();
114 }
115
116 unsigned short getILayer() const
117 {
118 return WireID(m_eWire).getILayer();
119 }
120
121 unsigned short getIWire() const
122 {
123 return WireID(m_eWire).getIWire();
124 }
125
126 unsigned short getIWireCenter() const;
131 unsigned short getID() const
132 {
133 return m_eWire;
134 }
135
136 short getQuadrant() const
137 {
138 return m_quadrant;
139 }
140
141 protected:
143 unsigned short m_segmentID;
146 unsigned short m_priorityPosition;
149 unsigned short m_leftRight;
156
159 unsigned short m_eWire;
160
163
165 unsigned int m_hitpattern;
166
168 std::vector<float> m_hittime;
169
171 unsigned int m_adcpattern;
172
174 std::vector<float> m_adcinfo;
175
176
179 };
180
181}
182#endif
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition CDCHit.h:40
short priorityTime() const
get hit time of priority cell in trigger clocks
ClassDef(CDCTriggerSegmentHit, 5)
Needed to make the ROOT object storable.
unsigned int m_hitpattern
hit pattern
unsigned short m_priorityPosition
position of the priority cell as an id: 0: no hit, 3: 1st priority, 1: 2nd right, 2: 2nd left
bool LRknown() const
true if LeftRight position is determined
unsigned short getPriorityPosition() const
get position of the priority cell within the track segment (0: no hit, 3: 1st priority,...
unsigned short m_eWire
Wire encoding of the priority wire.
std::vector< float > m_adcinfo
Full ADC information.
short m_priorityTime
hit time of priority cell in trigger clocks (~ 2ns)
unsigned int gethitpattern() const
get hit pattern in a segment hit
unsigned short getIWire() const
get wire number of priority wire within layer.
short getTDCCount() const
get hit time of priority cell in trigger clocks alias for priorityTime for backwards compatibility
~CDCTriggerSegmentHit()
destructor, empty because we don't allocate memory anywhere.
short m_fastestTime
time of first hit in the track segment in trigger clocks (~ 2ns)
short getQuadrant() const
get the quadrant
unsigned short getSegmentID() const
get continuous ID of the track segment [0, 2335]
std::vector< float > m_hittime
hit pattern with hit time
unsigned short getID() const
get the encoded wire number of the priority wire.
unsigned short m_segmentID
continuous ID of the track segment
short fastestTime() const
get time of first hit in the track segment in trigger clocks
std::vector< float > getadc() const
get ADC Full information in a segment hit
short m_foundTime
time when segment hit was found in trigger clocks (~ 2ns)
unsigned int getadcpattern() const
get adc pattern in a segment hit
unsigned short getISuperLayer() const
get super layer number.
std::vector< float > gethittime() const
get hit pattern in a segment hit
CDCTriggerSegmentHit()
default constructor.
unsigned short getLeftRight() const
get position of the priority cell relative to the track (0: no hit, 1: right, 2: left,...
unsigned int m_adcpattern
adc pattern
unsigned short getILayer() const
get priority layer number within super layer.
unsigned short m_leftRight
position of the priority cell relative to the track: 0: no hit, 1: right, 2: left,...
unsigned short getIWireCenter() const
get wire number of center wire within layer.
short foundTime() const
get time when segment hit was found in trigger clocks
Class to identify a wire inside the CDC.
Definition WireID.h:34
unsigned short getIWire() const
Getter for wire within the layer.
Definition WireID.h:145
unsigned short getISuperLayer() const
Getter for Super-Layer.
Definition WireID.h:130
unsigned short getILayer() const
Getter for layer within the Super-Layer.
Definition WireID.h:136
RelationsInterface< TObject > RelationsObject
Provides interface for getting/adding relations to objects in StoreArrays.
Abstract base class for different kinds of events.