Mdc2DWire Class Reference

#include <Mdc2DWire.h>

List of all members.

Public Member Functions

 Mdc2DWire ()
 Mdc2DWire (const char *name, const char *title, Double_t rmin, Double_t rmax, Double_t dz, Double_t phi, Double_t *center)
 Mdc2DWire (const char *name, const char *title, Int_t N, Double_t *P)
 ~Mdc2DWire ()
virtual void Init ()
virtual void SetStyle ()
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
virtual void SetHighlighted (bool status=true)
virtual void SetFired (bool status=true)
virtual bool IsHighlighted ()
virtual bool IsFired ()
virtual void AddInfo (TString info)
virtual void CloseInfo ()
virtual void ClearInfo ()
virtual void Draw (Option_t *option="")
virtual void Paint (Option_t *option="")
virtual char * GetObjectInfo (Int_t px, Int_t py) const
virtual bool HasZRSection ()
Double_t Range360 (Double_t input)
void SetTime (Double_t time)
void SetCharge (Double_t charge)
void SetColorfulWire (Bool_t colorfulWire, Bool_t subEvTime)
void SetQOverflow (Bool_t qOvfl)
void SetEvTime (Double_t time)

Private Attributes

Int_t fWireType
BesPolygon2DfTube
BesCircle2DfWireCircle
BesPolygon2DfWireCone
BesMarker2DfZRPosMarker2D
Double_t fWestHole [3]
Double_t fEastHole [3]
Double_t fWestPhi
Double_t fEastPhi
Double_t fZRSectionPos [3]
Bool_t fZRSectionFlag
std::vector< TString > fInfoCon
BesPaveTextfTip
Bool_t fHighlighted
Bool_t fFired
Bool_t fColorfulWire
Bool_t qOverflow
Int_t lcTube
Int_t lwTube
Int_t fcTube
Int_t fsTube
Int_t lcWire
Int_t lwCircle
Int_t lwCone
Int_t fcCircle
Int_t fcCone
Int_t fsCircle
Int_t fsCone
Int_t lcWireFired
Int_t lwCircleFired
Int_t lwConeFired
Int_t fcCircleFired
Int_t fcConeFired
Int_t fsCircleFired
Int_t fsConeFired
Int_t lcWireHL
Int_t lwCircleHL
Int_t lwConeHL
Int_t fcCircleHL
Int_t fcConeHL
Int_t fsCircleHL
Int_t fsConeHL
Int_t sizeMarker
Int_t cMarker
Int_t cMarkerFired
Int_t cMarkerHL
Int_t sMarker
Int_t sMarkerFired
Int_t sMarkerHL
Double_t mdcTime
Double_t mdcCharge
Double_t evTime


Detailed Description

Definition at line 17 of file Mdc2DWire.h.


Constructor & Destructor Documentation

Mdc2DWire::Mdc2DWire (  ) 

Mdc2DWire::Mdc2DWire ( const char *  name,
const char *  title,
Double_t  rmin,
Double_t  rmax,
Double_t  dz,
Double_t  phi,
Double_t *  center 
)

Definition at line 24 of file Mdc2DWire.cxx.

References cos(), evTime, fColorfulWire, fFired, fHighlighted, fTip, fWireCircle, fWireCone, fWireType, Init(), P(), and sin().

00031 {
00032 
00033     SetName(name);
00034     SetTitle(title);
00035     fTip = 0;
00036     fHighlighted = false;
00037     fFired = false;
00038     fColorfulWire = false;
00039     fWireType  = 1; // axial wire
00040     evTime = 0;
00041 
00042     Double_t r = 0.25*(rmax-rmin);
00043     fWireCircle = new BesCircle2D(name, title, 0.0, r, &center[0]);
00044 
00045     Double_t dx = fabs(r*cos(phi));
00046     Double_t dy = fabs(r*sin(phi));
00047     Double_t P[12] = { center[0] - dx, center[1] - dy, center[2] - dz,
00048                        center[0] + dx, center[1] + dy, center[2] - dz,
00049                        center[0] - dx, center[1] - dy, center[2] + dz,
00050                        center[0] + dx, center[1] + dy, center[2] + dz
00051                      };
00052 
00053     fWireCone = new BesPolygon2D(name, title, 4, P);
00054 
00055     Init();
00056 }

Mdc2DWire::Mdc2DWire ( const char *  name,
const char *  title,
Int_t  N,
Double_t *  P 
)

Definition at line 60 of file Mdc2DWire.cxx.

References fColorfulWire, fEastHole, fEastPhi, fFired, fHighlighted, fTip, fTube, fWestHole, fWestPhi, fWireCircle, fWireCone, fWireType, fZRPosMarker2D, genRecEmupikp::i, and Init().

