13#define TRG_SHORT_NAMES
14#define TRGCDC_SHORT_NAMES
16#include "trg/trg/Utilities.h"
17#include "trg/cdc/Cell.h"
18#include "trg/cdc/Segment.h"
20#define P3D HepGeom::Point3D<double>
38 _xyPosition(0.5 * (fp + bp)),
40 _backwardPosition(bp),
41 _direction((fp - bp).unit()),
61 if (msg.find(
"neighbor") != string::npos) {
73 cout <<
"TRGCDCCell::localIdDifference !!!";
74 cout <<
"super layer assumption violation" << endl;
77 int diff = int(a.localId()) - int(
localId());
80 int difR = nCells - diff;
81 if (diff < difR)
return diff;
84 int difR = nCells + diff;
85 if (- diff < difR)
return diff;
A class to represent a wire in CDC.
const unsigned _localId
Local ID.
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
virtual ~TRGCDCCell()
Destructor.
unsigned layerId(void) const
returns layer id.
unsigned localLayerId(void) const
returns local layer id in a super layer.
unsigned superLayerId(void) const
returns super layer id.
TRGCDCCell(unsigned id, unsigned localId, const TRGCDCLayer &layer, const HepGeom::Point3D< double > &forwardPosition, const HepGeom::Point3D< double > &backwardPosition)
Constructor.
const TRGCDCLayer & layer(void) const
returns a pointer to a layer.
unsigned nCells(void) const
returns # of cells.
int localIdDifference(const TRGCDCCell &) const
returns local id difference.
unsigned localId(void) const
returns local id in a layer.
Abstract base class for different kinds of events.