25Muc2DStrip::Muc2DStrip(
const char* name,
const char* title, Int_t N, Double_t *
P, Int_t part, Int_t seg, Int_t gap, Int_t strip)
40 for (Int_t i = 0; i < 4; i++) {
42 Int_t iXYSeq[8] = {1,0,4,5, 2,3,7,6};
43 for (Int_t j = 0; j < 3; j++) {
44 Pxy[3*i+j] = (
P[3*iXYSeq[i]+j] +
P[3*(iXYSeq[i+4])+j] )/2.0;
48 Int_t iXYSeq[8] = {0,1,2,3, 4,5,6,7};
49 for (Int_t j = 0; j < 3; j++) {
50 Pxy[3*i+j] = (
P[3*iXYSeq[i]+j] +
P[3*(iXYSeq[i+4])+j] )/2.0;
62 Int_t iZRSeq[6] = {4,5,1,2,6,7};
63 for (Int_t i = 0; i < nzrPoints; i++) {
64 for (Int_t j = 0; j < 3; j++) {
65 Pzr[3*i+j] =
P[3*iZRSeq[i]+j];
71 Int_t iZRSeq[6] = {1,2,3,7,6,5};
72 for (Int_t i = 0; i < nzrPoints; i++) {
73 for (Int_t j = 0; j < 3; j++) {
74 Pzr[3*i+j] =
P[3*iZRSeq[i]+j];
79 fStripZR =
new BesPolygon2D(name, title, nzrPoints, &Pzr[0]);
93 if (fStripXY)
delete fStripXY;
94 if (fStripZR)
delete fStripZR;
130 if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
134 cout <<
"Muc2DStrip::CloseInfo, not initialized" << endl;
167 if (gPad) gPad->SetCursor(kPointer);
179 fTip->Draw(
"BR,SAME");
207 TString opt = option;
217 TString opt = option;
221 Double_t min[3], max[3];
223 Double_t maxRange = 0.0;
225 for (Int_t i = 0; i < 3; i++) {
226 range[i] = fabs(max[i] - min[i]);
227 if (range[i] > maxRange) maxRange = range[i];
233 fStripXY->SetLineColor(lcStrip);
234 fStripXY->SetLineWidth(lwStrip);
235 fStripXY->SetLineStyle(lsStrip);
236 fStripXY->SetFillColor(fcStrip);
237 fStripXY->SetFillStyle(fsStrip);
242 fStripXY->SetLineColor(lcStripFired);
243 if (maxRange > m_kDrawLineRange && fPart == 1)
244 fStripXY->SetLineColor(fcStripFired);
245 fStripXY->SetLineWidth(lwStripFired);
246 fStripXY->SetLineStyle(lsStripFired);
247 fStripXY->SetFillColor(fcStripFired);
248 fStripXY->SetFillStyle(fsStripFired);
254 fStripXY->SetLineColor(lcStripHL);
255 if (maxRange > m_kDrawLineRange && fPart == 1)
256 fStripXY->SetLineColor(fcStripHL);
257 fStripXY->SetLineWidth(lwStripHL);
258 fStripXY->SetLineStyle(lsStripHL);
259 fStripXY->SetFillColor(fcStripHL);
260 fStripXY->SetFillStyle(fsStripHL);
278 fStripZR->SetLineColor(lcStrip);
279 fStripZR->SetLineWidth(lwStrip);
280 fStripZR->SetLineStyle(lsStrip);
281 fStripZR->SetFillColor(fcStrip);
282 fStripZR->SetFillStyle(fsStrip);
287 fStripZR->SetLineColor(lcStripFired);
288 if (maxRange > m_kDrawLineRange)
289 fStripZR->SetLineColor(fcStripFired);
290 fStripZR->SetLineWidth(lwStripFired);
291 fStripZR->SetLineStyle(lsStripFired);
292 fStripZR->SetFillColor(fcStripFired);
293 fStripZR->SetFillStyle(fsStripFired);
299 fStripZR->SetLineColor(lcStripHL);
300 if (maxRange > m_kDrawLineRange)
301 fStripZR->SetLineColor(fcStripHL);
302 fStripZR->SetLineWidth(lwStripHL);
303 fStripZR->SetLineStyle(lsStripHL);
304 fStripZR->SetFillColor(fcStripHL);
305 fStripZR->SetFillStyle(fsStripHL);
327 else return TObject::GetObjectInfo(px, py);
339 if ( (Int_t)viewPhi % 90 == 0 )
return true;
343 Int_t viewSeg = Int_t(viewPhi/45.0+0.5);
345 Int_t upSeg = viewSeg-2;
346 Int_t downSeg = viewSeg+2;
347 if (upSeg < 0) upSeg += 8;
348 else if (upSeg >= 8) upSeg -= 8;
349 if (downSeg < 0) downSeg += 8;
350 else if (downSeg >= 8) downSeg -= 8;
353 if ( (Int_t)viewPhi % 45 == 0 && (fSeg == upSeg || fSeg == downSeg) )
return true;
364 Double_t angle = TMath::ACos(
x/TMath::Sqrt(
x*
x+y*y) ) * TMath::RadToDeg();
365 if ( y<0.0 ) angle *= -1;
375 if (input >= 360.0) {
379 while (input >= 360.0);
381 else if (input < 0.0) {
R__EXTERN BesCursor * gBesCursor
double P(RecMdcKalTrack *trk)
gr SetTitle("BbLum_000XXXX")
ClassImp(Muc2DStrip) Muc2DStrip
virtual void SetText(std::vector< TString > infoCon)
virtual void SetPos(Int_t px, Int_t py)
virtual void Paint(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual void GetRange(Float_t *min, Float_t *max)
Bool_t GetVisMucHitsWest()
Bool_t GetVisMucHitsGlobal()
Bool_t GetVisMucHitsEast()
virtual void UpdateView(Bool_t resetview=kFALSE)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
Bool_t GetVisMucHitsBarrel()
EBESViewType GetViewType()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Double_t GetAngle(Double_t x, Double_t y)
virtual void SetHighlighted(bool status=true)
virtual bool IsHighlighted()
virtual void Draw(Option_t *option="")
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual bool IsZRVisible()
virtual void Paint(Option_t *option="")
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
Double_t Range360(Double_t input)