BOSS 7.1.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Mdc2DWire Class Reference

#include <Mdc2DWire.h>

+ Inheritance diagram for Mdc2DWire:

Public Member Functions

 Mdc2DWire ()
 
 Mdc2DWire (const char *name, const char *title, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi, Double_t *center)
 
 Mdc2DWire (const char *name, const char *title, Int_t N, Double_t *P)
 
 ~Mdc2DWire ()
 
virtual void Init ()
 
virtual void SetStyle ()
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
virtual void SetHighlighted (bool status=true)
 
virtual void SetFired (bool status=true)
 
virtual bool IsHighlighted ()
 
virtual bool IsFired ()
 
virtual void AddInfo (TString info)
 
virtual void CloseInfo ()
 
virtual void ClearInfo ()
 
virtual void Draw (Option_t *option="")
 
virtual void Paint (Option_t *option="")
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 
virtual bool HasZRSection ()
 
Double_t Range360 (Double_t input)
 
void SetTime (Double_t time)
 
void SetCharge (Double_t charge)
 
void SetColorfulWire (Bool_t colorfulWire, Bool_t subEvTime)
 
void SetQOverflow (Bool_t qOvfl)
 
void SetEvTime (Double_t time)
 
void SetTimeChannel (UInt_t tc)
 
void SetChargeChannel (UInt_t cc)
 
Double_t GetTime () const
 
Double_t GetCharge () const
 
Double_t GetEvTime () const
 
Bool_t GetQOverflow () const
 
UInt_t GetTimeChannel () const
 
UInt_t GetChargeChannel () const
 

Detailed Description

Definition at line 17 of file Mdc2DWire.h.

Constructor & Destructor Documentation

◆ Mdc2DWire() [1/3]

Mdc2DWire::Mdc2DWire ( )

◆ Mdc2DWire() [2/3]

Mdc2DWire::Mdc2DWire ( const char *  name,
const char *  title,
Double_t  rmin,
Double_t  rmax,
Double_t  dz,
Double_t  phi,
Double_t *  center 
)

Definition at line 24 of file Mdc2DWire.cxx.

31{
32
33 SetName(name);
35 fTip = 0;
36 fTube = 0; //Long Peixun's update: Add fTube initialization
37 fHighlighted = false;
38 fFired = false;
39 fColorfulWire = false;
40 fWireType = 1; // axial wire
41 evTime = 0;
42
43 Double_t r = 0.25*(rmax-rmin);
44 fWireCircle = new BesCircle2D(name, title, 0.0, r, &center[0]);
45
46 Double_t dx = fabs(r*cos(phi));
47 Double_t dy = fabs(r*sin(phi));
48 Double_t P[12] = { center[0] - dx, center[1] - dy, center[2] - dz,
49 center[0] + dx, center[1] + dy, center[2] - dz,
50 center[0] - dx, center[1] - dy, center[2] + dz,
51 center[0] + dx, center[1] + dy, center[2] + dz
52 };
53
54 fWireCone = new BesPolygon2D(name, title, 4, P);
55
56 Init();
57}
double sin(const BesAngle a)
Definition: BesAngle.h:210
double cos(const BesAngle a)
Definition: BesAngle.h:213
double P(RecMdcKalTrack *trk)
cout<<"end eff5"<< endl;TGraph *gr1=new TGraphErrors(15, x, eff_ep, errx, err_ep);TGraph *gr2=new TGraphErrors(15, x, eff_em, errx, err_em);TGraph *gr3=new TGraphErrors(15, x, eff_ep2, errx, err_ep2);TGraph *gr4=new TGraphErrors(15, x, eff_em2, errx, err_em2);TGraph *gr5=new TGraphErrors(15, x, eff_ep3, errx, err_ep3);TGraph *gr6=new TGraphErrors(15, x, eff_em3, errx, err_em3);TGraph *gr7=new TGraphErrors(15, x, eff_ep4, errx, err_ep4);TGraph *gr8=new TGraphErrors(15, x, eff_em4, errx, err_em4);TGraph *gr9=new TGraphErrors(15, x, eff_ep5, errx, err_ep5);TGraph *gr10=new TGraphErrors(15, x, eff_em5, errx, err_em5);TCanvas *c1=new TCanvas("c1","bhabha_eff", 100, 10, 600, 400);TMultiGraph *mg=new TMultiGraph();mg-> SetTitle("bhabha_eff")
titledef title[20]
virtual void Init()
Definition: Mdc2DWire.cxx:133

