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 class BeginOfRun;
10 class BeginOfEvent;
11 class BeginOfTrack;
12 class EndOfTrack;
13 class G4Step;
14 class G4ParticleDefinition;
15 
16 class RHStopTracer : public SimProducer,
17  public Observer<const BeginOfRun *>,
18  public Observer<const BeginOfEvent *>,
19  public Observer<const BeginOfTrack *>,
20  public Observer<const EndOfTrack *>
21 {
22  public:
24  virtual ~RHStopTracer();
25  void update(const BeginOfRun *);
26  void update(const BeginOfEvent *);
27  void update(const BeginOfTrack *);
28  void update(const EndOfTrack *);
29  void produce(edm::Event&, const edm::EventSetup&);
30  private:
31  struct StopPoint {
32  StopPoint (const std::string& fName, double fX, double fY, double fZ, double fT, int fId, double fMass, double fCharge)
33  : name(fName), x(fX), y(fY), z(fZ), t(fT), id(fId), mass(fMass), charge(fCharge)
34  {}
36  double x;
37  double y;
38  double z;
39  double t;
40  int id;
41  double mass;
42  double charge;
43  };
45  double mTraceEnergy;
47  const G4ParticleDefinition* mParticle;
48  std::vector <StopPoint> mStopPoints;
49 };
50 
51 #endif
void update(const BeginOfRun *)
This routine will be called when the appropriate signal arrives.
Definition: RHStopTracer.cc:45
const G4ParticleDefinition * mParticle
Definition: RHStopTracer.h:47
StopPoint(const std::string &fName, double fX, double fY, double fZ, double fT, int fId, double fMass, double fCharge)
Definition: RHStopTracer.h:32
virtual ~RHStopTracer()
Definition: RHStopTracer.cc:42
double mTraceEnergy
Definition: RHStopTracer.h:45
std::string mTraceParticleName
Definition: RHStopTracer.h:46
RHStopTracer(edm::ParameterSet const &p)
Definition: RHStopTracer.cc:20
void produce(edm::Event &, const edm::EventSetup &)
Definition: RHStopTracer.cc:99
bool mStopRegular
Definition: RHStopTracer.h:44
std::vector< StopPoint > mStopPoints
Definition: RHStopTracer.h:48