CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_3_10_patch2/src/RecoParticleFlow/PFRootEvent/src/GPFCluster.cc

Go to the documentation of this file.
00001 #include "DataFormats/ParticleFlowReco/interface/PFCluster.h"
00002 #include "RecoParticleFlow/PFRootEvent/interface/GPFCluster.h"
00003 #include "RecoParticleFlow/PFRootEvent/interface/DisplayManager.h"
00004 #include "TObject.h"
00005 #include "TPad.h"
00006 #include "TMarker.h"
00007 
00008 
00009 //_________________________________________________________________
00010 GPFCluster::GPFCluster(DisplayManager * display,
00011                        int view,int ident,
00012                        const reco::PFCluster* clus,
00013                        double x,double y,TAttMarker *attm)
00014   : GPFBase(display,view,ident, attm ),
00015     TMarker(x,y,1),clus_(clus) {
00016 
00017   ResetBit(kCanDelete);
00018   en_=clus_->energy();
00019   SetMarkerColor(markerAttr_->GetMarkerColor());
00020   SetMarkerStyle(markerAttr_->GetMarkerStyle());
00021   SetMarkerSize(markerAttr_->GetMarkerSize());
00022 }   
00023                     
00024 //_________________________________________________________________
00025 void GPFCluster::Print()
00026 {
00027   std::cout<<*clus_<<std::endl;
00028 }
00029 //_________________________________________________________________    
00030 void GPFCluster::ExecuteEvent(Int_t event, Int_t px, Int_t py)
00031 {
00032   // Execute action corresponding to a mouse click 
00033   //on a GPFRecHit object in the window
00034 
00035   gPad->SetCursor(kHand);
00036   switch (event) {
00037   case kButton1Down:
00038     Print();
00039     display_->findBlock(origId_);
00040     display_->findAndDraw(origId_);
00041     break;
00042   default:break;
00043   }    
00044 }
00045 //_________________________________________________________________
00046 void GPFCluster::draw()
00047 {
00048   TMarker::Draw();
00049 }
00050 //_________________________________________________________________
00051 void GPFCluster::setColor()
00052 {
00053   SetMarkerColor(markerAttr_->GetMarkerColor());
00054 }
00055 //_________________________________________________________________
00056 void GPFCluster::setColor(int newcol)
00057 {
00058   SetMarkerColor(newcol);
00059 }
00060 //_________________________________________________________________
00061 void GPFCluster::setInitialColor()
00062 {
00063   SetMarkerColor(markerAttr_->GetMarkerColor());
00064 }
00065 //_________________________________________________________________
00066 void GPFCluster::setNewStyle()
00067 {
00068   SetMarkerStyle(markerAttr_->GetMarkerStyle());
00069 }
00070 //_________________________________________________________________
00071 void GPFCluster::setNewSize()
00072 {
00073   SetMarkerSize(markerAttr_->GetMarkerSize());
00074 }