Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-12-06 04:01:05

0001 #ifndef SimG4CMS_HFGflash_h
0002 #define SimG4CMS_HFGflash_h
0003 
0004 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0005 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0006 
0007 #include "SimGeneral/GFlash/interface/GflashEMShowerProfile.h"
0008 #include "SimGeneral/GFlash/interface/GflashTrajectory.h"
0009 #include "SimGeneral/GFlash/interface/GflashNameSpace.h"
0010 
0011 #include "G4VFastSimulationModel.hh"
0012 #include "G4ParticleTable.hh"
0013 #include "G4ThreeVector.hh"
0014 #include "G4FastTrack.hh"
0015 #include "G4TouchableHandle.hh"
0016 #include "G4Navigator.hh"
0017 
0018 #include <memory>
0019 #include <string>
0020 #include <vector>
0021 
0022 #include <TFile.h>
0023 #include <TTree.h>
0024 #include <TH1F.h>
0025 #include <TH2F.h>
0026 #include <TProfile.h>
0027 
0028 class G4Step;
0029 
0030 class HFGflash {
0031 public:
0032   HFGflash(edm::ParameterSet const &p);
0033   virtual ~HFGflash();
0034 
0035   struct Hit {
0036     Hit() {}
0037     G4ThreeVector position;
0038     int depth = 0;
0039     double time = 0.;
0040     double edep = 0.;
0041     double pez = 0.;
0042   };
0043 
0044   std::vector<Hit> gfParameterization(const G4Step *aStep, bool onlyLong = false);
0045 
0046 private:
0047   std::unique_ptr<GflashTrajectory> theHelix;
0048   std::unique_ptr<G4Step> theGflashStep;
0049   std::unique_ptr<G4Navigator> theGflashNavigator;
0050   std::unique_ptr<G4TouchableHistory> theGflashTouchableHandle;
0051 
0052   Gflash::CalorimeterNumber jCalorimeter;
0053 
0054   bool theWatcherOn;
0055   bool theFillHisto;
0056   G4double theBField;
0057 
0058   G4int showerType;
0059   G4double energyToDeposit;
0060   G4double energyScale[Gflash::kNumberCalorimeter];
0061   G4double longHcal[Gflash::NPar];
0062   G4double longEcal[Gflash::NPar];
0063   G4double lateralPar[4];
0064 
0065   TH1F *em_incE, *em_ssp_rho, *em_ssp_z, *em_long, *em_lateral;
0066   TH1F *em_long_sd, *em_lateral_sd, *em_nSpots_sd, *em_ze_ratio;
0067   TH2F *em_2d, *em_2d_sd, *em_ze, *em_ratio, *em_ratio_selected;
0068 };
0069 
0070 #endif  // HFGflash_h