CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
GPFSimParticle Class Reference

#include <GPFSimParticle.h>

Inheritance diagram for GPFSimParticle:
GPFBase

Public Member Functions

virtual void draw ()
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 
double getPt ()
 
 GPFSimParticle (DisplayManager *dm, int view, int ident, const reco::PFSimParticle *ptc, int size, double *x, double *y, double pt, TAttMarker *attm, TAttLine *attl, std::string option)
 
virtual void Print ()
 
void setColor ()
 
void setColor (int newcol)
 
void setInitialColor ()
 
void setNewSize ()
 
void setNewStyle ()
 
- Public Member Functions inherited from GPFBase
virtual double getEnergy ()
 
int getOrigin ()
 
int getView ()
 
 GPFBase (DisplayManager *display, int viewType, int ident, TAttMarker *attm, TAttLine *attl)
 
 GPFBase (DisplayManager *display, int viewType, int ident, TAttMarker *attm)
 
 GPFBase (DisplayManager *display, int viewType, int ident, int color)
 
virtual ~GPFBase ()
 

Private Attributes

std::string option_
 
const reco::PFSimParticlepart_
 
double pt_
 

Additional Inherited Members

- Protected Attributes inherited from GPFBase
int color_
 
DisplayManagerdisplay_
 
TAttLine * lineAttr_
 
TAttMarker * markerAttr_
 
int origId_
 
int viewId_
 

Detailed Description

Definition at line 16 of file GPFSimParticle.h.

Constructor & Destructor Documentation

GPFSimParticle::GPFSimParticle ( DisplayManager dm,
int  view,
int  ident,
const reco::PFSimParticle ptc,
int  size,
double *  x,
double *  y,
double  pt,
TAttMarker *  attm,
TAttLine *  attl,
std::string  option 
)

Definition at line 11 of file GPFSimParticle.cc.

References GPFBase::lineAttr_, and GPFBase::markerAttr_.

16  : GPFBase(display,view,ident,attm,attl),
17  TGraph(size,x,y), part_(ptc), pt_(pt), option_(option)
18 {
19 
20  ResetBit(kCanDelete);
21  SetLineColor(lineAttr_->GetLineColor());
22  SetLineStyle(lineAttr_->GetLineStyle());
23  SetMarkerStyle(markerAttr_->GetMarkerStyle());
24  SetMarkerSize(markerAttr_->GetMarkerSize());
25  SetMarkerColor(markerAttr_->GetMarkerColor());
26 }
GPFBase(DisplayManager *display, int viewType, int ident, TAttMarker *attm, TAttLine *attl)
Definition: GPFBase.cc:15
TAttLine * lineAttr_
Definition: GPFBase.h:21
std::string option_
TAttMarker * markerAttr_
Definition: GPFBase.h:20
const reco::PFSimParticle * part_
Definition: DDAxes.h:10
tuple size
Write out results.

Member Function Documentation

void GPFSimParticle::draw ( )
virtual

Reimplemented from GPFBase.

Definition at line 48 of file GPFSimParticle.cc.

References option_.

49 {
50  TGraph::Draw(option_.data());
51 }
std::string option_
void GPFSimParticle::ExecuteEvent ( Int_t  event,
Int_t  px,
Int_t  py 
)
virtual

Definition at line 33 of file GPFSimParticle.cc.

References GPFBase::display_, DisplayManager::findAndDraw(), GPFBase::origId_, and Print().

34 {
35  // Execute action corresponding to a left mouse button click
36  //on a GPFSimParticle object in the window
37 
38  gPad->SetCursor(kHand);
39  switch (event) {
40  case kButton1Down:
41  Print();
43  break;
44  default:break;
45  }
46 }
int origId_
Definition: GPFBase.h:19
virtual void Print()
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger but the state exists so we define the behavior If all triggers are the negative crieriion will lead to accepting the event(this again matches the behavior of"!*"before the partial wildcard feature was incorporated).The per-event"cost"of each negative criterion with multiple relevant triggers is about the same as!*was in the past
DisplayManager * display_
Definition: GPFBase.h:17
void findAndDraw(int ident)
double GPFSimParticle::getPt ( )
inlinevirtual

Reimplemented from GPFBase.

Definition at line 26 of file GPFSimParticle.h.

References pt_.

26 { return pt_;}
void GPFSimParticle::Print ( void  )
virtual

Definition at line 28 of file GPFSimParticle.cc.

References gather_cfg::cout, and part_.

Referenced by ExecuteEvent().

29 {
30  std::cout<<*part_<<std::endl;
31 }
const reco::PFSimParticle * part_
tuple cout
Definition: gather_cfg.py:121
void GPFSimParticle::setColor ( )
virtual

Implements GPFBase.

Definition at line 53 of file GPFSimParticle.cc.

References GPFBase::lineAttr_, GPFBase::markerAttr_, and option_.

54 {
55  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
56  else SetLineColor(lineAttr_->GetLineColor());
57  SetMarkerColor(markerAttr_->GetMarkerColor());
58 }
TAttLine * lineAttr_
Definition: GPFBase.h:21
std::string option_
TAttMarker * markerAttr_
Definition: GPFBase.h:20
void GPFSimParticle::setColor ( int  newcol)
virtual

Implements GPFBase.

Definition at line 60 of file GPFSimParticle.cc.

References option_.

61 {
62  if (option_=="f") SetFillColor(newcol);
63  else SetLineColor(newcol);
64  SetMarkerColor(newcol);
65 }
std::string option_
void GPFSimParticle::setInitialColor ( )
virtual

Implements GPFBase.

Definition at line 67 of file GPFSimParticle.cc.

References GPFBase::lineAttr_, GPFBase::markerAttr_, and option_.

68 {
69  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
70  else SetLineColor(lineAttr_->GetLineColor());
71  SetMarkerColor(markerAttr_->GetMarkerColor());
72 }
TAttLine * lineAttr_
Definition: GPFBase.h:21
std::string option_
TAttMarker * markerAttr_
Definition: GPFBase.h:20
void GPFSimParticle::setNewSize ( )
virtual

Implements GPFBase.

Definition at line 74 of file GPFSimParticle.cc.

References GPFBase::markerAttr_.

75 {
76  SetMarkerSize(markerAttr_->GetMarkerSize());
77 }
TAttMarker * markerAttr_
Definition: GPFBase.h:20
void GPFSimParticle::setNewStyle ( )
virtual

Implements GPFBase.

Definition at line 79 of file GPFSimParticle.cc.

References GPFBase::markerAttr_.

80 {
81  SetMarkerStyle(markerAttr_->GetMarkerStyle());
82 }
TAttMarker * markerAttr_
Definition: GPFBase.h:20

Member Data Documentation

std::string GPFSimParticle::option_
private

Definition at line 42 of file GPFSimParticle.h.

Referenced by draw(), setColor(), and setInitialColor().

const reco::PFSimParticle* GPFSimParticle::part_
private

Definition at line 39 of file GPFSimParticle.h.

Referenced by Print().

double GPFSimParticle::pt_
private

Definition at line 40 of file GPFSimParticle.h.

Referenced by getPt().