|
|
#include <FWPFCandidateWithHitsProxyBuilder.h>
|
void | build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override |
|
| FWPFCandidateWithHitsProxyBuilder () |
|
bool | havePerViewProduct (FWViewType::EType) const override |
|
const std::string & | purpose () const |
|
void | scaleProduct (TEveElementList *parent, FWViewType::EType type, const FWViewContext *vc) override |
|
const std::string & | typeName () const |
|
const std::string & | view () const |
|
| ~FWPFCandidateWithHitsProxyBuilder () override |
|
void | build () |
|
virtual bool | canHandle (const FWEventItem &) |
|
const fireworks::Context & | context () const |
|
TEveElementList * | createProduct (FWViewType::EType, const FWViewContext *) |
|
| FWProxyBuilderBase () |
|
bool | getHaveWindow () const |
|
virtual bool | haveSingleProduct () const |
|
const FWEventItem * | item () const |
|
virtual void | itemBeingDestroyed (const FWEventItem *) |
|
void | itemChanged (const FWEventItem *) |
|
int | layer () const |
|
void | modelChanges (const FWModelIds &) |
|
void | removePerViewProduct (FWViewType::EType, const FWViewContext *vc) |
|
void | scaleChanged (const FWViewContext *) |
|
void | setHaveWindow (bool iFlag) |
|
virtual void | setInteractionList (FWInteractionList *, const std::string &) |
|
virtual void | setItem (const FWEventItem *iItem) |
|
void | setupAddElement (TEveElement *el, TEveElement *parent, bool set_color=true) const |
|
void | setupElement (TEveElement *el, bool color=true) const |
|
virtual bool | willHandleInteraction () const |
|
virtual | ~FWProxyBuilderBase () |
|
|
typedef std::vector< Product * >::iterator | Product_it |
|
virtual void | buildViewType (const FWEventItem *iItem, TEveElementList *, FWViewType::EType, const FWViewContext *) |
|
virtual void | clean () |
|
virtual void | cleanLocal () |
|
TEveCompound * | createCompound (bool set_color=true, bool propagate_color_to_all_children=false) const |
|
| FWProxyBuilderBase (const FWProxyBuilderBase &) |
|
void | increaseComponentTransparency (unsigned int index, TEveElement *holder, const std::string &name, Char_t transpOffset) |
|
virtual void | localModelChanges (const FWModelId &iId, TEveElement *iCompound, FWViewType::EType viewType, const FWViewContext *vc) |
|
virtual void | modelChanges (const FWModelIds &, Product *) |
|
const FWProxyBuilderBase & | operator= (const FWProxyBuilderBase &) |
|
virtual bool | visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *) |
|
std::vector< Product * > | m_products |
|
◆ FWPFCandidateWithHitsProxyBuilder() [1/2]
FWPFCandidateWithHitsProxyBuilder::FWPFCandidateWithHitsProxyBuilder |
( |
| ) |
|
|
inline |
◆ ~FWPFCandidateWithHitsProxyBuilder()
FWPFCandidateWithHitsProxyBuilder::~FWPFCandidateWithHitsProxyBuilder |
( |
| ) |
|
|
inlineoverride |
◆ FWPFCandidateWithHitsProxyBuilder() [2/2]
◆ addHitsForCandidate()
Definition at line 217 of file FWPFCandidateWithHitsProxyBuilder.cc.
222 TEveBoxSet* boxset =
nullptr;
223 TEveStraightLineSet* lineset =
nullptr;
225 for (
unsigned elIdx = 0; elIdx < eleInBlocks.size(); elIdx++) {
231 unsigned indexInBlock = eleInBlocks[elIdx].second;
239 if (myBlock->elements()[indexInBlock].type() == 5)
240 ieHCAL = indexInBlock;
242 std::vector<float> scaledCorners(24);
247 if (myCluster.get()) {
248 const std::vector<std::pair<DetId, float> >& hitsandfracs = myCluster->
hitsAndFractions();
251 boxset =
new TEveBoxSet();
252 boxset->Reset(TEveBoxSet::kBT_FreeBox,
true, hitsandfracs.size());
253 boxset->SetAntiFlick(
true);
254 boxset->SetAlwaysSecSelect(
true);
255 boxset->SetPickable(
true);
256 boxset->SetTooltipCBFoo(boxset_tooltip_callback);
260 lineset =
new TEveStraightLineSet();
263 bool hitsFound =
false;
264 for (
int ihandf = 0, lastIdx = (
int)(hitsandfracs.size()); ihandf < lastIdx; ihandf++) {
265 unsigned int hitDetId = hitsandfracs[ihandf].first;
270 boxset->AddBox(&scaledCorners[0]);
272 boxset->DigitColor(holder->GetMainColor());
273 boxset->DigitUserData((
void*)
hit);
274 addBoxAsLines(lineset, &scaledCorners[0]);
287 "Can't find matching hits with for HCAL block %d in %s collection. Number of hits %d.\n",
290 (
int)hitsandfracs.size());
References FWProxyBuilderBase::context(), fwLog, edm::Ref< C, T, F >::get(), FWGeometry::getCorners(), FWViewContext::getEnergyScale(), fireworks::Context::getGeom(), getHitForDetId(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), reco::CaloCluster::hitsAndFractions(), edm::Ref< C, T, F >::id(), createfilelist::int, edm::Ref< C, T, F >::key(), fwlog::kInfo, fwlog::kWarning, m_collectionHCAL, L1EGammaCrystalsEmulatorProducer_cfi::scale, FWProxyBuilderBase::setupAddElement(), and viewContextBoxScale().
Referenced by build().
◆ build()
void FWPFCandidateWithHitsProxyBuilder::build |
( |
const FWEventItem * |
iItem, |
|
|
TEveElementList * |
product, |
|
|
const FWViewContext * |
vc |
|
) |
| |
|
overridevirtual |
Reimplemented from FWProxyBuilderBase.
Definition at line 69 of file FWPFCandidateWithHitsProxyBuilder.cc.
80 for (reco::PFCandidateCollection::const_iterator it =
candidates->begin(), itEnd =
candidates->end(); it != itEnd;
93 t.fV = TEveVector(
cand.vertex().x(),
cand.vertex().y(),
cand.vertex().z());
94 t.fSign =
cand.charge();
95 TEveTrack* trk =
new TEveTrack(&
t,
context().getTrackPropagator());
References addHitsForCandidate(), HLT_FULL_cff::candidates, FWDisplayProperties::color(), AlCaHLTBitMon_QueryRunRegistry::comp, FWProxyBuilderBase::context(), FWProxyBuilderBase::createCompound(), FWEventItem::defaultDisplayProperties(), FWEventItem::get(), heavyIonCSV_trainingSettings::idx, initPFRecHitsCollections(), fireworks::setTrackTypePF(), FWProxyBuilderBase::setupAddElement(), and submitPVValidationJobs::t.
◆ classPurpose()
const std::string & FWPFCandidateWithHitsProxyBuilder::classPurpose |
( |
| ) |
|
|
static |
◆ classRegisterTypeName()
const std::string & FWPFCandidateWithHitsProxyBuilder::classRegisterTypeName |
( |
| ) |
|
|
static |
◆ classTypeName()
const std::string & FWPFCandidateWithHitsProxyBuilder::classTypeName |
( |
| ) |
|
|
static |
◆ classView()
const std::string & FWPFCandidateWithHitsProxyBuilder::classView |
( |
| ) |
|
|
static |
◆ getHitForDetId()
const reco::PFRecHit * FWPFCandidateWithHitsProxyBuilder::getHitForDetId |
( |
unsigned |
detId | ) |
|
|
private |
◆ havePerViewProduct()
bool FWPFCandidateWithHitsProxyBuilder::havePerViewProduct |
( |
FWViewType::EType |
| ) |
const |
|
inlineoverridevirtual |
◆ initPFRecHitsCollections()
void FWPFCandidateWithHitsProxyBuilder::initPFRecHitsCollections |
( |
| ) |
|
|
private |
◆ operator=()
◆ purpose()
const std::string& FWPFCandidateWithHitsProxyBuilder::purpose |
( |
| ) |
const |
|
inline |
◆ scaleProduct()
Reimplemented from FWProxyBuilderBase.
Definition at line 165 of file FWPFCandidateWithHitsProxyBuilder.cc.
168 std::vector<float> scaledCorners(24);
171 for (TEveElement::List_i
i =
parent->BeginChildren();
i !=
parent->EndChildren(); ++
i) {
172 if ((*i)->NumChildren() > 1) {
173 TEveElement::List_i
xx = (*i)->BeginChildren();
175 TEveBoxSet* boxset = dynamic_cast<TEveBoxSet*>(*
xx);
177 TEveStraightLineSet* lineset = dynamic_cast<TEveStraightLineSet*>(*
xx);
178 TEveChunkManager::iterator li(lineset->GetLinePlex());
181 TEveChunkManager* plex = boxset->GetPlex();
183 for (
int atomIdx = 0; atomIdx < plex->Size(); ++atomIdx) {
184 TEveBoxSet::BFreeBox_t* atom = (TEveBoxSet::BFreeBox_t*)boxset->GetPlex()->Atom(atomIdx);
188 memcpy(atom->fVertices, &scaledCorners[0],
sizeof(atom->fVertices));
190 editBoxInLineSet(li, &scaledCorners[0]);
193 for (TEveProjectable::ProjList_i
p = lineset->BeginProjecteds();
p != lineset->EndProjecteds(); ++
p) {
194 TEveStraightLineSetProjected* projLineSet = (TEveStraightLineSetProjected*)(*
p);
195 projLineSet->UpdateProjection();
References FWGeometry::getCorners(), FWViewContext::getEnergyScale(), FWEventItem::getGeom(), FWViewEnergyScale::getPlotEt(), FWViewEnergyScale::getScaleFactor3D(), mps_fire::i, FWProxyBuilderBase::item(), AlCaHLTBitMon_ParallelJobs::p, class-composition::parent, L1EGammaCrystalsEmulatorProducer_cfi::scale, viewContextBoxScale(), and geometryCSVtoXML::xx.
◆ typeName()
const std::string& FWPFCandidateWithHitsProxyBuilder::typeName |
( |
| ) |
const |
|
inline |
◆ view()
const std::string& FWPFCandidateWithHitsProxyBuilder::view |
( |
| ) |
const |
|
inline |
◆ viewContextBoxScale()
void FWPFCandidateWithHitsProxyBuilder::viewContextBoxScale |
( |
const float * |
corners, |
|
|
float |
scale, |
|
|
bool |
plotEt, |
|
|
std::vector< float > & |
scaledCorners, |
|
|
const reco::PFRecHit * |
|
|
) |
| |
|
private |
◆ m_collectionHCAL
const float * getCorners(unsigned int id) const
void initPFRecHitsCollections()
bool getByLabel(InputTag const &, Handle< T > &) const
void get(const T *&oData) const
void viewContextBoxScale(const float *corners, float scale, bool plotEt, std::vector< float > &scaledCorners, const reco::PFRecHit *)
T const * get() const
Returns C++ pointer to the item.
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
void setTrackTypePF(const reco::PFCandidate &pfCand, TAttLine *track)
const FWDisplayProperties & defaultDisplayProperties() const
std::vector< ElementInBlock > ElementsInBlocks
const edm::EventBase * getEvent() const
const reco::PFRecHitCollection * m_collectionHCAL
FWPFCandidateWithHitsProxyBuilder()
const std::vector< std::pair< DetId, float > > & hitsAndFractions() const
FWGeometry * getGeom() const
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
const FWGeometry * getGeom() const
const FWEventItem * item() const
float getScaleFactor3D() const
ProductID id() const
Accessor for product ID.
std::vector< reco::PFCandidate > PFCandidateCollection
collection of PFCandidates
const fireworks::Context & context() const
Particle flow rechit (rechit + geometry and topology information). See clustering algorithm in PFClus...
Particle reconstructed by the particle flow algorithm.
key_type key() const
Accessor for product key.
const std::string & name() const
const reco::PFRecHit * getHitForDetId(unsigned detId)
FWViewEnergyScale * getEnergyScale() const
void addHitsForCandidate(const reco::PFCandidate &c, TEveElement *holder, const FWViewContext *vc)