13#define TRG_SHORT_NAMES
14#define TRGCDC_SHORT_NAMES
16#include "trg/trg/Clock.h"
17#include "trg/trg/Utilities.h"
18#include "trg/cdc/TRGCDC.h"
19#include "trg/cdc/Wire.h"
20#include "trg/cdc/WireHit.h"
21#include "trg/cdc/WireHitMC.h"
22#include "trg/cdc/Segment.h"
24#define P3D HepGeom::Point3D<double>
40 : TCCell(id, localId, l, fp, bp),
63 if (msg.find(
"neighbor") != string::npos) {
64 for (
unsigned i = 0; i < 7; i++)
66 neighbor(i)->
dump(
"", pre + TRGUtil::itostring(i) +
" ");
68 if (msg.find(
"trigger") != string::npos ||
69 msg.find(
"detail") != string::npos) {
77 static bool first =
false;
79 cout <<
"TRGCDCWire::neighbor !!! "
80 <<
"this function is not tested yet"
87 const unsigned nLayers = cdc.superLayer(
superLayerId)->size();
88 const int local = int(
localId());
93 if (
layer().offset() != 0) {
95 return cdc.wire(
layerId - 1, local);
97 return cdc.wire(
layerId - 1, local + 1);
100 return cdc.wire(
layerId - 1, local - 1);
102 return cdc.wire(
layerId - 1, local);
106 return cdc.wire(
layerId, local - 1);
108 return cdc.wire(
layerId, local + 1);
112 if (
layer().offset() != 0) {
114 return cdc.wire(
layerId + 1, local);
116 return cdc.wire(
layerId + 1, local + 1);
119 return cdc.wire(
layerId + 1, local - 1);
121 return cdc.wire(
layerId + 1, local);
374 for (
unsigned i = 0; i <
_mcHits.size(); i++)
389 TRGUtil::itostring(
layerId()) +
393 TRGUtil::itostring(
layerId()) +
A class to represent a wire in CDC.
TRGSignal _signal
Trigger output.
std::vector< const TRGCDCWireHitMC * > _mcHits
MC wire hit.
TRGSignal _signal_adc
Trigger output. with adc cut.
The instance of TRGCDC is a singleton.
A class to represent a digitized signal. Unit is nano second.
#define WireInnerRight
type of the wire
#define WireLeft
type of the wire
static TRGCDC * getTRGCDC(void)
returns TRGCDC object.
virtual ~TRGCDCWire()
Destructor.
unsigned id(void) const
returns id.
#define WireRight
type of the wire
#define WireInnerLeft
type of the wire
unsigned layerId(void) const
returns layer id.
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.
unsigned superLayerId(void) const
returns super layer id.
const TRGSignal & signal(void) const override
returns an input to the trigger. This is sync'ed to 1GHz clock.
const TRGCDCWire * neighbor(unsigned) const
returns a pointer to a neighbor wire. This function is expensive.
std::string name(void) const override
returns name.
void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const override
dumps debug information.
TRGCDCWire(unsigned id, unsigned localId, const TRGCDCLayer &, const HepGeom::Point3D< double > &forwardPosition, const HepGeom::Point3D< double > &backwardPosition, const TRGClock &clock)
Constructor.
void clear(void) override
clears information.
#define WireOuterLeft
type of the wire
const TRGCDCLayer & layer(void) const
returns a pointer to a layer.
void clear(void)
clears contents.
bool axial(void) const
returns true if this wire is in an axial layer.
unsigned localId(void) const
returns local id in a layer.
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
Abstract base class for different kinds of events.