CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StackingAction.h
Go to the documentation of this file.
1 #ifndef SimG4Core_StackingAction_H
2 #define SimG4Core_StackingAction_H
3 
5 
6 #include "G4UserStackingAction.hh"
7 #include "G4Region.hh"
8 #include "G4Track.hh"
9 #include "G4LogicalVolume.hh"
10 
11 #include <string>
12 #include <vector>
13 
14 class StackingAction : public G4UserStackingAction {
15 
16 public:
18  virtual ~StackingAction();
19  virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track * aTrack);
20  virtual void NewStage();
21  virtual void PrepareNewEvent();
22 private:
23  void initPointer();
24  bool isThisVolume(const G4VTouchable*, std::vector<G4LogicalVolume*>&) const;
25  int isItPrimaryDecayProductOrConversion(const G4Track*, const G4Track &) const;
26  int isItFromPrimary(const G4Track &, int) const;
27  bool isItLongLived(const G4Track*) const;
28 private:
33  double maxTrackTime;
34  std::vector<double> maxTrackTimes;
35  std::vector<std::string> maxTimeNames;
36  std::vector<G4Region*> maxTimeRegions;
37  std::vector<G4LogicalVolume*> tracker, calo, muon;
38 };
39 
40 #endif
std::vector< G4LogicalVolume * > tracker
std::vector< G4Region * > maxTimeRegions
std::vector< double > maxTrackTimes
int isItPrimaryDecayProductOrConversion(const G4Track *, const G4Track &) const
virtual ~StackingAction()
virtual G4ClassificationOfNewTrack ClassifyNewTrack(const G4Track *aTrack)
StackingAction(const edm::ParameterSet &ps)
std::vector< std::string > maxTimeNames
virtual void PrepareNewEvent()
std::vector< G4LogicalVolume * > calo
bool savePDandCinTracker
std::vector< G4LogicalVolume * > muon
bool isThisVolume(const G4VTouchable *, std::vector< G4LogicalVolume * > &) const
virtual void NewStage()
int isItFromPrimary(const G4Track &, int) const
bool isItLongLived(const G4Track *) const