CMS 3D CMS Logo

VisMuonEnergyTwig.cc

Go to the documentation of this file.
00001 //<<<<<< INCLUDES                                                       >>>>>>
00002 
00003 #include "VisReco/VisMuon/interface/VisMuonEnergyTwig.h"
00004 #include "FWCore/Framework/interface/Event.h"
00005 #include "FWCore/Framework/interface/EventSetup.h"
00006 #include "Iguana/Models/interface/IgTextRep.h"
00007 #include "Iguana/GLModels/interface/Ig3DRep.h"
00008 #include "Iguana/GLModels/interface/IgLegoRep.h"
00009 #include "Iguana/GLModels/interface/IgRPhiRep.h"
00010 #include "Iguana/GLModels/interface/IgRZRep.h"
00011 #include "Iguana/Framework/interface/IgRepSet.h"
00012 #include "Iguana/Studio/interface/IgQtLock.h"
00013 #include <qstring.h>
00014 #include <sstream>
00015 #include <iomanip>
00016 #include <classlib/utils/Error.h>
00017 
00018 //<<<<<< PRIVATE DEFINES                                                >>>>>>
00019 //<<<<<< PRIVATE CONSTANTS                                              >>>>>>
00020 //<<<<<< PRIVATE TYPES                                                  >>>>>>
00021 //<<<<<< PRIVATE VARIABLE DEFINITIONS                                   >>>>>>
00022 //<<<<<< PUBLIC VARIABLE DEFINITIONS                                    >>>>>>
00023 //<<<<<< CLASS STRUCTURE INITIALIZATION                                 >>>>>>
00024 //<<<<<< PRIVATE FUNCTION DEFINITIONS                                   >>>>>>
00025 //<<<<<< PUBLIC FUNCTION DEFINITIONS                                    >>>>>>
00026 //<<<<<< MEMBER FUNCTION DEFINITIONS                                    >>>>>>
00027 
00028 VisMuonEnergyTwig::VisMuonEnergyTwig (IgState *state, IgTwig *parent,
00029                                       const std::string &name /* = "" */,
00030                                       reco::MuonEnergy energy)
00031     : VisQueuedTwig (state, parent, name),
00032       m_energy (energy)
00033 {
00034 }
00035 
00036 void
00037 VisMuonEnergyTwig::onNewEvent (const edm::Event &event,
00038                                const edm::EventSetup &eventSetup)
00039 {}
00040 
00041 void
00042 VisMuonEnergyTwig::configChanged (void)
00043 { IgRepSet::invalidate (this, SELF_MASK); }
00044 
00045 void
00046 VisMuonEnergyTwig::update (IgTextRep *rep)
00047 {
00048     // Get debugging dump.
00049     VisQueuedTwig::update (rep);
00050 
00051     std::ostringstream text;
00052 
00053     text << setiosflags (std::ios::showpoint | std::ios::fixed);
00054     text.setf (std::ios::right, std::ios::adjustfield);
00055 
00056     text << "Total energy: "  << m_energy.tower << " GeV"
00057          << "\nTotal energy in 3x3 tower shape: " << m_energy.towerS9 << " GeV"
00058          << "\nRecHit based energy (eta-phi size don't match!) "
00059          << "energy deposited in crossed ECAL crystals: " << m_energy.em << " GeV"
00060          << "\nEnergy deposited in 3x3 ECAL crystal shape around crossed crystal: " << m_energy.emS9 << " GeV"
00061          << "\nEnergy deposited in crossed HCAL tower (RecHits): " << m_energy.had << " GeV"
00062          << "\nEnergy deposited in 3x3 HCAL tower shape around crossed tower (RecHits): " << m_energy.hadS9 << " GeV"
00063          << "\nEnergy deposited in crossed HO tower (RecHits): " << m_energy.ho << " GeV"
00064          << "\nEnergy deposited in 3x3 HO tower shape around crossed tower (RecHits): " << m_energy.hoS9 << " GeV";
00065     
00066     IgQtLock ();
00067     rep->setText (text.str ());
00068 }
00069 
00070 void
00071 VisMuonEnergyTwig::update (IgLegoRep *rep)
00072 {
00073     // Get debugging dump.
00074     VisQueuedTwig::update (rep);
00075 }
00076 
00077 void
00078 VisMuonEnergyTwig::update (Ig3DRep *rep)
00079 {
00080     // Get debugging dump.
00081     VisQueuedTwig::update (rep);
00082 
00083     IgQtLock ();
00084     rep->clear ();
00085     
00086 }
00087 
00088 void
00089 VisMuonEnergyTwig::update (IgRPhiRep *rep)
00090 {
00091     // Get debugging dump.
00092     VisQueuedTwig::update (rep);
00093 
00094     IgQtLock ();
00095     rep->clear ();
00096 
00097 }
00098 
00099 void
00100 VisMuonEnergyTwig::update (IgRZRep *rep)
00101 {
00102     // Get debugging dump.
00103     VisQueuedTwig::update (rep);
00104 
00105     IgQtLock ();
00106     rep->clear ();
00107     
00108 }

Generated on Tue Jun 9 17:50:19 2009 for CMSSW by  doxygen 1.5.4