LArSoft  v09_90_00
Liquid Argon Software toolkit - https://larsoft.org/
artg4tk::KillerActionService Class Reference

#include "KillerAction_service.hh"

Inheritance diagram for artg4tk::KillerActionService:
artg4tk::StackingActionBase artg4tk::ActionBase

Public Member Functions

 KillerActionService (fhicl::ParameterSet const &)
 
virtual ~KillerActionService ()
 
bool killNewTrack (const G4Track *aTrack) override
 
std::string const & myName () const
 
virtual void initialize ()
 

Private Attributes

bool killPi0
 
bool killeta
 
bool killGammafromnCapture
 
mf::LogInfo logInfo_
 

Detailed Description

Definition at line 45 of file KillerAction_service.hh.

Constructor & Destructor Documentation

artg4tk::KillerActionService::KillerActionService ( fhicl::ParameterSet const &  p)

Definition at line 39 of file KillerAction.cc.

40  : StackingActionBase(p.get<string>("name", "myKillerAction"))
41  , killPi0(p.get<bool>("killPi0"))
42  , killeta(p.get<bool>("killeta"))
43  , killGammafromnCapture(p.get<bool>("killGammafromnCapture"))
44  , logInfo_("KillerAction")
45 {
46  // Register ourselves with the ActionHolder
47  // art::ServiceHandle<ActionHolderService> actionHolder;
48 }
StackingActionBase(std::string name)
artg4tk::KillerActionService::~KillerActionService ( )
virtual

Definition at line 76 of file KillerAction.cc.

76 {}

Member Function Documentation

virtual void artg4tk::ActionBase::initialize ( )
inlinevirtualinherited

Reimplemented in artg4tk::myParticleGunActionService, and artg4tk::HepevtInputActionService.

Definition at line 36 of file ActionBase.hh.

37  {}
bool artg4tk::KillerActionService::killNewTrack ( const G4Track *  aTrack)
overridevirtual

Reimplemented from artg4tk::StackingActionBase.

Definition at line 51 of file KillerAction.cc.

References killeta, killGammafromnCapture, and killPi0.

52 {
53  if (aTrack->GetParentID() == 0)
54  return false;
55  if (aTrack->GetDefinition()->GetParticleName() == "pi0") {
56  if (killPi0) {
57  return true;
58  }
59  }
60  if (aTrack->GetDefinition()->GetParticleName() == "eta") {
61  if (killeta) {
62  return true;
63  }
64  }
65  if (aTrack->GetDefinition()->GetParticleName() == "gamma") {
66  if (aTrack->GetCreatorProcess()->GetProcessName() == "nCapture") {
68  return true;
69  }
70  }
71  }
72  return false;
73 }
std::string const& artg4tk::ActionBase::myName ( ) const
inlineinherited

Definition at line 25 of file ActionBase.hh.

References artg4tk::ActionBase::myName_.

26  {
27  return myName_;
28  }
std::string myName_
Definition: ActionBase.hh:41

Member Data Documentation

bool artg4tk::KillerActionService::killeta
private

Definition at line 54 of file KillerAction_service.hh.

Referenced by killNewTrack().

bool artg4tk::KillerActionService::killGammafromnCapture
private

Definition at line 55 of file KillerAction_service.hh.

Referenced by killNewTrack().

bool artg4tk::KillerActionService::killPi0
private

Definition at line 53 of file KillerAction_service.hh.

Referenced by killNewTrack().

mf::LogInfo artg4tk::KillerActionService::logInfo_
private

Definition at line 57 of file KillerAction_service.hh.


The documentation for this class was generated from the following files: