 |
Belle II Software
release-05-02-19
|
14 #define TRG_SHORT_NAMES
15 #define TRGCDC_SHORT_NAMES
17 #include "trg/trg/Clock.h"
18 #include "trg/trg/Utilities.h"
19 #include "trg/cdc/TRGCDC.h"
20 #include "trg/cdc/Wire.h"
21 #include "trg/cdc/WireHit.h"
22 #include "trg/cdc/WireHitMC.h"
23 #include "trg/cdc/Segment.h"
25 #define P3D HepGeom::Point3D<double>
35 TRGCDCWire::TRGCDCWire(
unsigned id,
41 : TCCell(id, localId, l, fp, bp),
62 if (msg.find(
"neighbor") != string::npos) {
63 for (
unsigned i = 0; i < 7; i++)
65 neighbor(i)->
dump(
"", pre + TRGUtil::itostring(i) +
" ");
67 if (msg.find(
"trigger") != string::npos ||
68 msg.find(
"detail") != string::npos) {
76 static bool first =
false;
78 cout <<
"TRGCDCWire::neighbor !!! "
79 <<
"this function is not tested yet"
86 const unsigned nLayers = cdc.superLayer(
superLayerId)->size();
87 const int local = int(
localId());
92 if (
layer().offset() != 0) {
94 return cdc.wire(
layerId - 1, local);
96 return cdc.wire(
layerId - 1, local + 1);
99 return cdc.wire(
layerId - 1, local - 1);
101 return cdc.wire(
layerId - 1, local);
105 return cdc.wire(
layerId, local - 1);
107 return cdc.wire(
layerId, local + 1);
111 if (
layer().offset() != 0) {
113 return cdc.wire(
layerId + 1, local);
115 return cdc.wire(
layerId + 1, local + 1);
118 return cdc.wire(
layerId + 1, local - 1);
120 return cdc.wire(
layerId + 1, local);
373 for (
unsigned i = 0; i <
_mcHits.size(); i++)
386 TRGUtil::itostring(
layerId()) +
390 TRGUtil::itostring(
layerId()) +
unsigned localId(void) const
returns local id in a layer.
void clear(void) override
clears information.
#define WireInnerRight
type of the wire
const TRGCDCLayer & layer(void) const
returns a pointer to a layer.
A class to represent a wire in CDC.
TRGSignal _signal
Trigger output.
std::string name(void) const override
returns name.
#define WireOuterLeft
type of the wire
unsigned localLayerId(void) const
returns local layer id in a super layer.
#define WireOuterRight
type of the wire
const std::string & name(void) const
returns name.
#define WireLeft
type of the wire
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dumps debug information.
bool axial(void) const
returns true if this wire is in an axial layer.
Abstract base class for different kinds of events.
#define WireInnerLeft
type of the wire
virtual ~TRGCDCWire()
Destructor.
static TRGCDC * getTRGCDC(void)
returns TRGCDC object.
unsigned superLayerId(void) const
returns super layer id.
unsigned id(void) const
returns id.
The instance of TRGCDC is a singleton.
std::vector< const TRGCDCWireHitMC * > _mcHits
MC wire hit.
void clear(void)
clears contents.
const TRGCDCWire * neighbor(unsigned) const
returns a pointer to a neighbor wire. This function is expensive.
unsigned layerId(void) const
returns layer id.
#define WireRight
type of the wire
const TRGSignal & signal(void) const override
returns an input to the trigger. This is sync'ed to 1GHz clock.
A class to represent a digitized signal. Unit is nano second.