Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PmtPixel Class Reference

#include <PmtPixels.h>

List of all members.

Public Member Functions

 PmtPixel (int pixel_num, double xc, double yc, double w, double h)
 ~PmtPixel ()
void Draw (Option_t *opt="")


Constructor & Destructor Documentation

PmtPixel::PmtPixel int  pixel_num,
double  xc,
double  yc,
double  w,
double  h
 

Definition at line 114 of file PmtPixels.cxx.

00115     : TBox(xc-0.5*w, yc-0.5*h, xc+0.5*w, yc+0.5*h)
00116 {
00117     double r = 0.5*(w+h);       // normally, expect w == h.
00118     r /= 6.0;                   // assume pmt pixel is 3 fibers wide
00119     
00120     const double dy = r*sqrt(3.0);
00121     
00122     this->push_back(new PmtSpot(1,xc+2*r, yc+dy,r));
00123     this->push_back(new PmtSpot(2,xc,     yc+dy,r));
00124     this->push_back(new PmtSpot(3,xc-2*r, yc+dy,r));
00125 
00126     this->push_back(new PmtSpot(4,xc+r,   yc,    r));
00127     this->push_back(new PmtSpot(5,xc-r,   yc,    r));
00128 
00129     this->push_back(new PmtSpot(6,xc+2*r, yc-dy,r));
00130     this->push_back(new PmtSpot(7,xc,     yc-dy,r));
00131     this->push_back(new PmtSpot(8,xc-2*r, yc-dy,r));
00132 }

PmtPixel::~PmtPixel  ) 
 

Definition at line 134 of file PmtPixels.cxx.

References done().

00135 {
00136     iterator it, done = this->end();
00137     for (it = this->begin(); it != done; ++it) {
00138         PmtSpot* ps = (*it);
00139         delete ps;
00140         (*it) = 0;
00141     }
00142 
00143 }


Member Function Documentation

void PmtPixel::Draw Option_t *  opt = ""  ) 
 

Definition at line 145 of file PmtPixels.cxx.

References done(), and Draw().

Referenced by PmtPixelsMxx::PmtPixelsMxx().

00146 {
00147     this->TBox::Draw(opt);
00148     this->TBox::SetFillStyle(0);
00149     this->TBox::SetLineColor(1);
00150     
00151     iterator it, done = this->end();
00152     for (it = this->begin(); it != done; ++it) {
00153         PmtSpot* ps = (*it);
00154         ps->Draw(opt);
00155     }
00156 }


The documentation for this class was generated from the following files:
Generated on Mon Feb 15 11:10:05 2010 for loon by  doxygen 1.3.9.1