CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/SimG4CMS/Forward/interface/ZdcShowerLibrary.h

Go to the documentation of this file.
00001 #ifndef SimG4CMS_ZdcShowerLibrary_h
00002 #define SimG4CMS_ZdcShowerLibrary_h 1
00003 
00004 // File: ZdcShowerLibrary.h
00005 // Description: Gets information from a shower library
00006 // E. Garcia June 2008
00008 
00009 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00010 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00011 #include "Geometry/ForwardGeometry/src/ZdcHardcodeGeometryData.h"
00012 
00013 #include "G4ParticleTable.hh"
00014 #include "G4ThreeVector.hh"
00015 #include "DetectorDescription/Core/interface/DDsvalues.h"
00016 #include "DataFormats/HcalDetId/interface/HcalZDCDetId.h"
00017  
00018 #include <string>
00019 #include <memory>
00020 
00021 class G4Step;
00022 class DDCompactView;    
00023 class ZdcShowerLibrary {
00024 
00025 public:
00026   
00027   //Constructor and Destructor
00028   ZdcShowerLibrary(std::string & name, const DDCompactView & cpv, edm::ParameterSet const & p);
00029   ~ZdcShowerLibrary();
00030   
00031  public:
00032   
00033   struct Hit {
00034     Hit() {}
00035     G4ThreeVector             entryLocal;
00036     G4ThreeVector             position;
00037     int                       depth;
00038     double                    time;
00039     int                       detID;
00040     double                    DeHad;
00041     double                    DeEM;
00042   };
00043 
00044 
00045   void                        initRun(G4ParticleTable * theParticleTable);
00046   std::vector<Hit>&           getHits(G4Step * aStep, bool & ok);
00047   int                         getEnergyFromLibrary(G4ThreeVector posHit, G4ThreeVector momDir, double energy,
00048                                                    G4int parCode,HcalZDCDetId::Section section, bool side, int channel);
00049   int                         photonFluctuation(double eav, double esig,double edis);
00050   int                         encodePartID(G4int parCode);
00051   
00052  protected:
00053 
00054 private:
00055 
00056   bool                        verbose;
00057   G4int                         emPDG, epPDG, gammaPDG;
00058   G4int                         pi0PDG, etaPDG, nuePDG, numuPDG, nutauPDG;
00059   G4int                         anuePDG, anumuPDG, anutauPDG, geantinoPDG;
00060 
00061   int                         npe;
00062   std::vector<ZdcShowerLibrary::Hit> hits;
00063   
00064 };
00065 #endif