#include <VisReco/VisCustomTracker/interface/VisCuTkGeometryTwig.h>
Definition at line 43 of file VisCuTkGeometryTwig.h.
VisCuTkGeometryTwig::VisCuTkGeometryTwig | ( | IgState * | state, | |
IgTwig * | parent, | |||
const std::string & | name = "" | |||
) |
Definition at line 49 of file VisCuTkGeometryTwig.cc.
References clusterdraw, digidraw, p, pset, VisConfigurationService::pSet(), rechitdraw, simhitdraw, and VisConfigurationService_cff::VisConfigurationService.
00054 : VisQueuedTwig (state, parent, name), 00055 m_TrackerGeometry(0), 00056 m_cacheID_geo(0), 00057 m_cacheID_cab(0), 00058 m_name (name), 00059 m_done (false), 00060 m_3Ddone (false), 00061 alreadySelected (false), 00062 m_rzdone (false), 00063 m_rphidone (false), 00064 tr(0), 00065 tkMap(0), 00066 winTkMap(0), 00067 winTkSl(0), 00068 m_track(state, lat::CreateCallback (this, &VisCuTkGeometryTwig::configChanged)) 00069 { 00070 digidraw=0; 00071 clusterdraw=0; 00072 rechitdraw=0; 00073 simhitdraw=0; 00074 pset=VisConfigurationService::pSet(); 00075 if(!pset) 00076 { 00077 edm::ParameterSet p; 00078 VisConfigurationService *visService = new VisConfigurationService(p); 00079 pset = visService->pSet(); 00080 delete visService; 00081 } 00082 }
VisCuTkGeometryTwig::~VisCuTkGeometryTwig | ( | void | ) | [virtual] |
Definition at line 84 of file VisCuTkGeometryTwig.cc.
References cluster3d, digi3d, m_3dDet, m_3Ddone, m_rphiDet, m_rphidone, m_rzDet, m_rzdone, rechit3d, and simhit3d.
00085 { 00086 if (m_3Ddone) {m_3dDet->unref ();digi3d->unref();cluster3d->unref();rechit3d->unref();simhit3d->unref();} 00087 if (m_rzdone) m_rzDet->unref (); 00088 if (m_rphidone) m_rphiDet->unref (); 00089 }
Definition at line 452 of file VisCuTkGeometryTwig.cc.
References VisCuTkSlWindow::repaintAll(), selectCrossedModules(), tkMap, and winTkSl.
00453 { 00454 if(tkMap==0 ||winTkSl==0)return; 00455 selectCrossedModules(); 00456 winTkSl->repaintAll(); 00457 //IgRepSet::invalidate (this, SELF_MASK); 00458 }
void VisCuTkGeometryTwig::onNewEvent | ( | const edm::Event & | event, | |
const edm::EventSetup & | eventSetup | |||
) | [virtual] |
Reimplemented from VisQueuedTwig.
Definition at line 92 of file VisCuTkGeometryTwig.cc.
References accessingDb, TrackerGeometry::addDetUnit(), ASSERT, autoIntegrate, begin, VisCuTkModule::cluster_size, VisCuTkModule::cluster_start, clusterdraw, VisCuTkCompositeDetector< T >::components(), GenMuonPlsPt100GeV_cfg::cout, VisCuTkBuilder::create(), crossedModulesOnly, VisCuTkModule::digi_size, VisCuTkModule::digi_start, digidraw, VisCuTkMapWindow::drawall(), VisCuTkSlWindow::drawall(), VisCuTkMapWindow::drawCluster(), VisCuTkMapWindow::drawDigi(), lat::endl(), VisCuTkBuilder::fill(), edm::EventSetup::get(), VisCuTkCompositeDetector< T >::getComponent(), VisCuTkLayer::getSlWindow(), edm::ParameterSet::getUntrackedParameter(), i, VisCuTkMapWindow::integSign(), IgRepSet::invalidate(), j, k, LFfwvis, LOG, m_3Ddone, m_cacheID_cab, m_cacheID_geo, m_done, m_pDD, m_rphidone, m_rzdone, m_SiStripDetCabling, m_TrackerGeometry, VisCuTkMapWindow::map, mod(), VisCuTkModuleMap::moduleMap, IgSimpleTwig::name(), VisCuTkSlWindow::notifyEvent(), VisQueuedTwig::onBaseInvalidate(), previous_event, edm::ESHandle< T >::product(), pset, VisCuTkModule::rechit_size, VisCuTkModule::rechit_start, rechitdraw, selectCrossedModules(), IgTwig::SELF_MASK, VisCuTkMapWindow::separate(), VisCuTkMapWindow::setEvent(), VisCuTrackerRecHit::setEvent(), VisCuTrackerDigi::setEvent(), VisCuTrackerSimHit::setEvent(), VisCuTrackerCluster::setEvent(), VisCuTkSlWindow::setMap(), VisCuTrackerRecHit::setTracker(), VisCuTkMapWindow::setTracker(), VisCuTrackerCluster::setTracker(), VisCuTrackerDigi::setTracker(), VisCuTrackerSimHit::setTracker(), VisCuTkSlWindow::setTracker(), signalToIntegrate, VisCuTkModule::simhit_size, VisCuTkModule::simhit_start, simhitdraw, storeTracks(), VisCuTracker::subDetector(), tkMap, tr, GsfMatrixTools::trace(), VisCuTkBuilder::tracker(), trackLabelName, trackProducerName, VisCuCmsTracker::type, winTkMap, and winTkSl.
Referenced by VisCuTkRecoContent::init().
00094 { 00095 LOG (1, trace, LFfwvis, "VisCuTkGeometryTwig[" << name () 00096 << "]::onNewEvent()\n"); 00097 00098 00099 //&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& 00100 //Code modified by Domenico to 00101 // A: make faster the display 00102 // B: allow display of only active modules 00103 // 2007-01-25 00104 // domenico.giordano@cern.ch 00105 00106 accessingDb = pset->getUntrackedParameter<std::string>("accessDbConnection", "false"); 00107 autoIntegrate = pset->getUntrackedParameter<bool>("autoIntegrate", false); 00108 signalToIntegrate = pset->getUntrackedParameter<std::string>("signalToIntegrate", "strip"); 00109 trackProducerName = pset->getUntrackedParameter<std::string>("trackProducer", "cosmictrackfinder"); 00110 trackLabelName = pset->getUntrackedParameter<std::string>("trackLabel", ""); 00111 crossedModulesOnly = pset->getUntrackedParameter<std::string>("crossedModulesOnly", "false"); 00112 00113 eventSetup.get<TrackerDigiGeometryRecord> ().get (m_pDD); 00114 00115 if (accessingDb=="false"){ 00116 m_TrackerGeometry = const_cast<TrackerGeometry*> (m_pDD.product()); 00117 } 00118 else{ 00119 if (m_cacheID_cab != eventSetup.get<SiStripDetCablingRcd>().cacheIdentifier() 00120 || 00121 m_cacheID_geo != eventSetup.get<TrackerDigiGeometryRecord>().cacheIdentifier()){ 00122 m_done=false; 00123 m_3Ddone=false; 00124 m_rzdone=false; 00125 m_rphidone=false; 00126 if(tkMap!=0 ){ 00127 // Kill all open selection windows 00128 for(unsigned int i=0; i<tr->components(); i++){ 00129 VisCuTkSubDetector* subDetector = tr->getComponent(i+1); 00130 for(unsigned int j=0; j<subDetector->components(); j++ ){ 00131 VisCuTkPartDetector* partDetector = subDetector->getComponent(j+1); 00132 for(unsigned int k=0; k<partDetector->components(); k++ ){ 00133 VisCuTkLayer* layer = partDetector->getComponent(k+1); 00134 if(layer->getSlWindow()!=0 )delete layer->getSlWindow(); 00135 } 00136 } 00137 } 00138 delete tr; 00139 //delete tkMap; 00140 } 00141 tkMap=0; 00142 //if(digidraw!=0)delete digidraw; 00143 digidraw=0; 00144 //if(clusterdraw!=0)delete clusterdraw; 00145 clusterdraw=0; 00146 //if(rechitdraw!=0)delete rechitdraw; 00147 rechitdraw=0; 00148 //if(simhitdraw!=0)delete simhitdraw; 00149 simhitdraw=0; 00150 VisCuTkModuleMap::moduleMap.clear(); //@ clear previous moduleMap 00151 00152 m_cacheID_cab = eventSetup.get<SiStripDetCablingRcd>().cacheIdentifier(); 00153 m_cacheID_geo = eventSetup.get<TrackerDigiGeometryRecord>().cacheIdentifier(); 00154 00155 eventSetup.get<SiStripDetCablingRcd>().get( m_SiStripDetCabling ); 00156 std::vector<uint32_t> vdetId; 00157 m_SiStripDetCabling->addActiveDetectorsRawIds(vdetId); 00158 //for (size_t i=0;i<vdetId.size();i++) 00159 //std::cout << "Active DetIds from cabling " << vdetId[i] << std::endl; 00160 00161 if (m_TrackerGeometry!=0) 00162 delete m_TrackerGeometry; 00163 00164 m_TrackerGeometry = new TrackerGeometry; 00165 for (TrackingGeometry::DetUnitContainer::const_iterator idet = m_pDD->detUnits().begin(); 00166 idet != m_pDD->detUnits().end(); idet++){ 00167 //std::cout << "DetIds from geometry " << (*idet)->geographicalId().rawId() << std::endl; 00168 if (::binary_search(vdetId.begin(),vdetId.end(),(*idet)->geographicalId().rawId())){ 00169 m_TrackerGeometry->addDetUnit(*idet); 00170 //std::cout << "added detid " << (*idet)->geographicalId().rawId() << std::endl; 00171 } 00172 } 00173 } 00174 } 00175 00176 if (! m_done) 00177 { 00178 VisQueuedTwig::onBaseInvalidate (); 00179 00180 if(tkMap==0){ 00181 tkMap= new VisCuTkBuilder(); 00182 tkMap->create(); 00183 //tkMap->fill(m_pDD); //@@ This method is now substituded by fill(const TrackerGeometry*) 00184 tkMap->fill(m_TrackerGeometry); 00185 tr = tkMap->tracker(); 00186 ASSERT (tr); 00187 map<const GeomDetUnit * , VisCuTkModule *>::iterator imod; 00188 for (imod=VisCuTkModuleMap::moduleMap.begin();imod != VisCuTkModuleMap::moduleMap.end(); imod++){ 00189 VisCuTkModule* mod = imod->second; 00190 mod->digi_start=0; 00191 mod->digi_size=0; 00192 mod->cluster_start=0; 00193 mod->cluster_size=0; 00194 mod->rechit_start=0; 00195 mod->rechit_size=0; 00196 mod->simhit_start=0; 00197 mod->simhit_size=0; 00198 } 00199 if(winTkMap!=0){ 00200 winTkMap->setTracker(tr); 00201 winTkMap->setEvent(event,eventSetup); 00202 cout << "winTkMap updated "<<endl; 00203 } 00204 if(winTkSl!=0){ 00205 winTkSl->setTracker(tr); 00206 winTkSl->setMap(winTkMap->map); 00207 winTkSl->drawall(); 00208 cout << "winTkSl update "<<endl; 00209 if(tr->type==2)winTkSl->drawall();//if MTCC layout draw all modules by default 00210 } 00211 } 00212 if(digidraw==0){ 00213 digidraw = new VisCuTrackerDigi(); 00214 digidraw->setTracker(tr); 00215 digidraw->setEvent(event,eventSetup); 00216 cout << "digidraw created "<<endl; 00217 } 00218 if(clusterdraw==0){ 00219 clusterdraw = new VisCuTrackerCluster(); 00220 clusterdraw->setTracker(tr); 00221 clusterdraw->setEvent(event,eventSetup); 00222 cout << "clusterdraw created "<<endl; 00223 } 00224 if(rechitdraw==0){ 00225 rechitdraw = new VisCuTrackerRecHit(); 00226 rechitdraw->setTracker(tr); 00227 rechitdraw->setEvent(event,eventSetup); 00228 cout << "rechitdraw created "<<endl; 00229 } 00230 if(simhitdraw==0){ 00231 simhitdraw = new VisCuTrackerSimHit(); 00232 simhitdraw->setTracker(tr); 00233 simhitdraw->setEvent(event,eventSetup); 00234 cout << "simhitdraw created "<<endl; 00235 } 00236 if(winTkMap==0){ 00237 winTkMap = new VisCuTkMapWindow(0,0,0, this, simhitdraw, digidraw, clusterdraw, rechitdraw); 00238 winTkMap->setTracker(tr); 00239 winTkMap->setEvent(event,eventSetup); 00240 winTkMap->setGeometry(500,0,2000,1200); 00241 ASSERT (winTkMap); 00242 cout << "winTkMap created "<<endl; 00243 winTkMap->show(); 00244 } 00245 if(winTkSl==0){ 00246 winTkSl = new VisCuTkSlWindow(0,0,0,this); 00247 winTkSl->setTracker(tr); 00248 winTkSl->setMap(winTkMap->map); 00249 ASSERT (winTkSl); 00250 cout << "winTkSl created "<<endl; 00251 winTkSl->show(); 00252 if(tr->type==2)winTkSl->drawall();//if MTCC layout draw all modules by default 00253 //if (accessingDb=="true") winTkSl-> drawall(); 00254 if(autoIntegrate){winTkSl->drawall(); winTkMap->drawall(); winTkMap->separate(); winTkMap->integSign(); 00255 if(signalToIntegrate=="strip")winTkMap->drawDigi();else winTkMap->drawCluster();} 00256 } 00257 previous_event = event.id().event(); 00258 m_done = true; 00259 storeTracks(event); 00260 IgRepSet::invalidate (this, SELF_MASK); 00261 }else { 00262 int pe = event.id().event(); 00263 if(previous_event!=pe){ 00264 previous_event = pe; 00265 map<const GeomDetUnit * , VisCuTkModule *>::iterator imod; 00266 for (imod=VisCuTkModuleMap::moduleMap.begin();imod != VisCuTkModuleMap::moduleMap.end(); imod++){ 00267 VisCuTkModule* mod = imod->second; 00268 mod->digi_start=0; 00269 mod->digi_size=0; 00270 mod->cluster_start=0; 00271 mod->cluster_size=0; 00272 mod->rechit_start=0; 00273 mod->rechit_size=0; 00274 mod->simhit_start=0; 00275 mod->simhit_size=0; 00276 } 00277 //Draw only crossed modules 00278 if(tr->type==3)winTkSl->notifyEvent();//clear everything from previous event 00279 storeTracks(event); 00280 if(tr->type==3) selectCrossedModules(); 00281 if(digidraw!=0) digidraw->setEvent(event,eventSetup); 00282 if(clusterdraw!=0) clusterdraw->setEvent(event,eventSetup); 00283 if(rechitdraw!=0) rechitdraw->setEvent(event,eventSetup); 00284 if(simhitdraw!=0) simhitdraw->setEvent(event,eventSetup); 00285 if(winTkMap!=0) winTkMap->setEvent(event,eventSetup); 00286 IgRepSet::invalidate (this, SELF_MASK); 00287 }//if new event 00288 } 00289 }
void VisCuTkGeometryTwig::selectCrossedModules | ( | ) | [private] |
Definition at line 461 of file VisCuTkGeometryTwig.cc.
References GenMuonPlsPt100GeV_cfg::cout, crossedModulesOnly, lat::endl(), VisCuTkModule::isVisible(), m_track, m_trackModules, m_tracks, mod(), VisCuTkSlWindow::notifyEvent(), selectedModules, VisCuTkModule::setVisible(), tkMap, tr, VisCuCmsTracker::type, VisActiveConfigurable< T >::value(), and winTkSl.
Referenced by configChanged(), and onNewEvent().
00462 { 00463 if(tkMap==0 ||winTkSl==0)return; 00464 if(crossedModulesOnly=="true" && tr->type==3){ 00465 //clear everything 00466 winTkSl->notifyEvent(); 00467 selectedModules.clear(); 00468 unsigned int tracks_size = m_tracks.size (); 00469 int nselected = 0; 00470 if (tracks_size > 0) 00471 { 00472 for (unsigned int nt = 0; nt < tracks_size; nt++) 00473 { 00474 if (m_track.value() < 0 || m_track.value() == nt){ 00475 std::vector<VisCuTkModule * > myModules = m_trackModules[nt]; 00476 for (std::vector<VisCuTkModule *>::iterator imod = myModules.begin(); imod != myModules.end(); ++imod) 00477 { 00478 VisCuTkModule * mod = (*imod); 00479 nselected++; 00480 if (winTkSl!=0)if(!mod->isVisible())mod->setVisible(); 00481 } 00482 00483 } 00484 } 00485 if(m_track.value() >= 0)std::cout<<nselected<<" modules hit by track" << m_track.value() <<std::endl;else std::cout<<nselected<<" modules hit by tracks" << std::endl; 00486 }//tracks.size 00487 }//crossedmodulesonly 00488 }
void VisCuTkGeometryTwig::storeTracks | ( | const edm::Event & | event | ) | [private] |
Definition at line 491 of file VisCuTkGeometryTwig.cc.
References GeomDet::components(), GenMuonPlsPt100GeV_cfg::cout, crossedModulesOnly, lat::endl(), it, m_pDD, m_trackModules, m_tracks, mod(), VisCuTkModuleMap::moduleMap, DetId::rawId(), track, trackLabelName, and trackProducerName.
Referenced by onNewEvent().
00493 { 00494 m_tracks.clear (); 00495 m_trackModules.clear (); 00496 if(crossedModulesOnly=="true"){ 00497 bool notracks=true; 00498 edm::Handle<reco::TrackCollection> trackCollection; 00499 try 00500 { 00501 event.getByLabel(trackProducerName,trackLabelName,trackCollection); 00502 notracks=false; 00503 } 00504 catch (...) 00505 { 00506 cout << "no tracks type"<<trackProducerName<<"/"<<trackLabelName<< " in event" << endl; 00507 } 00508 if(!notracks){ 00509 int nt = 0; 00510 for (reco::TrackCollection::const_iterator track = trackCollection->begin (); track != trackCollection->end (); track++) 00511 { 00512 m_tracks.push_back (*track); 00513 std::vector<VisCuTkModule * > myModules; 00514 for (trackingRecHit_iterator it = track->recHitsBegin (); it != track->recHitsEnd (); it++) 00515 { 00516 if (!((*it)->geographicalId ().null ())) { 00517 VisCuTkModule * mod; 00518 DetId detIdObject = (*it)->geographicalId (); 00519 unsigned int id = detIdObject.rawId(); 00520 const GeomDet *gd = dynamic_cast<const GeomDet*>(m_pDD->idToDet(detIdObject)); 00521 if(gd !=0){ 00522 std::vector<const GeomDet*> comp = gd->components(); 00523 if(comp.empty()){ 00524 //case 1 - only 1 module associated 00525 const GeomDetUnit * geoUnit = dynamic_cast<const GeomDetUnit*>(m_pDD->idToDetUnit( detIdObject )); 00526 if(geoUnit!=0){ 00527 mod = VisCuTkModuleMap::moduleMap[geoUnit]; 00528 myModules.push_back(mod); 00529 } 00530 } 00531 if(comp.size()==2){ 00532 // case 2 - stereo pair associated 00533 const GeomDetUnit * geoUnit1 = dynamic_cast<const GeomDetUnit*>(comp[0]); 00534 if(geoUnit1!=0){ 00535 mod = VisCuTkModuleMap::moduleMap[geoUnit1]; 00536 myModules.push_back(mod); 00537 } 00538 const GeomDetUnit * geoUnit2 = dynamic_cast<const GeomDetUnit*>(comp[1]); 00539 if(geoUnit2!=0){ 00540 mod = VisCuTkModuleMap::moduleMap[geoUnit2]; 00541 myModules.push_back(mod); 00542 } 00543 } 00544 if(comp.size()==1 || comp.size()>2) std::cout<<"module " << id << " intersected by rechit not found!"<<std::endl; 00545 00546 }else std::cout<<"module " << id << " intersected by rechit not found!"<<std::endl; 00547 } 00548 } 00549 nt++; 00550 m_trackModules.push_back (myModules); 00551 } 00552 } //if(!notracks) 00553 } 00554 }
Reimplemented from VisQueuedTwig.
Definition at line 418 of file VisCuTkGeometryTwig.cc.
References VisCuTracker::buildDet(), Ig3DBaseRep::clear(), cluster3d, clusterdraw, digi3d, digidraw, VisCuTkMapWindow::drawcluster, VisCuTkMapWindow::drawdigi, VisCuTkMapWindow::drawrechit, VisCuTkMapWindow::drawsimhits, edm::ESHandle< T >::isValid(), m_3dDet, m_done, m_name, m_pDD, m_rzDet, m_rzdone, m_TrackerGeometry, Ig3DBaseRep::node(), rechit3d, rechitdraw, VisTrackingGeometry::RZDet, simhit3d, simhitdraw, VisCuTracker::subDetector(), VisCuTrackerRecHit::update(), VisCuTrackerSimHit::update(), VisCuTrackerDigi::update(), VisCuTrackerCluster::update(), VisQueuedTwig::update(), and winTkMap.
00419 { 00420 // Get debugging dump. 00421 VisQueuedTwig::update (rep); 00422 00423 if (! m_done) return; 00424 if (! m_pDD.isValid ()) return; 00425 00426 IgQtLock (); 00427 rep->clear (); 00428 m_rzDet=0;digi3d=0;cluster3d=0;rechit3d=0;simhit3d=0; 00429 m_rzDet = buildDet (VisTrackingGeometry::RZDet, m_TrackerGeometry, VisCuTracker::subDetector (m_name)); 00430 if(winTkMap!=0&&winTkMap->drawdigi)digi3d = digidraw->update(VisTrackingGeometry::RZDet); 00431 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d = clusterdraw->update(VisTrackingGeometry::RZDet); 00432 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d = rechitdraw->update(VisTrackingGeometry::RZDet); 00433 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d = simhitdraw->update(VisTrackingGeometry::RZDet); 00434 00435 if (! m_rzdone) 00436 { 00437 m_rzDet->ref (); 00438 if(winTkMap!=0&&winTkMap->drawdigi)digi3d->ref (); 00439 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d->ref (); 00440 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d->ref (); 00441 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d->ref (); 00442 m_rzdone = true; 00443 } 00444 if(m_3dDet!=0)rep->node ()->addChild (m_rzDet); 00445 if(winTkMap!=0&&winTkMap->drawdigi&&digi3d!=0)rep->node ()->addChild (digi3d); 00446 if(winTkMap!=0&&winTkMap->drawcluster&&cluster3d!=0)rep->node ()->addChild (cluster3d); 00447 if(winTkMap!=0&&winTkMap->drawrechit&&rechit3d!=0)rep->node ()->addChild (rechit3d); 00448 if(winTkMap!=0&&winTkMap->drawsimhits&&simhit3d!=0)rep->node ()->addChild (simhit3d); 00449 }
Reimplemented from VisQueuedTwig.
Definition at line 384 of file VisCuTkGeometryTwig.cc.
References VisCuTracker::buildDet(), Ig3DBaseRep::clear(), cluster3d, clusterdraw, digi3d, digidraw, VisCuTkMapWindow::drawcluster, VisCuTkMapWindow::drawdigi, VisCuTkMapWindow::drawrechit, VisCuTkMapWindow::drawsimhits, edm::ESHandle< T >::isValid(), m_3dDet, m_done, m_name, m_pDD, m_rphiDet, m_rphidone, m_TrackerGeometry, Ig3DBaseRep::node(), rechit3d, rechitdraw, VisTrackingGeometry::RPhiDet, simhit3d, simhitdraw, VisCuTracker::subDetector(), VisCuTrackerRecHit::update(), VisCuTrackerSimHit::update(), VisCuTrackerDigi::update(), VisCuTrackerCluster::update(), VisQueuedTwig::update(), and winTkMap.
00385 { 00386 // Get debugging dump. 00387 VisQueuedTwig::update (rep); 00388 00389 if (! m_done) return; 00390 if (! m_pDD.isValid ()) return; 00391 00392 IgQtLock (); 00393 rep->clear (); 00394 m_rphiDet=0;digi3d=0;cluster3d=0;rechit3d=0;simhit3d=0; 00395 m_rphiDet = buildDet (VisTrackingGeometry::RPhiDet, m_TrackerGeometry, VisCuTracker::subDetector (m_name)); 00396 if(winTkMap!=0&&winTkMap->drawdigi)digi3d = digidraw->update(VisTrackingGeometry::RPhiDet); 00397 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d = clusterdraw->update(VisTrackingGeometry::RPhiDet); 00398 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d = rechitdraw->update(VisTrackingGeometry::RPhiDet); 00399 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d = simhitdraw->update(VisTrackingGeometry::RPhiDet); 00400 if (! m_rphidone) 00401 { 00402 m_rphiDet->ref (); 00403 if(winTkMap!=0&&winTkMap->drawdigi)digi3d->ref (); 00404 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d->ref (); 00405 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d->ref (); 00406 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d->ref (); 00407 m_rphidone = true; 00408 } 00409 if(m_3dDet!=0)rep->node ()->addChild (m_rphiDet); 00410 if(winTkMap!=0&&winTkMap->drawdigi&&digi3d!=0)rep->node ()->addChild (digi3d); 00411 if(winTkMap!=0&&winTkMap->drawcluster&&cluster3d!=0)rep->node ()->addChild (cluster3d); 00412 if(winTkMap!=0&&winTkMap->drawrechit&&rechit3d!=0)rep->node ()->addChild (rechit3d); 00413 if(winTkMap!=0&&winTkMap->drawsimhits&&simhit3d!=0)rep->node ()->addChild (simhit3d); 00414 }
Reimplemented from VisQueuedTwig.
Definition at line 345 of file VisCuTkGeometryTwig.cc.
References alreadySelected, VisCuTracker::buildDet(), Ig3DBaseRep::clear(), cluster3d, clusterdraw, digi3d, digidraw, VisCuTkMapWindow::drawcluster, VisCuTkMapWindow::drawdigi, VisCuTkMapWindow::drawrechit, VisCuTkMapWindow::drawsimhits, VisTrackingGeometry::FullDet, edm::ESHandle< T >::isValid(), VisCuTkModule::isVisible(), m_3dDet, m_3Ddone, m_done, m_name, m_pDD, m_TrackerGeometry, mod(), Ig3DBaseRep::node(), rechit3d, rechitdraw, selectedModules, VisCuTkModule::setVisible(), simhit3d, simhitdraw, VisCuTracker::subDetector(), tr, VisCuCmsTracker::type, VisCuTrackerRecHit::update(), VisCuTrackerSimHit::update(), VisCuTrackerDigi::update(), VisCuTrackerCluster::update(), VisQueuedTwig::update(), winTkMap, and winTkSl.
00346 { 00347 // Get debugging dump. 00348 VisQueuedTwig::update (rep); 00349 if (! m_done) return; 00350 if (! m_pDD.isValid ()) return; 00351 if(tr->type!=3)alreadySelected=false; 00352 else { if(!alreadySelected) {alreadySelected=true; 00353 for (std::vector<VisCuTkModule *>::iterator imod = selectedModules.begin(); imod != selectedModules.end(); ++imod) 00354 { 00355 VisCuTkModule * mod = (*imod); 00356 if (winTkSl!=0)if(!mod->isVisible())mod->setVisible(); 00357 } 00358 } 00359 } 00360 IgQtLock (); 00361 rep->clear (); 00362 m_3dDet=0;digi3d=0;cluster3d=0;rechit3d=0;simhit3d=0; 00363 m_3dDet = buildDet (VisTrackingGeometry::FullDet, m_TrackerGeometry, VisCuTracker::subDetector (m_name)); 00364 if(winTkMap!=0&&winTkMap->drawdigi)digi3d = digidraw->update(VisTrackingGeometry::FullDet); 00365 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d = clusterdraw->update(VisTrackingGeometry::FullDet); 00366 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d = rechitdraw->update(VisTrackingGeometry::FullDet); 00367 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d = simhitdraw->update(VisTrackingGeometry::FullDet); 00368 if(!m_3Ddone){ 00369 m_3dDet->ref(); 00370 if(winTkMap!=0&&winTkMap->drawdigi)digi3d->ref (); 00371 if(winTkMap!=0&&winTkMap->drawcluster)cluster3d->ref (); 00372 if(winTkMap!=0&&winTkMap->drawrechit)rechit3d->ref (); 00373 if(winTkMap!=0&&winTkMap->drawsimhits)simhit3d->ref (); 00374 m_3Ddone = true; 00375 } 00376 if(m_3dDet!=0)rep->node ()->addChild (m_3dDet); 00377 if(winTkMap!=0&&winTkMap->drawdigi&&digi3d!=0)rep->node ()->addChild (digi3d); 00378 if(winTkMap!=0&&winTkMap->drawcluster&&cluster3d!=0)rep->node ()->addChild (cluster3d); 00379 if(winTkMap!=0&&winTkMap->drawrechit&&rechit3d!=0)rep->node ()->addChild (rechit3d); 00380 if(winTkMap!=0&&winTkMap->drawsimhits&&simhit3d!=0)rep->node ()->addChild (simhit3d); 00381 }
Reimplemented from VisQueuedTwig.
Definition at line 292 of file VisCuTkGeometryTwig.cc.
References begin, clusterdraw, count, VisCuTkModule::detUnit, digidraw, VisCuTkMapWindow::drawcluster, VisCuTkMapWindow::drawdigi, VisCuTkMapWindow::drawrechit, VisCuTkMapWindow::drawsimhits, VisCuTkModule::getName(), edm::ESHandle< T >::isValid(), VisCuTkModule::isVisible(), m_done, m_name, m_pDD, mod(), VisCuTkModuleMap::moduleMap, VisCuTkModule::notInUse(), GloballyPositioned< T >::position(), rechitdraw, IgTextRep::setText(), simhitdraw, GeomDet::surface(), tr, VisQueuedTwig::update(), VisCuTrackerCluster::updatetext(), VisCuTrackerRecHit::updatetext(), VisCuTrackerSimHit::updatetext(), VisCuTrackerDigi::updatetext(), and winTkMap.
00293 { 00294 // Get debugging dump. 00295 VisQueuedTwig::update (rep); 00296 00297 if (! m_done) return; 00298 if (! m_pDD.isValid ()) return; 00299 if(tr==0) return; 00300 int count=0; 00301 map<const GeomDetUnit * , VisCuTkModule *>::iterator imod; 00302 for (imod=VisCuTkModuleMap::moduleMap.begin();imod != VisCuTkModuleMap::moduleMap.end(); imod++){ 00303 VisCuTkModule* mod = imod->second; 00304 if(mod->isVisible()&&!mod->notInUse())count++; 00305 } 00306 // Prepare property description. 00307 std::ostringstream text; 00308 00309 text << "<b>CMS Tracker Geometry: </b>"; 00310 00311 text << m_name << "<br>"; 00312 00313 text << " Geometry node for CmsDigiTracker is " << &(*m_pDD) << "<br>"; 00314 00315 for (imod=VisCuTkModuleMap::moduleMap.begin();imod != VisCuTkModuleMap::moduleMap.end(); imod++){ 00316 VisCuTkModule* mod = imod->second; 00317 if(mod->isVisible()&&!mod->notInUse()) 00318 { 00319 Surface::GlobalPoint pos = mod->detUnit->surface ().position (); 00320 text << "<br>" <<mod->getName() << "<br>"; 00321 if(winTkMap!=0&&winTkMap->drawdigi){ 00322 std::string signaltext; 00323 signaltext = digidraw->updatetext(mod); 00324 text << signaltext;} 00325 if(winTkMap!=0&&winTkMap->drawcluster){ 00326 std::string signaltext; 00327 signaltext = clusterdraw->updatetext(mod); 00328 text << signaltext;} 00329 if(winTkMap!=0&&winTkMap->drawrechit){ 00330 std::string signaltext; 00331 signaltext = rechitdraw->updatetext(mod); 00332 text << signaltext;} 00333 if(winTkMap!=0&&winTkMap->drawsimhits){ 00334 std::string signaltext; 00335 signaltext = simhitdraw->updatetext(mod); 00336 text << signaltext;} 00337 } 00338 } 00339 // Send it over. 00340 IgQtLock (); 00341 rep->setText (text.str ()); 00342 }
std::string VisCuTkGeometryTwig::accessingDb [private] |
bool VisCuTkGeometryTwig::alreadySelected [private] |
bool VisCuTkGeometryTwig::autoIntegrate [private] |
SoSeparator* VisCuTkGeometryTwig::cluster3d [private] |
Definition at line 74 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
Definition at line 88 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and VisCuTkGeometryTwig().
std::string VisCuTkGeometryTwig::crossedModulesOnly [private] |
Definition at line 96 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), selectCrossedModules(), and storeTracks().
SoSeparator* VisCuTkGeometryTwig::digi3d [private] |
Definition at line 73 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
VisCuTrackerDigi* VisCuTkGeometryTwig::digidraw [private] |
Definition at line 87 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and VisCuTkGeometryTwig().
SoSeparator* VisCuTkGeometryTwig::m_3dDet [private] |
Definition at line 70 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
bool VisCuTkGeometryTwig::m_3Ddone [private] |
Definition at line 77 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and ~VisCuTkGeometryTwig().
unsigned long long VisCuTkGeometryTwig::m_cacheID_cab [private] |
unsigned long long VisCuTkGeometryTwig::m_cacheID_geo [private] |
bool VisCuTkGeometryTwig::m_done [private] |
std::string VisCuTkGeometryTwig::m_name [private] |
Reimplemented from IgSimpleTwig.
Definition at line 68 of file VisCuTkGeometryTwig.h.
Referenced by update().
Definition at line 63 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), storeTracks(), and update().
SoSeparator* VisCuTkGeometryTwig::m_rphiDet [private] |
Definition at line 72 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
bool VisCuTkGeometryTwig::m_rphidone [private] |
Definition at line 80 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and ~VisCuTkGeometryTwig().
SoSeparator* VisCuTkGeometryTwig::m_rzDet [private] |
Definition at line 71 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
bool VisCuTkGeometryTwig::m_rzdone [private] |
Definition at line 79 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and ~VisCuTkGeometryTwig().
std::vector<std::vector<VisCuTkModule * > > VisCuTkGeometryTwig::m_trackModules [private] |
Definition at line 93 of file VisCuTkGeometryTwig.h.
Referenced by selectCrossedModules(), and storeTracks().
std::vector<reco::Track> VisCuTkGeometryTwig::m_tracks [private] |
Definition at line 92 of file VisCuTkGeometryTwig.h.
Referenced by selectCrossedModules(), and storeTracks().
int VisCuTkGeometryTwig::previous_event [private] |
const edm::ParameterSet* VisCuTkGeometryTwig::pset [private] |
Definition at line 62 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), and VisCuTkGeometryTwig().
SoSeparator* VisCuTkGeometryTwig::rechit3d [private] |
Definition at line 75 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
Definition at line 89 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and VisCuTkGeometryTwig().
std::vector<VisCuTkModule *> VisCuTkGeometryTwig::selectedModules [private] |
Definition at line 86 of file VisCuTkGeometryTwig.h.
Referenced by selectCrossedModules(), and update().
std::string VisCuTkGeometryTwig::signalToIntegrate [private] |
SoSeparator* VisCuTkGeometryTwig::simhit3d [private] |
Definition at line 76 of file VisCuTkGeometryTwig.h.
Referenced by update(), and ~VisCuTkGeometryTwig().
Definition at line 90 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), update(), and VisCuTkGeometryTwig().
VisCuTkBuilder* VisCuTkGeometryTwig::tkMap [private] |
Definition at line 82 of file VisCuTkGeometryTwig.h.
Referenced by configChanged(), onNewEvent(), and selectCrossedModules().
VisCuCmsTracker* VisCuTkGeometryTwig::tr [private] |
Definition at line 81 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), selectCrossedModules(), and update().
std::string VisCuTkGeometryTwig::trackLabelName [private] |
Definition at line 101 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), and storeTracks().
std::string VisCuTkGeometryTwig::trackProducerName [private] |
Definition at line 100 of file VisCuTkGeometryTwig.h.
Referenced by onNewEvent(), and storeTracks().
VisCuTkMapWindow* VisCuTkGeometryTwig::winTkMap [private] |
VisCuTkSlWindow* VisCuTkGeometryTwig::winTkSl [private] |
Definition at line 84 of file VisCuTkGeometryTwig.h.
Referenced by configChanged(), onNewEvent(), selectCrossedModules(), and update().