CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RHStopTracer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_CustomPhysics_RHStopTracer_H
2 #define SimG4Core_CustomPhysics_RHStopTracer_H
3 
5 
8 
9 #include <regex>
10 
11 class BeginOfRun;
12 class BeginOfEvent;
13 class BeginOfTrack;
14 class EndOfTrack;
15 class G4Step;
16 class G4ParticleDefinition;
17 
18 class RHStopTracer : public SimProducer,
19  public Observer<const BeginOfRun *>,
20  public Observer<const BeginOfEvent *>,
21  public Observer<const BeginOfTrack *>,
22  public Observer<const EndOfTrack *> {
23 public:
25  ~RHStopTracer() override;
26  void update(const BeginOfRun *) override;
27  void update(const BeginOfEvent *) override;
28  void update(const BeginOfTrack *) override;
29  void update(const EndOfTrack *) override;
30  void produce(edm::Event &, const edm::EventSetup &) override;
31 
32 private:
33  struct StopPoint {
35  const std::string &fName, double fX, double fY, double fZ, double fT, int fId, double fMass, double fCharge)
36  : name(fName), x(fX), y(fY), z(fZ), t(fT), id(fId), mass(fMass), charge(fCharge) {}
38  double x;
39  double y;
40  double z;
41  double t;
42  int id;
43  double mass;
44  double charge;
45  };
47  double mTraceEnergy;
48  int minPdgId;
49  int maxPdgId;
52  std::regex rePartName;
53  std::vector<StopPoint> mStopPoints;
54 };
55 
56 #endif
~RHStopTracer() override
Definition: RHStopTracer.cc:44
StopPoint(const std::string &fName, double fX, double fY, double fZ, double fT, int fId, double fMass, double fCharge)
Definition: RHStopTracer.h:34
void produce(edm::Event &, const edm::EventSetup &) override
void update(const BeginOfRun *) override
This routine will be called when the appropriate signal arrives.
Definition: RHStopTracer.cc:46
double mTraceEnergy
Definition: RHStopTracer.h:47
std::string mTraceParticleName
Definition: RHStopTracer.h:51
RHStopTracer(edm::ParameterSet const &p)
Definition: RHStopTracer.cc:20
bool mStopRegular
Definition: RHStopTracer.h:46
std::regex rePartName
Definition: RHStopTracer.h:52
std::vector< StopPoint > mStopPoints
Definition: RHStopTracer.h:53