◆ Mdc2DWire() [3/3]

Mdc2DWire::Mdc2DWire ( const char *  name,
const char *  title,
Int_t  N,
Double_t *  P 
)

Definition at line 61 of file Mdc2DWire.cxx.

62{
63 SetName(name);
65 fTip = 0;
66 fHighlighted = false;
67 fFired = false;
68 fColorfulWire = false;
69 fWireType = 2; // stereo wire
70
71 Double_t *tubeP = &P[3*N/2]; // east four points, P4~P7
72 fTube = new BesPolygon2D(name, title, N/2, tubeP);
73 fWireCircle = 0;
74 fWireCone = 0;
75
76 for (Int_t i = 0; i < 3; i++) {
77 fWestHole[i] = (P[i] + P[3+i] + P[6+i] + P[9+i] )/4.0; // (P0+P1+P2+P3)/4
78 fEastHole[i] = (P[12+i] + P[15+i] + P[18+i] + P[21+i])/4.0; // (P4+P5+P6+P7)/4
79 }
80 TVector3 westVec(fWestHole[0], fWestHole[1], fWestHole[2]);
81 TVector3 eastVec(fEastHole[0], fEastHole[1], fEastHole[2]);
82 fWestPhi = westVec.Phi() * TMath::RadToDeg();
83 fEastPhi = eastVec.Phi() * TMath::RadToDeg();
84 if (fWestPhi < 0.0) fWestPhi += 360.0;
85 if (fEastPhi < 0.0) fEastPhi += 360.0;
86
87 // ------XY------
88 Double_t rMax = sqrt( (P[4*3] -P[7*3]) * (P[4*3]-P[7*3]) +
89 (P[4*3+1]-P[7*3+1]) * (P[4*3+1]-P[7*3+1]) +
90 (P[4*3+2]-P[7*3+2]) * (P[4*3+2]-P[7*3+2]) ) / 2.0;
91
92 Double_t rMinRatio = 0.0001; // min bubble radius = rMinRatio * rMax;
93 Double_t rMaxRatio = 0.8;//0.6; // 0.4//yzhang
94
95 Double_t newP[12];
96 Double_t edge = rMaxRatio*0.0001; //*0.85
97 for (Int_t i = 0; i < 3; i++) {
98 newP[i] = (0.5+edge*rMinRatio)*(P[i]+P[3+i])*0.5
99 + (0.5-edge*rMinRatio)*(P[6+i]+P[9+i])*0.5; // near center of P0+P1
100 newP[3+i] = (0.5-edge*rMinRatio)*(P[i]+P[3+i])*0.5
101 + (0.5+edge*rMinRatio)*(P[6+i]+P[9+i])*0.5; // near center of P2+P3
102 newP[6+i] = (0.5+edge*rMaxRatio)*(P[12+i]+P[15+i])*0.5
103 + (0.5-edge*rMaxRatio)*(P[18+i]+P[21+i])*0.5; // near center of P4+P5
104 newP[9+i] = (0.5-edge*rMaxRatio)*(P[12+i]+P[15+i])*0.5
105 + (0.5+edge*rMaxRatio)*(P[18+i]+P[21+i])*0.5; // near center of P6+P7
106 }
107 fWireCone = new BesPolygon2D("WireCone", "WireCone", 4, &newP[0]);
108
109 fWireCircle =
110 new BesCircle2D("WireBubble", "WireBubble", 0.0, rMaxRatio*rMax, &fEastHole[0]);
111
112 // ------ZR------
113 fZRPosMarker2D =
114 new BesMarker2D("MdcZRPos", "MdcZRPos", fEastHole[0], fEastHole[1], fEastHole[2]);
115
116 Init();
117}

