7#include "BesVisLib/Tof2DScin.h"
8#include "BesVisLib/BesView.h"
9#include "BesVisLib/BesCursor.h"
37 fZRSectionTolerance[1] = 0.071;
38 fZRSectionTolerance[2] = fZRSectionTolerance[0] = 0.1647;
43 for (Int_t i = 0; i < 3*4; i++) {
44 Pxy[i] = (
P[i] +
P[i+3*4])/2.0;
49 fScinXYFired =
new BesPolygon2D(name, title, 4, &Pxy[0]);
54 Int_t iSeq[8] = {0,3,1,2,5,6,4,7};
55 for (Int_t i = 0; i < 4; i++) {
56 for (Int_t j = 0; j < 3; j++) {
57 Pzr[3*i+j] = (
P[3*iSeq[2*i]+j] +
P[3*iSeq[2*i+1]+j])/2.0;
63 fScinZR =
new BesPolygon2D(TString(name)+TString(
"zr"), title, 4, &Pzr[0]);
64 fScinZRFired =
new BesPolygon2D(TString(name)+TString(
"zr"), title, 4, &Pzr[0]);
69 Double_t phiTemp = fPhiMin;
85 if (fScinXY)
delete fScinXY;
86 if (fScinZR)
delete fScinZR;
87 if (fScinXYFired)
delete fScinXYFired;
88 if (fScinZRFired)
delete fScinZRFired;
108 lcScinFiredHL = kRed;
110 fcScinFiredHL = kBlue;
111 fsScinFiredHL = 4000;
126 if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
130 cout <<
"Tof2DScin::CloseInfo, not initialized" << endl;
162 if (gPad) gPad->SetCursor(kPointer);
175 fTip->Draw(
"BR,SAME");
200 TString opt = option;
210 TString opt = option;
218 fScinXYFired->SetLineColor(lcScinFired);
219 fScinXYFired->SetLineWidth(lwScinFired);
220 fScinXYFired->SetFillColor(fcScinFired);
221 fScinXYFired->SetFillStyle(fsScinFired);
226 fScinXY->SetLineColor(lcScin);
227 fScinXY->SetLineWidth(lwScin);
228 fScinXY->SetFillColor(fcScin);
229 fScinXY->SetFillStyle(fsScin);
234 fScinXY->SetLineColor(lcScinHL);
235 fScinXY->SetLineWidth(lwScinHL);
236 fScinXY->SetFillColor(fcScinHL);
237 fScinXY->SetFillStyle(fsScinHL);
240 fScinXYFired->SetLineColor(lcScinFiredHL);
241 fScinXYFired->SetLineWidth(lwScinFiredHL);
242 fScinXYFired->SetFillColor(fcScinFiredHL);
243 fScinXYFired->SetFillStyle(fsScinFiredHL);
247 if (fScinXY) fScinXY->
Paint();
256 fScinXYFired->
SetSize(fCharge/fChargeMax);
257 fScinXYFired->
Paint();
267 fScinZRFired->SetLineColor(lcScinFired);
268 fScinZRFired->SetLineWidth(lwScinFired);
269 fScinZRFired->SetFillColor(fcScinFired);
270 fScinZRFired->SetFillStyle(fsScinFired);
275 fScinZR->SetLineColor(lcScin);
276 fScinZR->SetLineWidth(lwScin);
277 fScinZR->SetFillColor(fcScin);
278 fScinZR->SetFillStyle(fsScin);
283 fScinZR->SetLineColor(lcScinHL);
284 fScinZR->SetLineWidth(lwScinHL);
285 fScinZR->SetFillColor(fcScinHL);
286 fScinZR->SetFillStyle(fsScinHL);
289 fScinZRFired->SetLineColor(lcScinFiredHL);
290 fScinZRFired->SetLineWidth(lwScinFiredHL);
291 fScinZRFired->SetFillColor(fcScinFiredHL);
292 fScinZRFired->SetFillStyle(fsScinFiredHL);
296 if (fScinZR) fScinZR->
Paint();
305 fScinZRFired->
SetSize(fCharge/fChargeMax);
306 fScinZRFired->
Paint();
321 else return TObject::GetObjectInfo(px, py);
334 Double_t zrPhi = viewPhi-90.0;
338 for (Int_t i = 0; i < 2; i++) {
344 if (zrPhi >= fPhiMin-fZRSectionTolerance[
GetPart()] &&
345 zrPhi <= fPhiMax+fZRSectionTolerance[
GetPart()]) {
349 else if (fPhiMin > fPhiMax) {
350 if (zrPhi >= fPhiMin-fZRSectionTolerance[
GetPart()] ||
351 zrPhi <= fPhiMax+fZRSectionTolerance[
GetPart()]) {
365 Double_t angle = TMath::ACos(
x/TMath::Sqrt(
x*
x+y*y) ) * TMath::RadToDeg();
366 if ( y<0.0 ) angle *= -1;
376 if (input >= 360.0) {
380 while (input >= 360.0);
382 else if (input < 0.0) {
double P(RecMdcKalTrack *trk)
gr SetTitle("BbLum_000XXXX")
R__EXTERN BesCursor * gBesCursor
ClassImp(Tof2DScin) Tof2DScin
virtual void SetText(std::vector< TString > infoCon)
virtual void SetPos(Int_t px, Int_t py)
virtual void SetSize(Double_t size)
virtual void Paint(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void UpdateView(Bool_t resetview=kFALSE)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
EBESViewType GetViewType()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Bool_t GetVisTofHitsWest()
Bool_t GetVisTofHitsGlobal()
Bool_t GetVisTofHitsBarrel()
Bool_t GetVisTofHitsEast()
virtual void SetHighlighted(bool status=true)
virtual void Draw(Option_t *option="")
Double_t Range360(Double_t input)
Double_t GetAngle(Double_t x, Double_t y)
virtual void Paint(Option_t *option="")
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual bool IsHighlighted()
virtual bool HasZRSection()
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)