CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GPFGenParticle.cc
Go to the documentation of this file.
3 #include "TObject.h"
4 #include "TPad.h"
5 
6 //________________________________________________________________
8  int view,int ident,
9  double x,double y,double e, double pt,int barcode,
10  TAttMarker *attm,std::string name, std::string latexName)
11  : GPFBase(display,view,ident, attm ),
12  TMarker(x,y,1),
13  TLatex(x,y,latexName.c_str()),
14  en_(e),pt_(pt),name_(name),barcode_(barcode),
15  barcodeMother_(0),
16  line_(0) {
17 
18  //ResetBit(kCanDelete);
19  SetMarkerColor(markerAttr_->GetMarkerColor());
20  SetMarkerStyle(markerAttr_->GetMarkerStyle());
21  SetMarkerSize(markerAttr_->GetMarkerSize());
22 }
23 //________________________________________________________________
25  int view,int ident,
26  double *x,double *y,
27  double e, double pt,int barcode,int barcodeMother,
28  TAttMarker *attm,std::string name, std::string latexName)
29  : GPFBase(display,view,ident, attm ),
30  TMarker(x[1],y[1],1),
31  TLatex(x[1],y[1],latexName.c_str()),
32  en_(e),pt_(pt),name_(name),barcode_(barcode),
33  barcodeMother_(barcodeMother),
34  line_(0) {
35 
36  //ResetBit(kCanDelete);
37  SetMarkerColor(markerAttr_->GetMarkerColor());
38  SetMarkerStyle(markerAttr_->GetMarkerStyle());
39  SetMarkerSize(markerAttr_->GetMarkerSize());
40  line_ = new TLine(x[0],y[0],x[1],y[1]);
41  line_->SetLineColor(markerAttr_->GetMarkerColor());
42 }
43 
44 //_________________________________________________________________
46 {
48 }
49 //_________________________________________________________________
50 void GPFGenParticle::ExecuteEvent(Int_t event, Int_t px, Int_t py)
51 {
52  // Execute action corresponding to a mouse click
53 
54  gPad->SetCursor(kHand);
55  switch (event) {
56  case kButton1Down:
57  Print();
58  break;
59  default:break;
60  }
61 }
62 //_________________________________________________________________
64 {
65  TMarker::Draw();
66  SetTextFont(42);
67  SetTextSize(0.05);
68  TLatex::Draw();
69  if(line_) line_->Draw();
70 }
71 //_________________________________________________________________
73 {
74  SetMarkerColor(markerAttr_->GetMarkerColor());
75 }
76 //_________________________________________________________________
77 void GPFGenParticle::setColor(int newcol)
78 {
79  SetMarkerColor(newcol);
80 }
81 //_________________________________________________________________
83 {
84  SetMarkerColor(markerAttr_->GetMarkerColor());
85 }
86 //_________________________________________________________________
88 {
89  SetMarkerStyle(markerAttr_->GetMarkerStyle());
90 }
91 //_________________________________________________________________
93 {
94  SetMarkerSize(markerAttr_->GetMarkerSize());
95 }
96 
void printGenParticleInfo(std::string name, int barcode, int barcodeMother)
void setInitialColor()
virtual void draw()
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)
std::string name_
virtual void ExecuteEvent(Int_t event, Int_t px, Int_t py)
TAttMarker * markerAttr_
Definition: GPFBase.h:20
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
virtual void Print()
Definition: DDAxes.h:10