CMS 3D CMS Logo

MaterialBudgetHcal Class Reference

#include <Validation/Geometry/interface/MaterialBudgetHcal.h>

Inheritance diagram for MaterialBudgetHcal:

SimWatcher Observer< const BeginOfJob * > Observer< const BeginOfTrack * > Observer< const G4Step * > Observer< const EndOfTrack * >

List of all members.

Public Member Functions

 MaterialBudgetHcal (const edm::ParameterSet &)
virtual ~MaterialBudgetHcal ()

Private Member Functions

 MaterialBudgetHcal (const MaterialBudgetHcal &)
const MaterialBudgetHcaloperator= (const MaterialBudgetHcal &)
bool stopAfter (const G4Step *)
void update (const EndOfTrack *)
 This routine will be called when the appropriate signal arrives.
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 BeginOfJob *)
 This routine will be called when the appropriate signal arrives.

Private Attributes

double rMax
MaterialBudgetHcalHistostheHistos
double zMax


Detailed Description

Definition at line 17 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(), m, rMax, theHistos, and zMax.

00020                                                                {
00021   
00022   edm::ParameterSet m_p = p.getParameter<edm::ParameterSet>("MaterialBudgetHcal");
00023   rMax = m_p.getUntrackedParameter<double>("RMax", 4.5)*m;
00024   zMax = m_p.getUntrackedParameter<double>("ZMax", 13.0)*m;
00025   edm::LogInfo("MaterialBudget") << "MaterialBudgetHcal initialized with rMax "
00026                                  << rMax << " mm and zMax " << zMax << " mm";
00027   theHistos   = new MaterialBudgetHcalHistos(m_p);
00028 
00029 }

MaterialBudgetHcal::~MaterialBudgetHcal (  )  [virtual]

Definition at line 31 of file MaterialBudgetHcal.cc.

References theHistos.

00031                                         {
00032   delete theHistos;
00033 }

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

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

Referenced by update().

00069                                                       {
00070 
00071   G4ThreeVector hitPoint    = aStep->GetPreStepPoint()->GetPosition();
00072   double        rr = hitPoint.perp();
00073   double        zz = std::abs(hitPoint.z());
00074 
00075   if (rr > rMax || zz > zMax) {
00076     LogDebug("MaterialBudget") << " MaterialBudgetHcal::StopAfter R = " << rr
00077                                << " and Z = " << zz;
00078     return true;
00079   } else {
00080     return false;
00081   }
00082 }

void MaterialBudgetHcal::update ( const EndOfTrack  )  [private, virtual]

This routine will be called when the appropriate signal arrives.

Implements Observer< const EndOfTrack * >.

Definition at line 64 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillEndTrack(), and theHistos.

00064                                                      {
00065 
00066   theHistos->fillEndTrack();
00067 }

void MaterialBudgetHcal::update ( const G4Step *   )  [private, virtual]

This routine will be called when the appropriate signal arrives.

Implements Observer< const G4Step * >.

Definition at line 51 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillPerStep(), stopAfter(), theHistos, and track.

00051                                                    {
00052 
00053   //---------- each step
00054   theHistos->fillPerStep(aStep);
00055 
00056   //----- Stop tracking after selected position
00057   if (stopAfter(aStep)) {
00058     G4Track* track = aStep->GetTrack();
00059     track->SetTrackStatus( fStopAndKill );
00060   }
00061 }

void MaterialBudgetHcal::update ( const BeginOfTrack  )  [private, virtual]

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfTrack * >.

Definition at line 45 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillStartTrack(), and theHistos.

00045                                                        {
00046 
00047   const G4Track * aTrack = (*trk)(); // recover G4 pointer if wanted
00048   theHistos->fillStartTrack(aTrack);
00049 }

void MaterialBudgetHcal::update ( const BeginOfJob  )  [private, virtual]

This routine will be called when the appropriate signal arrives.

Implements Observer< const BeginOfJob * >.

Definition at line 35 of file MaterialBudgetHcal.cc.

References MaterialBudgetHcalHistos::fillBeginJob(), and theHistos.

00036 {
00037   //----- Check that selected volumes are indeed part of the geometry
00038   // Numbering From DDD
00039   edm::ESHandle<DDCompactView> pDD;
00040   (*job)()->get<IdealGeometryRecord>().get(pDD);
00041   theHistos->fillBeginJob((*pDD));
00042 
00043 }


Member Data Documentation

double MaterialBudgetHcal::rMax [private]

Definition at line 41 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().

MaterialBudgetHcalHistos* MaterialBudgetHcal::theHistos [private]

Definition at line 40 of file MaterialBudgetHcal.h.

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

double MaterialBudgetHcal::zMax [private]

Definition at line 41 of file MaterialBudgetHcal.h.

Referenced by MaterialBudgetHcal(), and stopAfter().


The documentation for this class was generated from the following files:
Generated on Tue Jun 9 18:28:03 2009 for CMSSW by  doxygen 1.5.4