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:
30 { }
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 unsigned int hitpattern = 0,
41 unsigned int hitpattern_adc = 0);
42
44 CDCTriggerSegmentHit(unsigned short iSL,
45 unsigned short iWire,
46 unsigned short priorityPosition,
47 unsigned short leftRight,
48 short priorityTime,
49 short fastestTime,
50 short foundTime,
51 short quadrant = -1,
52 unsigned int hitpattern = 0,
53 unsigned int hitpattern_adc = 0);
54
57 CDCTriggerSegmentHit(const CDCHit& priorityHit,
58 unsigned short segmentID,
59 unsigned short priorityPosition,
60 unsigned short leftRight,
61 short priorityTime,
62 short fastestTime,
63 short foundTime,
64 short quadrant = -1,
65 unsigned int hitpattern = 0,
66 unsigned int hitpattern_adc = 0);
67
70
71 //accessors
73 unsigned short getSegmentID() const { return m_segmentID; }
76 unsigned short getPriorityPosition() const { return m_priorityPosition; }
79 unsigned short getLeftRight() const { return m_leftRight; }
81 bool LRknown() const { return (m_leftRight == 1 || m_leftRight == 2); }
83 short priorityTime() const { return m_priorityTime; }
85 short fastestTime() const { return m_fastestTime; }
87 short foundTime() const { return m_foundTime; }
90 short getTDCCount() const { return m_priorityTime; }
92 unsigned int gethitpattern() const { return m_hitpattern; }
94 unsigned int gethitpattern_adc() const { return m_hitpattern_adc; }
95
97 unsigned short getISuperLayer() const
98 {
100 }
102 unsigned short getILayer() const
103 {
104 return WireID(m_eWire).getILayer();
105 }
107 unsigned short getIWire() const
108 {
109 return WireID(m_eWire).getIWire();
110 }
112 unsigned short getIWireCenter() const;
117 unsigned short getID() const
118 {
119 return m_eWire;
120 }
122 short getQuadrant() const
123 {
124 return m_quadrant;
125 }
126
127 protected:
129 unsigned short m_segmentID;
132 unsigned short m_priorityPosition;
135 unsigned short m_leftRight;
142
145 unsigned short m_eWire;
146
149
151 unsigned int m_hitpattern;
152
154 unsigned int m_hitpattern_adc;
155
158 };
160}
161#endif
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
Definition: CDCHit.h:40
Combination of several CDCHits to a track segment hit for the trigger.
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 int gethitpattern_adc() const
get hit pattern in a segment hit
unsigned short getPriorityPosition() const
get position of the priority cell within the track segment (0: no hit, 3: 1st priority,...
unsigned int m_hitpattern_adc
hit pattern with adc cut
unsigned short m_eWire
Wire encoding of the priority wire.
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]
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
short m_foundTime
time when segment hit was found in trigger clocks (~ 2ns)
unsigned short getISuperLayer() const
get super layer number.
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 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
Defines interface for accessing relations of objects in StoreArray.
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
Abstract base class for different kinds of events.