CMS 3D CMS Logo

List of all members | Public Member Functions | Static Public Member Functions | Private Member Functions
FWGEMPadDigiProxyBuilder Class Reference
Inheritance diagram for FWGEMPadDigiProxyBuilder:
FWProxyBuilderBase

Public Member Functions

 FWGEMPadDigiProxyBuilder ()
 
 FWGEMPadDigiProxyBuilder (const FWGEMPadDigiProxyBuilder &)=delete
 
const FWGEMPadDigiProxyBuilderoperator= (const FWGEMPadDigiProxyBuilder &)=delete
 
const std::string & purpose () const
 
const std::string & typeName () const
 
const std::string & view () const
 
 ~FWGEMPadDigiProxyBuilder () override
 
- Public Member Functions inherited from FWProxyBuilderBase
void build ()
 
virtual bool canHandle (const FWEventItem &)
 
const fireworks::Contextcontext () const
 
TEveElementList * createProduct (FWViewType::EType, const FWViewContext *)
 
 FWProxyBuilderBase ()
 
bool getHaveWindow () const
 
virtual bool havePerViewProduct (FWViewType::EType) const
 
virtual bool haveSingleProduct () const
 
const FWEventItemitem () 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 ()
 

Static Public Member Functions

static const std::string & classPurpose ()
 
static const std::string & classRegisterTypeName ()
 
static const std::string & classTypeName ()
 
static const std::string & classView ()
 
- Static Public Member Functions inherited from FWProxyBuilderBase
static bool representsSubPart ()
 
static std::string typeOfBuilder ()
 Used by the plugin system to determine how the proxy uses the data from FWEventItem. More...
 

Private Member Functions

void build (const FWEventItem *iItem, TEveElementList *product, const FWViewContext *) override
 

Additional Inherited Members

- Protected Types inherited from FWProxyBuilderBase
typedef std::vector< Product * >::iterator Product_it
 
- Protected Member Functions inherited from FWProxyBuilderBase
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 FWProxyBuilderBaseoperator= (const FWProxyBuilderBase &)
 
virtual void scaleProduct (TEveElementList *parent, FWViewType::EType, const FWViewContext *vc)
 
virtual bool visibilityModelChanges (const FWModelId &, TEveElement *, FWViewType::EType, const FWViewContext *)
 
- Protected Attributes inherited from FWProxyBuilderBase
std::vector< Product * > m_products
 

Detailed Description

Definition at line 108 of file FWGEMDigiProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWGEMPadDigiProxyBuilder() [1/2]

FWGEMPadDigiProxyBuilder::FWGEMPadDigiProxyBuilder ( )
inline

Definition at line 110 of file FWGEMDigiProxyBuilder.cc.

110 {}

◆ ~FWGEMPadDigiProxyBuilder()

FWGEMPadDigiProxyBuilder::~FWGEMPadDigiProxyBuilder ( )
inlineoverride

Definition at line 111 of file FWGEMDigiProxyBuilder.cc.

111 {}

◆ FWGEMPadDigiProxyBuilder() [2/2]

FWGEMPadDigiProxyBuilder::FWGEMPadDigiProxyBuilder ( const FWGEMPadDigiProxyBuilder )
delete

Member Function Documentation

◆ build()

void FWGEMPadDigiProxyBuilder::build ( const FWEventItem iItem,
TEveElementList *  product,
const FWViewContext  
)
overrideprivatevirtual

Reimplemented from FWProxyBuilderBase.

Definition at line 123 of file FWGEMDigiProxyBuilder.cc.

References FWProxyBuilderBase::createCompound(), fwLog, relativeConstraints::geom, FWEventItem::get(), FWEventItem::getGeom(), fwlog::kWarning, me0TriggerPseudoDigis_cff::nStrips, isotrackApplyRegressor::range, and FWProxyBuilderBase::setupAddElement().

123  {
124  const GEMPadDigiCollection* digis = nullptr;
125 
126  iItem->get(digis);
127 
128  if (!digis) {
129  fwLog(fwlog::kWarning) << "Failed to get GEMPadDigis" << std::endl;
130  return;
131  }
132  const FWGeometry* geom = iItem->getGeom();
133 
134  for (GEMPadDigiCollection::DigiRangeIterator dri = digis->begin(), driEnd = digis->end(); dri != driEnd; ++dri) {
135  unsigned int rawid = (*dri).first.rawId();
136  const GEMPadDigiCollection::Range& range = (*dri).second;
137 
138  if (!geom->contains(rawid)) {
139  fwLog(fwlog::kWarning) << "Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
140 
141  TEveCompound* compound = createCompound();
142  setupAddElement(compound, product);
143 
144  continue;
145  }
146 
147  const float* parameters = geom->getParameters(rawid);
148  float nStrips = parameters[0];
149  float halfStripLength = parameters[1] * 0.5;
150  float nPads = parameters[5];
151  float topPitch = parameters[3] * nStrips / nPads;
152  float bottomPitch = parameters[4] * nStrips / nPads;
153 
154  for (GEMPadDigiCollection::const_iterator dit = range.first; dit != range.second; ++dit) {
155  TEveStraightLineSet* stripDigiSet = new TEveStraightLineSet;
156  stripDigiSet->SetLineWidth(3 * nStrips / nPads);
157  setupAddElement(stripDigiSet, product);
158 
159  int pad = (*dit).pad();
160  float topOfStrip = (pad - 0.5) * topPitch - 0.5 * topPitch * nPads;
161  float bottomOfStrip = (pad - 0.5) * bottomPitch - 0.5 * bottomPitch * nPads;
162 
163  float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
164 
165  float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
166 
167  float globalPointTop[3];
168  float globalPointBottom[3];
169 
170  geom->localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
171 
172  stripDigiSet->AddLine(globalPointTop[0],
173  globalPointTop[1],
174  globalPointTop[2],
175  globalPointBottom[0],
176  globalPointBottom[1],
177  globalPointBottom[2]);
178  }
179  }
180 }
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
void get(const T *&oData) const
Definition: FWEventItem.h:78
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
#define fwLog(_level_)
Definition: fwLog.h:45
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
std::pair< const_iterator, const_iterator > Range
std::vector< DigiType >::const_iterator const_iterator

◆ classPurpose()

const std::string & FWGEMPadDigiProxyBuilder::classPurpose ( )
static

Definition at line 185 of file FWGEMDigiProxyBuilder.cc.

◆ classRegisterTypeName()

const std::string & FWGEMPadDigiProxyBuilder::classRegisterTypeName ( )
static

Definition at line 185 of file FWGEMDigiProxyBuilder.cc.

◆ classTypeName()

const std::string & FWGEMPadDigiProxyBuilder::classTypeName ( )
static

Definition at line 185 of file FWGEMDigiProxyBuilder.cc.

◆ classView()

const std::string & FWGEMPadDigiProxyBuilder::classView ( )
static

Definition at line 185 of file FWGEMDigiProxyBuilder.cc.

◆ operator=()

const FWGEMPadDigiProxyBuilder& FWGEMPadDigiProxyBuilder::operator= ( const FWGEMPadDigiProxyBuilder )
delete

◆ purpose()

const std::string& FWGEMPadDigiProxyBuilder::purpose ( ) const
inline

◆ typeName()

const std::string& FWGEMPadDigiProxyBuilder::typeName ( ) const
inline

◆ view()

const std::string& FWGEMPadDigiProxyBuilder::view ( ) const
inline