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 if (fPhiMin > fPhiMax && fPhiMin - fPhiMax < 180.0)
71 Double_t phiTemp = fPhiMin;
76 if (fPhiMax > fPhiMin && fPhiMax - fPhiMin > 180.0)
78 Double_t phiTemp = fPhiMin;
117 lcScinFiredHL = kRed;
119 fcScinFiredHL = kBlue;
120 fsScinFiredHL = 4000;
135 if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
139 cout <<
"Tof2DScin::CloseInfo, not initialized" << endl;
171 if (gPad) gPad->SetCursor(kPointer);
210 TString opt = option;
220 TString opt = option;
228 fScinXYFired->SetLineColor(lcScinFired);
229 fScinXYFired->SetLineWidth(lwScinFired);
230 fScinXYFired->SetFillColor(fcScinFired);
231 fScinXYFired->SetFillStyle(fsScinFired);
236 fScinXY->SetLineColor(lcScin);
237 fScinXY->SetLineWidth(lwScin);
238 fScinXY->SetFillColor(fcScin);
239 fScinXY->SetFillStyle(fsScin);
244 fScinXY->SetLineColor(lcScinHL);
245 fScinXY->SetLineWidth(lwScinHL);
246 fScinXY->SetFillColor(fcScinHL);
247 fScinXY->SetFillStyle(fsScinHL);
250 fScinXYFired->SetLineColor(lcScinFiredHL);
251 fScinXYFired->SetLineWidth(lwScinFiredHL);
252 fScinXYFired->SetFillColor(fcScinFiredHL);
253 fScinXYFired->SetFillStyle(fsScinFiredHL);
257 if (fScinXY) fScinXY->
Paint();
266 fScinXYFired->
SetSize(fCharge/fChargeMax);
267 fScinXYFired->
Paint();
277 fScinZRFired->SetLineColor(lcScinFired);
278 fScinZRFired->SetLineWidth(lwScinFired);
279 fScinZRFired->SetFillColor(fcScinFired);
280 fScinZRFired->SetFillStyle(fsScinFired);
285 fScinZR->SetLineColor(lcScin);
286 fScinZR->SetLineWidth(lwScin);
287 fScinZR->SetFillColor(fcScin);
288 fScinZR->SetFillStyle(fsScin);
293 fScinZR->SetLineColor(lcScinHL);
294 fScinZR->SetLineWidth(lwScinHL);
295 fScinZR->SetFillColor(fcScinHL);
296 fScinZR->SetFillStyle(fsScinHL);
299 fScinZRFired->SetLineColor(lcScinFiredHL);
300 fScinZRFired->SetLineWidth(lwScinFiredHL);
301 fScinZRFired->SetFillColor(fcScinFiredHL);
302 fScinZRFired->SetFillStyle(fsScinFiredHL);
306 if (fScinZR) fScinZR->
Paint();
315 fScinZRFired->
SetSize(fCharge/fChargeMax);
316 fScinZRFired->
Paint();
331 else return TObject::GetObjectInfo(px, py);
344 Double_t zrPhi = viewPhi-90.0;
348 for (Int_t i = 0; i < 2; i++) {
354 if (zrPhi >= fPhiMin-fZRSectionTolerance[
GetPart()] &&
355 zrPhi <= fPhiMax+fZRSectionTolerance[
GetPart()]) {
359 else if (fPhiMin > fPhiMax) {
360 if (zrPhi >= fPhiMin-fZRSectionTolerance[
GetPart()] ||
361 zrPhi <= fPhiMax+fZRSectionTolerance[
GetPart()]) {
375 Double_t angle = TMath::ACos(
x/TMath::Sqrt(
x*
x+y*y) ) * TMath::RadToDeg();
376 if ( y<0.0 ) angle *= -1;
386 if (input >= 360.0) {
390 while (input >= 360.0);
392 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)