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 ()
 
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
 
 FWGEMPadDigiProxyBuilder (const FWGEMPadDigiProxyBuilder &)=delete
 
const FWGEMPadDigiProxyBuilderoperator= (const FWGEMPadDigiProxyBuilder &)=delete
 

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 106 of file FWGEMDigiProxyBuilder.cc.

Constructor & Destructor Documentation

◆ FWGEMPadDigiProxyBuilder() [1/2]

FWGEMPadDigiProxyBuilder::FWGEMPadDigiProxyBuilder ( )
inline

Definition at line 108 of file FWGEMDigiProxyBuilder.cc.

108 {}

◆ ~FWGEMPadDigiProxyBuilder()

FWGEMPadDigiProxyBuilder::~FWGEMPadDigiProxyBuilder ( )
inlineoverride

Definition at line 109 of file FWGEMDigiProxyBuilder.cc.

109 {}

◆ FWGEMPadDigiProxyBuilder() [2/2]

FWGEMPadDigiProxyBuilder::FWGEMPadDigiProxyBuilder ( const FWGEMPadDigiProxyBuilder )
privatedelete

Member Function Documentation

◆ build()

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

Reimplemented from FWProxyBuilderBase.

Definition at line 119 of file FWGEMDigiProxyBuilder.cc.

119  {
120  const GEMPadDigiCollection* digis = nullptr;
121 
122  iItem->get(digis);
123 
124  if (!digis) {
125  fwLog(fwlog::kWarning) << "Failed to get GEMPadDigis" << std::endl;
126  return;
127  }
128  const FWGeometry* geom = iItem->getGeom();
129 
130  for (GEMPadDigiCollection::DigiRangeIterator dri = digis->begin(), driEnd = digis->end(); dri != driEnd; ++dri) {
131  unsigned int rawid = (*dri).first.rawId();
132  const GEMPadDigiCollection::Range& range = (*dri).second;
133 
134  if (!geom->contains(rawid)) {
135  fwLog(fwlog::kWarning) << "Failed to get geometry of GEM roll with detid: " << rawid << std::endl;
136 
137  TEveCompound* compound = createCompound();
138  setupAddElement(compound, product);
139 
140  continue;
141  }
142 
143  const float* parameters = geom->getParameters(rawid);
144  float nStrips = parameters[0];
145  float halfStripLength = parameters[1] * 0.5;
146  float nPads = parameters[5];
147  float topPitch = parameters[3] * nStrips / nPads;
148  float bottomPitch = parameters[4] * nStrips / nPads;
149 
150  for (GEMPadDigiCollection::const_iterator dit = range.first; dit != range.second; ++dit) {
151  TEveStraightLineSet* stripDigiSet = new TEveStraightLineSet;
152  stripDigiSet->SetLineWidth(3 * nStrips / nPads);
153  setupAddElement(stripDigiSet, product);
154 
155  int pad = (*dit).pad();
156  float topOfStrip = (pad - 0.5) * topPitch - 0.5 * topPitch * nPads;
157  float bottomOfStrip = (pad - 0.5) * bottomPitch - 0.5 * bottomPitch * nPads;
158 
159  float localPointTop[3] = {topOfStrip, halfStripLength, 0.0};
160 
161  float localPointBottom[3] = {bottomOfStrip, -halfStripLength, 0.0};
162 
163  float globalPointTop[3];
164  float globalPointBottom[3];
165 
166  geom->localToGlobal(rawid, localPointTop, globalPointTop, localPointBottom, globalPointBottom);
167 
168  stripDigiSet->AddLine(globalPointTop[0],
169  globalPointTop[1],
170  globalPointTop[2],
171  globalPointBottom[0],
172  globalPointBottom[1],
173  globalPointBottom[2]);
174  }
175  }
176 }

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

◆ classPurpose()

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

Definition at line 181 of file FWGEMDigiProxyBuilder.cc.

◆ classRegisterTypeName()

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

Definition at line 181 of file FWGEMDigiProxyBuilder.cc.

◆ classTypeName()

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

Definition at line 181 of file FWGEMDigiProxyBuilder.cc.

◆ classView()

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

Definition at line 181 of file FWGEMDigiProxyBuilder.cc.

◆ operator=()

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

◆ purpose()

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

Definition at line 111 of file FWGEMDigiProxyBuilder.cc.

113 :
114  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;

◆ typeName()

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

Definition at line 111 of file FWGEMDigiProxyBuilder.cc.

113 :
114  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;

◆ view()

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

Definition at line 111 of file FWGEMDigiProxyBuilder.cc.

113 :
114  void build(const FWEventItem* iItem, TEveElementList* product, const FWViewContext*) override;
FastTimerService_cff.range
range
Definition: FastTimerService_cff.py:34
fwLog
#define fwLog(_level_)
Definition: fwLog.h:45
FWGeometry
Definition: FWGeometry.h:27
FWEventItem::get
void get(const T *&oData) const
Definition: FWEventItem.h:78
FWProxyBuilderBase::createCompound
TEveCompound * createCompound(bool set_color=true, bool propagate_color_to_all_children=false) const
Definition: FWProxyBuilderBase.cc:374
MuonDigiCollection::const_iterator
std::vector< DigiType >::const_iterator const_iterator
Definition: MuonDigiCollection.h:94
parameters
parameters
Definition: BeamSpot_PayloadInspector.cc:14
GEMPadDigiCollection
relativeConstraints.geom
geom
Definition: relativeConstraints.py:72
FWProxyBuilderBase::setupAddElement
void setupAddElement(TEveElement *el, TEveElement *parent, bool set_color=true) const
Definition: FWProxyBuilderBase.cc:350
fwlog::kWarning
Definition: fwLog.h:35
FWProxyBuilderBase::build
void build()
Definition: FWProxyBuilderBase.cc:110
FWViewContext
Definition: FWViewContext.h:32
me0TriggerPseudoDigis_cff.nStrips
nStrips
1.2 is to make the matching window safely the two nearest strips 0.35 is the size of an ME0 chamber i...
Definition: me0TriggerPseudoDigis_cff.py:26
FWEventItem::getGeom
const FWGeometry * getGeom() const
Definition: FWEventItem.cc:548
FWEventItem
Definition: FWEventItem.h:56
MuonDigiCollection::Range
std::pair< const_iterator, const_iterator > Range
Definition: MuonDigiCollection.h:95
DigiContainerIterator
Definition: MuonDigiCollection.h:30