CMS 3D CMS Logo

Public Member Functions | Private Attributes

GPFGenParticle Class Reference

#include <GPFGenParticle.h>

Inheritance diagram for GPFGenParticle:
GPFBase

List of all members.

Public Member Functions

virtual void draw ()
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
double getEnergy ()
double getPt ()
 GPFGenParticle (DisplayManager *dm, int view, int ident, double *eta, double *phi, double en, double pt, int barcode, int barcodeMother, TAttMarker *attm, std::string name, std::string latexName)
 GPFGenParticle (DisplayManager *dm, int view, int ident, double eta, double phi, double en, double pt, int barcode, TAttMarker *attm, std::string name, std::string latexName)
virtual void Print ()
void setColor (int newcol)
void setColor ()
void setInitialColor ()
void setNewSize ()
void setNewStyle ()
virtual ~GPFGenParticle ()

Private Attributes

int barcode_
int barcodeMother_
double en_
TLine * line_
std::string name_
double pt_

Detailed Description

Definition at line 15 of file GPFGenParticle.h.


Constructor & Destructor Documentation

GPFGenParticle::GPFGenParticle ( DisplayManager dm,
int  view,
int  ident,
double  eta,
double  phi,
double  en,
double  pt,
int  barcode,
TAttMarker *  attm,
std::string  name,
std::string  latexName 
)

Definition at line 7 of file GPFGenParticle.cc.

References GPFBase::markerAttr_.

  :  GPFBase(display,view,ident, attm ),
     TMarker(x,y,1),
     TLatex(x,y,latexName.c_str()),
     en_(e),pt_(pt),name_(name),barcode_(barcode),
     barcodeMother_(0),
     line_(0) {
    
  //ResetBit(kCanDelete);
  SetMarkerColor(markerAttr_->GetMarkerColor());
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
  SetMarkerSize(markerAttr_->GetMarkerSize());
}   
GPFGenParticle::GPFGenParticle ( DisplayManager dm,
int  view,
int  ident,
double *  eta,
double *  phi,
double  en,
double  pt,
int  barcode,
int  barcodeMother,
TAttMarker *  attm,
std::string  name,
std::string  latexName 
)

Definition at line 24 of file GPFGenParticle.cc.

References line_, and GPFBase::markerAttr_.

  :  GPFBase(display,view,ident, attm ),
     TMarker(x[1],y[1],1),
     TLatex(x[1],y[1],latexName.c_str()),
     en_(e),pt_(pt),name_(name),barcode_(barcode),
     barcodeMother_(barcodeMother),
     line_(0) {
    
  //ResetBit(kCanDelete);
  SetMarkerColor(markerAttr_->GetMarkerColor());
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
  SetMarkerSize(markerAttr_->GetMarkerSize());
  line_ = new TLine(x[0],y[0],x[1],y[1]);
  line_->SetLineColor(markerAttr_->GetMarkerColor());
}
virtual GPFGenParticle::~GPFGenParticle ( ) [inline, virtual]

Definition at line 27 of file GPFGenParticle.h.

{;}

Member Function Documentation

void GPFGenParticle::draw ( ) [virtual]

Reimplemented from GPFBase.

Definition at line 63 of file GPFGenParticle.cc.

References line_.

{
  TMarker::Draw();
  SetTextFont(42);
  SetTextSize(0.05);
  TLatex::Draw();
  if(line_) line_->Draw();
}  
void GPFGenParticle::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
) [virtual]

Definition at line 50 of file GPFGenParticle.cc.

References Print().

{
  // Execute action corresponding to a mouse click 

  gPad->SetCursor(kHand);
  switch (event) {
  case kButton1Down:
    Print();
    break;
  default:break;
  }    
}
double GPFGenParticle::getEnergy ( ) [inline, virtual]

Reimplemented from GPFBase.

Definition at line 29 of file GPFGenParticle.h.

References en_.

{ return en_;}
double GPFGenParticle::getPt ( ) [inline, virtual]

Reimplemented from GPFBase.

Definition at line 30 of file GPFGenParticle.h.

References pt_.

{ return pt_;}
void GPFGenParticle::Print ( void  ) [virtual]
void GPFGenParticle::setColor ( int  newcol) [virtual]

Implements GPFBase.

Definition at line 77 of file GPFGenParticle.cc.

{
  SetMarkerColor(newcol);
}
void GPFGenParticle::setColor ( ) [virtual]

Implements GPFBase.

Definition at line 72 of file GPFGenParticle.cc.

References GPFBase::markerAttr_.

{
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFGenParticle::setInitialColor ( ) [virtual]

Implements GPFBase.

Definition at line 82 of file GPFGenParticle.cc.

References GPFBase::markerAttr_.

{
  SetMarkerColor(markerAttr_->GetMarkerColor());
}
void GPFGenParticle::setNewSize ( ) [virtual]

Implements GPFBase.

Definition at line 92 of file GPFGenParticle.cc.

References GPFBase::markerAttr_.

{
  SetMarkerSize(markerAttr_->GetMarkerSize());
}
void GPFGenParticle::setNewStyle ( ) [virtual]

Implements GPFBase.

Definition at line 87 of file GPFGenParticle.cc.

References GPFBase::markerAttr_.

{
  SetMarkerStyle(markerAttr_->GetMarkerStyle());
}

Member Data Documentation

int GPFGenParticle::barcode_ [private]

Definition at line 48 of file GPFGenParticle.h.

Referenced by Print().

Definition at line 49 of file GPFGenParticle.h.

Referenced by Print().

double GPFGenParticle::en_ [private]

Definition at line 45 of file GPFGenParticle.h.

Referenced by getEnergy().

TLine* GPFGenParticle::line_ [private]

Definition at line 50 of file GPFGenParticle.h.

Referenced by draw(), and GPFGenParticle().

std::string GPFGenParticle::name_ [private]

Definition at line 47 of file GPFGenParticle.h.

Referenced by Print().

double GPFGenParticle::pt_ [private]

Definition at line 46 of file GPFGenParticle.h.

Referenced by getPt().