00061 {
00062     SetName(name);
00063     SetTitle(title);
00064     fTip = 0;
00065     fHighlighted = false;
00066     fFired = false;
00067     fColorfulWire = false;
00068     fWireType  = 2;  // stereo wire
00069 
00070     Double_t *tubeP = &P[3*N/2]; // east four points, P4~P7
00071     fTube = new BesPolygon2D(name, title, N/2, tubeP);
00072     fWireCircle = 0;
00073     fWireCone   = 0;
00074 
00075     for (Int_t i = 0; i < 3; i++) {
00076         fWestHole[i] = (P[i]    + P[3+i]  + P[6+i]  + P[9+i] )/4.0;  // (P0+P1+P2+P3)/4
00077         fEastHole[i] = (P[12+i] + P[15+i] + P[18+i] + P[21+i])/4.0;  // (P4+P5+P6+P7)/4
00078     }
00079     TVector3 westVec(fWestHole[0], fWestHole[1], fWestHole[2]);
00080     TVector3 eastVec(fEastHole[0], fEastHole[1], fEastHole[2]);
00081     fWestPhi = westVec.Phi() * TMath::RadToDeg();
00082     fEastPhi = eastVec.Phi() * TMath::RadToDeg();
00083     if (fWestPhi < 0.0) fWestPhi += 360.0;
00084     if (fEastPhi < 0.0) fEastPhi += 360.0;
00085 
00086     // ------XY------
00087     Double_t rMax = sqrt( (P[4*3]  -P[7*3])   * (P[4*3]-P[7*3])     +
00088                           (P[4*3+1]-P[7*3+1]) * (P[4*3+1]-P[7*3+1]) +
00089                           (P[4*3+2]-P[7*3+2]) * (P[4*3+2]-P[7*3+2]) ) / 2.0;
00090 
00091     Double_t rMinRatio = 0.0001; // min bubble radius = rMinRatio * rMax;
00092     Double_t rMaxRatio = 0.8;//0.6; // 0.4//yzhang
00093 
00094     Double_t newP[12];
00095     Double_t edge = rMaxRatio*0.0001; //*0.85
00096     for (Int_t i = 0; i < 3; i++) {
00097         newP[i]   = (0.5+edge*rMinRatio)*(P[i]+P[3+i])*0.5
00098                     + (0.5-edge*rMinRatio)*(P[6+i]+P[9+i])*0.5;   // near center of P0+P1
00099         newP[3+i] = (0.5-edge*rMinRatio)*(P[i]+P[3+i])*0.5
00100                     + (0.5+edge*rMinRatio)*(P[6+i]+P[9+i])*0.5;   // near center of P2+P3
00101         newP[6+i] = (0.5+edge*rMaxRatio)*(P[12+i]+P[15+i])*0.5
00102                     + (0.5-edge*rMaxRatio)*(P[18+i]+P[21+i])*0.5; // near center of P4+P5
00103         newP[9+i] = (0.5-edge*rMaxRatio)*(P[12+i]+P[15+i])*0.5
00104                     + (0.5+edge*rMaxRatio)*(P[18+i]+P[21+i])*0.5; // near center of P6+P7
00105     }
00106     fWireCone = new BesPolygon2D("WireCone", "WireCone", 4, &newP[0]);
00107 
00108     fWireCircle =
00109         new BesCircle2D("WireBubble", "WireBubble", 0.0, rMaxRatio*rMax, &fEastHole[0]);
00110 
00111     // ------ZR------
00112     fZRPosMarker2D =
00113         new BesMarker2D("MdcZRPos", "MdcZRPos", fEastHole[0], fEastHole[1], fEastHole[2]);
00114 
00115     Init();
00116 }

Mdc2DWire::~Mdc2DWire (  ) 

Definition at line 120 of file Mdc2DWire.cxx.

References fTip, fTube, fWireCircle, fWireCone, and fZRPosMarker2D.

00120                       {
00121 
00122     if (fTube)          delete fTube;
00123     if (fWireCircle)    delete fWireCircle;
00124     if (fWireCone)      delete fWireCone;
00125     if (fZRPosMarker2D) delete fZRPosMarker2D;
00126 
00127     if (fTip) delete fTip;
00128 }


Member Function Documentation

virtual void Mdc2DWire::AddInfo ( TString  info  )  [inline, virtual]

Definition at line 37 of file Mdc2DWire.h.

References fInfoCon.

Referenced by MdcROOTGeo::SetHits().

00037 { fInfoCon.push_back(info); }

void Mdc2DWire::ClearInfo (  )  [virtual]

