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 TEveCaloData* buildCaloData(bool xyEE);
00050
00051
00052 void setColor(Color_t color, const std::vector<DetId> &detIds);
00053
00054
00055
00056 void showSuperClusters(Color_t color1=kGreen+2, Color_t color2=kTeal);
00057
00058
00059 void showSuperCluster(const reco::SuperCluster &cluster, Color_t color=kYellow);
00060
00061
00062 double makeLegend(double x0 = 0.02, double y0 = 0.95,
00063 Color_t clustered1=kGreen+1, Color_t clustered2=kTeal,
00064 Color_t supercluster=kYellow);
00065
00066 private:
00067
00068
00069 void fillData(const EcalRecHitCollection *hits,
00070 TEveCaloDataVec *data, bool xyEE);
00071 const edm::EventBase *m_event;
00072 const FWGeometry *m_geom;
00073 float m_eta;
00074 float m_phi;
00075 int m_size;
00076 Color_t m_defaultColor;
00077
00078
00079 std::map<DetId, int> m_detIdsToColor;
00080
00081
00082 std::vector<Color_t> m_colors;
00083
00084
00085 static bool superClusterEtaLess(const reco::CaloCluster &lhs, const reco::CaloCluster &rhs)
00086 {
00087 return ( lhs.eta() < rhs.eta());
00088 }
00089
00090 };