CMS 3D CMS Logo

VisTrackerDigiTwig Class Reference

#include <VisReco/VisTracker/interface/VisTrackerDigiTwig.h>

Inheritance diagram for VisTrackerDigiTwig:

VisQueuedTwig IgSimpleTwig VisEventObserver IgCompoundTwig IgTwig IgRepresentable

List of all members.

Public Member Functions

virtual void onNewEvent (const edm::Event &event, const edm::EventSetup &eventSetup)
virtual void twigChanged (void)
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)
 VisTrackerDigiTwig (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< DetId,
SiStripDigi > > 
m_digis
const std::string m_friendlyName
const std::string m_instanceName
const std::string m_moduleLabel
edm::ESHandle< TrackerGeometrym_pDD
const std::string m_processName
VisLegoScale m_scale
std::string m_text


Detailed Description

Definition at line 27 of file VisTrackerDigiTwig.h.


Constructor & Destructor Documentation

VisTrackerDigiTwig::VisTrackerDigiTwig ( 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 69 of file VisTrackerDigiTwig.cc.

References createThisTwig(), edm::TypeID::friendlyClassName(), DBSPlugin::get(), and VisTwigFactroyService::registerTwig().

00075     : VisQueuedTwig (state, parent, name),
00076       m_text (name),
00077       m_friendlyName (friendlyName),
00078       m_moduleLabel (moduleLabel),
00079       m_instanceName (instanceName),
00080       m_processName (processName),
00081       m_scale (state, lat::CreateCallback (this, &VisTrackerDigiTwig::twigChanged))      
00082 {
00083     VisTwigFactroyService *tfService = VisTwigFactroyService::get (state);
00084     if (! tfService)
00085     {
00086         tfService = new VisTwigFactroyService (state);
00087     }   
00088     edm::TypeID siDigiCollID (typeid (edm::DetSetVector<SiStripDigi>));
00089     tfService->registerTwig (siDigiCollID.friendlyClassName (), &createThisTwig);
00090 }


Member Function Documentation

void VisTrackerDigiTwig::onNewEvent ( const edm::Event event,
const edm::EventSetup eventSetup 
) [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 97 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), arg, edm::DetSetVector< T >::begin(), edm::Event::bunchCrossing(), c, edm::DetSet< T >::data, ds, e, edm::DetSetVector< T >::end(), exception, edm::EventSetup::get(), i, edm::DetSet< T >::id, edm::Event::id(), IgRepSet::invalidate(), LFfwvis, LOG, edm::Event::luminosityBlock(), 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, IgSimpleTwig::name(), VisQueuedTwig::onNewEvent(), edm::Event::orbitNumber(), p, IgTwig::SELF_MASK, edm::DetSetVector< T >::size(), IgTwig::STRUCTURE_MASK, and GsfMatrixTools::trace().

00099 {
00100     // Get debugging dump.
00101     VisQueuedTwig::onNewEvent (event, eventSetup);
00102 
00103     m_digis.clear ();
00104   
00105     m_text = QString ("Run %1, Event %2, LS %3, Orbit %4, BX %5")
00106              .arg (event.id ().run ())
00107              .arg (event.id ().event ())
00108              .arg (event.luminosityBlock ())
00109              .arg (event.orbitNumber ())
00110              .arg (event.bunchCrossing ())
00111              .latin1 ();
00112 
00113     std::vector< edm::Handle<edm::DetSetVector<SiStripDigi> > > collections;
00114     try
00115     {
00116         if ((! m_friendlyName.empty ()) || (! m_moduleLabel.empty ()) || (! m_instanceName.empty ()) || (! m_processName.empty ()))
00117         {
00118             VisEventSelector visSel (m_friendlyName, m_moduleLabel, m_instanceName, m_processName);
00119             event.getMany (visSel, collections);
00120         }
00121         eventSetup.get<TrackerDigiGeometryRecord> ().get (m_pDD);
00122     }
00123     catch (lat::Error& e)
00124     {
00125         if (this->m_onError)
00126             this->m_onError (&e);
00127     }
00128     catch (cms::Exception& e)
00129     {
00130         e.append (" from VisTrackerDigiTwig: ");
00131         e.append (this->name ());    
00132         
00133         if (this->m_onCmsException)
00134             this->m_onCmsException (&e);
00135     }
00136     catch (std::exception& e)
00137     {
00138         if (this->m_onException)
00139             this->m_onException (&e);
00140     }
00141     catch (...)
00142     {
00143         if (this->m_onUnhandledException)
00144             this->m_onUnhandledException ();
00145     }
00146 
00147     if (! collections.empty ())
00148     {
00149         std::vector< edm::Handle<edm::DetSetVector<SiStripDigi> > >::iterator i;
00150         std::vector< edm::Handle<edm::DetSetVector<SiStripDigi> > >::iterator iEnd;
00151         for (i = collections.begin (), iEnd = collections.end (); i != iEnd; ++i) 
00152         {
00153             const edm::DetSetVector<SiStripDigi> &c = *(*i);
00154             QString sizeStr = (QString ("%1").arg (c.size ()));
00155             QString nameStr = QString (this->name ());
00156             int ib = nameStr.find ("[");
00157             int ie = nameStr.find ("]");
00158             nameStr.replace (ib + 1, ie - 1, sizeStr);
00159             
00160             this->name (nameStr);
00161           
00162             edm::DetSetVector<SiStripDigi>::const_iterator DSViter = c.begin ();
00163             edm::DetSetVector<SiStripDigi>::const_iterator DSViterEnd = c.end ();
00164 
00165             LOG (2, trace, LFfwvis, "There are " <<  c.size () << "SiStrip digis\n");
00166 
00167             for (; DSViter != DSViterEnd; ++DSViter)
00168             {
00169                 edm::DetSet<SiStripDigi> ds = *DSViter;
00170                 if (ds.data.size ())
00171                 {
00172                     const uint32_t& detID = ds.id;
00173                     DetId detid (detID);
00174                     edm::DetSet<SiStripDigi>::const_iterator idigi = ds.data.begin ();
00175                     edm::DetSet<SiStripDigi>::const_iterator idigiEnd = ds.data.end ();
00176                     for(; idigi != idigiEnd; ++idigi)
00177                     { 
00178                         std::pair<DetId, SiStripDigi> p;
00179                         p.first = detid;
00180                         p.second = (*idigi);
00181                         m_digis.push_back (p);
00182                     } // for digis 
00183                 }
00184             }
00185         }
00186     }
00187 
00188     IgRepSet::invalidate (this, IgTwig::SELF_MASK | IgTwig::STRUCTURE_MASK);
00189 }

void VisTrackerDigiTwig::twigChanged ( void   )  [virtual]

Definition at line 93 of file VisTrackerDigiTwig.cc.

References IgRepSet::invalidate(), and IgTwig::SELF_MASK.

00094 { IgRepSet::invalidate (this, SELF_MASK); }

void VisTrackerDigiTwig::update ( IgRZRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 493 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), Ig3DBaseRep::clear(), e, exception, i, edm::ESHandle< T >::isValid(), StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, Ig3DBaseRep::node(), StripGeomDetUnit::specificTopology(), funct::sqrt(), strip(), IgSbColorMap::unpack(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.

00494 {
00495     // Get debugging dump.
00496     VisQueuedTwig::update (rep);
00497   
00498     IgQtLock ();
00499     rep->clear ();
00500   
00501     if (! m_digis.empty () && m_pDD.isValid ()) 
00502     {
00503         SoSeparator *sep = new SoSeparator;    
00504         SoMaterial *mat = new SoMaterial;
00505         float rgbcomponents [4];
00506         IgSbColorMap::unpack (0x03C03C00, rgbcomponents); // Dark pastel green
00507         mat->diffuseColor.setValue (SbColor (rgbcomponents));
00508       
00509         SoDrawStyle *drawStyle = new SoDrawStyle;
00510         drawStyle->pointSize = 4.0;
00511         sep->addChild (drawStyle);
00512       
00513         try 
00514         {
00515             SoVertexProperty *vertices = new SoVertexProperty;
00516             int nVrx = 0;
00517             for (std::vector<std::pair<DetId, SiStripDigi> >::const_iterator i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i) 
00518             {
00519                 const DetId& id = (*i).first;
00520                 const StripGeomDetUnit *theStripDet = dynamic_cast<const StripGeomDetUnit*>(m_pDD->idToDet (id));
00521                 const StripTopology *theStripTopol = dynamic_cast<const StripTopology *>( &(theStripDet->specificTopology ()));
00522                 int strip = (*i).second.strip ();
00523                 GlobalPoint pos =  (m_pDD->idToDet (id))->surface ().toGlobal(theStripTopol->localPosition (strip));
00524                 float x = -2.0;
00525                 float y = sqrt (pos.x () * pos.x () + pos.y () * pos.y ()) / 100.0; 
00526                 if (pos.y () < 0.) y = - y;
00527                 float z = pos.z () / 100.0;  // cm -> m
00528               
00529                 vertices->vertex.set1Value (nVrx++, SbVec3f (x, y, z));
00530             }
00531             vertices->vertex.setNum (m_digis.size ());
00532             SoPointSet *points = new SoPointSet;
00533             points->vertexProperty.setValue (vertices);
00534             points->numPoints.setValue (m_digis.size ());
00535             sep->addChild (points);
00536         }    
00537         catch (cms::Exception& e)
00538         {
00539             e.append (" from VisTrackerDigiTwig: ");
00540             e.append (this->name ());    
00541         
00542             if (this->m_onCmsException)
00543                 this->m_onCmsException (&e);
00544         }
00545         catch (lat::Error &e) 
00546         {
00547             if (this->m_onError)
00548                 this->m_onError (&e);
00549         }
00550         catch (std::exception &e) 
00551         {
00552             if (this->m_onException)
00553                 this->m_onException (&e);
00554         }
00555         catch (...) 
00556         {
00557             if (this->m_onUnhandledException)
00558                 this->m_onUnhandledException ();
00559         }
00560 
00561         rep->node ()->addChild (sep);
00562     }
00563 }

void VisTrackerDigiTwig::update ( IgRPhiRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 412 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), Ig3DBaseRep::clear(), e, exception, StripGeomDetUnit::geographicalId(), i, edm::ESHandle< T >::isValid(), StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, Ig3DBaseRep::node(), StripGeomDetUnit::specificTopology(), strip(), DetId::subdetId(), IgSbColorMap::unpack(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, and z.

00413 {
00414     // Get debugging dump.
00415     VisQueuedTwig::update (rep);
00416   
00417     IgQtLock ();
00418     rep->clear ();
00419   
00420     if (! m_digis.empty () && m_pDD.isValid ()) 
00421     {
00422         SoSeparator *sep = new SoSeparator;    
00423       
00424         SoMaterial *mat = new SoMaterial;
00425         float rgbcomponents [4];
00426         IgSbColorMap::unpack (0x03C03C00, rgbcomponents); // Dark pastel green
00427         mat->diffuseColor.setValue (SbColor (rgbcomponents));
00428       
00429         SoDrawStyle *drawStyle = new SoDrawStyle;
00430         drawStyle->pointSize = 4.0;
00431         sep->addChild (drawStyle);
00432       
00433         try 
00434         {
00435             SoVertexProperty *vertices = new SoVertexProperty;
00436             int nVrtx = 0;
00437           
00438             for (std::vector<std::pair<DetId, SiStripDigi> >::const_iterator 
00439                      i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i)
00440             {
00441                 const DetId& id = (*i).first;
00442                 const StripGeomDetUnit*  theStripDet = dynamic_cast<const StripGeomDetUnit *>(m_pDD->idToDet (id));
00443                 // Draw only if in barrel.
00444                 int subdet = theStripDet->geographicalId ().subdetId ();
00445                 if (subdet == 1 || subdet == 3 || subdet == 5)
00446                 {
00447                     const StripTopology * theStripTopol = dynamic_cast<const StripTopology *>( &(theStripDet->specificTopology ()));
00448                     int strip = (*i).second.strip ();
00449                     GlobalPoint pos =  (m_pDD->idToDet (id))->surface ().toGlobal(theStripTopol->localPosition (strip));
00450                     float x = pos.x () / 100.0;  // cm -> m
00451                     float y = pos.y () / 100.0;  // cm -> m
00452                     float z = 2.0;  // Z layer
00453                     vertices->vertex.set1Value (nVrtx++, SbVec3f (x, y, z));
00454                 }
00455             }
00456           
00457             vertices->vertex.setNum (nVrtx);
00458             SoPointSet *points = new SoPointSet;
00459             points->vertexProperty.setValue (vertices);
00460             points->numPoints.setValue (nVrtx);
00461           
00462             sep->addChild (points);
00463         }
00464         catch (cms::Exception& e)
00465         {
00466             e.append (" from VisTrackerDigiTwig: ");
00467             e.append (this->name ());    
00468         
00469             if (this->m_onCmsException)
00470                 this->m_onCmsException (&e);
00471         }
00472         catch (lat::Error &e) 
00473         {
00474             if (this->m_onError)
00475                 this->m_onError (&e);
00476         }
00477         catch (std::exception &e) 
00478         {
00479             if (this->m_onException)
00480                 this->m_onException (&e);
00481         }
00482         catch (...) 
00483         {
00484             if (this->m_onUnhandledException)
00485                 this->m_onUnhandledException ();
00486         }
00487 
00488         rep->node ()->addChild (sep);
00489     }
00490 }

void VisTrackerDigiTwig::update ( IgTextRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 192 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), e, exception, i, edm::ESHandle< T >::isValid(), StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, m_text, IgTextRep::setText(), StripGeomDetUnit::specificTopology(), strip(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), PV3DBase< T, PVType, FrameType >::y(), and PV3DBase< T, PVType, FrameType >::z().

00193 {
00194     // Get debugging dump.
00195     VisQueuedTwig::update (rep);
00196   
00197     // Prepare property description.
00198     std::ostringstream  text;
00199 
00200     text << m_text << "<br>";
00201   
00202     text << "Total " << m_digis.size () << " Silicon Strip digis from ";
00203     text << m_text << "<br>";
00204 
00205     if (m_digis.size () > 100) 
00206     {
00207         text << "Printing only first 100." << "<br>";
00208     } 
00209     
00210     text << "<table width='100%' border=1>"
00211          << "<TR align = center>"
00212          << "<TH>Number</TH>"
00213          << "<TH>GeomdetId</TH>"
00214          << "<TH>Position</TH>"
00215          << "<TH>Charge</TH>"
00216          << "<TH>Strip</TH>"
00217          << "</TR>";
00218     text << setiosflags (std::ios::showpoint | std::ios::fixed);
00219     text.setf (std::ios::right, std::ios::adjustfield);
00220   
00221     if ((! m_digis.empty ()) && m_pDD.isValid ()) 
00222     {
00223         int nSDigis = 0;
00224         try 
00225         {
00226             for (std::vector<std::pair<DetId, SiStripDigi> >::const_iterator i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i) 
00227             {
00228                 const DetId& id = (*i).first;
00229                 const StripGeomDetUnit*  theStripDet = dynamic_cast<const StripGeomDetUnit*>(m_pDD->idToDet (id));
00230                 const StripTopology * theStripTopol = dynamic_cast<const StripTopology *>( &(theStripDet->specificTopology ()));
00231                 int strip = (*i).second.strip ();
00232                 GlobalPoint pos =  (m_pDD->idToDet (id))->surface().toGlobal(theStripTopol->localPosition(strip));
00233               
00234                 text << "<TR align = right>"
00235                      << "<TD>" << std::setw (3) << nSDigis++ << "</TD>"
00236                      << "<TD>" << std::setw (11) << ((*i).first).rawId ()<< "</TD>"
00237                      << "<TD>" << pos.x () << ", " << pos.y () << ", " << pos.z () << "</TD>"
00238                      << "<TD>" << std::setw (6) << std::setprecision (3) << (*i).second.adc () << "</TD>"
00239                      << "<TD>" << std::setw (6) << std::setprecision (3) << (*i).second.strip () << "</TD>";
00240                 if (nSDigis > 100) break;
00241             }
00242         }
00243         catch (cms::Exception& e)
00244         {
00245             e.append (" from VisTrackerDigiTwig: ");
00246             e.append (this->name ());    
00247         
00248             if (this->m_onCmsException)
00249                 this->m_onCmsException (&e);
00250         }
00251         catch (lat::Error &e) 
00252         {
00253             if (this->m_onError)
00254                 this->m_onError (&e);
00255         }
00256         catch (std::exception &e) 
00257         {
00258             if (this->m_onException)
00259                 this->m_onException (&e);
00260         }
00261         catch (...) 
00262         {
00263             if (this->m_onUnhandledException)
00264                 this->m_onUnhandledException ();
00265         }
00266     }
00267   
00268     text << "</table>";
00269 
00270     // Send it over.
00271     IgQtLock ();
00272     rep->setText (text.str ());
00273 }

void VisTrackerDigiTwig::update ( IgLegoRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 351 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), Ig3DBaseRep::clear(), e, IgSoTower::energy, eta, PV3DBase< T, PVType, FrameType >::eta(), IgSoTower::etaWidth, exception, i, StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, m_scale, Ig3DBaseRep::node(), IgSoTower::orderedRGBA, PV3DBase< T, PVType, FrameType >::phi(), phi, IgSoTower::phiWidth, IgSoTower::position, IgSoTower::scaleFactor, StripGeomDetUnit::specificTopology(), strip(), VisQueuedTwig::update(), and VisActiveConfigurable< T >::value().

00352 {
00353     // Get debugging dump.
00354     VisQueuedTwig::update (rep);
00355   
00356     IgQtLock ();
00357     rep->clear ();
00358   
00359     SoSeparator *sep = new SoSeparator; // global
00360     try 
00361     {
00362         for (std::vector<std::pair<DetId, SiStripDigi> >::const_iterator i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i) 
00363         {
00364             const DetId& id = (*i).first;
00365             const StripGeomDetUnit*  theStripDet = dynamic_cast<const StripGeomDetUnit*>(m_pDD->idToDet (id));
00366             const StripTopology * theStripTopol = dynamic_cast<const StripTopology *>( &(theStripDet->specificTopology ()));
00367             int strip=(*i).second.strip ();
00368             GlobalPoint pos =  (m_pDD->idToDet (id))->surface().toGlobal(theStripTopol->localPosition(strip));
00369             double eta = pos.eta ();
00370             double phi = pos.phi ();
00371             if (phi < 0.0) phi = 2 * M_PI + phi; // correction in absence of one convention
00372             int adcCounts = (*i).second.adc ();
00373           
00374             IgSoTower *tower = new IgSoTower;
00375             tower->position = SbVec2f (phi, eta); // eta, phi
00376             tower->etaWidth = 0.01;
00377             tower->phiWidth = 0.01;
00378             tower->scaleFactor = m_scale.value ();
00379             tower->energy = adcCounts * 250.0 * 3.61e-09;
00380             tower->orderedRGBA.set1Value (6, SbColor (0.0, 1.0, 0.0).getPackedValue ());
00381             sep->addChild (tower);
00382         }
00383     }
00384     catch (cms::Exception& e)
00385     {
00386         e.append (" from VisTrackerDigiTwig: ");
00387         e.append (this->name ());    
00388         
00389         if (this->m_onCmsException)
00390             this->m_onCmsException (&e);
00391     }
00392     catch (lat::Error &e) 
00393     {
00394         if (this->m_onError)
00395             this->m_onError (&e);
00396     }
00397     catch (std::exception &e) 
00398     {
00399         if (this->m_onException)
00400             this->m_onException (&e);
00401     }
00402     catch (...) 
00403     {
00404         if (this->m_onUnhandledException)
00405             this->m_onUnhandledException ();
00406     }
00407 
00408     rep->node ()->addChild (sep);
00409 }

void VisTrackerDigiTwig::update ( Ig3DRep rep  )  [virtual]

Reimplemented from VisQueuedTwig.

Definition at line 276 of file VisTrackerDigiTwig.cc.

References cms::Exception::append(), Ig3DBaseRep::clear(), e, exception, i, edm::ESHandle< T >::isValid(), StripTopology::localPosition(), m_digis, VisQueuedTwig::m_onCmsException, VisQueuedTwig::m_onError, VisQueuedTwig::m_onException, VisQueuedTwig::m_onUnhandledException, m_pDD, Ig3DBaseRep::node(), StripGeomDetUnit::specificTopology(), strip(), IgSbColorMap::unpack(), VisQueuedTwig::update(), PV3DBase< T, PVType, FrameType >::x(), x, PV3DBase< T, PVType, FrameType >::y(), y, PV3DBase< T, PVType, FrameType >::z(), and z.

00277 {
00278     // Get debugging dump.
00279     VisQueuedTwig::update (rep);
00280     IgQtLock ();
00281     rep->clear ();
00282   
00283     if (! m_digis.empty () && m_pDD.isValid ())
00284     {
00285         SoMaterial *mat = new SoMaterial;
00286         float rgbcomponents [4];
00287         IgSbColorMap::unpack (0x03C03C00, rgbcomponents); // Dark pastel green
00288         mat->diffuseColor.setValue (SbColor (rgbcomponents));
00289       
00290         SoDrawStyle *drawStyle = new SoDrawStyle;
00291         drawStyle->pointSize = 4.0;
00292       
00293         SoSeparator *sep = new SoSeparator; // global
00294         sep->addChild (mat);
00295         sep->addChild (drawStyle);
00296       
00297         try 
00298         {
00299             SoVertexProperty *vertices = new SoVertexProperty;
00300             int nVrtx = 0;
00301           
00302             for (std::vector<std::pair<DetId, SiStripDigi> >::const_iterator 
00303                      i = m_digis.begin (), iEnd = m_digis.end (); i != iEnd; ++i)
00304             {
00305                 const DetId& id = (*i).first;
00306                 const StripGeomDetUnit*  theStripDet = dynamic_cast<const StripGeomDetUnit*>(m_pDD->idToDet (id));
00307                 const StripTopology * theStripTopol = dynamic_cast<const StripTopology *>( &(theStripDet->specificTopology ()));
00308                 int strip=(*i).second.strip ();
00309                 GlobalPoint pos =  (m_pDD->idToDet (id))->surface().toGlobal(theStripTopol->localPosition(strip));
00310                 float x = pos.x () / 100.0;  // cm -> m
00311                 float y = pos.y () / 100.0;  // cm -> m
00312                 float z = pos.z () / 100.0;  // cm -> m
00313                 vertices->vertex.set1Value (nVrtx++, SbVec3f (x, y, z));
00314             }
00315             vertices->vertex.setNum (nVrtx);
00316             SoPointSet *points = new SoPointSet;
00317             points->vertexProperty.setValue (vertices);
00318             points->numPoints.setValue (nVrtx);
00319           
00320             sep->addChild (points);
00321         }
00322         catch (cms::Exception& e)
00323         {
00324             e.append (" from VisTrackerDigiTwig: ");
00325             e.append (this->name ());    
00326         
00327             if (this->m_onCmsException)
00328                 this->m_onCmsException (&e);
00329         }
00330         catch (lat::Error &e) 
00331         {
00332             if (this->m_onError)
00333                 this->m_onError (&e);
00334         }
00335         catch (std::exception &e) 
00336         {
00337             if (this->m_onException)
00338                 this->m_onException (&e);
00339         }
00340         catch (...) 
00341         {
00342             if (this->m_onUnhandledException)
00343                 this->m_onUnhandledException ();
00344         }
00345 
00346         rep->node ()->addChild (sep);
00347     }
00348 }


Member Data Documentation

std::vector<std::pair<DetId, SiStripDigi> > VisTrackerDigiTwig::m_digis [private]

Definition at line 58 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent(), and update().

const std::string VisTrackerDigiTwig::m_friendlyName [private]

Definition at line 52 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent().

const std::string VisTrackerDigiTwig::m_instanceName [private]

Definition at line 54 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent().

const std::string VisTrackerDigiTwig::m_moduleLabel [private]

Definition at line 53 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent().

edm::ESHandle<TrackerGeometry> VisTrackerDigiTwig::m_pDD [private]

Definition at line 59 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent(), and update().

const std::string VisTrackerDigiTwig::m_processName [private]

Definition at line 55 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent().

VisLegoScale VisTrackerDigiTwig::m_scale [private]

Definition at line 56 of file VisTrackerDigiTwig.h.

Referenced by update().

std::string VisTrackerDigiTwig::m_text [private]

Definition at line 51 of file VisTrackerDigiTwig.h.

Referenced by onNewEvent(), and update().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:35:41 2009 for CMSSW by  doxygen 1.5.4