◆ ~Mdc2DWire()

Mdc2DWire::~Mdc2DWire ( )

Definition at line 121 of file Mdc2DWire.cxx.

121 {
122
123 //Long Peixun's update: remove "if"
124 delete fTube;
125 delete fWireCircle;
126 delete fWireCone;
127 delete fZRPosMarker2D;
128 delete fTip;
129}

Member Function Documentation

◆ AddInfo()

virtual void Mdc2DWire::AddInfo ( TString  info)
inlinevirtual

Definition at line 37 of file Mdc2DWire.h.

37{ fInfoCon.push_back(info); }

Referenced by MdcROOTGeo::SetHits().

◆ ClearInfo()

void Mdc2DWire::ClearInfo ( )
virtual

Definition at line 185 of file Mdc2DWire.cxx.

186{
187 fInfoCon.clear();
188 fTip->DeleteText();
189}

Referenced by MdcROOTGeo::SetHits().

◆ CloseInfo()

void Mdc2DWire::CloseInfo ( )
virtual

Definition at line 191 of file Mdc2DWire.cxx.

192{
193 if (fTip) {
194 fTip->Clear();
195
196 if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
197 fTip->SetText(fInfoCon);
198 }
199 else
200 cout << "Mdc2DWire::CloseInfo, not initialized" << endl;
201}
virtual void SetText(std::vector< TString > infoCon)
Definition: BesPaveText.cxx:35

Referenced by Init(), and MdcROOTGeo::SetHits().

◆ DistancetoPrimitive()

Int_t Mdc2DWire::DistancetoPrimitive ( Int_t  px,
Int_t  py 
)
virtual

Definition at line 205 of file Mdc2DWire.cxx.

205 {
206 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
207 if (view->GetViewType() & kXYView) {
208 return fWireCircle->DistancetoPrimitive(px, py);
209 }
210 else if (view->GetViewType() & kZRView) {
211 if (fZRPosMarker2D) {
212 //Long Peixun's update: Remove duplicate code
213
214 //We need to research what damage fZRPoseMarker2D pointers
215 //This bug can be avoid by changing the initialize order of subdetectors
216 // if ((unsigned long long)(fZRPosMarker2D) & 0xFFFFFFFF00000000)
217 // {
218 // cout << this << " " << fZRPosMarker2D << endl;
219 // }
220
221 return fZRPosMarker2D->DistancetoPrimitive(px, py);
222 }
223 }
224
225 return 999;
226}
@ kXYView
Definition: BesStatus.h:18
@ kZRView
Definition: BesStatus.h:19
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
Definition: BesCircle2D.cxx:78
EBESViewType GetViewType()
Definition: BesView.h:71

◆ Draw()

void Mdc2DWire::Draw ( Option_t *  option = "")
virtual

Definition at line 282 of file Mdc2DWire.cxx.

282 {
283 //
284 // Mdc2DWire draw function
285 TString opt = option;
286 opt.ToUpper();
287
288 AppendPad(option);
289}

Referenced by MdcROOTGeo::Draw(), and MdcROOTGeo::DrawHits().

◆ ExecuteEvent()

void Mdc2DWire::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
)
virtual

Definition at line 230 of file Mdc2DWire.cxx.