Definition at line 184 of file Mdc2DWire.cxx.

References fInfoCon, and fTip.

Referenced by MdcROOTGeo::SetHits().

00185 {
00186     fInfoCon.clear();
00187     fTip->DeleteText();
00188 }

void Mdc2DWire::CloseInfo (  )  [virtual]

Definition at line 190 of file Mdc2DWire.cxx.

References fInfoCon, fTip, and BesPaveText::SetText().

Referenced by Init(), and MdcROOTGeo::SetHits().

00191 {
00192     if (fTip) {
00193         fTip->Clear();
00194 
00195         if (fInfoCon.size() == 0) fInfoCon.push_back(GetTitle());
00196         fTip->SetText(fInfoCon);
00197     }
00198     else
00199         cout << "Mdc2DWire::CloseInfo, not initialized" << endl;
00200 }

Int_t Mdc2DWire::DistancetoPrimitive ( Int_t  px,
Int_t  py 
) [virtual]

Definition at line 204 of file Mdc2DWire.cxx.

References BesCircle2D::DistancetoPrimitive(), fWireCircle, fZRPosMarker2D, BesView::GetViewType(), kXYView, and kZRView.

00204                                                        {
00205     BesView *view = (BesView*)gPad->GetView();
00206     if (view->GetViewType() & kXYView) {
00207         return fWireCircle->DistancetoPrimitive(px, py);
00208     }
00209     else if (view->GetViewType() & kZRView) {
00210         if (fZRPosMarker2D) {
00211             fZRPosMarker2D->DistancetoPrimitive(px, py);
00212             return fZRPosMarker2D->DistancetoPrimitive(px, py);
00213         }
00214     }
00215 
00216     return 999;
00217 }

void Mdc2DWire::Draw ( Option_t *  option = ""  )  [virtual]

Definition at line 272 of file Mdc2DWire.cxx.

Referenced by MdcROOTGeo::Draw(), MdcROOTGeo::DrawHits(), and ExecuteEvent().

00272                                      {
00273     //
00274     // Mdc2DWire draw function
00275     TString opt = option;
00276     opt.ToUpper();
00277 
00278     AppendPad(option);
00279 }

void Mdc2DWire::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Definition at line 221 of file Mdc2DWire.cxx.

References Draw(), fTip, fWireCircle, fZRPosMarker2D, gBesCursor, BesCursor::GetType(), BesView::GetVisMdcWires(), kBesHand, kBesPick, SetHighlighted(), BesPaveText::SetPos(), and BesView::UpdateView().

00221                                                             {
00222 
00223     BesView *view = (BesView*)gPad->GetView();
00224 
00225     if (gBesCursor->GetType() == kBesHand) {
00226         if (view) view->ExecuteEvent(event, px, py);
00227     }
00228     else if (gBesCursor->GetType() == kBesPick){
00229 
00230         if (gPad) gPad->SetCursor(kPointer);
00231 
00232         Int_t    origColor = 1;
00233 
00234         switch (event) {
00235 
00236         case kMouseEnter :
00237 
00238             if ( fWireCircle )    origColor = fWireCircle->GetFillColor();
00239             if ( fZRPosMarker2D ) origColor = fZRPosMarker2D->GetMarkerColor();
00240             this->SetHighlighted(true);
00241 
00242             if (this->IsFired() || view->GetVisMdcWires()) {
00243                 Draw("WIRE,SAME");
00244 
00245                 fTip->SetPos(px, py);
00246                 view->UpdateView(0);
00247 
00248                 fTip->Draw("BR,SAME"); // "BR,ARC,SAME"
00249                 gPad->Modified();
00250                 gPad->Update();
00251             }
00252             break;
00253 
00254         case kMouseLeave:
00255 
00256             if (this->IsHighlighted()) {
00257                 this->SetHighlighted(false);
00258                 if (view->GetVisMdcWires()) Draw("WIRE,SAME");
00259 
00260                 view->UpdateView(0);
00261                 gPad->Modified();
00262                 gPad->Update();
00263             }
00264             break;
00265         }
00266 
00267     }
00268 }

char * Mdc2DWire::GetObjectInfo ( Int_t  px,
Int_t  py 
) const [virtual]

Definition at line 400 of file Mdc2DWire.cxx.

References BesView::GetObjectInfo().

00400                                                        {
00401 
00402     BesView *view = (BesView*)gPad->GetView();
00403     if (view) return view->GetObjectInfo(px, py);
00404     else return TObject::GetObjectInfo(px, py);
00405 }

bool Mdc2DWire::HasZRSection (  )  [virtual]

