00001 #include "VisReco/VisPF/interface/VisPFClusterTwig.h"
00002
00003
00004 #include "VisFramework/VisFrameworkBase/interface/VisTwigFactroyService.h"
00005 #include "VisFramework/VisFrameworkBase/interface/VisEventSelector.h"
00006
00007 #include "FWCore/Framework/interface/Event.h"
00008 #include "FWCore/Framework/interface/EventSetup.h"
00009
00010 #include "Iguana/Models/interface/IgTextRep.h"
00011 #include "Iguana/GLModels/interface/Ig3DRep.h"
00012 #include "Iguana/GLModels/interface/IgLegoRep.h"
00013 #include "Iguana/GLModels/interface/IgRPhiRep.h"
00014 #include "Iguana/GLModels/interface/IgRZRep.h"
00015 #include "Iguana/Framework/interface/IgRepSet.h"
00016
00017 #include "Iguana/Inventor/interface/IgSbColorMap.h"
00018 #include "Iguana/Inventor/interface/IgSoCrystalHit.h"
00019 #include "Iguana/Inventor/interface/IgSoCircularHist.h"
00020 #include "Iguana/Inventor/interface/IgSoRZHist.h"
00021 #include "Iguana/Inventor/interface/IgSoTower.h"
00022
00023 #include "Iguana/Studio/interface/IgQtLock.h"
00024
00025 #include <Inventor/nodes/SoSeparator.h>
00026 #include <Inventor/nodes/SoMaterial.h>
00027
00028 #include "DataFormats/ParticleFlowReco/interface/PFLayer.h"
00029 #include "Geometry/Records/interface/IdealGeometryRecord.h"
00030 #include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
00031
00032 #include "DataFormats/ParticleFlowReco/interface/PFRecHitFraction.h"
00033 #include "DataFormats/ParticleFlowReco/interface/PFRecHit.h"
00034 #include "DataFormats/ParticleFlowReco/interface/PFRecHitFwd.h"
00035
00036 #include <qstring.h>
00037 #include <classlib/utils/DebugAids.h>
00038 #include <algorithm>
00039 #include <iostream>
00040 #include <iomanip>
00041
00042 namespace
00043 {
00044 VisQueuedTwig* createThisTwig(IgState *state, IgTwig *parent,
00045 const std::string &name,
00046 const std::string &friendlyName,
00047 const std::string &modLabel,
00048 const std::string &instanceName,
00049 const std::string &processName)
00050 {
00051 return new VisPFClusterTwig(state, parent, name, friendlyName, modLabel, instanceName, processName);
00052 }
00053 }
00054
00055
00056 VisPFClusterTwig::VisPFClusterTwig(IgState *state, IgTwig *parent,
00057 const std::string &name,
00058 const std::string &friendlyName,
00059 const std::string &moduleLabel,
00060 const std::string &instanceName,
00061 const std::string &processName)
00062 : VisQueuedTwig(state, parent, name),
00063 m_text("No Info"),
00064 m_name(name),
00065 m_friendlyName(friendlyName),
00066 m_moduleLabel(moduleLabel),
00067 m_instanceName(instanceName),
00068 m_processName(processName)
00069 {
00070 VisTwigFactroyService *tfService = VisTwigFactroyService::get(state);
00071
00072 if (! tfService)
00073 {
00074 tfService = new VisTwigFactroyService(state);
00075 }
00076
00077 edm::TypeID pfClustersID(typeid (reco::PFClusterCollection));
00078
00079 tfService->registerTwig(pfClustersID.friendlyClassName(), &createThisTwig);
00080 }
00081
00082 void VisPFClusterTwig::onNewEvent(const edm::Event &event,
00083 const edm::EventSetup &eventSetup)
00084 {
00085 VisQueuedTwig::onNewEvent(event, eventSetup);
00086
00087 m_EBclusters.clear();
00088 m_HBclusters.clear();
00089 m_EEclusters.clear();
00090
00091 m_EBrechits.clear();
00092 m_HBrechits.clear();
00093 m_EErechits.clear();
00094
00095 std::vector<edm::Handle<reco::PFClusterCollection> > clusterCollections;
00096
00097 try
00098 {
00099 eventSetup.get<IdealGeometryRecord>().get(m_pDD);
00100 }
00101
00102 catch (cms::Exception& e)
00103 {
00104 if (this->m_onCmsException)
00105 this->m_onCmsException(&e);
00106 }
00107
00108 try
00109 {
00110 if ( (! m_friendlyName.empty ()) ||
00111 (! m_moduleLabel.empty ()) ||
00112 (! m_instanceName.empty ()) ||
00113 (! m_processName.empty ()) )
00114 {
00115 VisEventSelector visSel(m_friendlyName, m_moduleLabel,
00116 m_instanceName, m_processName);
00117
00118 event.getMany(visSel, clusterCollections);
00119 }
00120
00121 else
00122 {
00123 event.getManyByType(clusterCollections);
00124 }
00125 }
00126
00127 catch (cms::Exception& e)
00128 {
00129 if (this->m_onCmsException)
00130 this->m_onCmsException(&e);
00131 }
00132
00133 catch (lat::Error &e)
00134 {
00135 if (this->m_onError)
00136 this->m_onError(&e);
00137 }
00138
00139 catch (std::exception &e)
00140 {
00141 if (this->m_onException)
00142 this->m_onException(&e);
00143 }
00144
00145 catch (...)
00146 {
00147 if (this->m_onUnhandledException)
00148 this->m_onUnhandledException();
00149 }
00150
00151 if ( ! clusterCollections.empty() )
00152 {
00153 for (std::vector<edm::Handle<reco::PFClusterCollection> >::iterator i =
00154 clusterCollections.begin(), iEnd = clusterCollections.end();
00155 i != iEnd; ++i)
00156 {
00157 const reco::PFClusterCollection& c = *(*i);
00158
00159 for (std::vector<reco::PFCluster>::const_iterator ipfc = c.begin(), ipfcEnd = c.end();
00160 ipfc != ipfcEnd; ++ipfc)
00161 {
00162 if ( (*ipfc).layer() == PFLayer::ECAL_BARREL )
00163 {
00164 m_EBclusters.push_back((*ipfc));
00165
00166 std::vector<reco::PFRecHitFraction>::const_iterator iR;
00167
00168 for ( iR = (*ipfc).recHitFractions().begin();
00169 iR != (*ipfc).recHitFractions().end();
00170 ++iR )
00171 {
00172 RecHit recHit;
00173
00174 recHit.fraction = (*iR).fraction();
00175 recHit.energy = (*iR).recHitRef()->energy();
00176 recHit.detId = (*iR).recHitRef()->detId();
00177
00178 m_EBrechits.push_back(recHit);
00179 }
00180 }
00181
00182
00183 if ( (*ipfc).layer() == PFLayer::HCAL_BARREL1 )
00184 {
00185 m_HBclusters.push_back((*ipfc));
00186
00187 std::vector<reco::PFRecHitFraction>::const_iterator iR;
00188
00189 for ( iR = (*ipfc).recHitFractions().begin();
00190 iR != (*ipfc).recHitFractions().end();
00191 ++iR )
00192 {
00193 RecHit recHit;
00194
00195 recHit.fraction = (*iR).fraction();
00196 recHit.energy = (*iR).recHitRef()->energy();
00197 recHit.detId = (*iR).recHitRef()->detId();
00198
00199 m_HBrechits.push_back(recHit);
00200 }
00201 }
00202
00203
00204 if ( (*ipfc).layer() == PFLayer::ECAL_ENDCAP )
00205 {
00206 m_EEclusters.push_back((*ipfc));
00207
00208 std::vector<reco::PFRecHitFraction>::const_iterator iR;
00209
00210 for ( iR = (*ipfc).recHitFractions().begin();
00211 iR != (*ipfc).recHitFractions().end();
00212 ++iR )
00213 {
00214 RecHit recHit;
00215
00216 recHit.fraction = (*iR).fraction();
00217 recHit.energy = (*iR).recHitRef()->energy();
00218 recHit.detId = (*iR).recHitRef()->detId();
00219
00220 m_EErechits.push_back(recHit);
00221 }
00222 }
00223
00224 }
00225 }
00226 }
00227
00228 else
00229 std::cout<<"DEBUG: clusterCollections.empty()"<<std::endl;
00230
00231
00232 VisQueuedTwig::onBaseInvalidate();
00233 }
00234
00235 void VisPFClusterTwig::update(Ig3DRep *rep)
00236 {
00237 VisQueuedTwig::update(rep);
00238
00239 IgQtLock();
00240 rep->clear();
00241
00242 SoSeparator* sep = new SoSeparator;
00243
00244 try
00245 {
00246 std::vector<RecHit>::iterator iR;
00247
00248 if ( ! m_EBrechits.empty() && m_pDD.isValid() )
00249 {
00250 SoMaterial* EBmat = new SoMaterial;
00251 EBmat->diffuseColor.setValue(1.0, 0.0, 153.0 / 255.0);
00252 sep->addChild(EBmat);
00253
00254 for ( iR = m_EBrechits.begin();
00255 iR != m_EBrechits.end();
00256 ++iR )
00257 {
00258 const CaloCellGeometry* cell = (*m_pDD).getGeometry((*iR).detId);
00259
00260 const CaloCellGeometry::CornersVec& corners = cell->getCorners();
00261 assert(corners.size () == 8);
00262
00263 IgSoCrystalHit* eb_crystalHit = new IgSoCrystalHit;
00264 eb_crystalHit->energy.setValue((*iR).energy);
00265 eb_crystalHit->scale.setValue(1.0*(*iR).fraction);
00266 eb_crystalHit->relativeWidth.setValue(1.0);
00267 eb_crystalHit->drawCrystal.setValue(true);
00268 eb_crystalHit->drawHit.setValue(true);
00269
00270 eb_crystalHit->front1.setValue(corners[3].x()/100.0, corners[3].y()/100.0, corners[3].z()/100.0);
00271 eb_crystalHit->front2.setValue(corners[2].x()/100.0, corners[2].y()/100.0, corners[2].z()/100.0);
00272 eb_crystalHit->front3.setValue(corners[1].x()/100.0, corners[1].y()/100.0, corners[1].z()/100.0);
00273 eb_crystalHit->front4.setValue(corners[0].x()/100.0, corners[0].y()/100.0, corners[0].z()/100.0);
00274
00275 eb_crystalHit->back1.setValue(corners[7].x()/100.0, corners[7].y()/100.0, corners[7].z()/100.0);
00276 eb_crystalHit->back2.setValue(corners[6].x()/100.0, corners[6].y()/100.0, corners[6].z()/100.0);
00277 eb_crystalHit->back3.setValue(corners[5].x()/100.0, corners[5].y()/100.0, corners[5].z()/100.0);
00278 eb_crystalHit->back4.setValue(corners[4].x()/100.0, corners[4].y()/100.0, corners[4].z()/100.0);
00279
00280 sep->addChild(eb_crystalHit);
00281 }
00282 }
00283
00284
00285
00286
00287
00288
00289
00290
00291
00292
00293
00294
00295
00296
00297
00298
00299
00300
00301
00302
00303
00304
00305
00306
00307
00308
00309
00310
00311
00312
00313
00314
00315
00316
00317
00318
00319
00320
00321
00322
00323
00324
00325
00326
00327
00328
00329
00330
00331
00332
00333
00334
00335
00336
00337
00338
00339
00340
00341
00342
00343
00344
00345
00346
00347
00348
00349
00350
00351
00352
00353
00354
00355
00356
00357
00358
00359
00360
00361
00362
00363
00364
00365
00366
00367
00368
00369
00370
00371
00372 if ( ! m_EErechits.empty() && m_pDD.isValid() )
00373 {
00374 SoMaterial* EEmat = new SoMaterial;
00375 EEmat->diffuseColor.setValue(1.0, 0.0, 153.0 / 255.0);
00376 sep->addChild(EEmat);
00377
00378 for ( iR = m_EErechits.begin();
00379 iR != m_EErechits.end();
00380 ++iR )
00381 {
00382 const CaloCellGeometry* cell = (*m_pDD).getGeometry((*iR).detId);
00383
00384 const CaloCellGeometry::CornersVec& corners = cell->getCorners();
00385 assert(corners.size () == 8);
00386
00387 IgSoCrystalHit* ee_crystalHit = new IgSoCrystalHit;
00388 ee_crystalHit->energy.setValue((*iR).energy);
00389 ee_crystalHit->scale.setValue(1.0*(*iR).fraction);
00390 ee_crystalHit->relativeWidth.setValue(1.0);
00391 ee_crystalHit->drawCrystal.setValue(true);
00392 ee_crystalHit->drawHit.setValue(true);
00393
00394 ee_crystalHit->front1.setValue(corners[3].x()/100.0, corners[3].y()/100.0, corners[3].z()/100.0);
00395 ee_crystalHit->front2.setValue(corners[2].x()/100.0, corners[2].y()/100.0, corners[2].z()/100.0);
00396 ee_crystalHit->front3.setValue(corners[1].x()/100.0, corners[1].y()/100.0, corners[1].z()/100.0);
00397 ee_crystalHit->front4.setValue(corners[0].x()/100.0, corners[0].y()/100.0, corners[0].z()/100.0);
00398
00399 ee_crystalHit->back1.setValue(corners[7].x()/100.0, corners[7].y()/100.0, corners[7].z()/100.0);
00400 ee_crystalHit->back2.setValue(corners[6].x()/100.0, corners[6].y()/100.0, corners[6].z()/100.0);
00401 ee_crystalHit->back3.setValue(corners[5].x()/100.0, corners[5].y()/100.0, corners[5].z()/100.0);
00402 ee_crystalHit->back4.setValue(corners[4].x()/100.0, corners[4].y()/100.0, corners[4].z()/100.0);
00403
00404 sep->addChild(ee_crystalHit);
00405 }
00406 }
00407 }
00408
00409 catch (cms::Exception& e)
00410 {
00411 if (this->m_onCmsException)
00412 this->m_onCmsException (&e);
00413 }
00414 catch (lat::Error &e)
00415 {
00416 if (this->m_onError)
00417 this->m_onError (&e);
00418 }
00419 catch (std::exception &e)
00420 {
00421 if (this->m_onException)
00422 this->m_onException (&e);
00423 }
00424 catch (...)
00425 {
00426 if (this->m_onUnhandledException)
00427 this->m_onUnhandledException ();
00428 }
00429
00430 rep->node()->addChild(sep);
00431 }
00432
00433 void VisPFClusterTwig::update(IgLegoRep *rep)
00434 {
00435 VisQueuedTwig::update(rep);
00436
00437 IgQtLock();
00438 rep->clear();
00439
00440 SoSeparator* sep = new SoSeparator();
00441
00442 try
00443 {
00444 if ( ! m_EBclusters.empty() )
00445 {
00446 std::vector<reco::PFCluster>::const_iterator iC;
00447
00448 for ( iC = m_EBclusters.begin();
00449 iC != m_EBclusters.end(); ++iC)
00450 {
00451 IgSoTower* tower = new IgSoTower();
00452
00453 double energy = (*iC).energy();
00454 tower->energy = energy;
00455
00456 double eta = (*iC).position().Eta();
00457 double phi = (*iC).position().Phi();
00458 (phi < 0.0) ? phi = 2 * M_PI + phi : phi;
00459 tower->position = SbVec2f(phi, eta);
00460
00461 tower->scaleFactor = 1.0;
00462 tower->etaWidth = 0.0174;
00463 tower->phiWidth = 0.0174;
00464 tower->emFraction = 1.0;
00465
00466 sep->addChild(tower);
00467 }
00468 }
00469
00470
00471
00472
00473
00474
00475
00476
00477
00478
00479
00480
00481
00482
00483
00484
00485
00486
00487
00488
00489
00490
00491
00492
00493
00494
00495
00496 if ( ! m_EEclusters.empty() )
00497 {
00498 std::vector<reco::PFCluster>::const_iterator iC;
00499
00500 for ( iC = m_EEclusters.begin();
00501 iC != m_EEclusters.end(); ++iC)
00502 {
00503 IgSoTower* tower = new IgSoTower();
00504
00505 double energy = (*iC).energy();
00506 tower->energy = energy;
00507
00508 double eta = (*iC).position().Eta();
00509 double phi = (*iC).position().Phi();
00510 (phi < 0.0) ? phi = 2 * M_PI + phi : phi;
00511 tower->position = SbVec2f(phi, eta);
00512
00513 tower->scaleFactor = 1.0;
00514 tower->etaWidth = 0.0174;
00515 tower->phiWidth = 0.0174;
00516 tower->emFraction = 1.0;
00517
00518 sep->addChild(tower);
00519 }
00520 }
00521 }
00522
00523 catch (cms::Exception& e)
00524 {
00525 if (this->m_onCmsException)
00526 this->m_onCmsException (&e);
00527 }
00528
00529 catch (lat::Error &e)
00530 {
00531 if (this->m_onError)
00532 this->m_onError (&e);
00533 }
00534
00535 catch (std::exception &e)
00536 {
00537 if (this->m_onException)
00538 this->m_onException (&e);
00539 }
00540
00541 catch (...)
00542 {
00543 if (this->m_onUnhandledException)
00544 this->m_onUnhandledException ();
00545 }
00546
00547 rep->node()->addChild(sep);
00548 }
00549
00550 void VisPFClusterTwig::update(IgTextRep *rep)
00551 {
00552 VisQueuedTwig::update(rep);
00553
00554 std::ostringstream text;
00555
00556 text << m_name << " from ";
00557
00558 text << m_text << "<br>";
00559 text << "Total: " << m_EBclusters.size () << " EB PFClusters.<br>";
00560 text << "Total: " << m_HBclusters.size () << " HB PFClusters.<br>";
00561 text << "Total: " << m_EEclusters.size () << " EE PFClusters.<br>";
00562
00563 text << "<table width='100%' border=1>"
00564 << "<TR align = center>"
00565 << "<TH>Number</TH>"
00566 << "<TH>Detector</TH>"
00567 << "<TH>Energy (GeV)</TH>"
00568 << "<TH>Eta</TH>"
00569 << "<TH>Phi (deg)</TH>"
00570 << "</TR>";
00571
00572 text << setiosflags (std::ios::showpoint | std::ios::fixed);
00573 text.setf (std::ios::right, std::ios::adjustfield);
00574
00575 int nClusters;
00576
00577 try
00578 {
00579 std::vector<reco::PFCluster>::const_iterator iC;
00580
00581 if ( ! m_EBclusters.empty() )
00582 {
00583 nClusters = 0;
00584
00585 for ( iC = m_EBclusters.begin();
00586 iC != m_EBclusters.end(); ++iC)
00587 {
00588 double energy = (*iC).energy();
00589 double eta = (*iC).position().Eta();
00590 double phi = (*iC).position().Phi();
00591
00592 text << "<TR align = right>"
00593 << "<TD>" << std::setw (3) << nClusters++ << "</TD>"
00594 << "<TD> EB </TD>"
00595 << "<TD>" << std::setw (5) << std::setprecision (3) << energy << "</TD>"
00596 << "<TD>" << std::setw (5) << std::setprecision (3) << eta << "</TD>"
00597 << "<TD>" << std::setw (5) << std::setprecision (3) << phi << "</TD>"
00598 << "</TR>";
00599 }
00600 }
00601
00602 if ( ! m_HBclusters.empty() )
00603 {
00604 nClusters = 0;
00605
00606 for ( iC = m_HBclusters.begin();
00607 iC != m_HBclusters.end(); ++iC)
00608 {
00609 double energy = (*iC).energy();
00610 double eta = (*iC).position().Eta();
00611 double phi = (*iC).position().Phi();
00612
00613 text << "<TR align = right>"
00614 << "<TD>" << std::setw (3) << nClusters++ << "</TD>"
00615 << "<TD> HB </TD>"
00616 << "<TD>" << std::setw (5) << std::setprecision (3) << energy << "</TD>"
00617 << "<TD>" << std::setw (5) << std::setprecision (3) << eta << "</TD>"
00618 << "<TD>" << std::setw (5) << std::setprecision (3) << phi << "</TD>"
00619 << "</TR>";
00620 }
00621 }
00622
00623 if ( ! m_EEclusters.empty() )
00624 {
00625 nClusters = 0;
00626
00627 for ( iC = m_EEclusters.begin();
00628 iC != m_EEclusters.end(); ++iC)
00629 {
00630 double energy = (*iC).energy();
00631 double eta = (*iC).position().Eta();
00632 double phi = (*iC).position().Phi();
00633
00634 text << "<TR align = right>"
00635 << "<TD>" << std::setw (3) << nClusters++ << "</TD>"
00636 << "<TD> EE </TD>"
00637 << "<TD>" << std::setw (5) << std::setprecision (3) << energy << "</TD>"
00638 << "<TD>" << std::setw (5) << std::setprecision (3) << eta << "</TD>"
00639 << "<TD>" << std::setw (5) << std::setprecision (3) << phi << "</TD>"
00640 << "</TR>";
00641 }
00642 }
00643 }
00644
00645 catch (cms::Exception& e)
00646 {
00647 if (this->m_onCmsException)
00648 this->m_onCmsException (&e);
00649 }
00650 catch (lat::Error &e)
00651 {
00652 if (this->m_onError)
00653 this->m_onError (&e);
00654 }
00655 catch (std::exception &e)
00656 {
00657 if (this->m_onException)
00658 this->m_onException (&e);
00659 }
00660 catch (...)
00661 {
00662 if (this->m_onUnhandledException)
00663 this->m_onUnhandledException ();
00664 }
00665
00666 text << "</table>";
00667
00668 IgQtLock();
00669 rep->setText(text.str());
00670 }
00671
00672 void VisPFClusterTwig::update(IgRPhiRep *rep)
00673 {
00674 VisQueuedTwig::update(rep);
00675
00676 IgQtLock();
00677 rep->clear();
00678
00679 SoSeparator* sep = new SoSeparator;
00680 SoSeparator* posSep = new SoSeparator;
00681 SoSeparator* negSep = new SoSeparator;
00682 sep->addChild(posSep);
00683 sep->addChild(negSep);
00684
00685 int binNumber;
00686
00687 try
00688 {
00689 if ( ! m_EBclusters.empty() )
00690 {
00691 SoMaterial* posEBmat = new SoMaterial;
00692 posEBmat->ambientColor.setValue(1.0, 0.0, 153.0 / 255.0);
00693 posEBmat->diffuseColor.setValue(1.0, 0.0, 153.0 / 255.0);
00694 posEBmat->specularColor.setValue(1.0, 0.0, 153.0 / 255.0);
00695 posEBmat->emissiveColor.setValue(1.0, 0.0, 153.0 / 255.0);
00696 posSep->addChild(posEBmat);
00697
00698 SoMaterial* negEBmat = new SoMaterial;
00699 negEBmat->ambientColor.setValue(51.0 / 255.0, 1.0, 102.0 / 255.0);
00700 negEBmat->diffuseColor.setValue(51.0 / 255.0, 1.0, 102.0 / 255.0);
00701 negEBmat->specularColor.setValue(51.0 / 255.0, 1.0, 102.0 / 255.0);
00702 negEBmat->emissiveColor.setValue(51.0 / 255.0, 1.0, 102.0 / 255.0);
00703 negSep->addChild(negEBmat);
00704
00705 int nbrOfBins = 360;
00706
00707 std::vector<float> bufferPositive(nbrOfBins);
00708 std::vector<float> bufferNegative(nbrOfBins);
00709
00710 std::vector<reco::PFCluster>::const_iterator iC;
00711
00712 for ( iC = m_EBclusters.begin();
00713 iC != m_EBclusters.end(); ++iC)
00714 {
00715 double energy = (*iC).energy();
00716 double phi = (*iC).position().Phi();
00717 (phi < 0.0) ? phi = 2 * M_PI + phi : phi;
00718
00719 binNumber = (int) floor (phi / (2 * M_PI / nbrOfBins));
00720
00721 (energy >= 0.0) ? bufferPositive[binNumber] += energy : bufferNegative[binNumber] += energy;
00722 }
00723
00724 std::vector<float>::const_iterator first = bufferPositive.begin();
00725 std::vector<float>::const_iterator last = bufferPositive.end();
00726
00727 if ( *max_element(first, last) > 0.0 )
00728 {
00729 IgSoCircularHist* posEBclusters = new IgSoCircularHist;
00730 posEBclusters->minRadius = 1.29;
00731 posEBclusters->maxRadius = -1;
00732 posEBclusters->scaleFactor = 1.0;
00733 posEBclusters->numberOfBins = nbrOfBins;
00734 posEBclusters->energies.setValues(0, nbrOfBins, &bufferPositive[0]);
00735 posEBclusters->logScale = false;
00736 posEBclusters->layer = 5.5;
00737 posSep->addChild(posEBclusters);
00738 }
00739
00740 std::vector<float>::const_iterator nfirst = bufferNegative.begin();
00741 std::vector<float>::const_iterator nlast = bufferNegative.end();
00742
00743 if ( fabs(*max_element(nfirst, nlast)) > 0.0 )
00744 {
00745 IgSoCircularHist* negEBclusters = new IgSoCircularHist;
00746 negEBclusters->minRadius = 1.29;
00747 negEBclusters->maxRadius = -1;
00748 negEBclusters->scaleFactor = 1.0;
00749 negEBclusters->numberOfBins = nbrOfBins;
00750 negEBclusters->energies.setValues(0, nbrOfBins, &bufferNegative[0]);
00751 negEBclusters->logScale = false;
00752 negEBclusters->layer = 5.0;
00753
00754 negSep->addChild(negEBclusters);
00755 }
00756 }
00757
00758
00759
00760
00761
00762
00763
00764
00765
00766
00767
00768
00769
00770
00771
00772
00773
00774
00775
00776
00777
00778
00779
00780
00781
00782
00783
00784
00785
00786
00787
00788
00789
00790
00791
00792
00793
00794
00795
00796
00797
00798
00799
00800
00801
00802
00803
00804
00805
00806
00807
00808
00809
00810
00811
00812
00813
00814
00815
00816
00817
00818
00819
00820
00821
00822
00823
00824
00825
00826
00827
00828
00829 }
00830
00831 catch (cms::Exception& e)
00832 {
00833 if (this->m_onCmsException)
00834 this->m_onCmsException (&e);
00835 }
00836 catch (lat::Error &e)
00837 {
00838 if (this->m_onError)
00839 this->m_onError (&e);
00840 }
00841 catch (std::exception &e)
00842 {
00843 if (this->m_onException)
00844 this->m_onException (&e);
00845 }
00846 catch (...)
00847 {
00848 if (this->m_onUnhandledException)
00849 this->m_onUnhandledException ();
00850 }
00851
00852 rep->node()->addChild(sep);
00853 }
00854
00855 void VisPFClusterTwig::update(IgRZRep *rep)
00856 {
00857 VisQueuedTwig::update(rep);
00858
00859 IgQtLock();
00860 rep->clear();
00861 }
00862
00863