CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
MaterialBudgetHcal Class Reference

#include <MaterialBudgetHcal.h>

Inheritance diagram for MaterialBudgetHcal:
SimWatcher Observer< const BeginOfJob * > Observer< const BeginOfTrack * > Observer< const G4Step * > Observer< const EndOfTrack * >

Public Member Functions

 MaterialBudgetHcal (const edm::ParameterSet &)
 
virtual ~MaterialBudgetHcal ()
 
- Public Member Functions inherited from SimWatcher
 SimWatcher ()
 
virtual ~SimWatcher ()
 
- Public Member Functions inherited from Observer< const BeginOfJob * >
 Observer ()
 
void slotForUpdate (const BeginOfJob *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const BeginOfTrack * >
 Observer ()
 
void slotForUpdate (const BeginOfTrack *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const G4Step * >
 Observer ()
 
void slotForUpdate (const G4Step *iT)
 
virtual ~Observer ()
 
- Public Member Functions inherited from Observer< const EndOfTrack * >
 Observer ()
 
void slotForUpdate (const EndOfTrack *iT)
 
virtual ~Observer ()
 

Private Member Functions

 MaterialBudgetHcal (const MaterialBudgetHcal &)
 
const MaterialBudgetHcaloperator= (const MaterialBudgetHcal &)
 
bool stopAfter (const G4Step *)
 
void update (const BeginOfJob *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *)
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *)
 This routine will be called when the appropriate signal arrives. More...
 

Private Attributes

double rMax
 
MaterialBudgetCastorHistostheHistoCastor
 
MaterialBudgetHcalHistostheHistoHcal
 
double zMax
 

Additional Inherited Members

Detailed Description

Definition at line 18 of file MaterialBudgetHcal.h.

Constructor & Destructor Documentation

MaterialBudgetHcal::MaterialBudgetHcal ( const edm::ParameterSet p)

Definition at line 20 of file MaterialBudgetHcal.cc.

References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), visualization-live-secondInstance_cfg::m, rMax, theHistoCastor, theHistoHcal, and zMax.

20  :
22 
23  edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("MaterialBudgetHcal");
24  rMax = m_p.getUntrackedParameter<double>("RMax", 4.5)*CLHEP::m;
25  zMax = m_p.getUntrackedParameter<double>("ZMax", 13.0)*CLHEP::m;
26  bool doHcal = m_p.getUntrackedParameter<bool>("DoHCAL", true);
27  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcal initialized with rMax "
28  << rMax << " mm and zMax " << zMax << " mm"
29  << " doHcal is set to " << doHcal;
30  if (doHcal) theHistoHcal = new MaterialBudgetHcalHistos(m_p);
32 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
MaterialBudgetHcal::~MaterialBudgetHcal ( )
virtual

Definition at line 34 of file MaterialBudgetHcal.cc.

References theHistoCastor, and theHistoHcal.

34  {
35  if (theHistoHcal) delete theHistoHcal;
36  if (theHistoCastor) delete theHistoCastor;
37 }
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
MaterialBudgetHcal::MaterialBudgetHcal ( const MaterialBudgetHcal )
private

Member Function Documentation

const MaterialBudgetHcal& MaterialBudgetHcal::operator= ( const MaterialBudgetHcal )
private
bool MaterialBudgetHcal::stopAfter ( const G4Step *  aStep)
private

Definition at line 75 of file MaterialBudgetHcal.cc.

References funct::abs(), LogDebug, rMax, findQualityFiles::rr, and zMax.

Referenced by update().

75  {
76 
77  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
78  double rr = hitPoint.perp();
79  double zz = std::abs(hitPoint.z());
80 
81  if (rr > rMax || zz > zMax) {
82  LogDebug("MaterialBudget") << " MaterialBudgetHcal::StopAfter R = " << rr
83  << " and Z = " << zz;
84  return true;
85  } else {
86  return false;
87  }
88 }
#define LogDebug(id)
Abs< T >::type abs(const T &t)
Definition: Abs.h:22
void MaterialBudgetHcal::update ( const BeginOfJob )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 39 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillBeginJob(), and theHistoHcal.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