230 {
231
232 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
233
234 if (gBesCursor->GetType() == kBesHand) {
235 if (view) view->ExecuteEvent(event, px, py);
236 }
237 else if (gBesCursor->GetType() == kBesPick){
238
239 if (gPad) gPad->SetCursor(kPointer);
240
241 Int_t origColor = 1;
242
243 switch (event) {
244
245 case kMouseEnter :
246
247 if ( fWireCircle ) origColor = fWireCircle->GetFillColor();
248 if ( fZRPosMarker2D ) origColor = fZRPosMarker2D->GetMarkerColor();
249 this->SetHighlighted(true);
250
251 if (this->IsFired() || view->GetVisMdcWires()) {
252 Draw("WIRE,SAME");
253
254 fTip->SetPos(px, py);
255 view->UpdateView(0);
256
257 //Long Peixun's update: If ShowInfo is not checked, don't show tip text.
258 if (gBesCursor->GetShowInfo()) fTip->Draw("BR,SAME"); // "BR,ARC,SAME"
259 gPad->Modified();
260 gPad->Update();
261 }
262 break;
263
264 case kMouseLeave:
265
266 if (this->IsHighlighted()) {
267 this->SetHighlighted(false);
268 if (view->GetVisMdcWires()) Draw("WIRE,SAME");
269
270 view->UpdateView(0);
271 gPad->Modified();
272 gPad->Update();
273 }
274 break;
275 }
276
277 }
278}
@ kBesHand
Definition: BesCursor.h:15
@ kBesPick
Definition: BesCursor.h:14
R__EXTERN BesCursor * gBesCursor
Definition: BesCursor.h:40
legend Draw()
Bool_t GetShowInfo()
Definition: BesCursor.h:35
EBESCursorType GetType()
Definition: BesCursor.h:32
virtual void SetPos(Int_t px, Int_t py)
Definition: BesPaveText.cxx:86
virtual void UpdateView(Bool_t resetview=kFALSE)
Definition: BesView.cxx:657
Bool_t GetVisMdcWires()
Definition: BesView.h:114
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Definition: BesView.cxx:366
virtual void SetHighlighted(bool status=true)
Definition: Mdc2DWire.h:32
virtual bool IsFired()
Definition: Mdc2DWire.h:35
virtual bool IsHighlighted()
Definition: Mdc2DWire.h:34

◆ GetCharge()

Double_t Mdc2DWire::GetCharge ( ) const
inline

Definition at line 58 of file Mdc2DWire.h.

58{ return mdcCharge; }

◆ GetChargeChannel()

UInt_t Mdc2DWire::GetChargeChannel ( ) const
inline

Definition at line 62 of file Mdc2DWire.h.

62{ return chargeChannel; }

Referenced by MdcROOTGeo::DrawHits().

◆ GetEvTime()

Double_t Mdc2DWire::GetEvTime ( ) const
inline

Definition at line 59 of file Mdc2DWire.h.

59{ return evTime; }

◆ GetObjectInfo()

char * Mdc2DWire::GetObjectInfo ( Int_t  px,
Int_t  py 
) const
virtual

Definition at line 411 of file Mdc2DWire.cxx.

411 {
412
413 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
414 if (view) return view->GetObjectInfo(px, py);
415 else return TObject::GetObjectInfo(px, py);
416}
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Definition: BesView.cxx:869

◆ GetQOverflow()

Bool_t Mdc2DWire::GetQOverflow ( ) const
inline

Definition at line 60 of file Mdc2DWire.h.

60{ return qOverflow; }

Referenced by MdcROOTGeo::DrawHits().

◆ GetTime()

Double_t Mdc2DWire::GetTime ( ) const
inline

Definition at line 57 of file Mdc2DWire.h.

57{ return mdcTime; }

◆ GetTimeChannel()

UInt_t Mdc2DWire::GetTimeChannel ( ) const
inline

Definition at line 61 of file Mdc2DWire.h.

61{ return timeChannel; }

Referenced by MdcROOTGeo::DrawHits().

◆ HasZRSection()

bool Mdc2DWire::HasZRSection ( )
virtual

Definition at line 420 of file Mdc2DWire.cxx.

