10#include "MdcOldGraphics/MdcDisplay.h"
12#include "MdcTrkRecon/dchGlobal.h"
15#include "CLHEP/Alist/AIterator.h"
19int MdcPlotHits::axialColor = 1;
20int MdcPlotHits::posStereoColor = 1;
21int MdcPlotHits::negStereoColor = 1;
23MdcPlotHits::MdcPlotHits() {
32 for (
int ihit = 0; ihit < (int) hits.length(); ihit++) {
34 if (dclink == 0)
continue;
35 MdcHit *ahit = dclink->dchHit();
36 if (ahit == 0)
continue;
38 int foundAmbig = dclink->
ambig();
47 else mycolor = incolor;
48 this->plotAHit(ahit, tbunch, 1, mycolor, dclink->timeIndex());
55void MdcPlotHits::plotAHit(
const MdcHit *hit,
double tbunch,
int mode,
56 int incolor,
int tIndex)
const {
67 double driftmin = 0.002;
76 {color = posStereoColor;}
80 {color = negStereoColor;}
85 display->setlcolor(color);
88 if (mode<0) {mode = display->hitMode(windowXY);}
93 radius = (hit->
driftDist(tbunch, tIndex) > driftmin) ?
96 display->arc(radius, hit->
x() , hit->
y() , 1., 1.);
99 display->arc(0.75, hit->
x() , hit->
y() , 1., 1.);
102 cerr<<
"Unknown mode."<<endl;
108void MdcPlotHits::plotinfo(
const MdcHit *hit,
double scale,
double tbunch)
113 for (i = 0; i < 5; i++) {
114 string[i] =
new char[20];
118 sprintf(
string[3],
"%d",hit->
wire() );
119 sprintf(
string[2],
"%d",hit->mcTrack() );
120 sprintf(
string[1],
"%6.2f",10.*hit->
driftDist(tbunch, 0) );
121 sprintf(
string[0],
"%6.2f",0.);
123 display->info(windowXY, hit->
x(), hit->
y(),
string, scale, 0);
125 for (i = 0; i < 5; i++) {
unsigned layernumber() const
double driftDist(double, int, double, double, double) const
const MdcLayer * layer() const
const MdcSWire * wire() const