/home/bes3soft/bes3soft/Boss/7.0.2/dist/7.0.2/EventDisplay/BesVisLib/BesVisLib-00-04-04/BesVisLib/Emc2DCrystal.h

Go to the documentation of this file.
00001 
00002 #ifndef EMC_2D_CRYSTAL_H
00003 #define EMC_2D_CRYSTAL_H
00004 
00005 #include <vector>
00006 #include <TNamed.h>
00007 #include <TAttLine.h>
00008 #include <TAttFill.h>
00009 #include <TPaveLabel.h>
00010 #include <TPaveText.h>
00011 #include <TVector3.h>
00012 
00013 #include "BesCircle2D.h"
00014 #include "BesPolygon2D.h"
00015 #include "BesMarker2D.h"
00016 #include "BesPaveText.h"
00017 
00018 class Emc2DCrystal : public TNamed, public TAttLine, public TAttFill
00019 {
00020  public:
00021   
00022   Emc2DCrystal();
00023   Emc2DCrystal(const char* name, const char* title, Int_t N, Double_t *P, Int_t part, Int_t theta);
00024   ~Emc2DCrystal();
00025 
00026   virtual void  SetStyle();
00027   virtual Int_t DistancetoPrimitive(Int_t px, Int_t py);
00028   virtual void  ExecuteEvent(Int_t event, Int_t px, Int_t py);
00029 
00030   virtual void  SetHighlighted(bool status = true) { fHighlighted = status; }
00031   virtual void  SetFired(bool status = true) { fFired = status; }
00032   virtual bool  IsHighlighted() { return fHighlighted; }
00033   virtual bool  IsFired() { return fFired; }
00034 
00035   virtual void  AddInfo(TString info) { fInfoCon.push_back(info); }
00036   virtual void  CloseInfo();
00037   virtual void  ClearInfo();
00038 
00039   virtual void  SetTime(Double_t time) { fTime = time; }
00040   virtual void  SetCharge(Double_t charge) { fCharge = charge; }
00041   virtual Double_t GetTime()   { return fTime; }
00042   virtual Double_t GetCharge() { return fCharge; }
00043   virtual void  ResetTimeCharge() { fTime = 0.0; fCharge = 0.0; }
00044 
00045   virtual void  Draw(Option_t *option = "");
00046   virtual void  Paint(Option_t *option = "");
00047   virtual char *GetObjectInfo(Int_t px, Int_t py) const;
00048 
00049   virtual Int_t GetPart()  { return fPart; }
00050   virtual Int_t GetTheta() { return fTheta; }
00051   virtual bool  HasZRSection();
00052   Double_t GetAngle(Double_t x, Double_t y); // degree, 0~360
00053   Double_t Range360(Double_t input);
00054   virtual bool  IsXYVisible();
00055   virtual bool  IsSideVisible();
00056 
00057   virtual void  SetXYPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t z);
00058   virtual void  SetZRPoint(Double_t *p1, Double_t *p2, Double_t *newP, Double_t r);
00059   virtual void  ProjectECToSide(Double_t *p1, Double_t *newP);
00060  private:
00061 
00062   Int_t         fPart;
00063   Int_t         fTheta;
00064   BesPolygon2D *fCrystalXY;
00065   BesPolygon2D *fCrystalZR;
00066   BesPolygon2D *fCrystalSide;
00067   BesPolygon2D *fCrystalXYFired;
00068   BesPolygon2D *fCrystalZRFired;
00069   BesPolygon2D *fCrystalSideFired;
00070 
00071   static const Int_t fChargeMax = 300; 
00072   Double_t fTime, fCharge;
00073 
00074   Double_t fZRSectionTolerance[3];  // to avoid on zrSection nothing drawn sometimes
00075   Double_t fPhiMin, fPhiMax;
00076   
00077   //static const Int_t ecXYPointZ = 1420.0; // theta0:1407.71, theta5:1416.8
00078   //static const Int_t brZRPointR = 990.0;  // these two doule define the tube of emc, R=brZRPointR, Z=+-ecXYPointZ;
00079   // 2011.02.24 root update from 5.14 to 5.24
00080   static const Int_t ecXYPointZ = 1420; // theta0:1407.71, theta5:1416.8
00081   static const Int_t brZRPointR = 990;  // these two doule define the tube of emc, R=brZRPointR, Z=+-ecXYPointZ;
00082   static const Int_t sideDeltaPhi = 21;   // deg, side emc viewPhi +- sideDeltaPhi range 
00083 
00084   std::vector<TString> fInfoCon;
00085   BesPaveText *fTip;
00086   bool fHighlighted;
00087   bool fFired;
00088   
00089   // style
00090   Int_t lcCrystal; // line color
00091   Int_t lwCrystal; // line width
00092   Int_t fcCrystal; // fill color
00093   Int_t fsCrystal; // fill style
00094   Int_t fsCrystalTrans;
00095 
00096   Int_t lcCrystalFired;
00097   Int_t lwCrystalFired;
00098   Int_t fcCrystalFired;
00099   Int_t fsCrystalFired;
00100 
00101   Int_t lcCrystalHL;
00102   Int_t lwCrystalHL;
00103   Int_t fcCrystalHL;
00104   Int_t fsCrystalHL;
00105 
00106   Int_t lcCrystalFiredHL;
00107   Int_t lwCrystalFiredHL;
00108   Int_t fcCrystalFiredHL;
00109   Int_t fsCrystalFiredHL;
00110 
00111   ClassDef(Emc2DCrystal,1) // Emc 2D Crystal
00112 
00113 };
00114 
00115 #endif

Generated on Tue Nov 29 23:12:03 2016 for BOSS_7.0.2 by  doxygen 1.4.7