421{
422 if (fWireType != 2) return false;
423
424 bool flag = false;
425 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
426 Double_t viewPhi = view->GetLongitude();
427 viewPhi = Range360(viewPhi);
428 //if (GetName() == TString("Layer0Wire0")) cout << "view " << viewPhi << endl;
429
430 Double_t zrPhi = viewPhi-90.0;
431 zrPhi = Range360(zrPhi);
432 //if (GetName() == TString("Layer0Wire0")) cout << zrPhi << endl;
433
434 for (Int_t i = 0; i < 2; i++) {
435 if (i==1) {
436 zrPhi += 180.0;
437 zrPhi = Range360(zrPhi);
438 }
439
440 if ( fabs(fEastPhi-fWestPhi) < 180.0 ) { // no cross phi=0.0
441 if ( (fEastPhi-zrPhi)*(fWestPhi-zrPhi) > 0.0 ) flag = false;
442 else {
443 Double_t factor = fabs( (fEastPhi-zrPhi)/(fEastPhi-fWestPhi) );
444 for (Int_t i = 0; i < 3; i++) {
445 fZRSectionPos[i] = factor*fWestHole[i] + (1.0-factor)*fEastHole[i];
446 }
447 flag = true;
448 break;
449 }
450 }
451 else { // cross phi=0.0
452 if ( (fEastPhi-zrPhi)*(fWestPhi-zrPhi) < 0.0 ) flag = false;
453 else { // range 0~360 -> -180~180
454 Double_t tempEastPhi = fEastPhi;
455 if (tempEastPhi >= 180.0) tempEastPhi -= 360.0;
456 Double_t tempWestPhi = fWestPhi;
457 if (tempWestPhi >= 180.0) tempWestPhi -= 360.0;
458 Double_t tempZRPhi = zrPhi;
459 if (tempZRPhi >= 180.0) tempZRPhi -= 360.0;
460
461 Double_t factor = fabs( (tempEastPhi-tempZRPhi)/(tempEastPhi-tempWestPhi) );
462 for (Int_t i = 0; i < 3; i++) {
463 fZRSectionPos[i] = factor*fWestHole[i] + (1.0-factor)*fEastHole[i];
464 }
465 flag = true;
466 break;
467 }
468 }
469 }
470
471 return flag;
472}
Double_t GetLongitude()
Definition: BesTView.h:95
Double_t Range360(Double_t input)
Definition: Mdc2DWire.cxx:476

Referenced by Paint().

◆ Init()

void Mdc2DWire::Init ( )
virtual

Definition at line 133 of file Mdc2DWire.cxx.

133 {
134
135 SetStyle();
136
137 fTip = new BesPaveText(0, 0, 0.1, 0.1);
138 CloseInfo();
139}
virtual void CloseInfo()
Definition: Mdc2DWire.cxx:191
virtual void SetStyle()
Definition: Mdc2DWire.cxx:143

Referenced by Mdc2DWire().

◆ IsFired()

virtual bool Mdc2DWire::IsFired ( )
inlinevirtual

Definition at line 35 of file Mdc2DWire.h.

35{ return fFired; }

Referenced by ExecuteEvent(), and Paint().

◆ IsHighlighted()

virtual bool Mdc2DWire::IsHighlighted ( )
inlinevirtual

Definition at line 34 of file Mdc2DWire.h.

34{ return fHighlighted; }

Referenced by BesGeoTrack::ExecuteEvent(), ExecuteEvent(), and Paint().

◆ Paint()

void Mdc2DWire::Paint ( Option_t *  option = "")
virtual

Definition at line 293 of file Mdc2DWire.cxx.

