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];
119 sprintf(
string[2],
"%d",hit->mcTrack() );
123 display->info(windowXY, hit->
x(), hit->
y(),
string, scale, 0);
125 for (i = 0; i < 5; i++) {
sprintf(cut,"kal_costheta0_em>-0.93&&kal_costheta0_em<0.93&&kal_pxy0_em>=0.05+%d*0.1&&kal_pxy0_em<0.15+%d*0.1&&NGch>=2", j, j)
unsigned layernumber() const
double driftDist(double, int, double, double, double) const
const MdcLayer * layer() const
const MdcSWire * wire() const