Definition at line 409 of file Mdc2DWire.cxx.

References fEastHole, fEastPhi, fWestHole, fWestPhi, fWireType, fZRSectionPos, BesTView::GetLongitude(), genRecEmupikp::i, and Range360().

Referenced by Paint().

00410 {
00411     if (fWireType != 2) return false;
00412 
00413     bool flag = false;
00414     BesView *view = (BesView*)gPad->GetView();
00415     Double_t viewPhi = view->GetLongitude();
00416     viewPhi = Range360(viewPhi);
00417     //if (GetName() == TString("Layer0Wire0")) cout << "view " << viewPhi << endl;
00418 
00419     Double_t zrPhi = viewPhi-90.0;
00420     zrPhi = Range360(zrPhi);
00421     //if (GetName() == TString("Layer0Wire0")) cout << zrPhi << endl;
00422 
00423     for (Int_t i = 0; i < 2; i++) {
00424         if (i==1) {
00425             zrPhi += 180.0;
00426             zrPhi = Range360(zrPhi);
00427         }
00428 
00429         if ( fabs(fEastPhi-fWestPhi) < 180.0 ) {  // no cross phi=0.0
00430             if ( (fEastPhi-zrPhi)*(fWestPhi-zrPhi) > 0.0 ) flag = false;
00431             else {
00432                 Double_t factor = fabs( (fEastPhi-zrPhi)/(fEastPhi-fWestPhi) );
00433                 for (Int_t i = 0; i < 3; i++) {
00434                     fZRSectionPos[i] =  factor*fWestHole[i] + (1.0-factor)*fEastHole[i];
00435                 }
00436                 flag = true;
00437                 break;
00438             }
00439         }
00440         else { // cross phi=0.0
00441             if ( (fEastPhi-zrPhi)*(fWestPhi-zrPhi) < 0.0 ) flag = false;
00442             else { // range 0~360 -> -180~180
00443                 Double_t tempEastPhi = fEastPhi;
00444                 if (tempEastPhi >= 180.0) tempEastPhi -= 360.0;
00445                 Double_t tempWestPhi = fWestPhi;
00446                 if (tempWestPhi >= 180.0) tempWestPhi -= 360.0;
00447                 Double_t tempZRPhi   = zrPhi;
00448                 if (tempZRPhi   >= 180.0) tempZRPhi   -= 360.0;
00449 
00450                 Double_t factor = fabs( (tempEastPhi-tempZRPhi)/(tempEastPhi-tempWestPhi) );
00451                 for (Int_t i = 0; i < 3; i++) {
00452                     fZRSectionPos[i] =  factor*fWestHole[i] + (1.0-factor)*fEastHole[i];
00453                 }
00454                 flag = true;
00455                 break;
00456             }
00457         }
00458     }
00459 
00460     return flag;
00461 }

void Mdc2DWire::Init (  )  [virtual]

Definition at line 132 of file Mdc2DWire.cxx.

References CloseInfo(), fTip, and SetStyle().

Referenced by Mdc2DWire().

00132                      {
00133 
00134     SetStyle();
00135 
00136     fTip = new BesPaveText(0, 0, 0.1, 0.1);
00137     CloseInfo();
00138 }

virtual bool Mdc2DWire::IsFired (  )  [inline, virtual]

Definition at line 35 of file Mdc2DWire.h.

References fFired.

00035 { return fFired; }

virtual bool Mdc2DWire::IsHighlighted (  )  [inline, virtual]

Definition at line 34 of file Mdc2DWire.h.

References fHighlighted.

00034 { return fHighlighted; }

void Mdc2DWire::Paint ( Option_t *  option = ""  )  [virtual]

Definition at line 283 of file Mdc2DWire.cxx.

References cMarker, cMarkerFired, cMarkerHL, fcCircle, fcCircleFired, fcCircleHL, fcCone, fcConeFired, fcConeHL, fColorfulWire, fcTube, fsCircle, fsCircleFired, fsCircleHL, fsCone, fsConeFired, fsConeHL, fsTube, fTube, fWireCircle, fWireCone, fZRPosMarker2D, fZRSectionPos, BesCircle2D::GetCenter(), BesView::GetViewType(), HasZRSection(), kXYView, kZRView, lcTube, lcWire, lcWireFired, lcWireHL, lwCircle, lwCircleFired, lwCircleHL, lwCone, lwConeFired, lwConeHL, lwTube, BesMarker2D::Paint(), BesCircle2D::Paint(), BesPolygon2D::Paint(), BesMarker2D::SetMarkerSizeMultiple(), BesMarker2D::SetWCX(), BesMarker2D::SetWCY(), BesMarker2D::SetWCZ(), sizeMarker, sMarker, sMarkerFired, sMarkerHL, and BesView::WCtoNDC().

