CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
GPFSimParticle.cc
Go to the documentation of this file.
3 #include "TPad.h"
4 #include "TObject.h"
5 #include "TGraph.h"
6 #include <string>
7 
8 
9 
10 //________________________________________________________________________
11 GPFSimParticle::GPFSimParticle(DisplayManager *display,int view, int ident,
12  const reco::PFSimParticle *ptc,
13  int size, double *x, double *y,
14  double pt,TAttMarker *attm, TAttLine *attl,
15  std::string option)
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 }
27 //____________________________________________________________________________________________________________
29 {
30  std::cout<<*part_<<std::endl;
31 }
32 //_______________________________________________________________________________
33 void GPFSimParticle::ExecuteEvent(Int_t event, Int_t px, Int_t py)
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 }
47 //______________________________________________________________________________
49 {
50  TGraph::Draw(option_.data());
51 }
52 //_______________________________________________________________________________
54 {
55  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
56  else SetLineColor(lineAttr_->GetLineColor());
57  SetMarkerColor(markerAttr_->GetMarkerColor());
58 }
59 //_______________________________________________________________________________
60 void GPFSimParticle::setColor(int newcol)
61 {
62  if (option_=="f") SetFillColor(newcol);
63  else SetLineColor(newcol);
64  SetMarkerColor(newcol);
65 }
66 //_____________________________________________________________________________
68 {
69  if (option_=="f") SetFillColor(lineAttr_->GetLineColor());
70  else SetLineColor(lineAttr_->GetLineColor());
71  SetMarkerColor(markerAttr_->GetMarkerColor());
72 }
73 //_____________________________________________________________________________
75 {
76  SetMarkerSize(markerAttr_->GetMarkerSize());
77 }
78 //____________________________________________________________________________
80 {
81  SetMarkerStyle(markerAttr_->GetMarkerStyle());
82 }
83 
TAttLine * lineAttr_
Definition: GPFBase.h:21
virtual void draw()
void setInitialColor()
std::string option_
int origId_
Definition: GPFBase.h:19
TAttMarker * markerAttr_
Definition: GPFBase.h:20
const reco::PFSimParticle * part_
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
true particle for particle flow
Definition: PFSimParticle.h:19
DisplayManager * display_
Definition: GPFBase.h:17
void findAndDraw(int ident)
tuple cout
Definition: gather_cfg.py:41
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 ExecuteEvent(Int_t event, Int_t px, Int_t py)
tuple size
Write out results.