17 #include "TEveCaloData.h"
55 item()->defaultDisplayProperties().
color(),
56 item()->defaultDisplayProperties().transparency());
71 m_caloData->SetUserData(static_cast<FWFromEveSelectorBase*>(sel));
101 for (std::vector<float>::iterator
i = sliceVals.begin();
i!= sliceVals.end(); ++
i)
116 for (std::vector<float>::iterator
i = sliceVals.begin();
i!= sliceVals.end(); ++
i)
123 TEveCaloData::vCellId_t& selected =
m_vecData->GetCellsSelected();
125 if(
item()->defaultDisplayProperties().isVisible()) {
128 unsigned int index=0;
129 TEveCaloData::vCellId_t cellId;
135 unsigned int rawid = (*it).detid().rawId();
140 selected.push_back(TEveCaloData::CellId_t(tower,
m_sliceIndex));
151 using namespace TMath;
152 const static float upPhiLimit =
Pi() -10*DegToRad() -1
e-5;
154 TEveCaloData::vCellId_t cellIds;
156 if( !
geom->contains( rawid ))
158 fwLog(
fwlog::kInfo ) <<
"FWHFTowerProxyBuilderBase cannot get geometry for DetId: "<< rawid <<
". Ignored.\n";
162 const float* corners =
geom->getCorners( rawid );
165 fwLog(
fwlog::kInfo ) <<
"FWHFTowerProxyBuilderBase cannot get corners for DetId: "<< rawid <<
". Ignored.\n";
169 std::vector<TEveVector>
front( 4 );
171 bool plusSignPhi =
false;
172 bool minusSignPhi =
false;
174 for(
int i = 0;
i < 4; ++
i )
176 front[
i] = TEveVector( corners[
j], corners[j + 1], corners[j + 2] );
179 eta[
i] = front[
i].Eta();
180 phi[
i] = front[
i].Phi();
183 phi[
i] = Sign(
phi[
i], front[i].fY );
185 (
phi[
i] >= 0 ) ? plusSignPhi =
true : minusSignPhi =
true;
189 if( plusSignPhi && minusSignPhi )
191 for(
int i = 0;
i < 4; ++
i )
193 if(
phi[
i] >= upPhiLimit )
205 for(
int i = 0;
i < 4; ++
i )
208 etaM =
Max( etaM,
eta[i] );
209 phim =
Min( phim,
phi[i] );
210 phiM =
Max( phiM,
phi[i] );
219 Float_t ceta = (etam+etaM)*0.5;
220 Float_t cphi = (phim+phiM)*0.5;
223 for ( TEveCaloData::vCellGeom_i
i =
m_vecData->GetCellGeom().begin();
i!=
m_vecData->GetCellGeom().end(); ++
i, ++
idx)
225 const TEveCaloData::CellGeom_t &cg = *
i;
226 if ((ceta > cg.fEtaMin && ceta < cg.fEtaMax) && (cphi > cg.fPhiMin && cphi < cg.fPhiMax))
236 tower =
m_vecData->AddTower(etam, etaM, phim, phiM);
TEveCaloDataVec * getCaloDataHF() const
const FWDisplayProperties & displayProperties() const
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
static const int kAllRPZBits
void get(const T *&oData) const
std::vector< T >::const_iterator const_iterator
virtual void fillCaloData()
void addSliceSelector(int iSlice, FWFromSliceSelector *)
const FWEventItem * item() const
TEveCaloDataVec * m_vecData
virtual void itemBeingDestroyed(const FWEventItem *)
const_iterator end() const
virtual void setCaloData(const fireworks::Context &)
virtual ~FWHFTowerProxyBuilderBase()
tuple idx
DEBUGGING if hasattr(process,"trackMonIterativeTracking2012"): print "trackMonIterativeTracking2012 D...
FWHFTowerProxyBuilderBase()
virtual bool assertCaloDataSlice()
const HFRecHitCollection * m_hits
ModelInfo modelInfo(int iIndex) const
int fillTowerForDetId(unsigned int rawid, float)
tuple size
Write out results.
virtual void itemBeingDestroyed(const FWEventItem *)
const FWGeometry * getGeom() const
const_iterator begin() const
TEveCaloData * m_caloData