00283                                       {
00284 
00285     TString opt = option;
00286     opt.ToUpper();
00287 
00288     BesView *view = (BesView*)gPad->GetView();
00289 
00290     //gStyle->SetPalette(1);
00291     if (view->GetViewType() & kXYView) {
00292 
00293         Double_t wcCenter[3], ncCenter[3];
00294         fWireCircle->GetCenter(&wcCenter[0]);
00295         view->WCtoNDC(wcCenter, &ncCenter[0]);
00296         Double_t x1, y1, x2, y2;
00297         Double_t d = 0.05;
00298         gPad->GetRange(x1, y1, x2, y2);
00299 
00300         // Only draw wire in pad range
00301         if (ncCenter[0] > x1-d && ncCenter[0] < x2+d &&
00302                 ncCenter[1] > y1-d && ncCenter[1] < y2+d) {
00303             if (opt.Contains("TUBE") && fTube ) {
00304                 fTube->SetLineColor(lcTube);
00305                 fTube->SetLineWidth(lwTube);
00306                 fTube->SetFillColor(fcTube);
00307                 fTube->SetFillStyle(fsTube);
00308 
00309                 fTube->Paint();
00310             }
00311 
00312             if (this->IsFired()) {
00313                 if (fWireCircle) {
00314                     fWireCircle->SetLineColor(lcWireFired);
00315                     fWireCircle->SetLineWidth(lwCircleFired);
00316                     fWireCircle->SetFillColor(fcCircleFired);
00317                     fWireCircle->SetFillStyle(fsCircleFired);
00318                 }
00319                 if (fWireCone) {
00320                     fWireCone->SetLineColor(lcWireFired);
00321                     fWireCone->SetLineWidth(lwConeFired);
00322                     fWireCone->SetFillColor(fcConeFired);
00323                     fWireCone->SetFillStyle(fsConeFired);
00324                 }
00325             }
00326             else {
00327                 if (fWireCone) {
00328                     fWireCone->SetLineColor(lcWire);
00329                     fWireCone->SetLineWidth(lwCone);
00330                     fWireCone->SetFillColor(fcCone);
00331                     fWireCone->SetFillStyle(fsCone);
00332                 }
00333                 if (fWireCircle) {
00334                     fWireCircle->SetLineColor(lcWire);
00335                     fWireCircle->SetLineWidth(lwCircle);
00336                     fWireCircle->SetFillColor(fcCircle);
00337                     fWireCircle->SetFillStyle(fsCircle);
00338                 }
00339             }
00340 
00341             if (this->IsHighlighted()) {
00342                 if (fWireCircle) {
00343                     fWireCircle->SetLineColor(lcWireHL);
00344                     fWireCircle->SetLineWidth(lwCircleHL);
00345                     fWireCircle->SetFillColor(fcCircleHL);
00346                     fWireCircle->SetFillStyle(fsCircleHL);
00347                 }
00348                 if (fWireCone) {
00349                     fWireCone->SetLineColor(lcWireHL);
00350                     fWireCone->SetLineWidth(lwConeHL);
00351                     fWireCone->SetFillColor(fcConeHL);
00352                     fWireCone->SetFillStyle(fsConeHL);
00353                 }
00354             }
00355             if (opt.Contains("WIRE")) {
00356                 if (!fColorfulWire)   fWireCone->Paint();//yzhang remove stereo wire line
00357                 if (fWireCircle) fWireCircle->Paint();
00358             }
00359         }
00360     }
00361 
00362     if (view->GetViewType() & kZRView) {
00363         if (HasZRSection()) {
00364             fZRPosMarker2D->SetWCX(fZRSectionPos[0]);
00365             fZRPosMarker2D->SetWCY(fZRSectionPos[1]);
00366             fZRPosMarker2D->SetWCZ(fZRSectionPos[2]);
00367             fZRPosMarker2D->SetMarkerColor(cMarker);
00368             fZRPosMarker2D->SetMarkerStyle(sMarker);
00369             fZRPosMarker2D->SetMarkerSizeMultiple(sizeMarker);
00370 
00371             if (this->IsFired()) {
00372                 if (fZRPosMarker2D) {
00373                     fZRPosMarker2D->SetMarkerColor(cMarkerFired);
00374                     fZRPosMarker2D->SetMarkerStyle(sMarkerFired);
00375                 }
00376             }
00377             else {
00378                 if (fZRPosMarker2D) {
00379                     fZRPosMarker2D->SetMarkerColor(cMarker);
00380                     fZRPosMarker2D->SetMarkerStyle(sMarker);
00381                 }
00382             }
00383 
00384             if (this->IsHighlighted()) {
00385                 if (fZRPosMarker2D) {
00386                     fZRPosMarker2D->SetMarkerColor(cMarkerHL);
00387                     fZRPosMarker2D->SetMarkerStyle(sMarkerHL);
00388                 }
00389             }
00390 
00391             if (opt.Contains("WIRE")) {
00392                 if (fZRPosMarker2D) fZRPosMarker2D->Paint();
00393             }
00394         }
00395     }
00396 }

