Go to the documentation of this file.00001 #include "Rtypes.h"
00002 #include <map>
00003 #include <vector>
00004 #include "DataFormats/DetId/interface/DetId.h"
00005 #include "DataFormats/EcalRecHit/interface/EcalRecHitCollections.h"
00006 #include "DataFormats/EgammaReco/interface/SuperClusterFwd.h"
00007 #include "DataFormats/CaloRecHit/interface/CaloClusterFwd.h"
00008
00009 namespace edm {
00010 class EventBase;
00011 }
00012
00013 class FWGeometry;
00014 class TEveCaloDataVec;
00015 class TEveCaloLego;
00016
00017
00018 class superClsterEtaLess : public std::binary_function<const reco::CaloCluster&, const reco::CaloCluster&, bool>
00019 {
00020 public:
00021 bool operator()(const reco::CaloCluster &lhs, const reco::CaloCluster &rhs)
00022 {
00023 return ( lhs.eta() < rhs.eta()) ;
00024 }
00025 };
00026
00027
00028 class FWECALDetailViewBuilder {
00029
00030 public:
00031
00032
00033
00034
00035
00036
00037 FWECALDetailViewBuilder(const edm::EventBase *event, const FWGeometry* geom,
00038 float eta, float phi, int size = 50,
00039 Color_t defaultColor = kMagenta+1)
00040 : m_event(event), m_geom(geom),
00041 m_eta(eta), m_phi(phi), m_size(size),
00042 m_defaultColor(defaultColor){
00043 }
00044
00045
00046
00047 TEveCaloLego* build();
00048
00049
00050 void setColor(Color_t color, const std::vector<DetId> &detIds);
00051
00052
00053
00054 void showSuperClusters(Color_t color1=kGreen+2, Color_t color2=kTeal);
00055
00056
00057 void showSuperCluster(const reco::SuperCluster &cluster, Color_t color=kYellow);
00058
00059
00060 double makeLegend(double x0 = 0.02, double y0 = 0.95,
00061 Color_t clustered1=kGreen+1, Color_t clustered2=kTeal,
00062 Color_t supercluster=kYellow);
00063
00064 private:
00065
00066
00067 void fillData(const EcalRecHitCollection *hits,
00068 TEveCaloDataVec *data);
00069 const edm::EventBase *m_event;
00070 const FWGeometry *m_geom;
00071 float m_eta;
00072 float m_phi;
00073 int m_size;
00074 Color_t m_defaultColor;
00075
00076
00077 std::map<DetId, int> m_detIdsToColor;
00078
00079
00080 std::vector<Color_t> m_colors;
00081
00082
00083 static bool superClusterEtaLess(const reco::CaloCluster &lhs, const reco::CaloCluster &rhs)
00084 {
00085 return ( lhs.eta() < rhs.eta());
00086 }
00087
00088 };