test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SteppingAction.h
Go to the documentation of this file.
1 #ifndef SimG4Core_SteppingAction_H
2 #define SimG4Core_SteppingAction_H
3 
6 
7 #include "G4LogicalVolume.hh"
8 #include "G4Region.hh"
9 #include "G4UserSteppingAction.hh"
10 #include "G4VPhysicalVolume.hh"
11 #include "G4Track.hh"
12 
13 #include <string>
14 #include <vector>
15 
16 class EventAction;
17 class G4VTouchable;
18 //class G4Track;
19 
20 class SteppingAction: public G4UserSteppingAction {
21 
22 public:
24  virtual ~SteppingAction();
25 
26  virtual void UserSteppingAction(const G4Step * aStep);
27 
29 
30 private:
31 
32  bool initPointer();
33 
34  bool killInsideDeadRegion(G4Track * theTrack, const G4Region* reg) const;
35  bool catchLongLived(G4Track* theTrack, const G4Region* reg) const;
36  bool killLowEnergy(const G4Step * aStep) const;
37 
38  bool isThisVolume(const G4VTouchable* touch, G4VPhysicalVolume* pv) const;
39  void PrintKilledTrack(const G4Track*, const std::string&) const;
40 
41 private:
42 
44  G4VPhysicalVolume *tracker, *calo;
47  double maxTrackTime;
48  std::vector<double> maxTrackTimes, ekinMins;
49  std::vector<std::string> maxTimeNames, ekinNames, ekinParticles;
50  std::vector<std::string> deadRegionNames;
51  std::vector<const G4Region*> maxTimeRegions;
52  std::vector<const G4Region*> deadRegions;
53  std::vector<G4LogicalVolume*> ekinVolumes;
54  std::vector<int> ekinPDG;
55  unsigned int numberTimes;
56  unsigned int numberEkins;
57  unsigned int numberPart;
58  unsigned int ndeadRegions;
59 
62 
63 };
64 
65 #endif
virtual ~SteppingAction()
bool killInsideDeadRegion(G4Track *theTrack, const G4Region *reg) const
std::vector< int > ekinPDG
std::vector< const G4Region * > deadRegions
bool killLowEnergy(const G4Step *aStep) const
double theCriticalDensity
SimActivityRegistry::G4StepSignal m_g4StepSignal
G4VPhysicalVolume * calo
unsigned int numberPart
unsigned int numberEkins
virtual void UserSteppingAction(const G4Step *aStep)
std::vector< std::string > deadRegionNames
unsigned int numberTimes
std::vector< double > maxTrackTimes
SteppingAction(EventAction *ea, const edm::ParameterSet &ps)
std::vector< G4LogicalVolume * > ekinVolumes
double theCriticalEnergyForVacuum
EventAction * eventAction_
std::vector< double > ekinMins
bool isThisVolume(const G4VTouchable *touch, G4VPhysicalVolume *pv) const
std::vector< std::string > maxTimeNames
std::vector< std::string > ekinNames
void PrintKilledTrack(const G4Track *, const std::string &) const
G4VPhysicalVolume * tracker
unsigned int ndeadRegions
bool catchLongLived(G4Track *theTrack, const G4Region *reg) const
std::vector< std::string > ekinParticles
std::vector< const G4Region * > maxTimeRegions