Double_t Mdc2DWire::Range360 ( Double_t  input  ) 

Definition at line 465 of file Mdc2DWire.cxx.

Referenced by HasZRSection().

00466 {
00467     if (input >= 360.0) {
00468         do {
00469             input -= 360.0;
00470         }
00471         while (input >= 360.0);
00472     }
00473     else if (input < 0.0) {
00474         do {
00475             input += 360.0;
00476         }
00477         while (input < 0.0);
00478     }
00479 
00480     return input;
00481 }

void Mdc2DWire::SetCharge ( Double_t  charge  ) 

Definition at line 492 of file Mdc2DWire.cxx.

References mdcCharge.

Referenced by MdcROOTGeo::SetHits().

00493 { 
00494     mdcCharge = charge;
00495 }

void Mdc2DWire::SetColorfulWire ( Bool_t  colorfulWire,
Bool_t  subEvTime 
)

Definition at line 513 of file Mdc2DWire.cxx.

References evTime, fcCircleFired, fColorfulWire, lcWireFired, mdcCharge, mdcTime, and qOverflow.

Referenced by MdcROOTGeo::DrawHits().

00514 { 
00515     fColorfulWire = colorfulWire;
00516     if(fColorfulWire){
00517         //yzhang change LINE COLOR of fired mdc wires 
00518         //n color bin = 50, time of max bin is 2000 
00519         //time max value = 1943.8125 ~ 2000 ns 
00520         //no time info color is kGray 
00521         //time > 2000 && time <=10000, color is kBlack
00522         int tempColor;
00523         if(subEvTime){ 
00524             // raw time - event start time
00525             double tempMdcTime = mdcTime - evTime; 
00526             if(fabs(evTime)>0.0001) tempMdcTime += 230;
00527             if(tempMdcTime>10000) { 
00528                 tempColor = kGray;
00529             }else if(tempMdcTime>2000&&tempMdcTime<=10000){
00530                 tempColor = kRed;
00531             }else if(tempMdcTime<-10){
00532                 tempColor = kWhite;
00533             }else{
00534                 tempColor = 51 + (int) (tempMdcTime/40);
00535             }
00536         }else{
00537             //raw time
00538             if(mdcTime>10000) { 
00539                 tempColor= kGray;
00540             }else if(mdcTime>2000&&mdcTime<=10000){
00541                 tempColor = kRed;
00542             }else{
00543                 tempColor = 51 + (int) (mdcTime/40);
00544             }
00545         }
00546         lcWireFired = tempColor;
00547         //std::cout<< " mdcTime  "<<mdcTime <<" evTime "<< evTime << " t-t0 "<< mdcTime - evTime +230<< " lcWireFired " << lcWireFired <<std::endl;
00548 
00549         //yzhang change FILL COLOR of fired mdc wires
00550         //n color bin = 50,  charge of max bin is 2000
00551         //charge max value = 29783 ~ 30000
00552         //adc> 2000&&<=30000 color is kBlack
00553         //no adc color is kGray
00554         if(mdcCharge>30000){
00555             tempColor = kGray;
00556         }else if(mdcCharge>2000&&mdcCharge<=30000){
00557             tempColor = kRed;
00558         }else {
00559             tempColor = 51 + (int) (mdcCharge/40);
00560         }
00561         if(qOverflow) { tempColor = kBlack; }
00562         fcCircleFired  = tempColor;
00563         //std::cout<< " mdcCharge "<<mdcCharge<<" ovfl "<<qOverflow<<" fcCircleFired " << fcCircleFired<< std::endl;
00564     }else{
00565         lcWireFired = kRed;
00566         fcCircleFired  = 1004;
00567     } 
00568 }

void Mdc2DWire::SetEvTime ( Double_t  time  ) 

Definition at line 506 of file Mdc2DWire.cxx.

References evTime.

Referenced by MdcROOTGeo::SetHits().

00507 { 
00508     evTime = time;
00509 }

virtual void Mdc2DWire::SetFired ( bool  status = true  )  [inline, virtual]

Definition at line 33 of file Mdc2DWire.h.

References fFired.

