Belle II Software development
SegmentHit.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
9//-----------------------------------------------------------------------------
10// Description : A class to represent a track segment hit in CDC.
11//-----------------------------------------------------------------------------
12
13#ifndef TRGCDCSegmentHit_FLAG_
14#define TRGCDCSegmentHit_FLAG_
15
16#include "trg/cdc/CellHit.h"
17
18#ifdef TRGCDC_SHORT_NAMES
19#define TCSHit TRGCDCSegmentHit
20#endif
21
22namespace Belle2 {
28 class TRGCDCSegment;
29
32
33 public:
34
36 explicit TRGCDCSegmentHit(const TRGCDCSegment&);
37
39 virtual ~TRGCDCSegmentHit();
40
42 static void removeAll(void);
43
45 static void* operator new (size_t);
46
48 static void operator delete (void*);
49
50 public:// Selectors
51
53 virtual void dump(const std::string& message = std::string(""),
54 const std::string& prefix = std::string("")) const override;
55
57 const TRGCDCSegment& segment(void) const;
58
60 const TRGSignal& signal(void) const;
61
62 public:// Modifiers
63
64 public:// Static utility functions
65
67 static int sortById(const TRGCDCSegmentHit** a,
68 const TRGCDCSegmentHit** b);
69
70 private:
71
73 static std::vector<TRGCDCSegmentHit*> _all;
74
75 };
76
77//-----------------------------------------------------------------------------
78
79 inline
80 const TRGSignal&
82 {
83 return cell().signal();
84 }
85
87} // namespace Belle2
88
89#endif /* TRGCDCSegmentHit_FLAG_ */
A class to represent a wire hit in CDC.
Definition: CellHit.h:74
virtual const TRGSignal & signal(void) const =0
returns trigger output. Null will returned if no signal.
A class to represent a track segment hit in CDC.
Definition: SegmentHit.h:31
A class to represent a wire in CDC.
Definition: Segment.h:39
A class to represent a digitized signal. Unit is nano second.
Definition: Signal.h:23
virtual const TRGCDCCell & cell(void) const
returns a pointer to a TRGCDCWire.
Definition: CellHit.h:252
const TRGSignal & signal(void) const
returns trigger output. Null will returned if no signal.
Definition: SegmentHit.h:81
static void removeAll(void)
destructs all TRGCDCCellHit objects. (Called by TRGCDC)
Definition: SegmentHit.cc:84
static std::vector< TRGCDCSegmentHit * > _all
Keeps all TRGCDCSegmentHit created by new().
Definition: SegmentHit.h:73
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dumps debug information.
Definition: SegmentHit.cc:71
virtual ~TRGCDCSegmentHit()
Destructor.
Definition: SegmentHit.cc:54
const TRGCDCSegment & segment(void) const
returns a pointer to a track segment.
Definition: SegmentHit.cc:78
static int sortById(const TRGCDCSegmentHit **a, const TRGCDCSegmentHit **b)
Sorting funnction.
Definition: SegmentHit.cc:59
Abstract base class for different kinds of events.