Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-08-07 02:12:53

0001 #ifndef SimG4CMS_HFShower_h
0002 #define SimG4CMS_HFShower_h
0003 ///////////////////////////////////////////////////////////////////////////////
0004 // File: HFShower.h
0005 // Description: Generates hits for HF with Cerenkov photon code
0006 ///////////////////////////////////////////////////////////////////////////////
0007 
0008 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0009 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0010 #include "Geometry/HcalCommonData/interface/HcalDDDSimConstants.h"
0011 #include "CondFormats/GeometryObjects/interface/HcalSimulationParameters.h"
0012 #include "SimG4CMS/Calo/interface/HFCherenkov.h"
0013 #include "SimG4CMS/Calo/interface/HFFibre.h"
0014 
0015 #include "G4ThreeVector.hh"
0016 #include "G4String.hh"
0017 
0018 class G4Step;
0019 
0020 #include <vector>
0021 
0022 class HFShower {
0023 public:
0024   HFShower(const std::string &name,
0025            const HcalDDDSimConstants *hcons,
0026            const HcalSimulationParameters *hps,
0027            edm::ParameterSet const &p,
0028            int chk = 0);
0029   virtual ~HFShower();
0030 
0031 public:
0032   struct Hit {
0033     Hit() {}
0034     int depth;
0035     double time;
0036     double wavelength;
0037     double momentum;
0038     G4ThreeVector position;
0039   };
0040 
0041   std::vector<Hit> getHits(const G4Step *aStep, double weight);
0042   std::vector<Hit> getHits(const G4Step *aStep, bool forLibrary);
0043   std::vector<Hit> getHits(const G4Step *aStep, bool forLibraryProducer, double zoffset);
0044 
0045 private:
0046   const HcalDDDSimConstants *hcalConstant_;
0047 
0048   std::unique_ptr<HFCherenkov> cherenkov_;
0049   std::unique_ptr<HFFibre> fibre_;
0050 
0051   int chkFibre_;
0052   bool applyFidCut_;
0053   bool equalizeTimeShift_;
0054   double probMax_;
0055   std::vector<double> gpar_;
0056 };
0057 
0058 #endif  // HFShower_h