#include <VisReco/VisMuonRPC/interface/VisRPCDigiTwig.h>
Public Member Functions | |
virtual void | onNewEvent (const edm::Event &event, const edm::EventSetup &eventSetup) |
virtual void | update (IgRZRep *rep) |
virtual void | update (IgRPhiRep *rep) |
virtual void | update (IgTextRep *rep) |
virtual void | update (IgLegoRep *rep) |
virtual void | update (Ig3DRep *rep) |
VisRPCDigiTwig (IgState *state, IgTwig *parent, const std::string &name="", const std::string &friendlyName="", const std::string &moduleLabel="", const std::string &instanceName="", const std::string &processName="") | |
Private Attributes | |
std::vector< std::pair < RPCDetId, RPCDigi > > | m_digis |
const std::string | m_friendlyName |
const std::string | m_instanceName |
const std::string | m_moduleLabel |
edm::ESHandle< RPCGeometry > | m_pDD |
const std::string | m_processName |
std::string | m_text |
Definition at line 22 of file VisRPCDigiTwig.h.
VisRPCDigiTwig::VisRPCDigiTwig | ( | IgState * | state, | |
IgTwig * | parent, | |||
const std::string & | name = "" , |
|||
const std::string & | friendlyName = "" , |
|||
const std::string & | moduleLabel = "" , |
|||
const std::string & | instanceName = "" , |
|||
const std::string & | processName = "" | |||
) |
Definition at line 67 of file VisRPCDigiTwig.cc.
References createThisTwig(), edm::TypeID::friendlyClassName(), DBSPlugin::get(), and VisTwigFactroyService::registerTwig().
00073 : VisQueuedTwig (state, parent, name), 00074 m_text (name), 00075 m_friendlyName (friendlyName), 00076 m_moduleLabel (moduleLabel), 00077 m_instanceName (instanceName), 00078 m_processName (processName) 00079 { 00080 VisTwigFactroyService *tfService = VisTwigFactroyService::get (state); 00081 if (! tfService) 00082 { 00083 tfService = new VisTwigFactroyService (state); 00084 } 00085 edm::TypeID digiCollID (typeid (RPCDigiCollection)); 00086 tfService->registerTwig (digiCollID.friendlyClassName (), &createThisTwig); 00087 }
void VisRPCDigiTwig::onNewEvent | ( | const edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Reimplemented from VisQueuedTwig.
Definition at line 90 of file VisRPCDigiTwig.cc.
References arg, c, e, exception, edm::EventSetup::get(), i, edm::Event::id(), m_digis, m_friendlyName, m_instanceName, m_moduleLabel, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, m_processName, m_text, VisQueuedTwig::onBaseInvalidate(), VisQueuedTwig::onNewEvent(), p, and range.
00092 { 00093 // Get debugging dump. 00094 VisQueuedTwig::onNewEvent (event, eventSetup); 00095 00096 m_digis.clear (); 00097 m_text = (QString ("Run # %1, event # %2") 00098 .arg (event.id ().run ()) 00099 .arg (event.id ().event ()).latin1 ()); 00100 00101 std::vector<edm::Handle<RPCDigiCollection> > digiCollections; 00102 00103 try 00104 { 00105 if ((! m_friendlyName.empty ()) || (! m_moduleLabel.empty ()) || (! m_instanceName.empty ()) || (! m_processName.empty ())) 00106 { 00107 VisEventSelector visSel (m_friendlyName, m_moduleLabel, m_instanceName, m_processName); 00108 event.getMany (visSel, digiCollections); 00109 } 00110 else 00111 { 00112 event.getManyByType (digiCollections); 00113 } 00114 00115 eventSetup.get<MuonGeometryRecord> ().get (m_pDD); 00116 } 00117 catch (cms::Exception& e) 00118 { 00119 if (this->m_onCmsException) 00120 this->m_onCmsException (&e); 00121 } 00122 catch (lat::Error &e) 00123 { 00124 if (this->m_onError) 00125 this->m_onError (&e); 00126 } 00127 catch (std::exception &e) 00128 { 00129 if (this->m_onException) 00130 this->m_onException (&e); 00131 } 00132 catch (...) 00133 { 00134 if (this->m_onUnhandledException) 00135 this->m_onUnhandledException (); 00136 } 00137 00138 if (! digiCollections.empty ()) 00139 { 00140 std::vector<edm::Handle<RPCDigiCollection> >::iterator i; 00141 std::vector<edm::Handle<RPCDigiCollection> >::iterator iEnd; 00142 for (i = digiCollections.begin (), iEnd = digiCollections.end (); i != iEnd; ++i) 00143 { 00144 const RPCDigiCollection& c = *(*i); 00145 00146 // Loop over the DetUnits with digis 00147 RPCDigiCollection::DigiRangeIterator detUnitIt; 00148 RPCDigiCollection::DigiRangeIterator detUnitItEnd; 00149 for (detUnitIt = c.begin (), detUnitItEnd = c.end (); detUnitIt != detUnitItEnd; ++detUnitIt) 00150 { 00151 const RPCDetId &id = (*detUnitIt).first; 00152 const RPCDigiCollection::Range &range = (*detUnitIt).second; 00153 00154 // Loop over the digis of this DetUnit 00155 for (RPCDigiCollection::const_iterator digiIt = range.first; 00156 digiIt != range.second; 00157 ++digiIt) 00158 { 00159 std::pair< RPCDetId, RPCDigi > p; 00160 p.first = id; 00161 p.second = (*digiIt); 00162 00163 m_digis.push_back (p); 00164 } // for digis in layer 00165 } // for layers 00166 } 00167 } 00168 00169 VisQueuedTwig::onBaseInvalidate (); 00170 }
Reimplemented from VisQueuedTwig.
Definition at line 578 of file VisRPCDigiTwig.cc.
References Ig3DBaseRep::clear(), e, exception, i, m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, Ig3DBaseRep::node(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.
00579 { 00580 // Get debugging dump. 00581 VisQueuedTwig::update (rep); 00582 00583 IgQtLock (); 00584 rep->clear (); 00585 00586 if (! m_digis.empty ()) 00587 { 00588 SoSeparator *sep = new SoSeparator; 00589 SoMaterial *mat = new SoMaterial; 00590 mat->diffuseColor.setValue (0.3, 0.8, 0.0); 00591 sep->addChild (mat); 00592 00593 SoDrawStyle *drawStyle = new SoDrawStyle; 00594 drawStyle->pointSize = 3.0; 00595 sep->addChild (drawStyle); 00596 00597 try 00598 { 00599 SoVertexProperty *vertices = new SoVertexProperty; 00600 int nVrx = 0; 00601 00602 for (std::vector<std::pair<RPCDetId, RPCDigi> >::const_iterator i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i) 00603 { 00604 Surface::GlobalPoint pos = (m_pDD->idToDet ((*i).first))->surface ().position (); 00605 00606 float x = pos.x () / 100.0; // cm -> m 00607 float y = pos.y () / 100.0; // cm -> m 00608 float z = pos.z () / 100.0; // cm -> m 00609 00610 vertices->vertex.set1Value (++nVrx, SbVec3f (x, y, z)); 00611 } 00612 vertices->vertex.setNum (m_digis.size ()); 00613 00614 SoPointSet *points = new SoPointSet; 00615 points->vertexProperty.setValue (vertices); 00616 points->numPoints.setValue (m_digis.size ()); 00617 sep->addChild (points); 00618 } 00619 catch (cms::Exception& e) 00620 { 00621 if (this->m_onCmsException) 00622 this->m_onCmsException (&e); 00623 } 00624 catch (lat::Error &e) 00625 { 00626 if (this->m_onError) 00627 this->m_onError (&e); 00628 } 00629 catch (std::exception &e) 00630 { 00631 if (this->m_onException) 00632 this->m_onException (&e); 00633 } 00634 catch (...) 00635 { 00636 if (this->m_onUnhandledException) 00637 this->m_onUnhandledException (); 00638 } 00639 rep->node ()->addChild (sep); 00640 } 00641 }
Reimplemented from VisQueuedTwig.
Definition at line 550 of file VisRPCDigiTwig.cc.
References Ig3DBaseRep::clear(), and VisQueuedTwig::update().
00551 { 00552 // Get debugging dump. 00553 VisQueuedTwig::update (rep); 00554 // 00555 IgQtLock (); 00556 rep->clear (); 00557 // 00558 // if (! m_digis.empty () && m_pDD.isValid ()) 00559 // { 00560 // SoSeparator *sep = new SoSeparator; 00561 // // 00562 // SoMaterial *mat = new SoMaterial; 00563 // mat->diffuseColor.setValue (0.0, 0.0, 0.0); 00564 // sep->addChild (mat); 00565 // try 00566 // { 00567 // } 00568 // catch (...) 00569 // { 00570 // std::cout << "No RPCDigi Digis." << std::endl; 00571 // } 00572 // // 00573 // rep->node ()->addChild (sep); 00574 // } 00575 }
Reimplemented from VisQueuedTwig.
Definition at line 173 of file VisRPCDigiTwig.cc.
References e, exception, i, edm::ESHandle< T >::isValid(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, m_text, IgTextRep::setText(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().
00174 { 00175 // Get debugging dump. 00176 VisQueuedTwig::update (rep); 00177 00178 // Prepare property description. 00179 std::ostringstream text; 00180 text << "Total " << m_digis.size () << " RPC strip digis from"; 00181 text << " Cosmic run: " << m_text << "<br>"; 00182 00183 text << "<table width='100%' border=1>" 00184 << "<TR align = center>" 00185 << "<TH>Number</TH>" 00186 << "<TH>Position</TH>" 00187 << "<TH>Strip</TH>" 00188 << "<TH>BX</TH>" 00189 << "</TR>"; 00190 text << setiosflags (std::ios::showpoint | std::ios::fixed); 00191 text.setf (std::ios::right, std::ios::adjustfield); 00192 00193 if ((! m_digis.empty ()) && m_pDD.isValid ()) 00194 { 00195 int nDigis = 0; 00196 try 00197 { 00198 for (std::vector<std::pair<RPCDetId, RPCDigi> >::const_iterator i = m_digis.begin (); i != m_digis.end (); ++i) 00199 { 00200 Surface::GlobalPoint pos = (m_pDD->idToDet ((*i).first))->surface ().position (); 00201 text << "<TR align = right>" 00202 << "<TD>" << std::setw (3) << ++nDigis << "</TD>" 00203 << "<TD>" << pos.x () << ", " << pos.y () << ", " << pos.z () << "</TD>" 00204 << "<TD>" << std::setw (6) << std::setprecision (3) << (*i).second.strip () << "</TD>" 00205 << "<TD>" << std::setw (5) << std::setprecision (3) << (*i).second.bx () << "</TD></TR>"; 00206 } 00207 } 00208 catch (cms::Exception& e) 00209 { 00210 if (this->m_onCmsException) 00211 this->m_onCmsException (&e); 00212 } 00213 catch (lat::Error &e) 00214 { 00215 if (this->m_onError) 00216 this->m_onError (&e); 00217 } 00218 catch (std::exception &e) 00219 { 00220 if (this->m_onException) 00221 this->m_onException (&e); 00222 } 00223 catch (...) 00224 { 00225 if (this->m_onUnhandledException) 00226 this->m_onUnhandledException (); 00227 } 00228 } 00229 text << "</table>"; 00230 00231 // Send it over. 00232 IgQtLock (); 00233 rep->setText (text.str ()); 00234 }
Reimplemented from VisQueuedTwig.
Definition at line 512 of file VisRPCDigiTwig.cc.
References Ig3DBaseRep::clear(), and VisQueuedTwig::update().
00513 { 00514 // Get debugging dump. 00515 VisQueuedTwig::update (rep); 00516 00517 IgQtLock (); 00518 rep->clear (); 00519 00520 // SoSeparator *sep = new SoSeparator; 00521 // SoSeparator *posSep = new SoSeparator; 00522 // SoSeparator *negSep = new SoSeparator; 00523 00524 // SoMaterial *mat = new SoMaterial; 00525 // mat->diffuseColor.setValue (0.3, 0.8, 0.0); 00526 // posSep->addChild (mat); 00527 00528 // SoMaterial *negMat = new SoMaterial; 00529 // negMat->diffuseColor.setValue (1.0, 0.0, 0.0); 00530 // negSep->addChild (negMat); 00531 00532 // sep->addChild (posSep); 00533 // sep->addChild (negSep); 00534 00535 // try 00536 // { 00537 // for (std::vector<std::pair<RPCDetId, RPCDigi> >::const_iterator i = m_digis.begin (); i != m_digis.end (); ++i) 00538 // { 00539 // } 00540 // } 00541 // catch (...) 00542 // { 00543 // std::cout << "No RPCDigi Digis." << std::endl; 00544 // } 00545 00546 // rep->node ()->addChild (sep); 00547 }
Reimplemented from VisQueuedTwig.
Definition at line 237 of file VisRPCDigiTwig.cc.
References angle(), b, b1, b2, BoundSurface::bounds(), Ig3DBaseRep::clear(), e, exception, i, edm::ESHandle< T >::isValid(), RectangularPlaneBounds::length(), StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, Ig3DBaseRep::node(), TrapezoidalPlaneBounds::parameters(), r, strip(), StripTopology::stripLength(), GeomDet::surface(), RPCRoll::topology(), VisQueuedTwig::update(), RectangularPlaneBounds::width(), width, PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.
00238 { 00239 // Get debugging dump. 00240 VisQueuedTwig::update (rep); 00241 00242 IgQtLock (); 00243 rep->clear (); 00244 00245 if (! m_digis.empty () && m_pDD.isValid ()) 00246 { 00247 const float width = 0.01; // strip visualization 00248 const float depth = 0.01; // strip visualization 00249 00250 SoMaterial *mat = new SoMaterial; 00251 mat->diffuseColor.setValue (1.0, 1.0, 2.0); // white 00252 mat->emissiveColor.setValue(1.0, 1.0, 2.0); 00253 00254 SoDrawStyle *drawStyle = new SoDrawStyle; 00255 drawStyle->pointSize = 1.0; // big point; useful for the centers of the layers 00256 00257 SoSeparator *sep = new SoSeparator; // global 00258 sep->addChild (mat); 00259 sep->addChild (drawStyle); 00260 00261 try 00262 { 00263 SoMaterial *matl = new SoMaterial; 00264 //matl->diffuseColor.setValue (0.7, 1.0, 0.0); // yellow 00265 // matl->emissiveColor.setValue(0.7, 1.0, 0.0); 00266 matl->diffuseColor.setValue (1, 0.0, 0.0); // yellow 00267 matl->emissiveColor.setValue(1, 0.0, 0.0); 00268 matl->shininess = 1.; 00269 00270 SoDrawStyle *drawStylel = new SoDrawStyle; 00271 drawStylel->pointSize = 10.; 00272 00273 SoSeparator *pulses = new SoSeparator; // strips 00274 pulses->addChild (matl); 00275 pulses->addChild (drawStylel); 00276 00277 SoVertexProperty *vertices = new SoVertexProperty; 00278 int nVrtx = 0; 00279 for (std::vector<std::pair<RPCDetId, RPCDigi> >::const_iterator 00280 i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i) 00281 { 00282 const RPCDetId& id = (*i).first; 00283 00284 // This is the center of the (active) layer 00285 Surface::GlobalPoint ccpos = (m_pDD->idToDet (id))->surface ().position (); 00286 float x = ccpos.x () / 100.0; // cm -> m 00287 float y = ccpos.y () / 100.0; // cm -> m 00288 float z = ccpos.z () / 100.0; // cm -> m 00289 vertices->vertex.set1Value (++nVrtx, SbVec3f (x, y, z)); 00290 00291 const RPCRoll *roll = m_pDD->roll (id); 00292 const BoundSurface &bSurface = roll->surface (); 00293 const Topology &top = roll->topology (); 00294 00295 // Trapezoidal 00296 const Bounds *b = &(bSurface.bounds ()); 00297 if (dynamic_cast<const TrapezoidalPlaneBounds *> (b)) 00298 { 00299 const TrapezoidalPlaneBounds *b2 = dynamic_cast<const TrapezoidalPlaneBounds *> (b); 00300 const std::vector< float > trapezBounds = b2->parameters (); 00301 00302 // This is a frame around the (active) layer 00303 std::vector<Surface::GlobalPoint> crossPoint; 00304 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00305 (LocalPoint (-trapezBounds [0], -trapezBounds [3], 0.0))); 00306 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00307 (LocalPoint ( trapezBounds [0], -trapezBounds [3], 0.0))); 00308 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00309 (LocalPoint ( trapezBounds [1], trapezBounds [3], 0.0))); 00310 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00311 (LocalPoint (-trapezBounds [1], trapezBounds [3], 0.0))); 00312 SoVertexProperty *vert = new SoVertexProperty; 00313 int ncVrx = 0; 00314 for (std::vector<Surface::GlobalPoint>::iterator crossPit 00315 = crossPoint.begin (); crossPit != crossPoint.end (); ++crossPit) 00316 { 00317 x = crossPit->x () / 100.0; // cm -> m 00318 y = crossPit->y () / 100.0; // cm -> m 00319 z = crossPit->z () / 100.0; // cm -> m 00320 vert->vertex.set1Value (ncVrx++, SbVec3f (x, y, z)); 00321 } 00322 std::vector<Surface::GlobalPoint>::reference closeCircle 00323 = crossPoint.front (); 00324 x = closeCircle.x () / 100.0; // cm -> m 00325 y = closeCircle.y () / 100.0; // cm -> m 00326 z = closeCircle.z () / 100.0; // cm -> m 00327 vert->vertex.set1Value (ncVrx++, SbVec3f (x, y, z)); 00328 00329 vert->vertex.setNum (ncVrx); 00330 SoLineSet *trapez = new SoLineSet; 00331 trapez->vertexProperty.setValue (vert); 00332 trapez->numVertices [crossPoint.size () + 1]; 00333 00334 SoMaterial *mats = new SoMaterial; 00335 mats->diffuseColor.setValue (2.0, 1.0, 1.0); // white 00336 mats->emissiveColor.setValue(2.0, 1.0, 1.0); 00337 00338 SoSeparator *shape = new SoSeparator;// layer 00339 shape->addChild (mats); 00340 shape->addChild (trapez); 00341 00342 // Visualize the layer bounds 00343 sep->addChild (shape); 00344 00345 // 00346 int stripId = ((*i).second).strip (); 00347 00348 if (dynamic_cast<const StripTopology *> (&top)) 00349 { 00350 const StripTopology *stop = dynamic_cast<const StripTopology *> (&top); 00351 LocalPoint spos = stop->localPosition (stripId); 00352 00353 Surface::GlobalPoint pos = (m_pDD->idToDet (id))->surface ().toGlobal (spos); 00354 00355 // for Vis. purposes 00356 x = pos.x () / 100.0; // cm -> m 00357 y = pos.y () / 100.0; // cm -> m 00358 z = pos.z () / 100.0; // cm -> m 00359 // 00360 SoTranslation *inc = new SoTranslation; 00361 inc->translation = SbVec3f (x, y, z); 00362 // 00363 SbVec3f axis (0.0, 0.0, 1.0); 00364 float angle = -atan (x / y); 00365 SbRotation r (axis, angle); 00366 // 00367 SoTransform *xform = new SoTransform; 00368 xform ->rotation = r; 00369 // 00370 SoCube *hit = new SoCube; 00371 hit->width = width; 00372 hit->height = stop->stripLength () / 100.; 00373 hit->depth = depth; 00374 // 00375 SoSeparator *pulse = new SoSeparator;// strip 00376 pulse->addChild (inc); 00377 pulse->addChild (xform); 00378 pulse->addChild (hit); 00379 pulses->addChild (pulse); 00380 // Visualize strips with signal 00381 sep->addChild (pulses);// strips 00382 } 00383 } 00384 00385 00386 //AGGIUNTO DA NOI 00387 // Rectangular 00388 const Bounds *b1 = &(bSurface.bounds ()); 00389 if (dynamic_cast<const RectangularPlaneBounds *> (b1)) 00390 { 00391 const RectangularPlaneBounds *b2 = dynamic_cast<const RectangularPlaneBounds *> (b1); 00392 // const std::vector< float > trapezBounds = b2->parameters (); 00393 00394 // This is a frame around the (active) layer 00395 std::vector<Surface::GlobalPoint> crossPoint; 00396 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00397 (LocalPoint (-b2->width()/2, -b2->length()/2, 0.0))); 00398 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00399 (LocalPoint (b2->width()/2, -b2->length()/2, 0.0))); 00400 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00401 (LocalPoint (b2->width()/2, b2->length()/2, 0.0))); 00402 crossPoint.push_back ((m_pDD->idToDet (id))->surface ().toGlobal 00403 (LocalPoint (-b2->width()/2, b2->length()/2, 0.0))); 00404 SoVertexProperty *vert = new SoVertexProperty; 00405 int ncVrx = 0; 00406 for (std::vector<Surface::GlobalPoint>::iterator crossPit 00407 = crossPoint.begin (); crossPit != crossPoint.end (); ++crossPit) 00408 { 00409 x = crossPit->x () / 100.0; // cm -> m 00410 y = crossPit->y () / 100.0; // cm -> m 00411 z = crossPit->z () / 100.0; // cm -> m 00412 vert->vertex.set1Value (ncVrx++, SbVec3f (x, y, z)); 00413 } 00414 std::vector<Surface::GlobalPoint>::reference closeCircle 00415 = crossPoint.front (); 00416 x = closeCircle.x () / 100.0; // cm -> m 00417 y = closeCircle.y () / 100.0; // cm -> m 00418 z = closeCircle.z () / 100.0; // cm -> m 00419 vert->vertex.set1Value (ncVrx++, SbVec3f (x, y, z)); 00420 00421 vert->vertex.setNum (ncVrx); 00422 SoLineSet *trapez = new SoLineSet; 00423 trapez->vertexProperty.setValue (vert); 00424 trapez->numVertices [crossPoint.size () + 1]; 00425 00426 SoMaterial *mats = new SoMaterial; 00427 mats->diffuseColor.setValue (1.0, 0.0, 0.0); // white 00428 mats->emissiveColor.setValue(1.0, 0.0, 0.0); 00429 00430 SoSeparator *shape = new SoSeparator;// layer 00431 shape->addChild (mats); 00432 shape->addChild (trapez); 00433 00434 // Visualize the layer bounds 00435 sep->addChild (shape); 00436 00437 // 00438 int stripId = ((*i).second).strip (); 00439 00440 if (dynamic_cast<const StripTopology *> (&top)) 00441 { 00442 const StripTopology *stop = dynamic_cast<const StripTopology *> (&top); 00443 LocalPoint spos = stop->localPosition (stripId); 00444 00445 Surface::GlobalPoint pos = (m_pDD->idToDet (id))->surface ().toGlobal (spos); 00446 00447 // for Vis. purposes 00448 x = pos.x () / 100.0; // cm -> m 00449 y = pos.y () / 100.0; // cm -> m 00450 z = pos.z () / 100.0; // cm -> m 00451 // 00452 SoTranslation *inc = new SoTranslation; 00453 inc->translation = SbVec3f (x, y, z); 00454 // 00455 SbVec3f axis (1.0, 0.0, 0.0); 00456 float angle = 3.14/2; 00457 SbRotation r (axis, angle); 00458 // 00459 SoTransform *xform = new SoTransform; 00460 xform ->rotation = r; 00461 // 00462 SoCube *hit = new SoCube; 00463 hit->width = width; 00464 hit->height = stop->stripLength () / 100.; 00465 hit->depth = depth; 00466 // 00467 SoSeparator *pulse = new SoSeparator;// strip 00468 pulse->addChild (inc); 00469 pulse->addChild (xform); 00470 pulse->addChild (hit); 00471 pulses->addChild (pulse); 00472 // Visualize strips with signal 00473 sep->addChild (pulses);// strips 00474 } 00475 } 00476 } 00477 00478 vertices->vertex.setNum (nVrtx); 00479 SoPointSet *points = new SoPointSet; 00480 points->vertexProperty.setValue (vertices); 00481 points->numPoints.setValue (nVrtx); 00482 00483 // Visualize the center of the layer 00484 sep->addChild (points); 00485 } 00486 catch (cms::Exception& e) 00487 { 00488 if (this->m_onCmsException) 00489 this->m_onCmsException (&e); 00490 } 00491 catch (lat::Error &e) 00492 { 00493 if (this->m_onError) 00494 this->m_onError (&e); 00495 } 00496 catch (std::exception &e) 00497 { 00498 if (this->m_onException) 00499 this->m_onException (&e); 00500 } 00501 catch (...) 00502 { 00503 if (this->m_onUnhandledException) 00504 this->m_onUnhandledException (); 00505 } 00506 00507 rep->node ()->addChild (sep); 00508 }// end of if (m_digis.empty) 00509 }
std::vector< std::pair<RPCDetId, RPCDigi> > VisRPCDigiTwig::m_digis [private] |
const std::string VisRPCDigiTwig::m_friendlyName [private] |
const std::string VisRPCDigiTwig::m_instanceName [private] |
const std::string VisRPCDigiTwig::m_moduleLabel [private] |
edm::ESHandle<RPCGeometry> VisRPCDigiTwig::m_pDD [private] |
const std::string VisRPCDigiTwig::m_processName [private] |
std::string VisRPCDigiTwig::m_text [private] |