CMS 3D CMS Logo

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 &)
 
 MaterialBudgetHcal (const MaterialBudgetHcal &)=delete
 
const MaterialBudgetHcaloperator= (const MaterialBudgetHcal &)=delete
 
 ~MaterialBudgetHcal () override
 
- 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

bool stopAfter (const G4Step *)
 
void update (const BeginOfJob *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const BeginOfTrack *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const G4Step *) override
 This routine will be called when the appropriate signal arrives. More...
 
void update (const EndOfTrack *) override
 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  : theHistoHcal(nullptr), theHistoCastor(nullptr) {
21  edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("MaterialBudgetHcal");
22  rMax = m_p.getUntrackedParameter<double>("RMax", 4.5) * CLHEP::m;
23  zMax = m_p.getUntrackedParameter<double>("ZMax", 13.0) * CLHEP::m;
24  bool doHcal = m_p.getUntrackedParameter<bool>("DoHCAL", true);
25  edm::LogInfo("MaterialBudget") << "MaterialBudgetHcal initialized with rMax " << rMax << " mm and zMax " << zMax
26  << " mm"
27  << " doHcal is set to " << doHcal;
28  if (doHcal)
30  else
32 }
T getParameter(std::string const &) const
T getUntrackedParameter(std::string const &, T const &) const
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
MaterialBudgetHcal::MaterialBudgetHcal ( const MaterialBudgetHcal )
delete
MaterialBudgetHcal::~MaterialBudgetHcal ( )
override

Definition at line 34 of file MaterialBudgetHcal.cc.

References theHistoCastor, and theHistoHcal.

34  {
35  if (theHistoHcal)
36  delete theHistoHcal;
37  if (theHistoCastor)
38  delete theHistoCastor;
39 }
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal

Member Function Documentation

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

Definition at line 79 of file MaterialBudgetHcal.cc.

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

Referenced by update().

79  {
80  G4ThreeVector hitPoint = aStep->GetPreStepPoint()->GetPosition();
81  double rr = hitPoint.perp();
82  double zz = std::abs(hitPoint.z());
83 
84  if (rr > rMax || zz > zMax) {
85  LogDebug("MaterialBudget") << " MaterialBudgetHcal::StopAfter R = " << rr << " 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 )
overrideprivatevirtual

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 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().

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

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 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().

50  {
51  const G4Track* aTrack = (*trk)(); // recover G4 pointer if wanted
52  if (theHistoHcal)
54  if (theHistoCastor)
56 }
void fillStartTrack(const G4Track *)
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
void MaterialBudgetHcal::update ( const G4Step *  )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 58 of file MaterialBudgetHcal.cc.

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

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().

58  {
59  //---------- each step
60  if (theHistoHcal)
61  theHistoHcal->fillPerStep(aStep);
62  if (theHistoCastor)
64 
65  //----- Stop tracking after selected position
66  if (stopAfter(aStep)) {
67  G4Track* track = aStep->GetTrack();
68  track->SetTrackStatus(fStopAndKill);
69  }
70 }
bool stopAfter(const G4Step *)
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal
void MaterialBudgetHcal::update ( const EndOfTrack )
overrideprivatevirtual

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 72 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().

72  {
73  if (theHistoHcal)
75  if (theHistoCastor)
77 }
MaterialBudgetCastorHistos * theHistoCastor
MaterialBudgetHcalHistos * theHistoHcal

Member Data Documentation

double MaterialBudgetHcal::rMax
private

Definition at line 40 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().

MaterialBudgetCastorHistos* MaterialBudgetHcal::theHistoCastor
private

Definition at line 39 of file MaterialBudgetHcal.h.

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

MaterialBudgetHcalHistos* MaterialBudgetHcal::theHistoHcal
private

Definition at line 38 of file MaterialBudgetHcal.h.

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

double MaterialBudgetHcal::zMax
private

Definition at line 40 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().