Belle II Software  release-08-01-10
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 
15 namespace Belle2 {
24  public:
29  m_eWire(65535), m_quadrant(-1)
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 
42  CDCTriggerSegmentHit(unsigned short iSL,
43  unsigned short iWire,
44  unsigned short priorityPosition,
45  unsigned short leftRight,
46  short priorityTime,
47  short fastestTime,
48  short foundTime,
49  short quadrant = -1);
50 
53  CDCTriggerSegmentHit(const CDCHit& priorityHit,
54  unsigned short segmentID,
55  unsigned short priorityPosition,
56  unsigned short leftRight,
57  short priorityTime,
58  short fastestTime,
59  short foundTime,
60  short quadrant = -1);
61 
64 
65  //accessors
67  unsigned short getSegmentID() const { return m_segmentID; }
70  unsigned short getPriorityPosition() const { return m_priorityPosition; }
73  unsigned short getLeftRight() const { return m_leftRight; }
75  bool LRknown() const { return (m_leftRight == 1 || m_leftRight == 2); }
77  short priorityTime() const { return m_priorityTime; }
79  short fastestTime() const { return m_fastestTime; }
81  short foundTime() const { return m_foundTime; }
84  short getTDCCount() const { return m_priorityTime; }
85 
87  unsigned short getISuperLayer() const
88  {
89  return WireID(m_eWire).getISuperLayer();
90  }
92  unsigned short getILayer() const
93  {
94  return WireID(m_eWire).getILayer();
95  }
97  unsigned short getIWire() const
98  {
99  return WireID(m_eWire).getIWire();
100  }
102  unsigned short getIWireCenter() const;
107  unsigned short getID() const
108  {
109  return m_eWire;
110  }
112  short getQuadrant() const
113  {
114  return m_quadrant;
115  }
116 
117  protected:
119  unsigned short m_segmentID;
122  unsigned short m_priorityPosition;
125  unsigned short m_leftRight;
131  short m_foundTime;
132 
135  unsigned short m_eWire;
136 
138  short m_quadrant;
139 
142  };
144 }
145 #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
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.
short m_priorityTime
hit time of priority cell in trigger clocks (~ 2ns)
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
ClassDef(CDCTriggerSegmentHit, 4)
Needed to make the ROOT object storable.
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.