39  {
40  //----- Check that selected volumes are indeed part of the geometry
41  // Numbering From DDD
43  (*job)()->get<IdealGeometryRecord>().get(pDD);
45 
46 }
void fillBeginJob(const DDCompactView &)
MaterialBudgetHcalHistos * theHistoHcal
void MaterialBudgetHcal::update ( const BeginOfTrack )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 48 of file MaterialBudgetHcal.cc.

References MaterialBudgetCastorHistos::fillStartTrack(), MaterialBudgetHcalHistos::fillStartTrack(), theHistoCastor, and theHistoHcal.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

48  {
49 
50  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
53 }
void fillStartTrack(const G4Track *)
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
void MaterialBudgetHcal::update ( const G4Step *  )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 55 of file MaterialBudgetHcal.cc.

References MaterialBudgetCastorHistos::fillPerStep(), MaterialBudgetHcalHistos::fillPerStep(), stopAfter(), theHistoCastor, and theHistoHcal.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

55  {
56 
57  //---------- each step
60 
61  //----- Stop tracking after selected position
62  if (stopAfter(aStep)) {
63  G4Track* track = aStep->GetTrack();
64  track->SetTrackStatus( fStopAndKill );
65  }
66 }
bool stopAfter(const G4Step *)
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
void MaterialBudgetHcal::update ( const EndOfTrack )
privatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 69 of file MaterialBudgetHcal.cc.

References MaterialBudgetCastorHistos::fillEndTrack(), MaterialBudgetHcalHistos::fillEndTrack(), theHistoCastor, and theHistoHcal.

Referenced by MatrixUtil.Matrix::__setitem__(), MatrixUtil.Steps::__setitem__(), Vispa.Gui.VispaWidget.VispaWidget::autosize(), Vispa.Views.LineDecayView.LineDecayContainer::createObject(), Vispa.Views.LineDecayView.LineDecayContainer::deselectAllObjects(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::deselectAllWidgets(), Vispa.Gui.VispaWidget.VispaWidget::enableAutosizing(), Vispa.Gui.MenuWidget.MenuWidget::leaveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseMoveEvent(), Vispa.Gui.MenuWidget.MenuWidget::mouseMoveEvent(), Vispa.Views.LineDecayView.LineDecayContainer::mouseMoveEvent(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner::mouseReleaseEvent(), Vispa.Views.LineDecayView.LineDecayContainer::objectMoved(), MatrixUtil.Steps::overwrite(), Vispa.Views.LineDecayView.LineDecayContainer::removeObject(), Vispa.Gui.ConnectableWidget.ConnectableWidget::removePorts(), Vispa.Gui.FindDialog.FindDialog::reset(), Vispa.Gui.PortConnection.PointToPointConnection::select(), Vispa.Gui.VispaWidget.VispaWidget::select(), Vispa.Views.LineDecayView.LineDecayContainer::select(), Vispa.Gui.VispaWidget.VispaWidget::setText(), Vispa.Gui.VispaWidget.VispaWidget::setTitle(), Vispa.Gui.ZoomableWidget.ZoomableWidget::setZoom(), Vispa.Views.LineDecayView.LineDecayContainer::setZoom(), and Vispa.Gui.PortConnection.PointToPointConnection::updateConnection().

69  {
70 
73 }
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal

Member Data Documentation

double MaterialBudgetHcal::rMax
private

Definition at line 43 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().

MaterialBudgetCastorHistos* MaterialBudgetHcal::theHistoCastor
private

Definition at line 42 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), update(), and ~MaterialBudgetHcal().

MaterialBudgetHcalHistos* MaterialBudgetHcal::theHistoHcal
private

Definition at line 41 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), update(), and ~MaterialBudgetHcal().

double MaterialBudgetHcal::zMax
private

Definition at line 43 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().