14 #include "TEveGeoNode.h" 31 TEveElement& oItemHolder )
34 TEveGeoManagerHolder gmgr( TEveGeoShape::GetGeoMangeur());
36 std::vector< std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
37 if (detids.empty())
return false;
38 std::vector<double> phis;
39 for( std::vector<std::pair<DetId, float> >::const_iterator
id = detids.begin(),
end = detids.end();
id !=
end; ++
id )
44 std::vector<float> centre( 3, 0 );
46 for(
unsigned int i = 0;
i < 24;
i += 3 )
48 centre[0] += corners[
i];
49 centre[1] += corners[
i + 1];
50 centre[2] += corners[
i + 2];
53 phis.push_back( TEveVector( centre[0], centre[1], centre[2] ).
Phi());
58 TGeoBBox *sc_box =
new TGeoTubeSeg( r - 2, r , 1,
59 phiRange.first * 180 /
M_PI - 0.5,
60 phiRange.second * 180 /
M_PI + 0.5 );
62 sc->SetPickable( kTRUE );
70 TEveElement& oItemHolder )
73 TEveGeoManagerHolder gmgr( TEveGeoShape::GetGeoMangeur());
75 double theta_min = 10;
76 std::vector<std::pair<DetId, float> > detids = iCluster->hitsAndFractions();
77 if (detids.empty())
return false;
78 for( std::vector<std::pair<DetId, float> >::const_iterator
id = detids.begin(),
end = detids.end();
id !=
end; ++
id )
83 std::vector<float> centre( 3, 0 );
85 for(
unsigned int i = 0;
i < 24;
i += 3 )
87 centre[0] += corners[
i];
88 centre[1] += corners[
i + 1];
89 centre[2] += corners[
i + 2];
92 double theta = TEveVector( centre[0], centre[1], centre[2] ).Theta();
93 if( theta > theta_max ) theta_max =
theta;
94 if( theta < theta_min ) theta_min =
theta;
99 if ((theta_max > 0 && theta_max < pb->context().caloTransAngle()) ||
109 theta_min - 0.003, theta_max + 0.003,
const fireworks::Context & context() const
const FWDisplayProperties & defaultDisplayProperties() const
std::pair< double, double > getPhiRange(const std::vector< double > &phis, double phi)
static float caloTransAngle()
const FWGeometry * getGeom() const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Geom::Theta< T > theta() const
static float caloZ2(bool offset=true)
const FWEventItem * item() const
static float caloR2(bool offset=true)
static float caloR1(bool offset=true)
bool makeRhoZSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
void addRhoZEnergyProjection(FWProxyBuilderBase *, TEveElement *, double r_ecal, double z_ecal, double theta_min, double theta_max, double phi)
const float * getCorners(unsigned int id) const
bool makeRhoPhiSuperCluster(FWProxyBuilderBase *, const reco::SuperClusterRef &iCluster, float iPhi, TEveElement &oItemHolder)
static float caloZ1(bool offset=true)
TEveGeoShape * getShape(const char *name, TGeoBBox *shape, Color_t color)