Referenced by MdcROOTGeo::DrawHits().

00033 { fFired = status; }

virtual void Mdc2DWire::SetHighlighted ( bool  status = true  )  [inline, virtual]

Definition at line 32 of file Mdc2DWire.h.

References fHighlighted.

Referenced by ExecuteEvent().

00032 { fHighlighted = status; }

void Mdc2DWire::SetQOverflow ( Bool_t  qOvfl  ) 

Definition at line 499 of file Mdc2DWire.cxx.

References qOverflow.

Referenced by MdcROOTGeo::SetHits().

00500 { 
00501     qOverflow = qOvfl;
00502 }

void Mdc2DWire::SetStyle (  )  [virtual]

Definition at line 142 of file Mdc2DWire.cxx.

References cMarker, cMarkerFired, cMarkerHL, fcCircle, fcCircleFired, fcCircleHL, fcCone, fcConeFired, fcConeHL, fcTube, fsCircle, fsCircleFired, fsCircleHL, fsCone, fsConeFired, fsConeHL, fsTube, fWireType, lcTube, lcWire, lcWireFired, lcWireHL, lwCircle, lwCircleFired, lwCircleHL, lwCone, lwConeFired, lwConeHL, lwTube, sizeMarker, sMarker, sMarkerFired, and sMarkerHL.

Referenced by Init().

00143 {
00144     lcTube = kBlack; // grey;
00145     lwTube = 1;
00146     fcTube = kBlack; // grey 15;
00147     fsTube = 4000;
00148 
00149     lcWire = 15;
00150     if (fWireType == 1) lcWire = kGreen;
00151     if (fWireType == 2) lcWire = kBlue;
00152     lwCircle = 1;
00153     lwCone   = 1;
00154     fcCircle = kWhite;
00155     fcCone   = 0;
00156     fsCircle = 1001;
00157     fsCone   = 0;
00158 
00159     lcWireFired    = kRed;
00160     lwCircleFired  = 2;//yzhang 2;
00161     lwConeFired    = 2;
00162     fcCircleFired  = 1004; //kBlack;
00163     fcConeFired    = kBlack;
00164     fsCircleFired  = 1001;//solid
00165     fsConeFired    = 3001;
00166 
00167     lcWireHL   = kMagenta;//yzhang lcWire;
00168     lwCircleHL = 2;
00169     lwConeHL   = 2;
00170     fcCircleHL = kMagenta;//yzhang kBlack;
00171     fcConeHL   = kRed;
00172     fsCircleHL = 1001;
00173     fsConeHL   = 4000;
00174 
00175     sizeMarker   = 4;
00176     cMarker      = kBlue;
00177     cMarkerFired = kRed;    // color of fired marker
00178     cMarkerHL    = cMarker; // cMarkerFired;
00179     sMarker      = 24;
00180     sMarkerFired = 20;   // style of fired marker
00181     sMarkerHL    = 25;   // style of highlighted marker
00182 }

void Mdc2DWire::SetTime ( Double_t  time  ) 

Definition at line 485 of file Mdc2DWire.cxx.

References mdcTime.

Referenced by MdcROOTGeo::SetHits().

00486 { 
00487     mdcTime = time;
00488 }


Member Data Documentation

Int_t Mdc2DWire::cMarker [private]

Definition at line 105 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::cMarkerFired [private]

Definition at line 106 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::cMarkerHL [private]

Definition at line 107 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Double_t Mdc2DWire::evTime [private]

Definition at line 114 of file Mdc2DWire.h.

Referenced by Mdc2DWire(), SetColorfulWire(), and SetEvTime().

Int_t Mdc2DWire::fcCircle [private]

Definition at line 83 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fcCircleFired [private]

Definition at line 91 of file Mdc2DWire.h.

Referenced by Paint(), SetColorfulWire(), and SetStyle().

Int_t Mdc2DWire::fcCircleHL [private]

Definition at line 99 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fcCone [private]

Definition at line 84 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fcConeFired [private]

Definition at line 92 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fcConeHL [private]

Definition at line 100 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Bool_t Mdc2DWire::fColorfulWire [private]

Definition at line 71 of file Mdc2DWire.h.

Referenced by Mdc2DWire(), Paint(), and SetColorfulWire().

Int_t Mdc2DWire::fcTube [private]

Definition at line 77 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Double_t Mdc2DWire::fEastHole[3] [private]

Definition at line 62 of file Mdc2DWire.h.

Referenced by HasZRSection(), and Mdc2DWire().

Double_t Mdc2DWire::fEastPhi [private]

Definition at line 63 of file Mdc2DWire.h.