293 {
294
295 TString opt = option;
296 opt.ToUpper();
297
298 BesView *view = dynamic_cast<BesView*>(gPad->GetView());
299
300 //gStyle->SetPalette(1);
301 if (view->GetViewType() & kXYView) {
302
303 Double_t wcCenter[3], ncCenter[3];
304 fWireCircle->GetCenter(&wcCenter[0]);
305 view->WCtoNDC(wcCenter, &ncCenter[0]);
306 Double_t x1, y1, x2, y2;
307 Double_t d = 0.05;
308 gPad->GetRange(x1, y1, x2, y2);
309
310 // Only draw wire in pad range
311 if (ncCenter[0] > x1-d && ncCenter[0] < x2+d &&
312 ncCenter[1] > y1-d && ncCenter[1] < y2+d) {
313 if (opt.Contains("TUBE") && fTube ) {
314 fTube->SetLineColor(lcTube);
315 fTube->SetLineWidth(lwTube);
316 fTube->SetFillColor(fcTube);
317 fTube->SetFillStyle(fsTube);
318
319 fTube->Paint();
320 }
321
322 if (this->IsFired()) {
323 if (fWireCircle) {
324 fWireCircle->SetLineColor(lcWireFired);
325 fWireCircle->SetLineWidth(lwCircleFired);
326 fWireCircle->SetFillColor(fcCircleFired);
327 fWireCircle->SetFillStyle(fsCircleFired);
328 }
329 if (fWireCone) {
330 fWireCone->SetLineColor(lcWireFired);
331 fWireCone->SetLineWidth(lwConeFired);
332 fWireCone->SetFillColor(fcConeFired);
333 fWireCone->SetFillStyle(fsConeFired);
334 }
335 }
336 else {
337 if (fWireCone) {
338 fWireCone->SetLineColor(lcWire);
339 fWireCone->SetLineWidth(lwCone);
340 fWireCone->SetFillColor(fcCone);
341 fWireCone->SetFillStyle(fsCone);
342 }
343 if (fWireCircle) {
344 fWireCircle->SetLineColor(lcWire);
345 fWireCircle->SetLineWidth(lwCircle);
346 fWireCircle->SetFillColor(fcCircle);
347 fWireCircle->SetFillStyle(fsCircle);
348 }
349 }
350
351 if (this->IsHighlighted()) {
352 if (fWireCircle) {
353 fWireCircle->SetLineColor(lcWireHL);
354 fWireCircle->SetLineWidth(lwCircleHL);
355 fWireCircle->SetFillColor(fcCircleHL);
356 fWireCircle->SetFillStyle(fsCircleHL);
357 }
358 if (fWireCone) {
359 fWireCone->SetLineColor(lcWireHL);
360 fWireCone->SetLineWidth(lwConeHL);
361 fWireCone->SetFillColor(fcConeHL);
362 fWireCone->SetFillStyle(fsConeHL);
363 }
364 }
365 if (opt.Contains("WIRE")) {
366 //Long Peixun's update: Only draw fired wires' cone
367 if (IsFired()) fWireCone->Paint(); //Long Peixun's update: Draw colorful wires' cone
368 if (fWireCircle) fWireCircle->Paint();
369 }
370 }
371 }
372
373 if (view->GetViewType() & kZRView) {
374 if (HasZRSection()) {
375 fZRPosMarker2D->SetWCX(fZRSectionPos[0]);
376 fZRPosMarker2D->SetWCY(fZRSectionPos[1]);
377 fZRPosMarker2D->SetWCZ(fZRSectionPos[2]);
378 fZRPosMarker2D->SetMarkerColor(cMarker);
379 fZRPosMarker2D->SetMarkerStyle(sMarker);
380 fZRPosMarker2D->SetMarkerSizeMultiple(sizeMarker);
381
382 if (this->IsFired()) {
383 if (fZRPosMarker2D) {
384 fZRPosMarker2D->SetMarkerColor(cMarkerFired);
385 fZRPosMarker2D->SetMarkerStyle(sMarkerFired);
386 }
387 }
388 else {
389 if (fZRPosMarker2D) {
390 fZRPosMarker2D->SetMarkerColor(cMarker);
391 fZRPosMarker2D->SetMarkerStyle(sMarker);
392 }
393 }
394
395 if (this->IsHighlighted()) {
396 if (fZRPosMarker2D) {
397 fZRPosMarker2D->SetMarkerColor(cMarkerHL);
398 fZRPosMarker2D->SetMarkerStyle(sMarkerHL);
399 }
400 }
401
402 if (opt.Contains("WIRE")) {
403 if (fZRPosMarker2D) fZRPosMarker2D->Paint();
404 }
405 }
406 }
407}
virtual void Paint(Option_t *option="")
virtual void GetCenter(Double_t *center)
virtual void SetWCY(Float_t input)
Definition: BesMarker2D.h:45
virtual void SetMarkerSizeMultiple(Int_t input)
Definition: BesMarker2D.h:34
virtual void Paint(Option_t *option="")
virtual void SetWCZ(Float_t input)
Definition: BesMarker2D.h:46
virtual void SetWCX(Float_t input)
Definition: BesMarker2D.h:44
virtual void Paint(Option_t *option="")
virtual void WCtoNDC(const Float_t *pw, Float_t *pn)
Definition: BesView.cxx:728
virtual bool HasZRSection()
Definition: Mdc2DWire.cxx:420

