#include <MaterialBudgetHcal.h>
Public Member Functions | |
MaterialBudgetHcal (const edm::ParameterSet &) | |
virtual | ~MaterialBudgetHcal () |
Private Member Functions | |
MaterialBudgetHcal (const MaterialBudgetHcal &) | |
const MaterialBudgetHcal & | operator= (const MaterialBudgetHcal &) |
bool | stopAfter (const G4Step *) |
void | update (const G4Step *) |
This routine will be called when the appropriate signal arrives. | |
void | update (const BeginOfTrack *) |
This routine will be called when the appropriate signal arrives. | |
void | update (const EndOfTrack *) |
This routine will be called when the appropriate signal arrives. | |
void | update (const BeginOfJob *) |
This routine will be called when the appropriate signal arrives. | |
Private Attributes | |
double | rMax |
MaterialBudgetCastorHistos * | theHistoCastor |
MaterialBudgetHcalHistos * | theHistoHcal |
double | zMax |
Definition at line 18 of file MaterialBudgetHcal.h.
MaterialBudgetHcal::MaterialBudgetHcal | ( | const edm::ParameterSet & | p | ) |
Definition at line 20 of file MaterialBudgetHcal.cc.
References edm::ParameterSet::getParameter(), edm::ParameterSet::getUntrackedParameter(), m, rMax, theHistoCastor, theHistoHcal, and zMax.
: theHistoHcal(0), theHistoCastor(0) { edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("MaterialBudgetHcal"); rMax = m_p.getUntrackedParameter<double>("RMax", 4.5)*m; zMax = m_p.getUntrackedParameter<double>("ZMax", 13.0)*m; bool doHcal = m_p.getUntrackedParameter<bool>("DoHCAL", true); edm::LogInfo("MaterialBudget") << "MaterialBudgetHcal initialized with rMax " << rMax << " mm and zMax " << zMax << " mm" << " doHcal is set to " << doHcal; if (doHcal) theHistoHcal = new MaterialBudgetHcalHistos(m_p); else theHistoCastor = new MaterialBudgetCastorHistos(m_p); }
MaterialBudgetHcal::~MaterialBudgetHcal | ( | ) | [virtual] |
Definition at line 34 of file MaterialBudgetHcal.cc.
References theHistoCastor, and theHistoHcal.
{ if (theHistoHcal) delete theHistoHcal; if (theHistoCastor) delete theHistoCastor; }
MaterialBudgetHcal::MaterialBudgetHcal | ( | const MaterialBudgetHcal & | ) | [private] |
const MaterialBudgetHcal& MaterialBudgetHcal::operator= | ( | const MaterialBudgetHcal & | ) | [private] |
bool MaterialBudgetHcal::stopAfter | ( | const G4Step * | aStep | ) | [private] |
void MaterialBudgetHcal::update | ( | const EndOfTrack * | ) | [private, virtual] |
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.
{ if (theHistoHcal) theHistoHcal->fillEndTrack(); if (theHistoCastor) theHistoCastor->fillEndTrack(); }
void MaterialBudgetHcal::update | ( | const G4Step * | ) | [private, virtual] |
This routine will be called when the appropriate signal arrives.
Implements Observer< const G4Step * >.
Definition at line 55 of file MaterialBudgetHcal.cc.
References MaterialBudgetHcalHistos::fillPerStep(), MaterialBudgetCastorHistos::fillPerStep(), stopAfter(), theHistoCastor, and theHistoHcal.
{ //---------- each step if (theHistoHcal) theHistoHcal->fillPerStep(aStep); if (theHistoCastor) theHistoCastor->fillPerStep(aStep); //----- Stop tracking after selected position if (stopAfter(aStep)) { G4Track* track = aStep->GetTrack(); track->SetTrackStatus( fStopAndKill ); } }
void MaterialBudgetHcal::update | ( | const BeginOfTrack * | ) | [private, virtual] |
This routine will be called when the appropriate signal arrives.
Implements Observer< const BeginOfTrack * >.
Definition at line 48 of file MaterialBudgetHcal.cc.
References MaterialBudgetHcalHistos::fillStartTrack(), MaterialBudgetCastorHistos::fillStartTrack(), theHistoCastor, and theHistoHcal.
{ const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted if (theHistoHcal) theHistoHcal->fillStartTrack(aTrack); if (theHistoCastor) theHistoCastor->fillStartTrack(aTrack); }
void MaterialBudgetHcal::update | ( | const BeginOfJob * | ) | [private, virtual] |
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.
{ //----- Check that selected volumes are indeed part of the geometry // Numbering From DDD edm::ESTransientHandle<DDCompactView> pDD; (*job)()->get<IdealGeometryRecord>().get(pDD); if (theHistoHcal) theHistoHcal->fillBeginJob((*pDD)); }
double MaterialBudgetHcal::rMax [private] |
Definition at line 43 of file MaterialBudgetHcal.h.
Referenced by MaterialBudgetHcal(), and stopAfter().
Definition at line 42 of file MaterialBudgetHcal.h.
Referenced by MaterialBudgetHcal(), update(), and ~MaterialBudgetHcal().
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().