Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:30:24

0001 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0002 #include "SimG4Core/Notification/interface/Observer.h"
0003 #include "SimG4Core/Watcher/interface/SimWatcher.h"
0004 
0005 #include "G4ThreeVector.hh"
0006 #include "globals.hh"
0007 #include <TFile.h>
0008 #include <TH1F.h>
0009 #include <TH2F.h>
0010 #include <TProfile.h>
0011 #include <TTree.h>
0012 #include <string>
0013 
0014 //
0015 // class decleration
0016 //
0017 
0018 class BeginOfEvent;
0019 class EndOfEvent;
0020 class G4Step;
0021 
0022 class GflashG4Watcher : public SimWatcher,
0023                         public Observer<const BeginOfEvent *>,
0024                         public Observer<const EndOfEvent *>,
0025                         public Observer<const G4Step *> {
0026 public:
0027   GflashG4Watcher(const edm::ParameterSet &p);
0028   ~GflashG4Watcher() override;
0029 
0030 private:
0031   G4bool inc_flag;
0032   G4double inc_energy;
0033   G4double out_energy;
0034   G4ThreeVector inc_vertex;
0035   G4ThreeVector inc_direction;
0036   G4ThreeVector inc_position;
0037 
0038   void update(const BeginOfEvent *) override;
0039   void update(const EndOfEvent *) override;
0040   void update(const G4Step *) override;
0041 
0042   // histograms for GflashG4Watcher
0043 
0044   std::string histFileName_;
0045   double recoEnergyScaleEB_;
0046   double recoEnergyScaleEE_;
0047 
0048   TFile *histFile_;
0049 
0050   TH1F *em_incE;
0051   TH1F *em_vtx_rho;
0052   TH1F *em_vtx_z;
0053 
0054   TH1F *eb_ssp_rho;
0055   TH1F *eb_hit_long;
0056   TH1F *eb_hit_lat;
0057   TH2F *eb_hit_rz;
0058   TH1F *eb_hit_long_sd;
0059   TH1F *eb_hit_lat_sd;
0060   TH2F *eb_hit_rz_sd;
0061 
0062   TH1F *ee_ssp_z;
0063   TH1F *ee_hit_long;
0064   TH1F *ee_hit_lat;
0065   TH2F *ee_hit_rz;
0066   TH1F *ee_hit_long_sd;
0067   TH1F *ee_hit_lat_sd;
0068   TH2F *ee_hit_rz_sd;
0069 };