◆ Range360()

Double_t Mdc2DWire::Range360 ( Double_t  input)

Definition at line 476 of file Mdc2DWire.cxx.

477{
478 if (input >= 360.0) {
479 do {
480 input -= 360.0;
481 }
482 while (input >= 360.0);
483 }
484 else if (input < 0.0) {
485 do {
486 input += 360.0;
487 }
488 while (input < 0.0);
489 }
490
491 return input;
492}

Referenced by HasZRSection().

◆ SetCharge()

void Mdc2DWire::SetCharge ( Double_t  charge)

Definition at line 503 of file Mdc2DWire.cxx.

504{
505 mdcCharge = charge;
506}
float charge

Referenced by MdcROOTGeo::SetHits().

◆ SetChargeChannel()

void Mdc2DWire::SetChargeChannel ( UInt_t  cc)

Definition at line 528 of file Mdc2DWire.cxx.

529{
530 chargeChannel = cc;
531}

Referenced by MdcROOTGeo::SetHits().

◆ SetColorfulWire()

void Mdc2DWire::SetColorfulWire ( Bool_t  colorfulWire,
Bool_t  subEvTime 
)

Definition at line 535 of file Mdc2DWire.cxx.

536{
537 fColorfulWire = colorfulWire;
538 if(fColorfulWire){
539 //yzhang change LINE COLOR of fired mdc wires
540 //n color bin = 50, time of max bin is 2000
541 //time max value = 1943.8125 ~ 2000 ns
542 //no time info color is kGray
543 //time > 2000 && time <=10000, color is kBlack
544 int tempColor;
545 if(subEvTime){
546 // raw time - event start time
547 double tempMdcTime = mdcTime - evTime;
548 if(fabs(evTime)>0.0001) tempMdcTime += 230;
549 if(tempMdcTime>10000) {
550 tempColor = kGray;
551 }else if(tempMdcTime>2000&&tempMdcTime<=10000){
552 tempColor = kRed;
553 }else if(tempMdcTime<-10){
554 tempColor = kWhite;
555 }else{
556 tempColor = 51 + (int) (tempMdcTime/40);
557 }
558 }else{
559 //raw time
560 if(mdcTime>10000) {
561 tempColor= kGray;
562 }else if(mdcTime>2000&&mdcTime<=10000){
563 tempColor = kRed;
564 }else{
565 tempColor = 51 + (int) (mdcTime/40);
566 }
567 }
568 lcWireFired = tempColor;
569 //std::cout<< " mdcTime "<<mdcTime <<" evTime "<< evTime << " t-t0 "<< mdcTime - evTime +230<< " lcWireFired " << lcWireFired <<std::endl;
570
571 //yzhang change FILL COLOR of fired mdc wires
572 //n color bin = 50, charge of max bin is 2000
573 //charge max value = 29783 ~ 30000
574 //adc> 2000&&<=30000 color is kBlack
575 //no adc color is kGray
576 if(mdcCharge>30000){
577 tempColor = kGray;
578 }else if(mdcCharge>2000&&mdcCharge<=30000){
579 tempColor = kRed;
580 }else {
581 tempColor = 51 + (int) (mdcCharge/40);
582 }
583 if(qOverflow) { tempColor = kBlack; }
584 fcCircleFired = tempColor;
585 //std::cout<< " mdcCharge "<<mdcCharge<<" ovfl "<<qOverflow<<" fcCircleFired " << fcCircleFired<< std::endl;
586 }else{
587 lcWireFired = kRed;
588 fcCircleFired = 9004;
589 }
590}

