CMS 3D CMS Logo

VisCuTkPartDetector Class Reference

#include <VisReco/VisCustomTracker/interface/VisCuTkPartDetector.h>

Inheritance diagram for VisCuTkPartDetector:

VisCuTkCompositeDetector< VisCuTkLayer > VisCuTkState

List of all members.

Public Member Functions

int getId ()
string getName ()
VisCuTkSubDetectorgetOwner ()
bool isVisible ()
void setVisible (bool vis)
void setVisible ()
 VisCuTkPartDetector (int idc, VisCuTkSubDetector *subDtc)
virtual ~VisCuTkPartDetector ()

Private Attributes

int idSubDtc
VisCuTkSubDetectorsubDetector
bool visible


Detailed Description

Definition at line 12 of file VisCuTkPartDetector.h.


Constructor & Destructor Documentation

VisCuTkPartDetector::VisCuTkPartDetector ( int  idc,
VisCuTkSubDetector subDtc 
)

Definition at line 9 of file VisCuTkPartDetector.cc.

References VisCuTkCompositeDetector< VisCuTkLayer >::addComponent(), VisCuTkSubDetector::getId(), i, idSubDtc, subDetector, and visible.

00009                                                                            {
00010         idSubDtc = idc;
00011         subDetector = subDtc;
00012         int ncomponent = 0;
00013         visible = false;
00014 
00015         if(subDetector->getId()== 1){ //1=pixel
00016           if(idSubDtc == 1 || idSubDtc == 3){ //1-3=encap
00017             ncomponent = 3;
00018             //ncomponent = 2;
00019           }
00020           else { ncomponent = 3; } //barrel
00021         }
00022         if(subDetector->getId()== 2){ //2=inner silicon
00023            if(idSubDtc == 1 || idSubDtc == 3){ //1-3=encap
00024             ncomponent = 3;
00025            }
00026            else { ncomponent = 4; } //barrel
00027         }
00028         if(subDetector->getId()== 3){ //3=outer silicon
00029            if(idSubDtc == 1 || idSubDtc == 3){ //1-3=encap
00030              ncomponent = 9;
00031            }
00032            else { ncomponent = 6; } //barrel
00033         }
00034         for(int i=1; i<(ncomponent+1); i++){
00035             addComponent(i,new VisCuTkLayer(i,this));   
00036         }
00037 }

VisCuTkPartDetector::~VisCuTkPartDetector (  )  [virtual]

Definition at line 39 of file VisCuTkPartDetector.cc.

00039                                          {
00040 }


Member Function Documentation

int VisCuTkPartDetector::getId (  )  [inline, virtual]

Implements VisCuTkState.

Definition at line 18 of file VisCuTkPartDetector.h.

References idSubDtc.

Referenced by getName(), VisCuTkLayer::VisCuTkLayer(), VisCuTkLayerSelection::VisCuTkLayerSelection(), and VisCuTkSubLayer::VisCuTkSubLayer().

00018 {return idSubDtc; } 

string VisCuTkPartDetector::getName ( void   ) 

Definition at line 41 of file VisCuTkPartDetector.cc.

References getId(), getOwner(), and name.

Referenced by VisCuTkSlWindow::drawpart(), VisCuTkSelectionBar::mousePressEvent(), and VisCuTkLayerSlWindow::VisCuTkLayerSlWindow().

00041                                    {
00042         string name;
00043         if(getOwner()->getId()==1){
00044                 if (getId()==1)name="PXE -z";
00045                 if (getId()==2)name="PXB";
00046                 if (getId()==3)name="PXE +z";
00047         }
00048         if(getOwner()->getId()==2){
00049                 if (getId()==1)name="TID -z";
00050                 if (getId()==2)name="TIB";
00051                 if (getId()==3)name="TID +z";
00052         }
00053         if(getOwner()->getId()==3){
00054                 if (getId()==1)name="TEC -z";
00055                 if (getId()==2)name="TOB";
00056                 if (getId()==3)name="TEC +z";
00057         }
00058         return name;
00059 }

VisCuTkSubDetector* VisCuTkPartDetector::getOwner (  )  [inline]

Definition at line 17 of file VisCuTkPartDetector.h.

References subDetector.

Referenced by getName(), VisCuTkLayer::VisCuTkLayer(), VisCuTkLayerSelection::VisCuTkLayerSelection(), and VisCuTkSubLayer::VisCuTkSubLayer().

00017 {return subDetector; }

bool VisCuTkPartDetector::isVisible (  )  [inline, virtual]

Implements VisCuTkState.

Definition at line 19 of file VisCuTkPartDetector.h.

References visible.

00019 {return visible;}

void VisCuTkPartDetector::setVisible ( bool  vis  )  [inline, virtual]

Implements VisCuTkState.

Definition at line 21 of file VisCuTkPartDetector.h.

References visible.

00021 {visible=vis;}

void VisCuTkPartDetector::setVisible (  )  [inline, virtual]

Implements VisCuTkState.

Definition at line 20 of file VisCuTkPartDetector.h.

References visible.

00020 {if(visible) visible=false; else visible=true;} 


Member Data Documentation

int VisCuTkPartDetector::idSubDtc [private]

Definition at line 25 of file VisCuTkPartDetector.h.

Referenced by getId(), and VisCuTkPartDetector().

VisCuTkSubDetector* VisCuTkPartDetector::subDetector [private]

Definition at line 24 of file VisCuTkPartDetector.h.

Referenced by getOwner(), and VisCuTkPartDetector().

bool VisCuTkPartDetector::visible [private]

Definition at line 26 of file VisCuTkPartDetector.h.

Referenced by isVisible(), setVisible(), and VisCuTkPartDetector().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:15 2009 for CMSSW by  doxygen 1.5.4