BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
EventDisplay/BesVisLib/include/BesVisLib/Emc2DCrystal.h
Go to the documentation of this file.
1
2#ifndef EMC_2D_CRYSTAL_H
3#define EMC_2D_CRYSTAL_H
4
5#include <TAttFill.h>
6#include <TAttLine.h>
7#include <TNamed.h>
8#include <TPaveLabel.h>
9#include <TPaveText.h>
10#include <TVector3.h>
11#include <vector>
12
13#include "BesCircle2D.h"
14#include "BesMarker2D.h"
15#include "BesPaveText.h"
16#include "BesPolygon2D.h"
17
18class Emc2DCrystal : public TNamed, public TAttLine, public TAttFill {
19public:
21 Emc2DCrystal( const char* name, const char* title, Int_t N, Double_t* P, Int_t part,
22 Int_t theta );
24
25 virtual void SetStyle();
26 virtual Int_t DistancetoPrimitive( Int_t px, Int_t py );
27 virtual void ExecuteEvent( Int_t event, Int_t px, Int_t py );
28
29 virtual void SetHighlighted( bool status = true ) { fHighlighted = status; }
30 virtual void SetFired( bool status = true ) { fFired = status; }
31 virtual bool IsHighlighted() { return fHighlighted; }
32 virtual bool IsFired() { return fFired; }
33
34 virtual void AddInfo( TString info ) { fInfoCon.push_back( info ); }
35 virtual void CloseInfo();
36 virtual void ClearInfo();
37
38 virtual void SetTime( Double_t time ) { fTime = time; }
39 virtual void SetCharge( Double_t charge ) { fCharge = charge; }
40 virtual Double_t GetTime() { return fTime; }
41 virtual Double_t GetCharge() { return fCharge; }
42 virtual void ResetTimeCharge() {
43 fTime = 0.0;
44 fCharge = 0.0;
45 }
46
47 virtual void Draw( Option_t* option = "" );
48 virtual void Paint( Option_t* option = "" );
49 virtual char* GetObjectInfo( Int_t px, Int_t py ) const;
50
51 virtual Int_t GetPart() { return fPart; }
52 virtual Int_t GetTheta() { return fTheta; }
53 virtual bool HasZRSection();
54 Double_t GetAngle( Double_t x, Double_t y ); // degree, 0~360
55 Double_t Range360( Double_t input );
56 virtual bool IsXYVisible();
57 virtual bool IsSideVisible();
58
59 virtual void SetXYPoint( Double_t* p1, Double_t* p2, Double_t* newP, Double_t z );
60 virtual void SetZRPoint( Double_t* p1, Double_t* p2, Double_t* newP, Double_t r );
61 virtual void ProjectECToSide( Double_t* p1, Double_t* newP );
62
63private:
64 Int_t fPart;
65 Int_t fTheta;
66 BesPolygon2D* fCrystalXY;
67 BesPolygon2D* fCrystalZR;
68 BesPolygon2D* fCrystalSide;
69 BesPolygon2D* fCrystalXYFired;
70 BesPolygon2D* fCrystalZRFired;
71 BesPolygon2D* fCrystalSideFired;
72
73 static const Int_t fChargeMax = 300;
74 Double_t fTime, fCharge;
75
76 Double_t fZRSectionTolerance[3]; // to avoid on zrSection nothing drawn sometimes
77 Double_t fPhiMin, fPhiMax;
78
79 // static const Int_t ecXYPointZ = 1420.0; // theta0:1407.71, theta5:1416.8
80 // static const Int_t brZRPointR = 990.0; // these two doule define the tube of emc,
81 // R=brZRPointR, Z=+-ecXYPointZ;
82 // 2011.02.24 root update from 5.14 to 5.24
83 static const Int_t ecXYPointZ = 1420; // theta0:1407.71, theta5:1416.8
84 static const Int_t brZRPointR =
85 990; // these two doule define the tube of emc, R=brZRPointR, Z=+-ecXYPointZ;
86 static const Int_t sideDeltaPhi = 21; // deg, side emc viewPhi +- sideDeltaPhi range
87
88 std::vector<TString> fInfoCon;
89 BesPaveText* fTip;
90 bool fHighlighted;
91 bool fFired;
92
93 // style
94 Int_t lcCrystal; // line color
95 Int_t lwCrystal; // line width
96 Int_t fcCrystal; // fill color
97 Int_t fsCrystal; // fill style
98 Int_t fsCrystalTrans;
99
100 Int_t lcCrystalFired;
101 Int_t lwCrystalFired;
102 Int_t fcCrystalFired;
103 Int_t fsCrystalFired;
104
105 Int_t lcCrystalHL;
106 Int_t lwCrystalHL;
107 Int_t fcCrystalHL;
108 Int_t fsCrystalHL;
109
110 Int_t lcCrystalFiredHL;
111 Int_t lwCrystalFiredHL;
112 Int_t fcCrystalFiredHL;
113 Int_t fsCrystalFiredHL;
114
115 ClassDef( Emc2DCrystal, 1 ) // Emc 2D Crystal
116};
117
118#endif
double p2[4]
double p1[4]
double P(RecMdcKalTrack *trk)
legend Draw()
Double_t time
titledef title[20]
virtual void ProjectECToSide(Double_t *p1, Double_t *newP)
virtual void SetZRPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t r)
virtual void SetStyle()
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual bool IsSideVisible()
virtual void CloseInfo()
Double_t GetAngle(Double_t x, Double_t y)
virtual char * GetObjectInfo(Int_t px, Int_t py) const
virtual Int_t DistancetoPrimitive(Int_t px, Int_t py)
virtual bool HasZRSection()
Double_t Range360(Double_t input)
virtual bool IsXYVisible()
virtual void Paint(Option_t *option="")
virtual void ClearInfo()
virtual void SetXYPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t z)