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