Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-08-09 22:38:41

0001 #ifndef SimG4Core_DBremWatcher_H
0002 #define SimG4Core_DBremWatcher_H
0003 
0004 #include "SimG4Core/Notification/interface/Observer.h"
0005 #include "SimG4Core/Notification/interface/BeginOfTrack.h"
0006 #include "SimG4Core/Notification/interface/EndOfTrack.h"
0007 #include "SimG4Core/Notification/interface/BeginOfEvent.h"
0008 #include "SimG4Core/Notification/interface/BeginOfRun.h"
0009 #include "SimG4Core/Notification/interface/EndOfEvent.h"
0010 #include "SimG4Core/Watcher/interface/SimProducer.h"
0011 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0012 #include "G4ThreeVector.hh"
0013 
0014 #include <vector>
0015 #include <tuple>
0016 
0017 class DBremWatcher : public SimProducer,
0018                      public Observer<const BeginOfTrack *>,
0019                      public Observer<const BeginOfEvent *>,
0020                      public Observer<const BeginOfRun *>,
0021                      public Observer<const EndOfEvent *>,
0022                      public Observer<const EndOfTrack *> {
0023 public:
0024   DBremWatcher(edm::ParameterSet const &p);
0025   ~DBremWatcher() override;
0026   void update(const BeginOfTrack *trk) override;
0027   void update(const BeginOfEvent *event) override;
0028   void update(const EndOfEvent *event) override;
0029   void update(const BeginOfRun *run) override;
0030   void update(const EndOfTrack *trk) override;
0031   void produce(edm::Event &, const edm::EventSetup &) override;
0032 
0033 private:
0034   std::vector<int> pdgs_;
0035   int MotherId;
0036   float m_weight;
0037   double biasFactor;
0038   bool foundbrem;
0039   G4ThreeVector aPrimeTraj;
0040   G4ThreeVector finaltraj;
0041   G4ThreeVector VertexPos;
0042   float f_energy;
0043 };
0044 
0045 #endif