From 277033569eed4e4ff53e2ebc6f4592042df9aac0 Mon Sep 17 00:00:00 2001 From: ivana Date: Tue, 21 Aug 2001 19:45:06 +0000 Subject: [PATCH] Initial version --- TGeant4/TG4ProcessControlMap.cxx | 176 +++++++++++++++++++++ TGeant4/TG4ProcessControlMap.h | 70 ++++++++ TGeant4/TG4ProcessMCMap.cxx | 171 ++++++++++++++++++++ TGeant4/TG4ProcessMCMap.h | 71 +++++++++ TGeant4/TG4SpecialCutsForChargedHadron.cxx | 42 +++++ TGeant4/TG4SpecialCutsForChargedHadron.h | 40 +++++ TGeant4/TG4SpecialCutsForElectron.cxx | 42 +++++ TGeant4/TG4SpecialCutsForElectron.h | 40 +++++ TGeant4/TG4SpecialCutsForEplus.cxx | 41 +++++ TGeant4/TG4SpecialCutsForEplus.h | 39 +++++ TGeant4/TG4SpecialCutsForGamma.cxx | 37 +++++ TGeant4/TG4SpecialCutsForGamma.h | 39 +++++ TGeant4/TG4SpecialCutsForMuon.cxx | 41 +++++ TGeant4/TG4SpecialCutsForMuon.h | 39 +++++ TGeant4/TG4SpecialCutsForNeutralHadron.cxx | 42 +++++ TGeant4/TG4SpecialCutsForNeutralHadron.h | 40 +++++ TGeant4/TG4SpecialCutsForOther.cxx | 41 +++++ TGeant4/TG4SpecialCutsForOther.h | 39 +++++ 18 files changed, 1050 insertions(+) create mode 100644 TGeant4/TG4ProcessControlMap.cxx create mode 100644 TGeant4/TG4ProcessControlMap.h create mode 100644 TGeant4/TG4ProcessMCMap.cxx create mode 100644 TGeant4/TG4ProcessMCMap.h create mode 100644 TGeant4/TG4SpecialCutsForChargedHadron.cxx create mode 100644 TGeant4/TG4SpecialCutsForChargedHadron.h create mode 100644 TGeant4/TG4SpecialCutsForElectron.cxx create mode 100644 TGeant4/TG4SpecialCutsForElectron.h create mode 100644 TGeant4/TG4SpecialCutsForEplus.cxx create mode 100644 TGeant4/TG4SpecialCutsForEplus.h create mode 100644 TGeant4/TG4SpecialCutsForGamma.cxx create mode 100644 TGeant4/TG4SpecialCutsForGamma.h create mode 100644 TGeant4/TG4SpecialCutsForMuon.cxx create mode 100644 TGeant4/TG4SpecialCutsForMuon.h create mode 100644 TGeant4/TG4SpecialCutsForNeutralHadron.cxx create mode 100644 TGeant4/TG4SpecialCutsForNeutralHadron.h create mode 100644 TGeant4/TG4SpecialCutsForOther.cxx create mode 100644 TGeant4/TG4SpecialCutsForOther.h diff --git a/TGeant4/TG4ProcessControlMap.cxx b/TGeant4/TG4ProcessControlMap.cxx new file mode 100644 index 00000000000..2cdc0ceb1f7 --- /dev/null +++ b/TGeant4/TG4ProcessControlMap.cxx @@ -0,0 +1,176 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4ProcessControlMap +// -------------------------- +// See the class description in the header file. + +#include "TG4ProcessControlMap.h" +#include "TG4G3ControlVector.h" +#include "TG4Globals.h" + +#include +#include "g4std/iomanip" +#include "globals.hh" + +TG4ProcessControlMap* TG4ProcessControlMap::fgInstance = 0; + +//_____________________________________________________________________________ +TG4ProcessControlMap::TG4ProcessControlMap() { +// + if (fgInstance) { + TG4Globals::Exception( + "TG4ProcessControlMap: attempt to create two instances of singleton."); + } + + fgInstance = this; +} + +//_____________________________________________________________________________ +TG4ProcessControlMap::TG4ProcessControlMap(const TG4ProcessControlMap& right) { +// + TG4Globals::Exception( + "Attempt to copy TG4ProcessControlMap singleton."); +} + +//_____________________________________________________________________________ +TG4ProcessControlMap::~TG4ProcessControlMap() { +// +} + +// operators + +//_____________________________________________________________________________ +TG4ProcessControlMap& TG4ProcessControlMap::operator=(const TG4ProcessControlMap& right) +{ + // check assignement to self + if (this == &right) return *this; + + TG4Globals::Exception( + "Attempt to assign TG4ProcessControlMap singleton."); + + return *this; +} + +// private methods + +//_____________________________________________________________________________ +G4bool TG4ProcessControlMap::IsDefined(const G4String& processName) +{ +// Returns true if the first is already in the map. +// --- + + if (fMap.find(processName) == fMap.end()) + return false; + else + return true; +} + +// public methods + +//_____________________________________________________________________________ +G4bool TG4ProcessControlMap::Add(G4VProcess* process, TG4G3Control control) +{ +// Adds the pair to the map. +// --- + + if (!process) return false; + + return Add(process->GetProcessName(), control); +} + +//_____________________________________________________________________________ +G4bool TG4ProcessControlMap::Add(G4String processName, TG4G3Control control) +{ +// Adds the pair to the map. +// --- + + if (!IsDefined(processName)) { + // insert into map + // only in case it is not yet here + fMap[processName] = control; + return true; + } + return false; +} + +//_____________________________________________________________________________ +void TG4ProcessControlMap::PrintAll() const +{ +// Dumps all map. +// --- + + if (fMap.size()) { + G4cout << "Dump of TG4ProcessControlMap - " << fMap.size() << " entries:" << G4endl; + G4int counter = 0; + for (MapConstIterator i=fMap.begin(); i != fMap.end(); i++) { + G4String processName = (*i).first; + TG4G3Control control = (*i).second; + G4cout << "Map element " << G4std::setw(3) << counter++ << " " + << processName << " " + << TG4G3ControlVector::GetControlName(control) + << G4endl; + } + } +} + +//_____________________________________________________________________________ +void TG4ProcessControlMap::Clear() +{ +// Clears the map. +// --- + + fMap.clear(); +} + +//_____________________________________________________________________________ +TG4G3Control +TG4ProcessControlMap::GetControl(const G4VProcess* process) +{ +// Returns the G3 process control for the process with a given name. +// --- + + if (!process) return kNoG3Controls; + + return GetControl(process->GetProcessName()); +} + +//_____________________________________________________________________________ +TG4G3Control +TG4ProcessControlMap::GetControl(const G4String& processName) +{ +// Returns the G3 process control for the process with a given name. +// --- + + MapIterator i = fMap.find(processName); + if (i == fMap.end()) + return kNoG3Controls; + else + return (*i).second; +} + +//_____________________________________________________________________________ +const G4String& +TG4ProcessControlMap::GetControlName(const G4VProcess* process) +{ +// Returns the G3 process control name for the process with a given name. +// --- + + if (!process) + return TG4G3ControlVector::GetControlName(kNoG3Controls); + + return GetControlName(process->GetProcessName()); +} + +//_____________________________________________________________________________ +const G4String& +TG4ProcessControlMap::GetControlName(const G4String& processName) +{ +// Returns the G3 process control name for the process with a given name. +// --- + + return TG4G3ControlVector::GetControlName(GetControl(processName)); +} + diff --git a/TGeant4/TG4ProcessControlMap.h b/TGeant4/TG4ProcessControlMap.h new file mode 100644 index 00000000000..c012113e5e4 --- /dev/null +++ b/TGeant4/TG4ProcessControlMap.h @@ -0,0 +1,70 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4ProcessControlMap +// -------------------------- +// Singleton map container for associated pairs +// G4 process name and TG4G3Control. + +#ifndef TG4_PROCESS_CONTROL_MAP_H +#define TG4_PROCESS_CONTROL_MAP_H + +#include +#include + +#include "TG4G3Control.h" + +class G4VProcess; + +class TG4ProcessControlMap +{ + typedef G4std::map > Map; + typedef Map::iterator MapIterator; + typedef Map::const_iterator MapConstIterator; + + public: + TG4ProcessControlMap(); + // --> protected + // TG4ProcessControlMap(const TG4ProcessControlMap& right); + virtual ~TG4ProcessControlMap(); + + // static access method + static TG4ProcessControlMap* Instance(); + + // methods + G4bool Add(G4VProcess* process, TG4G3Control second); + G4bool Add(G4String processName, TG4G3Control second); + void PrintAll() const; + void Clear(); + + // get methods + TG4G3Control GetControl(const G4VProcess* process); + TG4G3Control GetControl(const G4String& processName); + const G4String& GetControlName(const G4VProcess* process); + const G4String& GetControlName(const G4String& processName); + + protected: + TG4ProcessControlMap(const TG4ProcessControlMap& right); + + // operators + TG4ProcessControlMap& operator=(const TG4ProcessControlMap& right); + + private: + // methods + G4bool IsDefined(const G4String& processName); + + // static data members + static TG4ProcessControlMap* fgInstance; //this instance + + // data members + Map fMap; //map container +}; + +// inline methods + +inline TG4ProcessControlMap* TG4ProcessControlMap::Instance() +{ return fgInstance; } + +#endif //TG4_PROCESS_CONTROL_MAP_H diff --git a/TGeant4/TG4ProcessMCMap.cxx b/TGeant4/TG4ProcessMCMap.cxx new file mode 100644 index 00000000000..1171828b120 --- /dev/null +++ b/TGeant4/TG4ProcessMCMap.cxx @@ -0,0 +1,171 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4ProcessMCMap +// --------------------- +// See the class description in the header file. + +#include "TG4ProcessMCMap.h" +#include "TG4G3PhysicsManager.h" +#include "TG4Globals.h" + +#include +#include "g4std/iomanip" +#include "globals.hh" + +TG4ProcessMCMap* TG4ProcessMCMap::fgInstance = 0; + +//_____________________________________________________________________________ +TG4ProcessMCMap::TG4ProcessMCMap() { +// + if (fgInstance) { + TG4Globals::Exception( + "TG4ProcessMCMap: attempt to create two instances of singleton."); + } + + fgInstance = this; +} + +//_____________________________________________________________________________ +TG4ProcessMCMap::TG4ProcessMCMap(const TG4ProcessMCMap& right) { +// + TG4Globals::Exception( + "Attempt to copy TG4ProcessMCMap singleton."); +} + +//_____________________________________________________________________________ +TG4ProcessMCMap::~TG4ProcessMCMap() { +// +} + +// operators + +//_____________________________________________________________________________ +TG4ProcessMCMap& TG4ProcessMCMap::operator=(const TG4ProcessMCMap& right) +{ + // check assignement to self + if (this == &right) return *this; + + TG4Globals::Exception( + "Attempt to assign TG4ProcessMCMap singleton."); + + return *this; +} + +// private methods + +//_____________________________________________________________________________ +G4bool TG4ProcessMCMap::IsDefined(const G4String& processName) +{ +// Returns true if the first is already in the map. +// --- + + if (fMap.find(processName) == fMap.end()) + return false; + else + return true; +} + +// public methods + +//_____________________________________________________________________________ +G4bool TG4ProcessMCMap::Add(G4VProcess* process, AliMCProcess mcProcess) +{ +// Adds the pair to the map. +// --- + + if (!process) return false; + + return Add(process->GetProcessName(), mcProcess); +} + +//_____________________________________________________________________________ +G4bool TG4ProcessMCMap::Add(G4String processName, AliMCProcess mcProcess) +{ +// Adds the pair to the map. +// --- + + if (!IsDefined(processName)) { + // insert into map + // only in case it is not yet here + fMap[processName] = mcProcess; + return true; + } + return false; +} + +//_____________________________________________________________________________ +void TG4ProcessMCMap::PrintAll() const +{ +// Dumps all map. +// --- + + if (fMap.size()) { + G4cout << "Dump of TG4ProcessMCMap - " << fMap.size() << " entries:" << G4endl; + G4int counter = 0; + for (MapConstIterator i=fMap.begin(); i != fMap.end(); i++) { + G4String processName = (*i).first; + AliMCProcess mcProcess = (*i).second; + G4cout << "Map element " << G4std::setw(3) << counter++ << " " + << processName << " " + << AliMCProcessName[mcProcess] + << G4endl; + } + } +} + +//_____________________________________________________________________________ +void TG4ProcessMCMap::Clear() +{ +// Clears the map. +// --- + + fMap.clear(); +} + +//_____________________________________________________________________________ +AliMCProcess TG4ProcessMCMap::GetMCProcess(const G4VProcess* process) +{ +// Returns AliMCProcess code for the process with a given name. +// --- + + if (!process) return kPNoProcess; + + return GetMCProcess(process->GetProcessName()); +} + +//_____________________________________________________________________________ +AliMCProcess TG4ProcessMCMap::GetMCProcess(const G4String& processName) +{ +// Returns AliMCProcess code for the process with a given name. +// --- + + MapIterator i = fMap.find(processName); + if (i == fMap.end()) + return kPNoProcess; + else + return (*i).second; +} + +//_____________________________________________________________________________ +G4String TG4ProcessMCMap::GetMCProcessName(const G4VProcess* process) +{ +// Returns AliMCProcess code for the process with a given name. +// --- + + if (!process) return AliMCProcessName[kPNoProcess]; + + return GetMCProcessName(process->GetProcessName()); +} + +//_____________________________________________________________________________ +G4String TG4ProcessMCMap::GetMCProcessName(const G4String& processName) +{ +// Returns AliMCProcess code for the process with a given name. +// --- + + return AliMCProcessName[GetMCProcess(processName)]; +} + diff --git a/TGeant4/TG4ProcessMCMap.h b/TGeant4/TG4ProcessMCMap.h new file mode 100644 index 00000000000..b49ef0a0703 --- /dev/null +++ b/TGeant4/TG4ProcessMCMap.h @@ -0,0 +1,71 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4ProcessMCMap +// --------------------- +// Singleton map container for associated pairs +// of G4 process name and AliMCProcess code. + +#ifndef TG4_PROCESS_MC_MAP_H +#define TG4_PROCESS_MC_MAP_H + +#include +#include + +#include +#include "AliMCProcess.h" + +class G4VProcess; + +class TG4ProcessMCMap +{ + typedef G4std::map > Map; + typedef Map::iterator MapIterator; + typedef Map::const_iterator MapConstIterator; + + public: + TG4ProcessMCMap(); + // --> protected + // TG4ProcessMCMap(const TG4ProcessMCMap& right); + virtual ~TG4ProcessMCMap(); + + // static access method + static TG4ProcessMCMap* Instance(); + + // methods + G4bool Add(G4VProcess* process, AliMCProcess second); + G4bool Add(G4String processName, AliMCProcess second); + void PrintAll() const; + void Clear(); + + // get methods + AliMCProcess GetMCProcess(const G4VProcess* process); + AliMCProcess GetMCProcess(const G4String& processName); + G4String GetMCProcessName(const G4VProcess* process); + G4String GetMCProcessName(const G4String& processName); + + protected: + TG4ProcessMCMap(const TG4ProcessMCMap& right); + + // operators + TG4ProcessMCMap& operator=(const TG4ProcessMCMap& right); + + private: + // methods + G4bool IsDefined(const G4String& processName); + + // static data members + static TG4ProcessMCMap* fgInstance; //this instance + + // data members + Map fMap; //map container +}; + +// inline methods + +inline TG4ProcessMCMap* TG4ProcessMCMap::Instance() +{ return fgInstance; } + +#endif //TG4_PROCESS_MC_MAP_H diff --git a/TGeant4/TG4SpecialCutsForChargedHadron.cxx b/TGeant4/TG4SpecialCutsForChargedHadron.cxx new file mode 100644 index 00000000000..e723a0162a4 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForChargedHadron.cxx @@ -0,0 +1,42 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForChargedHadron +// ------------------------------------ +// See the class description in the header file. + +#include "TG4SpecialCutsForChargedHadron.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForChargedHadron::TG4SpecialCutsForChargedHadron( + const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForChargedHadron::TG4SpecialCutsForChargedHadron() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForChargedHadron::~TG4SpecialCutsForChargedHadron() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForChargedHadron::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForChargedHadron(track); +} + diff --git a/TGeant4/TG4SpecialCutsForChargedHadron.h b/TGeant4/TG4SpecialCutsForChargedHadron.h new file mode 100644 index 00000000000..922eb333717 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForChargedHadron.h @@ -0,0 +1,40 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForChargedHadron +// ------------------------------------ +// Special process that activates kinetic energy cuts +// for charged hadrons. + +#ifndef TG4_SPECIAL_CUTS_FOR_CHARGED_HADRON_H +#define TG4_SPECIAL_CUTS_FOR_CHARGED_HADRON_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForChargedHadron: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForChargedHadron(const G4String& processName + = "specialCutForChHadron"); + // --> protected + // TG4SpecialCutsForChargedHadron(); + virtual ~TG4SpecialCutsForChargedHadron(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForChargedHadron(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_CHARGED_HADRON_H + + + diff --git a/TGeant4/TG4SpecialCutsForElectron.cxx b/TGeant4/TG4SpecialCutsForElectron.cxx new file mode 100644 index 00000000000..5355c72a6ed --- /dev/null +++ b/TGeant4/TG4SpecialCutsForElectron.cxx @@ -0,0 +1,42 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForElectron +// ------------------------------- +// See the class description in the header file. + +#include "TG4SpecialCutsForElectron.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForElectron::TG4SpecialCutsForElectron( + const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForElectron::TG4SpecialCutsForElectron() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForElectron::~TG4SpecialCutsForElectron() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForElectron::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForElectron(track); +} + diff --git a/TGeant4/TG4SpecialCutsForElectron.h b/TGeant4/TG4SpecialCutsForElectron.h new file mode 100644 index 00000000000..a341b6de643 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForElectron.h @@ -0,0 +1,40 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForElectron +// ------------------------------- +// Special process that activates kinetic energy cuts +// for e-. + +#ifndef TG4_SPECIAL_CUTS_FOR_ELECTRON_H +#define TG4_SPECIAL_CUTS_FOR_ELECTRON_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForElectron: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForElectron(const G4String& processName + = "specialCutForElectron"); + // --> protected + // TG4SpecialCutsForElectron(); + virtual ~TG4SpecialCutsForElectron(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForElectron(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_ELECTRON_H + + + diff --git a/TGeant4/TG4SpecialCutsForEplus.cxx b/TGeant4/TG4SpecialCutsForEplus.cxx new file mode 100644 index 00000000000..4ccc7aa24a1 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForEplus.cxx @@ -0,0 +1,41 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForEplus +// ---------------------------- +// See the class description in the header file. + +#include "TG4SpecialCutsForEplus.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForEplus::TG4SpecialCutsForEplus(const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForEplus::TG4SpecialCutsForEplus() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForEplus::~TG4SpecialCutsForEplus() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForEplus::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForEplus(track); +} + diff --git a/TGeant4/TG4SpecialCutsForEplus.h b/TGeant4/TG4SpecialCutsForEplus.h new file mode 100644 index 00000000000..38bc307d537 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForEplus.h @@ -0,0 +1,39 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForEplus +// ---------------------------- +// Special process that activates kinetic energy cuts +// for e+. + +#ifndef TG4_SPECIAL_CUTS_FOR_EPLUS_H +#define TG4_SPECIAL_CUTS_FOR_EPLUS_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForEplus: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForEplus(const G4String& processName = "specialCutForEplus"); + // --> protected + // TG4SpecialCutsForEplus(); + virtual ~TG4SpecialCutsForEplus(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForEplus(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_EPLUS_H + + + diff --git a/TGeant4/TG4SpecialCutsForGamma.cxx b/TGeant4/TG4SpecialCutsForGamma.cxx new file mode 100644 index 00000000000..ff9ffca2251 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForGamma.cxx @@ -0,0 +1,37 @@ +// $Id$ +// Category: physics +// +// See the class description in the header file. + +#include "TG4SpecialCutsForGamma.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForGamma::TG4SpecialCutsForGamma(const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForGamma::TG4SpecialCutsForGamma() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForGamma::~TG4SpecialCutsForGamma() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForGamma::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForGamma(track); +} + diff --git a/TGeant4/TG4SpecialCutsForGamma.h b/TGeant4/TG4SpecialCutsForGamma.h new file mode 100644 index 00000000000..8b3c7508b14 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForGamma.h @@ -0,0 +1,39 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForGamma +// ---------------------------- +// Special process that activates kinetic energy cuts +// for gamma. + +#ifndef TG4_SPECIAL_CUTS_FOR_GAMMA_H +#define TG4_SPECIAL_CUTS_FOR_GAMMA_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForGamma: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForGamma(const G4String& processName = "specialCutForGamma"); + // --> protected + // TG4SpecialCutsForGamma(); + virtual ~TG4SpecialCutsForGamma(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForGamma(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_GAMMA_H + + + diff --git a/TGeant4/TG4SpecialCutsForMuon.cxx b/TGeant4/TG4SpecialCutsForMuon.cxx new file mode 100644 index 00000000000..dd4072fd3db --- /dev/null +++ b/TGeant4/TG4SpecialCutsForMuon.cxx @@ -0,0 +1,41 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForMuon +// --------------------------- +// See the class description in the header file. + +#include "TG4SpecialCutsForMuon.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForMuon::TG4SpecialCutsForMuon(const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForMuon::TG4SpecialCutsForMuon() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForMuon::~TG4SpecialCutsForMuon() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForMuon::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForMuon(track); +} + diff --git a/TGeant4/TG4SpecialCutsForMuon.h b/TGeant4/TG4SpecialCutsForMuon.h new file mode 100644 index 00000000000..429caffffca --- /dev/null +++ b/TGeant4/TG4SpecialCutsForMuon.h @@ -0,0 +1,39 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForMuon +// --------------------------- +// Special process that activates kinetic energy cuts +// for muon. + +#ifndef TG4_SPECIAL_CUTS_FOR_MUON_H +#define TG4_SPECIAL_CUTS_FOR_MUON_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForMuon: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForMuon(const G4String& processName = "specialCutForMuon"); + // --> protected + // TG4SpecialCutsForMuon(); + virtual ~TG4SpecialCutsForMuon(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForMuon(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_MUON_H + + + diff --git a/TGeant4/TG4SpecialCutsForNeutralHadron.cxx b/TGeant4/TG4SpecialCutsForNeutralHadron.cxx new file mode 100644 index 00000000000..edc4f0e1f2c --- /dev/null +++ b/TGeant4/TG4SpecialCutsForNeutralHadron.cxx @@ -0,0 +1,42 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForNeutralHadron +// ------------------------------------ +// See the class description in the header file. + +#include "TG4SpecialCutsForNeutralHadron.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForNeutralHadron::TG4SpecialCutsForNeutralHadron( + const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForNeutralHadron::TG4SpecialCutsForNeutralHadron() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForNeutralHadron::~TG4SpecialCutsForNeutralHadron() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForNeutralHadron::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForNeutralHadron(track); +} + diff --git a/TGeant4/TG4SpecialCutsForNeutralHadron.h b/TGeant4/TG4SpecialCutsForNeutralHadron.h new file mode 100644 index 00000000000..b55956379ff --- /dev/null +++ b/TGeant4/TG4SpecialCutsForNeutralHadron.h @@ -0,0 +1,40 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForNeutralHadron +// ------------------------------------ +// Special process that activates kinetic energy cuts +// for neutral hadrons. + +#ifndef TG4_SPECIAL_CUTS_FOR_NEUTRAL_HADRON_H +#define TG4_SPECIAL_CUTS_FOR_NEUTRAL_HADRON_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForNeutralHadron: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForNeutralHadron(const G4String& processName + = "specialCutForNeuHadron"); + // --> protected + // TG4SpecialCutsForNeutralHadron(); + virtual ~TG4SpecialCutsForNeutralHadron(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForNeutralHadron(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_NEUTRAL_HADRON_H + + + diff --git a/TGeant4/TG4SpecialCutsForOther.cxx b/TGeant4/TG4SpecialCutsForOther.cxx new file mode 100644 index 00000000000..be7a8740098 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForOther.cxx @@ -0,0 +1,41 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForOther +// ---------------------------- +// See the class description in the header file. + +#include "TG4SpecialCutsForOther.h" +#include "TG4Limits.h" + + +//_____________________________________________________________________________ +TG4SpecialCutsForOther::TG4SpecialCutsForOther(const G4String& processName) + : TG4VSpecialCuts(processName) { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForOther::TG4SpecialCutsForOther() { +// +} + +//_____________________________________________________________________________ +TG4SpecialCutsForOther::~TG4SpecialCutsForOther() { +// +} + +// public methods + +//_____________________________________________________________________________ +G4double TG4SpecialCutsForOther::GetMinEkine(const TG4Limits& limits, + const G4Track& track) const +{ +// Returns the min kinetic energy cut from limits. +// --- + + return limits.GetMinEkineForOther(track); +} + diff --git a/TGeant4/TG4SpecialCutsForOther.h b/TGeant4/TG4SpecialCutsForOther.h new file mode 100644 index 00000000000..97502493760 --- /dev/null +++ b/TGeant4/TG4SpecialCutsForOther.h @@ -0,0 +1,39 @@ +// $Id$ +// Category: physics +// +// Author: I. Hrivnacova +// +// Class TG4SpecialCutsForOther +// ---------------------------- +// Special process that activates the kinetic energy cuts +// for other (than specified in TParticleWSP) particles. + +#ifndef TG4_SPECIAL_CUTS_FOR_OTHER_H +#define TG4_SPECIAL_CUTS_FOR_OTHER_H + +#include "TG4VSpecialCuts.h" + +class TG4Limits; + +class G4Track; + +class TG4SpecialCutsForOther: public TG4VSpecialCuts +{ + public: + TG4SpecialCutsForOther(const G4String& processName = "specialCutForOther"); + // --> protected + // TG4SpecialCutsForOther(); + virtual ~TG4SpecialCutsForOther(); + + // methods + virtual G4double GetMinEkine(const TG4Limits& limits, + const G4Track& track) const; + + protected: + TG4SpecialCutsForOther(); +}; + +#endif //TG4_SPECIAL_CUTS_FOR_OTHER_H + + + -- 2.43.0