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,
46 _xyPosition(w.xyPosition()),
49 _iCDCHit(indexCDCHit),
50 _iCDCSimHit(indexCDCSimHit),
51 _iMCParticle(indexMCParticle)
59 if (w.axial())
_state |= CellHitAxial;
60 else _state |= CellHitStereo;
70 const std::string& pre)
const
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) {
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.
A class to represent a wire hit in CDC.
float _driftError[2]
drift distance error
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.
virtual const TRGSignal & signal(void) const =0
returns trigger output. Null will returned if no signal.
virtual std::string name(void) const =0
returns name.
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.
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 void * track(void) const
assigns a pointer to a TTrack.
void dump(const std::string &message="", const std::string &pre="") const
dumps contents.
Abstract base class for different kinds of events.