16 #include "TEveCaloData.h" 54 item()->defaultDisplayProperties().
color(),
55 item()->defaultDisplayProperties().transparency());
62 assert(
nullptr!=base);
70 m_caloData->SetUserData(static_cast<FWFromEveSelectorBase*>(sel));
100 for (std::vector<float>::iterator
i = sliceVals.begin();
i!= sliceVals.end(); ++
i)
115 for (std::vector<float>::iterator
i = sliceVals.begin();
i!= sliceVals.end(); ++
i)
122 TEveCaloData::vCellId_t& selected =
m_vecData->GetCellsSelected();
124 if(
item()->defaultDisplayProperties().isVisible()) {
127 unsigned int index=0;
128 TEveCaloData::vCellId_t cellId;
134 unsigned int rawid = (*it).detid().rawId();
139 selected.push_back(TEveCaloData::CellId_t(tower,
m_sliceIndex));
150 using namespace TMath;
151 const static float upPhiLimit =
Pi() -10*DegToRad() -1
e-5;
153 TEveCaloData::vCellId_t cellIds;
157 fwLog(
fwlog::kInfo ) <<
"FWHFTowerProxyBuilderBase cannot get geometry for DetId: "<< rawid <<
". Ignored.\n";
161 const float* corners = geom->
getCorners( rawid );
164 fwLog(
fwlog::kInfo ) <<
"FWHFTowerProxyBuilderBase cannot get corners for DetId: "<< rawid <<
". Ignored.\n";
168 std::vector<TEveVector> front( 4 );
170 bool plusSignPhi =
false;
171 bool minusSignPhi =
false;
173 for(
int i = 0;
i < 4; ++
i )
175 front[
i] = TEveVector( corners[j], corners[j + 1], corners[j + 2] );
178 eta[
i] = front[
i].Eta();
179 phi[
i] = front[
i].Phi();
182 phi[
i] =
Sign( phi[
i], front[i].fY );
184 ( phi[
i] >= 0 ) ? plusSignPhi =
true : minusSignPhi =
true;
188 if( plusSignPhi && minusSignPhi )
190 for(
int i = 0;
i < 4; ++
i )
192 if( phi[
i] >= upPhiLimit )
204 for(
int i = 0;
i < 4; ++
i )
206 etam =
Min( etam, eta[
i] );
207 etaM =
Max( etaM, eta[i] );
208 phim =
Min( phim, phi[i] );
209 phiM =
Max( phiM, phi[i] );
218 Float_t ceta = (etam+etaM)*0.5;
219 Float_t cphi = (phim+phiM)*0.5;
222 for ( TEveCaloData::vCellGeom_i
i =
m_vecData->GetCellGeom().begin();
i!=
m_vecData->GetCellGeom().end(); ++
i, ++
idx)
224 const TEveCaloData::CellGeom_t &cg = *
i;
225 if ((ceta > cg.fEtaMin && ceta < cg.fEtaMax) && (cphi > cg.fPhiMin && cphi < cg.fPhiMax))
235 tower =
m_vecData->AddTower(etam, etaM, phim, phiM);
TEveCaloDataVec * getCaloDataHF() const
const FWDisplayProperties & displayProperties() const
#define REGISTER_FWPROXYBUILDER(_name_, _type_, _purpose_, _view_)
void setCaloData(const fireworks::Context &) override
static const int kAllRPZBits
void get(const T *&oData) const
std::vector< T >::const_iterator const_iterator
void fillCaloData() override
void addSliceSelector(int iSlice, FWFromSliceSelector *)
const FWEventItem * item() const
TEveCaloDataVec * m_vecData
void itemBeingDestroyed(const FWEventItem *) override
void itemBeingDestroyed(const FWEventItem *) override
bool contains(unsigned int id) const
base
Make Sure CMSSW is Setup ##.
const_iterator end() const
~FWHFTowerProxyBuilderBase() override
const float * getCorners(unsigned int id) const
FWHFTowerProxyBuilderBase()
const HFRecHitCollection * m_hits
ModelInfo modelInfo(int iIndex) const
bool assertCaloDataSlice() override
int fillTowerForDetId(unsigned int rawid, float)
const FWGeometry * getGeom() const
const_iterator begin() const
TEveCaloData * m_caloData