13#define TRG_SHORT_NAMES
14#define TRGCDC_SHORT_NAMES
16#include "framework/datastore/StoreArray.h"
17#include "mdst/dataobjects/MCParticle.h"
18#include "cdc/dataobjects/CDCSimHit.h"
19#include "cdc/dataobjects/CDCHit.h"
20#include "trg/trg/Utilities.h"
21#include "trg/cdc/Wire.h"
22#include "trg/cdc/CellHit.h"
23#include "trg/cdc/TrackMC.h"
24#include "trg/cdc/WireHitMC.h"
36 unsigned indexCDCSimHit,
37 unsigned indexMCParticle,
41 float driftRightError,
60 else _state |= CellHitStereo;
70 const std::string& pre)
const
73 std::cout <<
_cell.name();
74 if (msg.find(
"state") != std::string::npos ||
75 msg.find(
"detail") != std::string::npos) {
76 std::cout <<
",state";
77 TRGUtil::bitDisplay(
_state);
78 if (
track()) std::cout <<
",trk ";
80 if (msg.find(
"position") != std::string::npos ||
81 msg.find(
"detail") != std::string::npos) {
84 if (msg.find(
"drift") != std::string::npos ||
85 msg.find(
"detail") != std::string::npos) {
86 if (
_state & CellHitLeftMask) std::cout <<
", L";
87 if (
_state & CellHitRightMask) std::cout <<
", R";
91 if (msg.find(
"mc") != std::string::npos ||
92 msg.find(
"detail") != std::string::npos) {
96 _cell.signal().dump(
"detail", pre +
" ");
98 std::cout << std::endl;
104 static const HepGeom::Vector3D<double> HepXHat(1.0, 0.0, 0.0);
105 static const HepGeom::Vector3D<double> HepYHat(0.0, 1.0, 0.0);
106 static const HepGeom::Vector3D<double> HepZHat(0.0, 0.0, 1.0);
109 if (lr == CellHitLeft) {
124 if ((* a)->_cell.id() > (* b)->_cell.id())
126 else if ((* a)->_cell.id() == (* b)->_cell.id())
Class containing the result of the unpacker in raw data and the result of the digitizer in simulation...
double getFlightTime() const
The method to get flight time.
double getDriftLength() const
The method to get drift length.
A Class to store the Monte Carlo particle information.
Accessor to arrays stored in the data store.
const void * _track
a pointer to a TTrack
float _driftError[2]
drift distance error
unsigned _sequentialLength
sequential Length in one segment
const TRGCDCCell & _cell
a pointer to a TRGCDCWire
unsigned _iCDCSimHit
Index to CDCSimHit array.
unsigned _iMCParticle
Index to MCParticle array.
const HepGeom::Point3D< double > & _xyPosition
position in the middle of wire. z is always zero, however.
unsigned _iCDCHit
Index to CDCHit array.
float _drift[2]
drift distance
unsigned _state
state, defined above
int _mcLR
mc left/right information
A class to represent a wire in CDC.
TRGCDCCellHit(const TRGCDCCell &, unsigned indexCDCHit=0, unsigned indexCDCSimHit=0, unsigned indexMCParticle=0, float driftLeft=0, float driftLeftError=0, float driftRight=0, float driftRightError=0, int mcLRflag=0, float fudgeFacgtor=1)
Constructor.
HepGeom::Point3D< double > position(unsigned) const
returns left position. z is always zero.
HepGeom::Point3D< double > Point3D
3D point
virtual void dump(const std::string &message=std::string(""), const std::string &prefix=std::string("")) const
dumps debug information.
virtual ~TRGCDCCellHit()
Destructor.
const CDCSimHit * simHit(void) const
Access to CDCSimHit.
const CDCHit * hit(void) const
Access to CDCHit.
const MCParticle * mcParticle(void) const
Access to MCParticle.
unsigned iMCParticle(void) const
returns an index to MCParticle.
static int sortById(const TRGCDCCellHit **a, const TRGCDCCellHit **b)
Sort function.
const HepGeom::Point3D< double > & xyPosition(void) const
returns position in the middle of wire. z is always zero, however.
const void * track(void) const
assigns a pointer to a TTrack.
bool axial(void) const
returns true if this wire is in an axial layer.
Abstract base class for different kinds of events.