CMS 3D CMS Logo

RHStopTracer.h
Go to the documentation of this file.
1 #ifndef SimG4Core_RHStopTracer_H
2 #define SimG4Core_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 {
24  public:
26  ~RHStopTracer() override;
27  void update(const BeginOfRun *) override;
28  void update(const BeginOfEvent *) override;
29  void update(const BeginOfTrack *) override;
30  void update(const EndOfTrack *) override;
31  void produce(edm::Event&, const edm::EventSetup&) override;
32  private:
33  struct StopPoint {
34  StopPoint (const std::string& fName, double fX, double fY, double fZ, double fT, int fId, double fMass, double fCharge)
35  : name(fName), x(fX), y(fY), z(fZ), t(fT), id(fId), mass(fMass), charge(fCharge)
36  {}
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:46
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:49
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