6# include "MdcTrkRecon/MdcPlotHits.h"
7# include "MdcData/MdcHitOnTrack.h"
10# include "MdcOldGraphics/MdcDisplay.h"
12# include "CLHEP/Alist/AIterator.h"
13# include "MdcData/MdcHit.h"
14# include "MdcData/MdcHitOnTrack.h"
15# include "MdcTrkRecon/dchGlobal.h"
19int MdcPlotHits::axialColor = 1;
20int MdcPlotHits::posStereoColor = 1;
21int MdcPlotHits::negStereoColor = 1;
23MdcPlotHits::MdcPlotHits() {}
31 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();
48 else mycolor = incolor;
49 this->plotAHit( ahit, tbunch, 1, mycolor, dclink->timeIndex() );
56void MdcPlotHits::plotAHit(
const MdcHit* hit,
double tbunch,
int mode,
int incolor,
68 double driftmin = 0.002;
72 if ( incolor >= 0 ) { color = incolor; }
75 if ( hit->
layer()->
view() > 0 ) { color = posStereoColor; }
78 if ( hit->
layer()->
view() < 0.0 ) { color = negStereoColor; }
79 else { color = axialColor; }
82 display->setlcolor( color );
84 if ( mode < 0 ) { mode = display->hitMode( windowXY ); }
89 radius = ( hit->
driftDist( tbunch, tIndex ) > driftmin ) ? hit->
driftDist( tbunch, tIndex )
91 display->arc( radius, hit->
x(), hit->
y(), 1., 1. );
93 case 2: display->arc( 0.75, hit->
x(), hit->
y(), 1., 1. );
break;
94 default: cerr <<
"Unknown mode." << endl;
break;
98void MdcPlotHits::plotinfo(
const MdcHit* hit,
double scale,
double tbunch )
const {
102 for ( i = 0; i < 5; i++ ) {
string[i] =
new char[20]; }
106 sprintf(
string[2],
"%d", hit->mcTrack() );
108 sprintf(
string[0],
"%6.2f", 0. );
110 display->info( windowXY, hit->
x(), hit->
y(),
string, scale, 0 );
112 for ( i = 0; i < 5; i++ ) {
delete string[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