Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:11:50

0001 // -*- C++ -*-
0002 //
0003 // Package:     Tracks
0004 // Class  :     FWPFDetailView
0005 
0006 #include "Rtypes.h"
0007 
0008 #include "Fireworks/Core/interface/FWDetailViewGL.h"
0009 #include "Fireworks/Core/interface/CSGActionSupervisor.h"
0010 
0011 #include "DataFormats/ParticleFlowCandidate/interface/PFCandidate.h"
0012 class TGLEmbeddedViewer;
0013 class FWIntValueListener;
0014 class TEveCaloLego;
0015 class TGSlider;
0016 
0017 namespace reco {
0018   //   class PFCandidate;
0019   class PFRecHit;
0020   class PFCluster;
0021   class PFRecTrack;
0022 }  // namespace reco
0023 
0024 class FWPFCandidateDetailView : public FWDetailViewGL<reco::PFCandidate>, public CSGActionSupervisor {
0025 public:
0026   FWPFCandidateDetailView();
0027   ~FWPFCandidateDetailView() override;
0028 
0029   FWPFCandidateDetailView(const FWPFCandidateDetailView &) = delete;                   // stop default
0030   const FWPFCandidateDetailView &operator=(const FWPFCandidateDetailView &) = delete;  // stop default
0031 
0032 private:
0033   using FWDetailView<reco::PFCandidate>::build;
0034   void build(const FWModelId &id, const reco::PFCandidate *) override;
0035   void setTextInfo(const FWModelId &id, const reco::PFCandidate *) override;
0036   void makeLegend(void);
0037 
0038   bool isPntInRng(float x, float y);
0039 
0040   void rangeChanged(int x);
0041   void plotEtChanged();
0042   void rnrHcalChanged();
0043 
0044   void buildGLEventScene();
0045 
0046   void voteMaxEtEVal(const std::vector<reco::PFRecHit> *hits);
0047 
0048   void addHits(const std::vector<reco::PFRecHit> *);
0049   void addClusters(const std::vector<reco::PFCluster> *);
0050   void addTracks(const std::vector<reco::PFRecTrack> *);
0051 
0052   float eta();
0053   float phi();
0054 
0055   float etaMin() { return eta() - m_range; }
0056   float etaMax() { return eta() + m_range; }
0057   float phiMin() { return phi() - m_range; }
0058   float phiMax() { return phi() + m_range; }
0059 
0060   float m_range;
0061   const reco::PFCandidate *m_candidate;
0062 
0063   TLegend *m_legend;
0064 
0065   TGSlider *m_slider;
0066   FWIntValueListener *m_sliderListener;
0067 
0068   TEveElementList *m_eventList;
0069 
0070   bool m_plotEt;
0071 
0072   bool m_rnrHcal;
0073 };