Referenced by HasZRSection(), and Mdc2DWire().

Bool_t Mdc2DWire::fFired [private]

Definition at line 70 of file Mdc2DWire.h.

Referenced by IsFired(), Mdc2DWire(), and SetFired().

Bool_t Mdc2DWire::fHighlighted [private]

Definition at line 69 of file Mdc2DWire.h.

Referenced by IsHighlighted(), Mdc2DWire(), and SetHighlighted().

std::vector<TString> Mdc2DWire::fInfoCon [private]

Definition at line 67 of file Mdc2DWire.h.

Referenced by AddInfo(), ClearInfo(), and CloseInfo().

Int_t Mdc2DWire::fsCircle [private]

Definition at line 85 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsCircleFired [private]

Definition at line 93 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsCircleHL [private]

Definition at line 101 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsCone [private]

Definition at line 86 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsConeFired [private]

Definition at line 94 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsConeHL [private]

Definition at line 102 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::fsTube [private]

Definition at line 78 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

BesPaveText* Mdc2DWire::fTip [private]

Definition at line 68 of file Mdc2DWire.h.

Referenced by ClearInfo(), CloseInfo(), ExecuteEvent(), Init(), Mdc2DWire(), and ~Mdc2DWire().

BesPolygon2D* Mdc2DWire::fTube [private]

Definition at line 57 of file Mdc2DWire.h.

Referenced by Mdc2DWire(), Paint(), and ~Mdc2DWire().

Double_t Mdc2DWire::fWestHole[3] [private]

Definition at line 62 of file Mdc2DWire.h.

Referenced by HasZRSection(), and Mdc2DWire().

Double_t Mdc2DWire::fWestPhi [private]

Definition at line 63 of file Mdc2DWire.h.

Referenced by HasZRSection(), and Mdc2DWire().

BesCircle2D* Mdc2DWire::fWireCircle [private]

Definition at line 58 of file Mdc2DWire.h.

Referenced by DistancetoPrimitive(), ExecuteEvent(), Mdc2DWire(), Paint(), and ~Mdc2DWire().

BesPolygon2D* Mdc2DWire::fWireCone [private]

Definition at line 59 of file Mdc2DWire.h.

Referenced by Mdc2DWire(), Paint(), and ~Mdc2DWire().

Int_t Mdc2DWire::fWireType [private]

Definition at line 55 of file Mdc2DWire.h.

Referenced by HasZRSection(), Mdc2DWire(), and SetStyle().

BesMarker2D* Mdc2DWire::fZRPosMarker2D [private]

Definition at line 60 of file Mdc2DWire.h.

Referenced by DistancetoPrimitive(), ExecuteEvent(), Mdc2DWire(), Paint(), and ~Mdc2DWire().

Bool_t Mdc2DWire::fZRSectionFlag [private]

Definition at line 65 of file Mdc2DWire.h.

Double_t Mdc2DWire::fZRSectionPos[3] [private]

Definition at line 64 of file Mdc2DWire.h.

Referenced by HasZRSection(), and Paint().

Int_t Mdc2DWire::lcTube [private]

Definition at line 75 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lcWire [private]

Definition at line 80 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lcWireFired [private]

Definition at line 88 of file Mdc2DWire.h.

Referenced by Paint(), SetColorfulWire(), and SetStyle().

Int_t Mdc2DWire::lcWireHL [private]

Definition at line 96 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwCircle [private]

Definition at line 81 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwCircleFired [private]

Definition at line 89 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwCircleHL [private]

Definition at line 97 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwCone [private]

Definition at line 82 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwConeFired [private]

Definition at line 90 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwConeHL [private]

Definition at line 98 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::lwTube [private]

Definition at line 76 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Double_t Mdc2DWire::mdcCharge [private]

Definition at line 113 of file Mdc2DWire.h.

Referenced by SetCharge(), and SetColorfulWire().

Double_t Mdc2DWire::mdcTime [private]

Definition at line 112 of file Mdc2DWire.h.

Referenced by SetColorfulWire(), and SetTime().

Bool_t Mdc2DWire::qOverflow [private]

Definition at line 72 of file Mdc2DWire.h.

Referenced by SetColorfulWire(), and SetQOverflow().

Int_t Mdc2DWire::sizeMarker [private]

Definition at line 104 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::sMarker [private]

Definition at line 108 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::sMarkerFired [private]

Definition at line 109 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().

Int_t Mdc2DWire::sMarkerHL [private]

Definition at line 110 of file Mdc2DWire.h.

Referenced by Paint(), and SetStyle().


Generated on Tue Nov 29 23:20:07 2016 for BOSS_7.0.2 by  doxygen 1.4.7