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 22 of file MaterialBudgetHcal.cc.

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

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

Definition at line 36 of file MaterialBudgetHcal.cc.

References theHistoCastor, and theHistoHcal.

36  {
37  if (theHistoHcal) delete theHistoHcal;
38  if (theHistoCastor) delete theHistoCastor;
39 }
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 77 of file MaterialBudgetHcal.cc.

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

Referenced by update().

77  {
78 
79  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
80  double rr = hitPoint.perp();
81  double zz = std::abs(hitPoint.z());
82 
83  if (rr > rMax || zz > zMax) {
84  LogDebug("MaterialBudget") << " MaterialBudgetHcal::StopAfter R = " << rr
85  << " and Z = " << zz;
86  return true;
87  } else {
88  return false;
89  }
90 }
#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 41 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillBeginJob(), and theHistoHcal.

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

41  {
42  //----- Check that selected volumes are indeed part of the geometry
43  // Numbering From DDD
45  (*job)()->get<IdealGeometryRecord>().get(pDD);
47 
48 }
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 50 of file MaterialBudgetHcal.cc.

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

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

50  {
51 
52  const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
55 }
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 57 of file MaterialBudgetHcal.cc.

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

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

57  {
58 
59  //---------- each step
62 
63  //----- Stop tracking after selected position
64  if (stopAfter(aStep)) {
65  G4Track* track = aStep->GetTrack();
66  track->SetTrackStatus( fStopAndKill );
67  }
68 }
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 71 of file MaterialBudgetHcal.cc.

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

Referenced by relval_steps.Matrix::__setitem__(), relval_steps.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(), relval_steps.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().

71  {
72 
75 }
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().