Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-05 11:15:04

0001 #ifndef SimG4CMS_ZdcShowerLibrary_h
0002 #define SimG4CMS_ZdcShowerLibrary_h 1
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: ZdcShowerLibrary.h
0005 // Description: Gets information from a shower library
0006 // E. Garcia June 2008
0007 ///////////////////////////////////////////////////////////////////////////////
0008 
0009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0010 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0011 #include "Geometry/ForwardGeometry/interface/ZdcHardcodeGeometryData.h"
0012 
0013 #include "G4ParticleTable.hh"
0014 #include "G4ThreeVector.hh"
0015 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
0016 
0017 #include <string>
0018 #include <memory>
0019 
0020 class G4Step;
0021 class ZdcShowerLibrary {
0022 public:
0023   //Constructor and Destructor
0024   ZdcShowerLibrary(const std::string& name, edm::ParameterSet const& p);
0025   ~ZdcShowerLibrary();
0026 
0027 public:
0028   struct Hit {
0029     Hit() {}
0030     G4ThreeVector entryLocal;
0031     G4ThreeVector position;
0032     int depth;
0033     double time;
0034     int detID;
0035     double DeHad;
0036     double DeEM;
0037   };
0038 
0039   std::vector<Hit>& getHits(const G4Step* aStep, bool& ok);
0040   int getEnergyFromLibrary(const G4ThreeVector& posHit,
0041                            const G4ThreeVector& momDir,
0042                            double energy,
0043                            G4int parCode,
0044                            HcalZDCDetId::Section section,
0045                            bool side,
0046                            int channel);
0047   int photonFluctuation(double eav, double esig, double edis);
0048 
0049 private:
0050   bool verbose;
0051 
0052   int npe;
0053   std::vector<ZdcShowerLibrary::Hit> hits;
0054 };
0055 #endif