Referenced by MdcROOTGeo::DrawHits().

◆ SetEvTime()

void Mdc2DWire::SetEvTime ( Double_t  time)

Definition at line 517 of file Mdc2DWire.cxx.

518{
519 evTime = time;
520}
Double_t time

Referenced by MdcROOTGeo::SetHits().

◆ SetFired()

virtual void Mdc2DWire::SetFired ( bool  status = true)
inlinevirtual

Definition at line 33 of file Mdc2DWire.h.

33{ fFired = status; }

Referenced by MdcROOTGeo::Draw(), and MdcROOTGeo::DrawHits().

◆ SetHighlighted()

virtual void Mdc2DWire::SetHighlighted ( bool  status = true)
inlinevirtual

Definition at line 32 of file Mdc2DWire.h.

32{ fHighlighted = status; }

Referenced by BesGeoTrack::ExecuteEvent(), and ExecuteEvent().

◆ SetQOverflow()

void Mdc2DWire::SetQOverflow ( Bool_t  qOvfl)

Definition at line 510 of file Mdc2DWire.cxx.

511{
512 qOverflow = qOvfl;
513}

Referenced by MdcROOTGeo::SetHits().

◆ SetStyle()

void Mdc2DWire::SetStyle ( )
virtual

Definition at line 143 of file Mdc2DWire.cxx.

144{
145 lcTube = kBlack; // grey;
146 lwTube = 1;
147 fcTube = kBlack; // grey 15;
148 fsTube = 4000;
149
150 lcWire = 15;
151 if (fWireType == 1) lcWire = kGreen;
152 if (fWireType == 2) lcWire = kBlue;
153 lwCircle = 1;
154 lwCone = 1;
155 fcCircle = kWhite;
156 fcCone = 0;
157 fsCircle = 1001;
158 fsCone = 0;
159
160 lcWireFired = kRed;
161 lwCircleFired = 2;//yzhang 2;
162 lwConeFired = 2;
163 fcCircleFired = 9004; //kBlack;
164 fcConeFired = kBlack;
165 fsCircleFired = 1001;//solid
166 fsConeFired = 3001;
167
168 lcWireHL = kMagenta;//yzhang lcWire;
169 lwCircleHL = 2;
170 lwConeHL = 2;
171 fcCircleHL = kMagenta;//yzhang kBlack;
172 fcConeHL = kRed;
173 fsCircleHL = 1001;
174 fsConeHL = 4000;
175
176 sizeMarker = 4;
177 cMarker = kBlue;
178 cMarkerFired = kRed; // color of fired marker
179 cMarkerHL = cMarker; // cMarkerFired;
180 sMarker = 24;
181 sMarkerFired = 20; // style of fired marker
182 sMarkerHL = 25; // style of highlighted marker
183}

Referenced by Init().

◆ SetTime()

void Mdc2DWire::SetTime ( Double_t  time)

Definition at line 496 of file Mdc2DWire.cxx.

497{
498 mdcTime = time;
499}

Referenced by MdcROOTGeo::SetHits().

◆ SetTimeChannel()

void Mdc2DWire::SetTimeChannel ( UInt_t  tc)

Definition at line 524 of file Mdc2DWire.cxx.

525{
526 timeChannel = tc;
527}

Referenced by MdcROOTGeo::SetHits().


The documentation for this class was generated from the following files: